WO2021012795A1 - Network node scheduling method and apparatus, electronic device and storage medium - Google Patents
Network node scheduling method and apparatus, electronic device and storage medium Download PDFInfo
- Publication number
- WO2021012795A1 WO2021012795A1 PCT/CN2020/093598 CN2020093598W WO2021012795A1 WO 2021012795 A1 WO2021012795 A1 WO 2021012795A1 CN 2020093598 W CN2020093598 W CN 2020093598W WO 2021012795 A1 WO2021012795 A1 WO 2021012795A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network node
- service
- microservice
- service request
- current
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1021—Server selection for load balancing based on client or server locations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
Definitions
- This application relates to the technical field of data processing, in particular to the scheduling method, device, electronic equipment and storage medium of network nodes.
- Microservice architecture is a new technology for deploying applications and services in the cloud.
- each microservice can be deployed independently, and each microservice is loosely coupled.
- the server side When the server side needs to execute a business request initiated by the user terminal to execute the service corresponding to the microservice, the server generally needs to execute the service request through a certain network node used to execute the service corresponding to the microservice in the service request. There are many network nodes selected. Therefore, a reasonable selection of network nodes will affect the efficiency of the system to complete service requests.
- the inventor realizes that the server generally selects the network node used to execute the service corresponding to the microservice in the service request by random selection, so the optimal network node cannot be selected reasonably, which will lead to the efficiency of completing the service request Lower.
- this application provides a network node scheduling Methods, devices, electronic equipment and storage media.
- a method for scheduling network nodes includes: in response to a service request initiated by a user terminal requesting to execute a service corresponding to a microservice, obtaining a service request for executing a service corresponding to the microservice in the service request.
- the current load, current performance, and current distance from the user terminal of each network node based on the current load, current performance, and current distance from the user terminal of each network node, it is determined that each network node is performing the service
- the priority of the service corresponding to the microservice in the request determining the target network for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request node.
- a network node scheduling device includes: an obtaining unit, configured to respond to a request initiated by a user terminal to perform a service request corresponding to a microservice, and obtain a service request for performing the service request.
- the current load, current performance, and current distance from the user terminal of each network node corresponding to the microservice is configured to be based on the current load, current performance, and current distance from the user terminal of each network node Determine the priority of each network node in executing the service corresponding to the microservice in the service request; the second execution unit is configured to execute the service corresponding to the microservice in the service request based on each network node The priority determines the target network node used to execute the service corresponding to the microservice in the service request.
- an electronic device including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the aforementioned network The steps of the node scheduling method.
- a storage medium storing computer-readable instructions.
- the one or more processors execute the steps of the scheduling method of the network node. .
- the server determines the priority of each network node's microservice corresponding business in the execution of the service request based on the current load, current performance of each network node, and the current distance from the user terminal.
- the priority of the service corresponding to the microservice determines the target network node used to execute the service corresponding to the microservice in the service request, and then achieves better performance when selecting all network nodes that execute the service corresponding to the microservice in the service request to execute the service request.
- the network nodes that have poor performance in processing service requests are avoided, thereby improving the efficiency of completing service requests.
- Fig. 1 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application.
- Fig. 2 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application.
- Fig. 3 is a specific implementation flowchart of step S230 in a method for scheduling network nodes according to an exemplary embodiment of the present application.
- Fig. 4 is a specific implementation flowchart of step S120 in a method for scheduling a network node according to an exemplary embodiment of the present application.
- Fig. 5 is a block diagram of a method and apparatus for scheduling a network node according to an exemplary embodiment of the present application.
- Fig. 6 schematically shows an exemplary block diagram of an electronic device for implementing the foregoing method for scheduling network nodes.
- Fig. 7 schematically shows a computer-readable storage medium for implementing the foregoing method for scheduling network nodes.
- FIG. 1 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application.
- the execution subject of the network node scheduling method in this embodiment is an electronic device, and the electronic device may specifically be The server side that performs the management of all network nodes that perform service requests corresponding to microservices.
- the server side is used as an example for description.
- the scheduling method of network nodes as shown in FIG. 1 may include the following steps S110 to S130, which are described in detail as follows.
- Step S110 in response to a service request initiated by the user terminal to execute the service corresponding to the microservice, obtain the current load, current performance, and current load of each network node used to execute the service corresponding to the microservice in the service request. distance.
- the user terminal sends a service request for requesting the execution of a service corresponding to the microservice to the server, where the service request may be a data query request, which is of course not limited to this.
- the service request is also It can be a request to perform other services.
- the service request may be triggered by the user manually operating a physical button or virtual control provided by the terminal. It should be noted that the above service request carries geographic location information located by the user terminal.
- the server responds to the service request of the service corresponding to the microservice initiated by the user terminal, and needs to determine the target for executing the service corresponding to the microservice in the service request from all network nodes that execute the service corresponding to the microservice in the service request Network nodes, where each network node corresponds to a network device used to execute the service corresponding to the microservice in the service request.
- the server can directly obtain the current load of each network node and the current performance of each network node from the network equipment corresponding to each network node.
- the server side determines the current distance between each network node and the user terminal, it can obtain the geographic location information of the network node from the network device corresponding to the network node, and based on the geographic location information of the network node and the service request carried
- the geographic location information located by the user terminal determines the current distance between the network node and the user terminal.
- Step S120 Determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node.
- the current load of the network node may be the current network device corresponding to the network node.
- the number of service requests processed the more the number of service requests currently processed by the network device, the greater the current load of the network node.
- the current performance of the network node may be the current processor performance of the network device corresponding to the network node.
- the smaller the current distance between the node and the user terminal the better the effect of the network node in executing the service request, and the more suitable it is as the target network node for executing the service corresponding to the microservice in the service request, so the priority is higher.
- the server determines the priority of each network node's microservice corresponding business in the execution of the service request based on the three dimensional information of each network node's current load, current performance, and current distance from the user terminal.
- Step S130 Determine a target network node for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
- the server after determining the priority of each network node used to execute the service corresponding to the microservice in the service request, the server will determine the microservice used to execute the service request according to the priority.
- the target network node corresponding to the service is the server.
- FIG. 2 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application. As shown in FIG. 2, the method is based on each network node in the execution of the service request. The priority of the service corresponding to the service determines the target network node for executing the microservice corresponding service in the service request.
- the step S130 includes: step S230, determining the network node with the highest priority as the target network node for executing the service request The microservice corresponds to the target network node of the business.
- the server side may determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
- the server side can also randomly select a network node from all network nodes with a priority higher than a set threshold as the target network node for executing the service corresponding to the microservice in the service request.
- the server determines the priority of each network node in the execution of the microservice corresponding service in the service request based on the current load, current performance of each network node and the current distance from the user terminal.
- the priority of the service corresponding to the microservice in the execution of the service request is determined to determine the target network node used to execute the service corresponding to the microservice in the service request, and then all network nodes that execute the service corresponding to the microservice in the service request are selected to execute the service request.
- the network node with better performance at the time avoids selecting the network node with poor performance in processing service requests, thereby improving the efficiency of completing service requests.
- FIG. 3 is a specific implementation flowchart of step S230 in a network node scheduling method shown in an exemplary embodiment of the present application.
- the highest priority The step S230 of determining the network node as the target network node for executing the service corresponding to the microservice in the service request includes: step S2301, obtaining the current time of the network node with the highest priority from a preset log information database All logs generated when the microservice corresponding service in the service request is executed within a specific time period before the current time, wherein the log information in the log includes at least the network node with the highest priority executing the Response status information when the microservice in the service request corresponds to the business, where the response status information indicates that the network node with the highest priority responded successfully or the priority is the highest when executing the service corresponding to the microservice in the service request The network node of is not responding when executing the service corresponding to the microservice in the service request.
- the server side may first obtain the highest priority from the preset log information database. All logs generated when the network node of the network node executes the service corresponding to the microservice in the service request in the current time and a specific time period before the current time. Among them, all logs of the network node with the highest priority during the current time and a specific time period before the current time may be all logs within one week before the current time, which is not limited here.
- the preset log information database can be the log information database storing logs of the network device corresponding to the network node, and the log information in the log includes at least the network node with the highest priority when executing the service corresponding to the microservice in the service request.
- the above response status information is the information that the network node with the highest priority is responding successfully when executing the microservice corresponding service in the service request or the network node with the highest priority is executing the microservice corresponding service in the service request.
- the log information may also include the reason why the network node with the highest priority did not respond when executing the service corresponding to the microservice in the service request.
- Step S2302 Determine, based on the response status information in the log information, the response success rate of the microservice corresponding service in the service request executed by the network node with the highest priority in the current time and a specific time period before the current time.
- the server side obtains the response status information in the log information of all logs, and according to the response status information of all logs, the number of logs that respond successfully when executing the microservice corresponding business in the service request accounts for all
- the ratio of the number of logs determines the response success rate of the microservice corresponding service in the service request by the network node with the highest priority during the current time and the specific time period before the current time.
- Step S2303 if the response success rate of the microservice corresponding service in the service request executed by the network node with the highest priority in the current time and a specific time period before the current time is higher than a predetermined threshold, the network node with the highest priority will be selected
- the network node is determined as a target network node for executing the service corresponding to the microservice in the service request.
- the server can determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
- the server can execute the service Other network nodes with a lower probability of failure and higher priority when the microservice in the request corresponds to the service are determined as the target network node for executing the service corresponding to the microservice in the service request.
- FIG. 4 is a specific implementation flowchart of step S120 in a network node scheduling method shown in an exemplary embodiment of the present application.
- the method is based on each network node.
- the current load, current performance, and current distance from the user terminal to determine the priority of each network node in executing the service corresponding to the microservice in the service request S120 includes: step S1201, based on each network The current load of the node and the maximum load corresponding to each network node determine the first score.
- the server also obtains the maximum load of each network node from the device information of the network device corresponding to each network node, that is, the maximum number of service requests that the network device corresponding to the network node can process simultaneously value.
- the maximum load of the network node is smaller, the effect of the network node in executing service requests is better; it should be noted that when the maximum load of the network node is larger, the effect of the network node in executing service requests will be better.
- the terminal will determine the first score based on the current load of each network node and the maximum load corresponding to each network node.
- the server side determines the first score based on the current load of each network node and the maximum load corresponding to each network node, the first score may be specifically determined based on the following formula.
- ⁇ is a normal number greater than zero
- a 1 is the maximum load corresponding to each network node
- a 2 is the current load of each network node
- A is the server side based on the current load of each network node and each network node
- the first score determined by the corresponding maximum load.
- the server determines the first score based on the current load of each network node and the maximum load corresponding to each network node. The higher the corresponding first score, the better the network node performs the service request.
- Step S1202 Determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node.
- the server also obtains the optimal performance of each network node from the device information of the network device corresponding to each network node, that is, the optimal performance of the processor of the network device corresponding to the network node.
- the network node performs better in performing service requests; it should be noted that when the current performance of the network node is closer to the optimal performance of the network node, the network node is performing the service request The effect will be better; the server will determine the second score based on the current performance of each network node and the optimal performance corresponding to each network node.
- the server determines the second score based on the current performance of each network node and the optimal performance corresponding to each network node
- the second score may be specifically determined based on the following formula.
- ⁇ is a normal number greater than zero
- b 1 is the current performance of each network node
- b 2 is the optimal performance of each network node
- B is the server side based on the current performance of each network node and each network node The second score determined by the corresponding optimal performance.
- the server determines the second score based on the current performance of each network node and the optimal performance of each network node. The higher the corresponding second score, the better the network node performs the service request.
- Step S1203 Determine a third score based on the relationship table between the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value.
- the current distance between the network node and the user terminal will affect the effect of the network node in executing the service request.
- the server has pre-stored the relationship table of the current distance between the network node and the user terminal and the priority value, and the server side is based on the determined current distance between each network node and the user terminal, the current distance between the network node and the user terminal and the priority value.
- the server side determines the third score based on the current distance between each network node and the user terminal, and the relationship table between the current distance between the network node and the user terminal and the priority value. The higher the corresponding third score, the network node is executing the service request The effect is better.
- Step S1204 based on the first score, the second score, and the third score, determine the priority of each network node in executing the service corresponding to the microservice in the service request.
- the server side determines the priority of each network node in executing the service corresponding to the microservice in the service request based on the determined first score, second score, and third score.
- the server determines the priority of each network node in executing the service corresponding to the microservice in the service request. Specifically, it can be determined based on the following formula that each network node is The priority of the business corresponding to the microservice in the execution business request.
- A is the first score
- B is the second score
- C is the third score
- ⁇ , ⁇ , and ⁇ are normal numbers greater than zero
- S is the value of each network node in executing service requests
- the server determines the first score, second score, and third score determined by the three dimensional information of each network node's load, performance, and the current distance from the user terminal to determine the microservices of each network node in executing the service request
- the first score, the second score, and the third score are all positively correlated with the priority. When the first score, the second score, and the third score are larger, the priority is higher.
- FIG. 5 is a scheduling apparatus of a network node provided by an embodiment of the present application.
- the scheduling apparatus of the network node may be integrated into the above-mentioned electronic device, and may specifically include an obtaining unit 310 and a first execution unit 320. And the second execution unit 330.
- the obtaining unit 310 is configured to respond to a service request for executing a service corresponding to the microservice in response to a request initiated by a user terminal, and obtain the current load and current performance of each network node used to execute the service corresponding to the microservice in the service request. The current distance of the terminal.
- the first execution unit 320 is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node .
- the second execution unit 330 is configured to determine a target network node for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
- the second execution unit 330 includes: a first execution subunit, configured to determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
- the first execution subunit further includes: an acquisition module, configured to acquire the network node with the highest priority from a preset log information library to execute the execution in the current time and a specific time period before the current time All logs generated when the microservice in the service request corresponds to the service, wherein the log information in the log includes at least the log information of the network node with the highest priority when executing the service corresponding to the microservice in the service request Response status information, where the response status information is that the network node with the highest priority responds successfully when the microservice corresponding service in the service request is executed or the network node with the highest priority is executing the service request When the microservice corresponds to the business, it is not responding.
- an acquisition module configured to acquire the network node with the highest priority from a preset log information library to execute the execution in the current time and a specific time period before the current time All logs generated when the microservice in the service request corresponds to the service
- the log information in the log includes at least the log information of the network node with the highest priority when
- the first execution module is configured to determine, based on the response status information in the log information, that the network node with the highest priority executes the service corresponding to the microservice in the service request within the current time and a specific time period before the current time Response success rate.
- the second execution module is configured to: if the network node with the highest priority executes the microservice corresponding service in the service request within a specific time period before the current time and the response success rate is higher than a predetermined threshold, The network node with the highest priority is determined as the target network node for executing the service corresponding to the microservice in the service request.
- the first execution unit 320 includes: a second execution subunit, configured to determine the first score based on the current load of each network node and the maximum load corresponding to each network node.
- the third execution subunit is configured to determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node.
- the fourth execution subunit is configured to determine the third score based on the relationship table between the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value.
- the fifth execution subunit is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the first score, the second score, and the third score.
- the fifth execution subunit is specifically configured to determine the priority of each network node in executing the service corresponding to the microservice in the service request based on the following formula.
- A is the first score
- B is the second score
- C is the third score
- ⁇ , ⁇ , and ⁇ are normal numbers greater than zero
- S is the execution of each network node The priority of the microservice in the business request corresponding to the business.
- the second execution subunit is specifically configured to determine the first score based on the following formula.
- n is a normal number greater than zero
- a 1 is the maximum load corresponding to each network node
- a 2 is the current load of each network node
- A is the first score.
- the third execution subunit is specifically configured to determine the second score based on the following formula.
- ⁇ is a normal number greater than zero
- b 1 is the current performance of each network node
- b 2 is the optimal performance of each network node
- B is the second score
- modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
- the features and functions of two or more modules or units described above may be embodied in one module or unit.
- the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
- the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present disclosure.
- a computing device which may be a personal computer, a server, a mobile terminal, or a network device, etc.
- an electronic device capable of implementing the above method is also provided.
- FIG. 6 is an electronic device 400 according to this embodiment of the present application.
- the electronic device 400 shown in FIG. 6 is only an example, and should not bring any limitation to the function and use scope of the embodiments of the present application.
- the electronic device 400 takes the form of a general-purpose computing device.
- the components of the electronic device 400 may include but are not limited to: the aforementioned at least one processing unit 410, the aforementioned at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
- the storage unit stores program code, and the program code can be executed by the processing unit 410, so that the processing unit 410 executes the various exemplary methods described in the "Exemplary Method" section of this specification.
- Implementation steps For example, the processing unit 410 may perform step S110 as shown in FIG. 1: In response to a service request for executing the service corresponding to the microservice initiated by the user terminal, obtain the service request for executing the service corresponding to the microservice in the service request.
- Step S120 Determine that each network node is performing based on the current load, current performance, and current distance from the user terminal of each network node
- the priority of the service corresponding to the microservice in the service request Step S130: Determine the priority of the service corresponding to the microservice in the service request based on the priority of each network node in executing the service request.
- the storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and/or a cache storage unit 4202, and may further include a read-only storage unit (ROM) 4203.
- RAM random access storage unit
- ROM read-only storage unit
- the storage unit 420 may also include a program/utility tool 4204 having a set of (at least one) program module 4205.
- program module 4205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
- the bus 430 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
- the electronic device 400 can also communicate with one or more external devices 600 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 400, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 400 to communicate with one or more other computing devices. Such communication may be performed through an input/output (I/O) interface 440.
- the electronic device 400 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 460.
- networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
- the network adapter 460 communicates with other modules of the electronic device 400 through the bus 430. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
- the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
- a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
- a computer-readable storage medium is also provided.
- the computer-readable storage medium may be non-volatile or volatile.
- program products that can implement the above-mentioned methods in this specification.
- various aspects of the present application can also be implemented in the form of a program product, which includes program code.
- the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
- a program product 500 for implementing the above method according to an embodiment of the present application is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be stored in an electronic device, For example, running on a personal computer.
- CD-ROM compact disk read-only memory
- the program product of this application is not limited to this.
- the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device.
- the program product can use any combination of one or more readable media.
- the readable medium may be a readable signal medium or a readable storage medium.
- the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
- the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
- the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
- the program code used to perform the operations of this application can be written in any combination of one or more programming languages.
- the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural Programming language-such as "C" language or similar programming language.
- the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
- the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
- LAN local area network
- WAN wide area network
- Internet service providers Internet service providers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Disclosed are a network node scheduling method and apparatus, an electronic device and a storage medium, which can be achieved by means of big data. The method comprises: in response to a service request initiated by a user terminal for requesting to execute a service corresponding to a micro-service, obtaining the current load and current performance of each network node used for executing the service corresponding to the micro-service in the service request, and the current distance between the network node and the user terminal; and determining, on the basis of the current load and current performance of each network node and the current distance between the network node and the user terminal, the priority of the service corresponding to the micro-service in the execution of the service request by each network node. According to the method proposed by the present application, when a server needs to execute the service request initiated by the user terminal for requesting to execute the service corresponding to the micro-service, an optimal network node can be selected, and the selection of a network node having poor service request processing performance is avoided, thereby improving the efficiency of completing the service request.
Description
本申请要求于2019年07月23日提交中国专利局、申请号为2019106674000,发明名称为“网络节点的调度方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 23, 2019, the application number is 2019106674000, and the invention title is "Network Node Scheduling Method, Device, Electronic Equipment, and Storage Medium". The entire content is approved The reference is incorporated in this application.
本申请涉及数据处理的技术领域,特别是涉及网络节点的调度方法、装置、电子设备和存储介质。This application relates to the technical field of data processing, in particular to the scheduling method, device, electronic equipment and storage medium of network nodes.
微服务架构是一项在云中部署应用和服务的新技术,在系统的微服务构架中,各个微服务可被独立部署,各个微服务之间是松耦合的。Microservice architecture is a new technology for deploying applications and services in the cloud. In the system's microservice architecture, each microservice can be deployed independently, and each microservice is loosely coupled.
在服务器端需要执行用户终端发起的请求执行微服务对应业务的业务请求时,服务器端一般需要通过用于执行该业务请求中的微服务对应业务的某个网络节点去执行业务请求,由于可供选择的网络节点较多,因此,合理地选择网络节点将会影响到系统完成业务请求的效率。When the server side needs to execute a business request initiated by the user terminal to execute the service corresponding to the microservice, the server generally needs to execute the service request through a certain network node used to execute the service corresponding to the microservice in the service request. There are many network nodes selected. Therefore, a reasonable selection of network nodes will affect the efficiency of the system to complete service requests.
发明人意识到,服务器端一般通过随机选择的方式去选择用于执行该业务请求中的微服务对应业务的网络节点,由此不能合理选择最优的网络节点,因此会导致完成业务请求的效率较低。The inventor realizes that the server generally selects the network node used to execute the service corresponding to the microservice in the service request by random selection, so the optimal network node cannot be selected reasonably, which will lead to the efficiency of completing the service request Lower.
基于此,为解决现有技术中在系统需要执行用户终端发起的请求执行微服务对应业务的业务请求时,不能合理选择最优的网络节点的技术问题,本申请提供了一种网络节点的调度方法、装置、电子设备和存储介质。Based on this, in order to solve the technical problem in the prior art that the system cannot reasonably select the optimal network node when the system needs to execute the service request initiated by the user terminal to perform the service corresponding to the microservice, this application provides a network node scheduling Methods, devices, electronic equipment and storage media.
第一方面,提供了一种网络节点的调度方法,所述方法包括:响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。In a first aspect, a method for scheduling network nodes is provided. The method includes: in response to a service request initiated by a user terminal requesting to execute a service corresponding to a microservice, obtaining a service request for executing a service corresponding to the microservice in the service request. The current load, current performance, and current distance from the user terminal of each network node; based on the current load, current performance, and current distance from the user terminal of each network node, it is determined that each network node is performing the service The priority of the service corresponding to the microservice in the request; determining the target network for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request node.
第二方面,提供了一种网络节点的调度装置,所述装置包括:获取单元,用于响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;第一执行单元,用于基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;第二执行单元,用于基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。In a second aspect, a network node scheduling device is provided. The device includes: an obtaining unit, configured to respond to a request initiated by a user terminal to perform a service request corresponding to a microservice, and obtain a service request for performing the service request. The current load, current performance, and current distance from the user terminal of each network node corresponding to the microservice; the first execution unit is configured to be based on the current load, current performance, and current distance from the user terminal of each network node Determine the priority of each network node in executing the service corresponding to the microservice in the service request; the second execution unit is configured to execute the service corresponding to the microservice in the service request based on each network node The priority determines the target network node used to execute the service corresponding to the microservice in the service request.
第三方面,提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述网络节点的调度方法的步骤。In a third aspect, an electronic device is provided, including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the aforementioned network The steps of the node scheduling method.
第四方面,提供了一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述网络节点的调度方法的步骤。In a fourth aspect, there is provided a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the scheduling method of the network node. .
服务器端基于每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定每个网络节点在执行业务请求中的微服务对应业务的优先度,基于每个网络节点在执行业务请求中的微服务对应业务的优先度确定用于执行业务请求中的微服务对应业务的目标网络节点,进而实现从执行该业务请求中的微服务对应业务的所有网络节点选择执行业务请求时的性能较优的网络节点,避免了选择处理业务请求性能较差的网络节点,进而能提高完成业务请求的效率。The server determines the priority of each network node's microservice corresponding business in the execution of the service request based on the current load, current performance of each network node, and the current distance from the user terminal. The priority of the service corresponding to the microservice determines the target network node used to execute the service corresponding to the microservice in the service request, and then achieves better performance when selecting all network nodes that execute the service corresponding to the microservice in the service request to execute the service request The network nodes that have poor performance in processing service requests are avoided, thereby improving the efficiency of completing service requests.
图1是本申请一示例性实施例示出的一种网络节点的调度方法的实现流程图。Fig. 1 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application.
图2是本申请一示例性实施例示出的一种网络节点的调度方法的实现流程图。Fig. 2 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application.
图3是本申请一示例性实施例示出的一种网络节点的调度方法中的步骤S230的一种具体实现流程图。Fig. 3 is a specific implementation flowchart of step S230 in a method for scheduling network nodes according to an exemplary embodiment of the present application.
图4是本申请一示例性实施例示出的一种网络节点的调度方法中的步骤S120的一种具体实现流程图。Fig. 4 is a specific implementation flowchart of step S120 in a method for scheduling a network node according to an exemplary embodiment of the present application.
图5是本申请一示例性实施例示出的一种网络节点的调度方法装置的框图。Fig. 5 is a block diagram of a method and apparatus for scheduling a network node according to an exemplary embodiment of the present application.
图6示意性示出一种用于实现上述网络节点的调度方法的电子设备示例框图。Fig. 6 schematically shows an exemplary block diagram of an electronic device for implementing the foregoing method for scheduling network nodes.
图7示意性示出一种用于实现上述网络节点的调度方法的计算机可读存储介质。Fig. 7 schematically shows a computer-readable storage medium for implementing the foregoing method for scheduling network nodes.
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes this application more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。Furthermore, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to give a sufficient understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present application.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the drawings are merely functional entities, and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices. entity.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is only an exemplary description, and does not necessarily include all contents and operations/steps, nor does it have to be performed in the described order. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partially combined, so the actual execution order may be changed according to actual conditions.
参考图1,图1是本申请一示例性实施例示出的网络节点的调度方法的实现流程图,本实施例中的网络节点的调度方法的执行主体为电子设备,该电子设备具体可以为对执行微服务对应业务的业务请求的所有网络节点进行管理的服务器端,以下以服务器端为例来进行描述,如图1所示的网络节点的调度方法可包括如下步骤S110至步骤S130,详细说明如下。Referring to FIG. 1, FIG. 1 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application. The execution subject of the network node scheduling method in this embodiment is an electronic device, and the electronic device may specifically be The server side that performs the management of all network nodes that perform service requests corresponding to microservices. The server side is used as an example for description. The scheduling method of network nodes as shown in FIG. 1 may include the following steps S110 to S130, which are described in detail as follows.
步骤S110,响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离。Step S110, in response to a service request initiated by the user terminal to execute the service corresponding to the microservice, obtain the current load, current performance, and current load of each network node used to execute the service corresponding to the microservice in the service request. distance.
在本申请一个实施例中,用户终端发出用于请求执行微服务对应业务的业务请求至服务器端,其中,该业务请求可以为一种数据查询请求,当然并不限定于此,该业务请求还可以为执行其它业务的请求。具体的,该业务请求可以由用户手动操作终端提供的实体按键或虚拟控件进行触发。需要说明的是,上述业务请求携带有用户终端所定位的地理位置信息。In an embodiment of the present application, the user terminal sends a service request for requesting the execution of a service corresponding to the microservice to the server, where the service request may be a data query request, which is of course not limited to this. The service request is also It can be a request to perform other services. Specifically, the service request may be triggered by the user manually operating a physical button or virtual control provided by the terminal. It should be noted that the above service request carries geographic location information located by the user terminal.
服务器端响应于用户终端发起的请求执行微服务对应业务的业务请求,需要从执行该业务请求中的微服务对应业务的所有网络节点中确定用于执行该业务请求中的微服务对应业务的目标网络节点,其中,每个网络节点对应一个用于执行业务请求中的微服务对应业务的网络设备。The server responds to the service request of the service corresponding to the microservice initiated by the user terminal, and needs to determine the target for executing the service corresponding to the microservice in the service request from all network nodes that execute the service corresponding to the microservice in the service request Network nodes, where each network node corresponds to a network device used to execute the service corresponding to the microservice in the service request.
服务器端可以直接从每个网络节点对应的网络设备中获取每个网络节点的当前负荷以及每个网络节点的当前性能。而服务器端在确定每个网络节点与用户终端的当前距离时,可以通过从网络节点对应的网络设备中获取该网络节点的地理位置信息,并基于该网络节点的地理位置信息和业务请求中携带的用户终端所定位的地理位置信息确定得到网络节点与用户终端的当前距离。The server can directly obtain the current load of each network node and the current performance of each network node from the network equipment corresponding to each network node. When the server side determines the current distance between each network node and the user terminal, it can obtain the geographic location information of the network node from the network device corresponding to the network node, and based on the geographic location information of the network node and the service request carried The geographic location information located by the user terminal determines the current distance between the network node and the user terminal.
步骤S120,基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Step S120: Determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node.
在本申请一个实施例中,由于每个网络节点的当前负荷、当前性能以及与用户终端的当前距离这三个维度信息存在差异,其中,网络节点的当前负荷可以为网络节点对应的网络设备当前所处理的业务请求的数量,网络设备当前所处理的业务请求的数量越多,网络节点的当前负荷越大。当网络节点的当前负荷越小,则该网络节点在执行业务请求时的效果越好,则越适合作为执行业务请求中的微服务对应业务的目标网络节点,因此优先度越高。网络节点的当前性能可以是网络节点对应的网络设备当前的处理器性能,网络节点对应的网络设备当前的处理器性能越好,网络节点对应的网络设备当前的处理器性能越好。当网络节点的当前性能越好,则该网络节点在执行业务请求时的效果越好,则越适合作为执行业务请求中的微服务对应业务的目标网络节点,因此优先度越高;当该网络节点与用户终端的当前距离越小,则该网络节点在执行业务请求时的效果越好,则越适合作为用于执行业务请求中的微服务对应业务的目标网络节点,因此优先度越高。服务器端基于每个网络节点的当前负荷、当前性能以及与用户终端的当前距离这三个维度信息确定每个网络节点在执行业务请求中的微服务对应业务的优先度。In an embodiment of the present application, due to differences in the three dimensions of the current load, current performance, and current distance from the user terminal of each network node, the current load of the network node may be the current network device corresponding to the network node. The number of service requests processed, the more the number of service requests currently processed by the network device, the greater the current load of the network node. When the current load of the network node is smaller, the effect of the network node in executing the service request is better, and the more suitable it is to be the target network node for executing the service corresponding to the microservice in the service request, so the priority is higher. The current performance of the network node may be the current processor performance of the network device corresponding to the network node. The better the current processor performance of the network device corresponding to the network node, the better the current processor performance of the network device corresponding to the network node. The better the current performance of the network node, the better the effect of the network node in executing the service request, and the more suitable it is to be the target network node for executing the service corresponding to the microservice in the service request, so the priority is higher; The smaller the current distance between the node and the user terminal, the better the effect of the network node in executing the service request, and the more suitable it is as the target network node for executing the service corresponding to the microservice in the service request, so the priority is higher. The server determines the priority of each network node's microservice corresponding business in the execution of the service request based on the three dimensional information of each network node's current load, current performance, and current distance from the user terminal.
步骤S130,基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。Step S130: Determine a target network node for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
在本申请的一个实施例中,服务器端在确定得到用于执行业务请求中的微服务对应业务的每个网络节点的优先度后,会根据优选度确定用于执行该业务请求中的微服务对应业务的目标网络节点。In an embodiment of the present application, after determining the priority of each network node used to execute the service corresponding to the microservice in the service request, the server will determine the microservice used to execute the service request according to the priority. The target network node corresponding to the service.
参考图2,图2是本申请一示例性实施例示出的网络节点的调度方法的实现流程图,如图2所示,所述基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点的步骤S130,包括:步骤S230,将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。Referring to FIG. 2, FIG. 2 is an implementation flowchart of a network node scheduling method shown in an exemplary embodiment of the present application. As shown in FIG. 2, the method is based on each network node in the execution of the service request. The priority of the service corresponding to the service determines the target network node for executing the microservice corresponding service in the service request. The step S130 includes: step S230, determining the network node with the highest priority as the target network node for executing the service request The microservice corresponds to the target network node of the business.
服务器端可以将优先度最高的网络节点确定为用于执行该业务请求中的微服务对应业务的目标网络节点。The server side may determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
可选地,服务器端还可以在优先度高于设定阈值的所有网络节点中随机选取一个网络节点作为用于执行该业务请求中的微服务对应业务的目标网络节点。Optionally, the server side can also randomly select a network node from all network nodes with a priority higher than a set threshold as the target network node for executing the service corresponding to the microservice in the service request.
以上可以看出,服务器端基于每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定每个网络节点在执行业务请求中的微服务对应业务的优先度,基于每个网络节点在执行业务请求中的微服务对应业务的优先度确定用于执行业务请求中的微服务对应业务的目标网络节点,进而实现从执行该业务请求中的微服务对应业务的所有网络节点选择执行业务请求时的性能较优的网络节点,避免选择了处理业务请求性能较差的网络节点,进而能提高完成业务请求的效率。It can be seen from the above that the server determines the priority of each network node in the execution of the microservice corresponding service in the service request based on the current load, current performance of each network node and the current distance from the user terminal. The priority of the service corresponding to the microservice in the execution of the service request is determined to determine the target network node used to execute the service corresponding to the microservice in the service request, and then all network nodes that execute the service corresponding to the microservice in the service request are selected to execute the service request The network node with better performance at the time avoids selecting the network node with poor performance in processing service requests, thereby improving the efficiency of completing service requests.
参阅图3,图3为是本申请一示例性实施例示出的一种网络节点的调度方法中的步骤S230的一种具体实现流程图,在本实施例中,所述将将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点的步骤S230,包括:步骤S2301,从预设的日志信息库中获取所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务时所产生的所有日志,其中,所述日志中的日志信息至少包括所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时的响应状况信息,所述响应状况信息为所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为响应成功或所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为未响应。Referring to FIG. 3, FIG. 3 is a specific implementation flowchart of step S230 in a network node scheduling method shown in an exemplary embodiment of the present application. In this embodiment, the highest priority The step S230 of determining the network node as the target network node for executing the service corresponding to the microservice in the service request includes: step S2301, obtaining the current time of the network node with the highest priority from a preset log information database All logs generated when the microservice corresponding service in the service request is executed within a specific time period before the current time, wherein the log information in the log includes at least the network node with the highest priority executing the Response status information when the microservice in the service request corresponds to the business, where the response status information indicates that the network node with the highest priority responded successfully or the priority is the highest when executing the service corresponding to the microservice in the service request The network node of is not responding when executing the service corresponding to the microservice in the service request.
在本申请一个实施例中,服务器端在将优先度最高的网络节点确定为用于执行业务请求中微服务对应业务的目标网络节点之前,可以先从预设的日志信息库中获取优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行业务请求中微服务对应业务时所产生的所有日志。其中,优先度最高的网络节点在当前时间和当前时间之前的特定时间段内的所有日志可以是当前时间之前一个星期内的所有日志,在此不作限定。In an embodiment of the present application, before the server side determines the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request, it may first obtain the highest priority from the preset log information database. All logs generated when the network node of the network node executes the service corresponding to the microservice in the service request in the current time and a specific time period before the current time. Among them, all logs of the network node with the highest priority during the current time and a specific time period before the current time may be all logs within one week before the current time, which is not limited here.
可以理解的是,预设的日志信息库可以为网络节点对应的网络设备存储日志的日志信息库,日志中的日志信息至少包括优先度最高的网络节点在执行业务请求中的微服务对应业务时的响应状况信息,上述响应状况信息为优先度最高的网络节点在执行业务请求中的微服务对应业务时为响应成功的信息或优先度最高的网络节点在执行业务请求中的微服务对应业务时为未响应的信息,此外,日志信息还可以包含优先度最高的网络节点在执行业务请求中的微服务对应业务时未响应的原因。It is understandable that the preset log information database can be the log information database storing logs of the network device corresponding to the network node, and the log information in the log includes at least the network node with the highest priority when executing the service corresponding to the microservice in the service request. The above response status information is the information that the network node with the highest priority is responding successfully when executing the microservice corresponding service in the service request or the network node with the highest priority is executing the microservice corresponding service in the service request In addition, the log information may also include the reason why the network node with the highest priority did not respond when executing the service corresponding to the microservice in the service request.
步骤S2302,基于所述日志信息中的响应状况信息确定所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率。Step S2302: Determine, based on the response status information in the log information, the response success rate of the microservice corresponding service in the service request executed by the network node with the highest priority in the current time and a specific time period before the current time.
在本申请一个实施例中,服务器端获取所有日志的日志信息中的响应状况信息,并根据所有日志的响应状况信息中在执行业务请求中的微服务对应业务时为响应成功的日志数占所有日志数的比值确定优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行该业务请求中的微服务对应业务的响应成功率。In an embodiment of the present application, the server side obtains the response status information in the log information of all logs, and according to the response status information of all logs, the number of logs that respond successfully when executing the microservice corresponding business in the service request accounts for all The ratio of the number of logs determines the response success rate of the microservice corresponding service in the service request by the network node with the highest priority during the current time and the specific time period before the current time.
步骤S2303,若所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率高于预定阈值,则将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。Step S2303, if the response success rate of the microservice corresponding service in the service request executed by the network node with the highest priority in the current time and a specific time period before the current time is higher than a predetermined threshold, the network node with the highest priority will be selected The network node is determined as a target network node for executing the service corresponding to the microservice in the service request.
在本申请的一个实施例中,若优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行业务请求中的微服务对应业务的响应成功率高于预定阈值,说明该网络节点在执行业务请求中的微服务对应业务时出现故障的概率较低,则服务器端可以将优先度最高的网络节点确定为用于执行业务请求中的微服务对应业务的目标网络节点。In an embodiment of the present application, if the network node with the highest priority executes the microservice corresponding service in the service request within a specific time period before the current time and the response success rate of the service is higher than the predetermined threshold, it indicates that the network node The probability of failure when executing the service corresponding to the microservice in the service request is low, and the server can determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
需要指出的是,当优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行业务请求中的微服务对应业务的响应成功率低于预定阈值时,服务器端可以将在执行业务请求中的微服务对应业务时出现故障的概率较低且优先度较高的其它网络节点确定为用于执行该业务请求中的微服务对应业务的目标网络节点。It should be pointed out that when the network node with the highest priority executes the microservice corresponding service in the service request within a certain period of time before the current time and the response success rate is lower than the predetermined threshold, the server can execute the service Other network nodes with a lower probability of failure and higher priority when the microservice in the request corresponds to the service are determined as the target network node for executing the service corresponding to the microservice in the service request.
参阅图4,图4是本申请一示例性实施例示出的一种网络节点的调度方法中的步骤S120的一种具体实现流程图,在本实施例中,所述基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度的步骤S120,包括:步骤S1201,基于所述每个网络节点的当前负荷与所述每个网络节点对应的最大负荷,确定第一分数。4, FIG. 4 is a specific implementation flowchart of step S120 in a network node scheduling method shown in an exemplary embodiment of the present application. In this embodiment, the method is based on each network node. The current load, current performance, and current distance from the user terminal to determine the priority of each network node in executing the service corresponding to the microservice in the service request S120 includes: step S1201, based on each network The current load of the node and the maximum load corresponding to each network node determine the first score.
在本申请一个实施例中,服务器端还从每个网络节点对应的网络设备的设备信息中获取每个网络节点的最大负荷,即网络节点对应的网络设备所能同时处理的业务请求的最大数量值。当网络节点的当前负荷越小,则网络节点在执行业务请求的效果更好;需要说明的是,当网络节点的最大负荷越大,则网络节点在执行业务请求的效果也将更好,服务器端将基于每个网络节点的当前负荷与每个网络节点对应的最大负荷,确定第一分数。In an embodiment of the present application, the server also obtains the maximum load of each network node from the device information of the network device corresponding to each network node, that is, the maximum number of service requests that the network device corresponding to the network node can process simultaneously value. When the current load of the network node is smaller, the effect of the network node in executing service requests is better; it should be noted that when the maximum load of the network node is larger, the effect of the network node in executing service requests will be better. The terminal will determine the first score based on the current load of each network node and the maximum load corresponding to each network node.
[援引加入(细则20.6) 17.07.2020]
可选地,服务器端在基于每个网络节点的当前负荷与每个网络节点对应的最大负荷,确定第一分数时,具体可以基于以下公式确定第一分数。
[Add by reference (Rule 20.6) 17.07.2020]
Optionally, when the server side determines the first score based on the current load of each network node and the maximum load corresponding to each network node, the first score may be specifically determined based on the following formula.
可选地,服务器端在基于每个网络节点的当前负荷与每个网络节点对应的最大负荷,确定第一分数时,具体可以基于以下公式确定第一分数。
[Add by reference (Rule 20.6) 17.07.2020]
Optionally, when the server side determines the first score based on the current load of each network node and the maximum load corresponding to each network node, the first score may be specifically determined based on the following formula.
其中,η为大于零的正常数,a 1 为每个网络节点对应的最大负荷,a 2 为每个网络节点的当前负荷,A为服务器端基于每个网络节点的当前负荷与每个网络节点对应的最大负荷所确定的第一分数。服务器端基于每个网络节点的当前负荷与每个网络节点对应的最大负荷,确定第一分数,对应的第一分数越高,则网络节点在执行业务请求的效果更好。Among them, η is a normal number greater than zero, a 1 is the maximum load corresponding to each network node, a 2 is the current load of each network node, and A is the server side based on the current load of each network node and each network node The first score determined by the corresponding maximum load. The server determines the first score based on the current load of each network node and the maximum load corresponding to each network node. The higher the corresponding first score, the better the network node performs the service request.
步骤S1202,基于所述每个网络节点的当前性能与所述每个网络节点对应的最优性能,确定第二分数。Step S1202: Determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node.
服务器端还从每个网络节点对应的网络设备的设备信息中获取每个网络节点的最优性能,即网络节点对应的网络设备的处理器最优性能。当网络节点的当前性能越好,则网络节点在执行业务请求的效果更好;需要说明的是,当网络节点的当前性能越接近该网络节点的最优性能,则网络节点在执行业务请求的效果也将更好;服务器端将基于每个网络节点的当前性能与每个网络节点对应的最优性能,确定第二分数。The server also obtains the optimal performance of each network node from the device information of the network device corresponding to each network node, that is, the optimal performance of the processor of the network device corresponding to the network node. When the current performance of the network node is better, the network node performs better in performing service requests; it should be noted that when the current performance of the network node is closer to the optimal performance of the network node, the network node is performing the service request The effect will be better; the server will determine the second score based on the current performance of each network node and the optimal performance corresponding to each network node.
可选地,服务器端在基于每个网络节点的当前性能与每个网络节点对应的最优性能,确定第二分数时,具体可以基于以下公式确定第二分数。Optionally, when the server determines the second score based on the current performance of each network node and the optimal performance corresponding to each network node, the second score may be specifically determined based on the following formula.
[援引加入(细则20.6) 17.07.2020]
其中,λ为大于零的正常数,b 1 为每个网络节点的当前性能,b 2 为每个网络节点的最优性能,B为服务器端基于每个网络节点的当前性能与每个网络节点对应的最优性能所确定的第二分数。服务器端基于每个网络节点的当前性能与每个网络节点的最优性能,确定第二分数,对应的第二分数越高,则网络节点在执行业务请求的效果更好。[Add by reference (Rule 20.6) 17.07.2020]
Among them, λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the server side based on the current performance of each network node and each network node The second score determined by the corresponding optimal performance. The server determines the second score based on the current performance of each network node and the optimal performance of each network node. The higher the corresponding second score, the better the network node performs the service request.
其中,λ为大于零的正常数,b 1 为每个网络节点的当前性能,b 2 为每个网络节点的最优性能,B为服务器端基于每个网络节点的当前性能与每个网络节点对应的最优性能所确定的第二分数。服务器端基于每个网络节点的当前性能与每个网络节点的最优性能,确定第二分数,对应的第二分数越高,则网络节点在执行业务请求的效果更好。[Add by reference (Rule 20.6) 17.07.2020]
Among them, λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the server side based on the current performance of each network node and each network node The second score determined by the corresponding optimal performance. The server determines the second score based on the current performance of each network node and the optimal performance of each network node. The higher the corresponding second score, the better the network node performs the service request.
步骤S1203,基于所述每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数。Step S1203: Determine a third score based on the relationship table between the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value.
在本申请一个实施例中,网络节点与用户终端的当前距离会影响到网络节点在执行业务请求的效果,当网络节点与用户终端的当前距离越小,则网络节点在执行业务请求的效果更好。服务器端预存有网络节点与用户终端的当前距离和优先值的关系表,服务器端基于所确定的每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数。服务器端基于每个网络节点与用户终端的当前距离,以及网络节点与用户终端的当前距离和优先值的关系表,确定第三分数,对应的第三分数越高,则网络节点在执行业务请求的效果更好。In an embodiment of the present application, the current distance between the network node and the user terminal will affect the effect of the network node in executing the service request. When the current distance between the network node and the user terminal is smaller, the network node has a better effect in executing the service request. it is good. The server has pre-stored the relationship table of the current distance between the network node and the user terminal and the priority value, and the server side is based on the determined current distance between each network node and the user terminal, the current distance between the network node and the user terminal and the priority value. To determine the third score. The server side determines the third score based on the current distance between each network node and the user terminal, and the relationship table between the current distance between the network node and the user terminal and the priority value. The higher the corresponding third score, the network node is executing the service request The effect is better.
步骤S1204,基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Step S1204, based on the first score, the second score, and the third score, determine the priority of each network node in executing the service corresponding to the microservice in the service request.
在本申请一个实施例中,服务器端基于所确定的第一分数、第二分数以及第三分数,确定得到每个网络节点在执行所述业务请求中的微服务对应业务的优先度。In an embodiment of the present application, the server side determines the priority of each network node in executing the service corresponding to the microservice in the service request based on the determined first score, second score, and third score.
可选地,服务器端基于第一分数、第二分数以及第三分数,确定每个网络节点在执行业务请求中的微服务对应业务的优先度时,具体可以基于以下公式确定每个网络节点在执行业务请求中的微服务对应业务的优先度。Optionally, based on the first score, the second score, and the third score, the server determines the priority of each network node in executing the service corresponding to the microservice in the service request. Specifically, it can be determined based on the following formula that each network node is The priority of the business corresponding to the microservice in the execution business request.
[援引加入(细则20.6) 17.07.2020]
其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为每个网络节点在执行业务请求中的微服务对应业务的优先度。服务器端基于每个网络节点的负荷、性能以及与用户终端的当前距离这三个维度信息所确定的第一分数、第二分数以及第三分数来确定个网络节点在执行业务请求中的微服务对应业务的优先度,第一分数、第二分数以及第三分数与优先度均为正相关关系,当第一分数、第二分数以及第三分数越大,则优先度越高。[Add by reference (Rule 20.6) 17.07.2020]
Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the value of each network node in executing service requests The priority of the microservice corresponding to the business. The server determines the first score, second score, and third score determined by the three dimensional information of each network node's load, performance, and the current distance from the user terminal to determine the microservices of each network node in executing the service request Corresponding to the priority of the business, the first score, the second score, and the third score are all positively correlated with the priority. When the first score, the second score, and the third score are larger, the priority is higher.
其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为每个网络节点在执行业务请求中的微服务对应业务的优先度。服务器端基于每个网络节点的负荷、性能以及与用户终端的当前距离这三个维度信息所确定的第一分数、第二分数以及第三分数来确定个网络节点在执行业务请求中的微服务对应业务的优先度,第一分数、第二分数以及第三分数与优先度均为正相关关系,当第一分数、第二分数以及第三分数越大,则优先度越高。[Add by reference (Rule 20.6) 17.07.2020]
Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the value of each network node in executing service requests The priority of the microservice corresponding to the business. The server determines the first score, second score, and third score determined by the three dimensional information of each network node's load, performance, and the current distance from the user terminal to determine the microservices of each network node in executing the service request Corresponding to the priority of the business, the first score, the second score, and the third score are all positively correlated with the priority. When the first score, the second score, and the third score are larger, the priority is higher.
参考图5,图5是本申请一个实施例提供的一种网络节点的调度装置,所述网络节点的调度装置可以集成于上述的电子设备中,具体可以包括获取单元310、第一执行单元320以及第二执行单元330。Referring to FIG. 5, FIG. 5 is a scheduling apparatus of a network node provided by an embodiment of the present application. The scheduling apparatus of the network node may be integrated into the above-mentioned electronic device, and may specifically include an obtaining unit 310 and a first execution unit 320. And the second execution unit 330.
获取单元310,用于响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离。The obtaining unit 310 is configured to respond to a service request for executing a service corresponding to the microservice in response to a request initiated by a user terminal, and obtain the current load and current performance of each network node used to execute the service corresponding to the microservice in the service request. The current distance of the terminal.
第一执行单元320,用于基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。The first execution unit 320 is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node .
第二执行单元330,用于基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。The second execution unit 330 is configured to determine a target network node for executing the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
可选地,所述第二执行单元330,包括:第一执行子单元,用于将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。Optionally, the second execution unit 330 includes: a first execution subunit, configured to determine the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request.
可选地,所述第一执行子单元,还包括:获取模块,用于从预设的日志信息库中获取所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务时所产生的所有日志,其中,所述日志中的日志信息至少包括所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时的响应状况信息,所述响应状况信息为所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为响应成功或所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为未响应。Optionally, the first execution subunit further includes: an acquisition module, configured to acquire the network node with the highest priority from a preset log information library to execute the execution in the current time and a specific time period before the current time All logs generated when the microservice in the service request corresponds to the service, wherein the log information in the log includes at least the log information of the network node with the highest priority when executing the service corresponding to the microservice in the service request Response status information, where the response status information is that the network node with the highest priority responds successfully when the microservice corresponding service in the service request is executed or the network node with the highest priority is executing the service request When the microservice corresponds to the business, it is not responding.
第一执行模块,用于基于所述日志信息中的响应状况信息确定所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率。The first execution module is configured to determine, based on the response status information in the log information, that the network node with the highest priority executes the service corresponding to the microservice in the service request within the current time and a specific time period before the current time Response success rate.
第二执行模块,用于若所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率高于预定阈值,则将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。The second execution module is configured to: if the network node with the highest priority executes the microservice corresponding service in the service request within a specific time period before the current time and the response success rate is higher than a predetermined threshold, The network node with the highest priority is determined as the target network node for executing the service corresponding to the microservice in the service request.
可选地,所述第一执行单元320,包括:第二执行子单元,用于基于所述每个网络节点的当前负荷与所述每个网络节点对应的最大负荷,确定第一分数。Optionally, the first execution unit 320 includes: a second execution subunit, configured to determine the first score based on the current load of each network node and the maximum load corresponding to each network node.
第三执行子单元,用于基于所述每个网络节点的当前性能与所述每个网络节点对应的最优性能,确定第二分数。The third execution subunit is configured to determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node.
第四执行子单元,用于基于所述每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数。The fourth execution subunit is configured to determine the third score based on the relationship table between the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value.
第五执行子单元,用于基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。The fifth execution subunit is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the first score, the second score, and the third score.
可选地,第五执行子单元,具体用于基于以下公式确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Optionally, the fifth execution subunit is specifically configured to determine the priority of each network node in executing the service corresponding to the microservice in the service request based on the following formula.
[援引加入(细则20.6) 17.07.2020]
其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。[Add by reference (Rule 20.6) 17.07.2020]
Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the execution of each network node The priority of the microservice in the business request corresponding to the business.
其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。[Add by reference (Rule 20.6) 17.07.2020]
Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the execution of each network node The priority of the microservice in the business request corresponding to the business.
可选地,第二执行子单元具体用于基于以下公式确定所述第一分数。Optionally, the second execution subunit is specifically configured to determine the first score based on the following formula.
[援引加入(细则20.6) 17.07.2020]
其中,η为大于零的正常数,a 1 为所述每个网络节点对应的最大负荷,a 2 为所述每个网络节点的当前负荷,A为所述第一分数。[Add by reference (Rule 20.6) 17.07.2020]
Where, n is a normal number greater than zero, a 1 is the maximum load corresponding to each network node, a 2 is the current load of each network node, and A is the first score.
其中,η为大于零的正常数,a 1 为所述每个网络节点对应的最大负荷,a 2 为所述每个网络节点的当前负荷,A为所述第一分数。[Add by reference (Rule 20.6) 17.07.2020]
Where, n is a normal number greater than zero, a 1 is the maximum load corresponding to each network node, a 2 is the current load of each network node, and A is the first score.
可选地,第三执行子单元具体用于基于以下公式确定所述第二分数。Optionally, the third execution subunit is specifically configured to determine the second score based on the following formula.
[援引加入(细则20.6) 17.07.2020]
其中,λ为大于零的正常数,b 1 为所述每个网络节点的当前性能,b 2 为所述每个网络节点的最优性能,B为所述第二分数。[Add by reference (Rule 20.6) 17.07.2020]
Where λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the second score.
其中,λ为大于零的正常数,b 1 为所述每个网络节点的当前性能,b 2 为所述每个网络节点的最优性能,B为所述第二分数。[Add by reference (Rule 20.6) 17.07.2020]
Where λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the second score.
上述装置中各个模块的功能和作用的实现过程具体详见上述网络节点的调度方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and roles of each module in the above-mentioned device, refer to the implementation process of the corresponding steps in the above-mentioned network node scheduling method for details, which will not be repeated here.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the various steps of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in the specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present disclosure.
在本公开的示例性实施例中,还提供了一种能够实现上述方法的电子设备。In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present application can be implemented as a system, method, or program product. Therefore, each aspect of the present application can be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "Circuit", "Module" or "System".
参考图6,图6是根据本申请的这种实施方式的电子设备400。图6显示的电子设备400仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring to FIG. 6, FIG. 6 is an electronic device 400 according to this embodiment of the present application. The electronic device 400 shown in FIG. 6 is only an example, and should not bring any limitation to the function and use scope of the embodiments of the present application.
如图6所示,电子设备400以通用计算设备的形式表现。电子设备400的组件可以包括但不限于:上述至少一个处理单元410、上述至少一个存储单元420、连接不同系统组件(包括存储单元420和处理单元410)的总线430。As shown in FIG. 6, the electronic device 400 takes the form of a general-purpose computing device. The components of the electronic device 400 may include but are not limited to: the aforementioned at least one processing unit 410, the aforementioned at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元410执行,使得所述处理单元410执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。例如,所述处理单元410可以执行如图1中所示的步骤S110:响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;步骤S120:基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;步骤S130:基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 410, so that the processing unit 410 executes the various exemplary methods described in the "Exemplary Method" section of this specification. Implementation steps. For example, the processing unit 410 may perform step S110 as shown in FIG. 1: In response to a service request for executing the service corresponding to the microservice initiated by the user terminal, obtain the service request for executing the service corresponding to the microservice in the service request. The current load, current performance, and current distance from the user terminal of each network node; Step S120: Determine that each network node is performing based on the current load, current performance, and current distance from the user terminal of each network node The priority of the service corresponding to the microservice in the service request; Step S130: Determine the priority of the service corresponding to the microservice in the service request based on the priority of each network node in executing the service request. The target network node serving the corresponding business.
存储单元420可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)4201和/或高速缓存存储单元4202,还可以进一步包括只读存储单元(ROM)4203。The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and/or a cache storage unit 4202, and may further include a read-only storage unit (ROM) 4203.
存储单元420还可以包括具有一组(至少一个)程序模块4205的程序/实用工具4204,这样的程序模块4205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 420 may also include a program/utility tool 4204 having a set of (at least one) program module 4205. Such program module 4205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线430可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 430 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
电子设备400也可以与一个或多个外部设备600(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备400交互的设备通信,和/或与使得该电子设备400能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口440进行。并且,电子设备400还可以通过网络适配器460与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器460通过总线430与电子设备400的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备400使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 400 can also communicate with one or more external devices 600 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 400, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 400 to communicate with one or more other computing devices. Such communication may be performed through an input/output (I/O) interface 440. Moreover, the electronic device 400 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 460. As shown in the figure, the network adapter 460 communicates with other modules of the electronic device 400 through the bus 430. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性。其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。In the exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided. The computer-readable storage medium may be non-volatile or volatile. Stored on it are program products that can implement the above-mentioned methods in this specification. In some possible implementation manners, various aspects of the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
参考图7所示,描述了根据本申请的实施方式的用于实现上述方法的程序产品500,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在电子设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Referring to FIG. 7, a program product 500 for implementing the above method according to an embodiment of the present application is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be stored in an electronic device, For example, running on a personal computer. However, the program product of this application is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code used to perform the operations of this application can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (20)
- 一种网络节点的调度方法,其中,所述方法包括:A method for scheduling network nodes, wherein the method includes:响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;In response to a service request initiated by a user terminal to execute a service corresponding to the microservice, obtain the current load, current performance, and current distance from the user terminal of each network node used to execute the service corresponding to the microservice in the service request;基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;Determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node;基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。Based on the priority of each network node in executing the service corresponding to the microservice in the service request, a target network node for executing the service corresponding to the microservice in the service request is determined.
- 根据权利要求1所述的方法,其中,所述基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点的步骤,包括:The method according to claim 1, wherein said determining, based on the priority of each network node in executing the service corresponding to the microservice in the service request, the service for executing the service corresponding to the microservice in the service request The steps of the target network node include:将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。The network node with the highest priority is determined as the target network node for executing the service corresponding to the microservice in the service request.
- 根据权利要求2所述的方法,其中,所述将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点的步骤,包括:The method according to claim 2, wherein the step of determining the network node with the highest priority as the target network node for executing the service corresponding to the microservice in the service request comprises:从预设的日志信息库中获取所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务时所产生的所有日志,其中,所述日志中的日志信息至少包括所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时的响应状况信息,所述响应状况信息为所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为响应成功或所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为未响应;Obtain all logs generated when the network node with the highest priority executes the service corresponding to the microservice in the service request within the current time and a specific time period before the current time from the preset log information database, where all The log information in the log includes at least the response status information of the network node with the highest priority when executing the service corresponding to the microservice in the service request, and the response status information indicates that the network node with the highest priority is executing The microservice corresponding service in the service request is a successful response or the network node with the highest priority is not responding when executing the microservice corresponding service in the service request;基于所述日志信息中的响应状况信息确定所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率;Determining, based on the response status information in the log information, the response success rate for the network node with the highest priority to execute the microservice corresponding service in the service request within the current time and a specific time period before the current time;若所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率高于预定阈值,则将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。If the response success rate of the microservice corresponding service in the service request in the current time and the specific time period before the current time by the network node with the highest priority is higher than the predetermined threshold, the network node with the highest priority is determined It is the target network node used to execute the service corresponding to the microservice in the service request.
- 根据权利要求1所述的方法,其中,所述基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度的步骤,包括:The method according to claim 1, wherein the determining that each network node performs the microservice in the service request based on the current load, current performance, and current distance from the user terminal of each network node The steps corresponding to the priority of the business include:基于所述每个网络节点的当前负荷与所述每个网络节点对应的最大负荷,确定第一分数;Determine a first score based on the current load of each network node and the maximum load corresponding to each network node;基于所述每个网络节点的当前性能与所述每个网络节点对应的最优性能,确定第二分数;Determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node;基于所述每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数;Determine the third score based on the relationship table of the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value;基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Based on the first score, the second score, and the third score, determine the priority of each network node in executing the microservice corresponding service in the service request.
- [援引加入(细则20.6) 17.07.2020]
根据权利要求4所述的方法,其中,所述基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度的步骤,包括:
基于以下公式确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;
其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。
[Add by reference (Rule 20.6) 17.07.2020]
The method according to claim 4, wherein the determination of the microservice correspondence of each network node in executing the service request based on the first score, the second score, and the third score The steps of business priority include:
Determine the priority of each network node in executing the service corresponding to the microservice in the service request based on the following formula;
Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the execution of each network node The priority of the microservice in the business request corresponding to the business.
- [援引加入(细则20.6) 17.07.2020]
根据权利要求5所述的方法,其中,所述基于每个网络节点的当前负荷与每个网络节点对应的最大负荷,确定第一分数的步骤,包括:基于以下公式确定所述第一分数;
其中,η为大于零的正常数,a 1 为所述每个网络节点对应的最大负荷,a 2 为所述每个网络节点的当前负荷,A为所述第一分数。[Add by reference (Rule 20.6) 17.07.2020]
The method according to claim 5, wherein the step of determining the first score based on the current load of each network node and the maximum load corresponding to each network node comprises:Determine the first score based on the following formula;
Where, n is a normal number greater than zero, a 1 is the maximum load corresponding to each network node, a 2 is the current load of each network node, and A is the first score. - [援引加入(细则20.6) 17.07.2020]
根据权利要求5所述的方法,其中,所述基于每个网络节点的当前性能与每个网络节点对应的最优性能,确定第二分数的步骤,包括:基于以下公式确定所述第二分数;其中,λ为大于零的正常数,b 1 为所述每个网络节点的当前性能,b 2 为所述每个网络节点的最优性能,B为所述第二分数。[Add by reference (Rule 20.6) 17.07.2020]
The method according to claim 5, wherein the step of determining the second score based on the current performance of each network node and the optimal performance corresponding to each network node comprises:Determine the second score based on the following formula;Where λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the second score. - 一种网络节点的调度装置,其中,所述装置包括:A scheduling device for network nodes, wherein the device includes:获取单元,用于响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;The acquiring unit is configured to respond to a service request for executing a service corresponding to a microservice in response to a request initiated by a user terminal, and to acquire the current load, current performance, and the current load of each network node used to execute the service corresponding to the microservice in the service request. The current distance;第一执行单元,用于基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;The first execution unit is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node;第二执行单元,用于基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。The second execution unit is configured to determine the target network node used to execute the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
- 一种电子设备,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:An electronic device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:所述处理器,用于响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;The processor is configured to respond to a service request for executing a service corresponding to a microservice in response to a request initiated by a user terminal, and obtain the current load, current performance, and current load of each network node used to execute the service corresponding to the microservice in the service request. The current distance of the user terminal;所述处理器,用于基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;The processor is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node;所述处理器,用于基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。The processor is configured to determine a target network node used to execute the service corresponding to the microservice in the service request based on the priority of each network node in executing the service corresponding to the microservice in the service request.
- 根据权利要求9所述的电子设备,其中,所述处理器,还用于:The electronic device according to claim 9, wherein the processor is further configured to:将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。The network node with the highest priority is determined as the target network node for executing the service corresponding to the microservice in the service request.
- 根据权利要求10所述的电子设备,其中,所述处理器还用于:The electronic device according to claim 10, wherein the processor is further configured to:从预设的日志信息库中获取所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务时所产生的所有日志,其中,所述日志中的日志信息至少包括所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时的响应状况信息,所述响应状况信息为所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为响应成功或所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为未响应;Obtain all logs generated when the network node with the highest priority executes the service corresponding to the microservice in the service request within the current time and a specific time period before the current time from the preset log information database, where all The log information in the log includes at least the response status information of the network node with the highest priority when executing the service corresponding to the microservice in the service request, and the response status information indicates that the network node with the highest priority is executing The microservice corresponding service in the service request is a successful response or the network node with the highest priority is not responding when executing the microservice corresponding service in the service request;基于所述日志信息中的响应状况信息确定所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率;Determining, based on the response status information in the log information, the response success rate for the network node with the highest priority to execute the microservice corresponding service in the service request within the current time and a specific time period before the current time;若所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率高于预定阈值,则将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。If the response success rate of the microservice corresponding service in the service request in the current time and the specific time period before the current time by the network node with the highest priority is higher than the predetermined threshold, the network node with the highest priority is determined It is the target network node used to execute the service corresponding to the microservice in the service request.
- 根据权利要求9所述的电子设备,其中,所述处理器还用于:The electronic device according to claim 9, wherein the processor is further configured to:基于所述每个网络节点的当前负荷与所述每个网络节点对应的最大负荷,确定第一分数;Determine a first score based on the current load of each network node and the maximum load corresponding to each network node;基于所述每个网络节点的当前性能与所述每个网络节点对应的最优性能,确定第二分数;Determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node;基于所述每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数;Determine the third score based on the relationship table of the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value;基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Based on the first score, the second score, and the third score, determine the priority of each network node in executing the microservice corresponding service in the service request.
- [援引加入(细则20.6) 17.07.2020]
根据权利要求12所述的电子设备,其中,所述处理器用于基于以下公式确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。[Add by reference (Rule 20.6) 17.07.2020]
The electronic device according to claim 12, wherein the processor is configured to determine the priority of each network node in executing the microservice corresponding service in the service request based on the following formula;Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the execution of each network node The priority of the microservice in the business request corresponding to the business. - [援引加入(细则20.6) 17.07.2020]
根据权利要求13所述的电子设备,其中,所述处理器还用于:基于以下公式确定所述第一分数;其中,η为大于零的正常数,a 1 为所述每个网络节点对应的最大负荷,a 2 为所述每个网络节点的当前负荷,A为所述第一分数。[Add by reference (Rule 20.6) 17.07.2020]
The electronic device according to claim 13, wherein the processor is further configured to:Determine the first score based on the following formula;Where, n is a normal number greater than zero, a 1 is the maximum load corresponding to each network node, a 2 is the current load of each network node, and A is the first score. - [援引加入(细则20.6) 17.07.2020]
根据权利要求13所述的电子设备,其中,所述处理器还用于:基于以下公式确定所述第二分数;其中,λ为大于零的正常数,b 1 为所述每个网络节点的当前性能,b 2 为所述每个网络节点的最优性能,B为所述第二分数。[Add by reference (Rule 20.6) 17.07.2020]
The electronic device according to claim 13, wherein the processor is further configured to:Determine the second score based on the following formula;Where λ is a normal number greater than zero, b 1 is the current performance of each network node, b 2 is the optimal performance of each network node, and B is the second score. - 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:响应于用户终端发起的请求执行微服务对应业务的业务请求,获取用于执行所述业务请求中的微服务对应业务的每个网络节点的当前负荷、当前性能以及与用户终端的当前距离;In response to a service request initiated by a user terminal to execute a service corresponding to the microservice, obtain the current load, current performance, and current distance from the user terminal of each network node used to execute the service corresponding to the microservice in the service request;基于所述每个网络节点的当前负荷、当前性能以及与用户终端的当前距离确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;Determine the priority of each network node in executing the microservice corresponding service in the service request based on the current load, current performance, and current distance from the user terminal of each network node;基于所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度确定用于执行所述业务请求中的微服务对应业务的目标网络节点。Based on the priority of each network node in executing the service corresponding to the microservice in the service request, a target network node for executing the service corresponding to the microservice in the service request is determined.
- 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。The network node with the highest priority is determined as the target network node for executing the service corresponding to the microservice in the service request.
- 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 17, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:从预设的日志信息库中获取所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务时所产生的所有日志,其中,所述日志中的日志信息至少包括所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时的响应状况信息,所述响应状况信息为所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为响应成功或所述优先度最高的网络节点在执行所述业务请求中的微服务对应业务时为未响应;Obtain all logs generated when the network node with the highest priority executes the service corresponding to the microservice in the service request within the current time and a specific time period before the current time from the preset log information database, where all The log information in the log includes at least the response status information of the network node with the highest priority when executing the service corresponding to the microservice in the service request, and the response status information indicates that the network node with the highest priority is executing The microservice corresponding service in the service request is a successful response or the network node with the highest priority is not responding when executing the microservice corresponding service in the service request;基于所述日志信息中的响应状况信息确定所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率;Determining, based on the response status information in the log information, the response success rate for the network node with the highest priority to execute the microservice corresponding service in the service request within the current time and a specific time period before the current time;若所述优先度最高的网络节点在当前时间和当前时间之前的特定时间段内执行所述业务请求中的微服务对应业务的响应成功率高于预定阈值,则将优先度最高的网络节点确定为用于执行所述业务请求中的微服务对应业务的目标网络节点。If the response success rate of the microservice corresponding service in the service request in the current time and the specific time period before the current time by the network node with the highest priority is higher than the predetermined threshold, the network node with the highest priority is determined It is the target network node used to execute the service corresponding to the microservice in the service request.
- 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:基于所述每个网络节点的当前负荷与所述每个网络节点对应的最大负荷,确定第一分数;Determine a first score based on the current load of each network node and the maximum load corresponding to each network node;基于所述每个网络节点的当前性能与所述每个网络节点对应的最优性能,确定第二分数;Determine a second score based on the current performance of each network node and the optimal performance corresponding to each network node;基于所述每个网络节点与用户终端的当前距离、网络节点与用户终端的当前距离和优先值的关系表,确定第三分数;Determine the third score based on the relationship table of the current distance between each network node and the user terminal, the current distance between the network node and the user terminal, and the priority value;基于所述第一分数、所述第二分数以及所述第三分数,确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。Based on the first score, the second score, and the third score, determine the priority of each network node in executing the microservice corresponding service in the service request.
- [援引加入(细则20.6) 17.07.2020]
根据权利要求19所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:基于以下公式确定所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度;其中,A为所述第一分数,B为所述第二分数,C为所述第三分数,α、β和γ为大于零的正常数,S为所述每个网络节点在执行所述业务请求中的微服务对应业务的优先度。[Add by reference (Rule 20.6) 17.07.2020]
The computer-readable storage medium according to claim 19, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:Determine the priority of each network node in executing the service corresponding to the microservice in the service request based on the following formula;Wherein, A is the first score, B is the second score, C is the third score, α, β, and γ are normal numbers greater than zero, and S is the execution of each network node The priority of the microservice in the business request corresponding to the business.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910667400.0 | 2019-07-23 | ||
CN201910667400.0A CN110460647B (en) | 2019-07-23 | 2019-07-23 | Network node scheduling method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021012795A1 true WO2021012795A1 (en) | 2021-01-28 |
Family
ID=68483247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/093598 WO2021012795A1 (en) | 2019-07-23 | 2020-05-30 | Network node scheduling method and apparatus, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110460647B (en) |
WO (1) | WO2021012795A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114257493A (en) * | 2021-12-17 | 2022-03-29 | 中国电信股份有限公司 | Fault early warning method, device, medium and electronic equipment for network node |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110460647B (en) * | 2019-07-23 | 2021-10-22 | 平安科技(深圳)有限公司 | Network node scheduling method and device, electronic equipment and storage medium |
CN111092816B (en) * | 2019-11-26 | 2022-02-15 | 金蝶软件(中国)有限公司 | Gateway dynamic routing method, gateway dynamic routing device, computer equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102726031A (en) * | 2011-07-22 | 2012-10-10 | 华为技术有限公司 | Content processing method, device and system |
CN102868935A (en) * | 2012-08-24 | 2013-01-09 | 乐视网信息技术(北京)股份有限公司 | Scheduling method for responding multiple sources in content distribution network (CDN) |
US20180219932A1 (en) * | 2017-01-31 | 2018-08-02 | Wipro Limited | Method and system for proactively selecting a content distribution network (cdn) for delivering content |
CN108512890A (en) * | 2018-01-25 | 2018-09-07 | 中铝视拓智能科技有限公司 | A kind of container cloud platform resource regulating method and system based on rack perception |
CN108563499A (en) * | 2018-04-27 | 2018-09-21 | 努比亚技术有限公司 | CDN server switching method, mobile terminal and computer readable storage medium |
CN109802997A (en) * | 2018-12-20 | 2019-05-24 | 华为技术服务有限公司 | A kind of selection method and its relevant device of node device |
CN110460647A (en) * | 2019-07-23 | 2019-11-15 | 平安科技(深圳)有限公司 | Dispatching method, device, electronic equipment and the storage medium of network node |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11323508B2 (en) * | 2009-05-22 | 2022-05-03 | Comcast Interactive Media, Llc | Web service system and method |
CN103780654B (en) * | 2012-10-24 | 2018-05-18 | 华为技术有限公司 | Service request processing method, user terminal, business router and network system |
CN103916472B (en) * | 2014-04-03 | 2018-03-13 | 华为软件技术有限公司 | A kind of content routing method and device |
CN106302565B (en) * | 2015-05-12 | 2020-11-24 | 浙江格林蓝德信息技术有限公司 | Scheduling method and system of service server |
CN105847381A (en) * | 2016-04-18 | 2016-08-10 | 乐视控股(北京)有限公司 | Scheduling method and device for content server |
CN106101232A (en) * | 2016-06-16 | 2016-11-09 | 北京思源置地科技有限公司 | Load-balancing method and device |
CN106227611A (en) * | 2016-07-26 | 2016-12-14 | 北京北森云计算股份有限公司 | The dynamic micro services call method of a kind of multilingual cloud compiling and device |
CN109067869A (en) * | 2018-08-01 | 2018-12-21 | 郑州云海信息技术有限公司 | The management method and device of micro services node in cloud computing system |
CN109729155A (en) * | 2018-12-13 | 2019-05-07 | 平安医疗健康管理股份有限公司 | A kind of distribution method and relevant apparatus of service request |
CN109901927A (en) * | 2019-02-21 | 2019-06-18 | 国泰君安证券股份有限公司 | Intelligent Task dynamic scheduling system and its method |
-
2019
- 2019-07-23 CN CN201910667400.0A patent/CN110460647B/en active Active
-
2020
- 2020-05-30 WO PCT/CN2020/093598 patent/WO2021012795A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102726031A (en) * | 2011-07-22 | 2012-10-10 | 华为技术有限公司 | Content processing method, device and system |
CN102868935A (en) * | 2012-08-24 | 2013-01-09 | 乐视网信息技术(北京)股份有限公司 | Scheduling method for responding multiple sources in content distribution network (CDN) |
US20180219932A1 (en) * | 2017-01-31 | 2018-08-02 | Wipro Limited | Method and system for proactively selecting a content distribution network (cdn) for delivering content |
CN108512890A (en) * | 2018-01-25 | 2018-09-07 | 中铝视拓智能科技有限公司 | A kind of container cloud platform resource regulating method and system based on rack perception |
CN108563499A (en) * | 2018-04-27 | 2018-09-21 | 努比亚技术有限公司 | CDN server switching method, mobile terminal and computer readable storage medium |
CN109802997A (en) * | 2018-12-20 | 2019-05-24 | 华为技术服务有限公司 | A kind of selection method and its relevant device of node device |
CN110460647A (en) * | 2019-07-23 | 2019-11-15 | 平安科技(深圳)有限公司 | Dispatching method, device, electronic equipment and the storage medium of network node |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114257493A (en) * | 2021-12-17 | 2022-03-29 | 中国电信股份有限公司 | Fault early warning method, device, medium and electronic equipment for network node |
CN114257493B (en) * | 2021-12-17 | 2024-04-23 | 中国电信股份有限公司 | Fault early warning method and device for network node, medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110460647A (en) | 2019-11-15 |
CN110460647B (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021036228A1 (en) | File upload method and apparatus, terminal, server, system, and storage medium | |
WO2019042294A1 (en) | Resource allocation method and related product | |
US9094483B2 (en) | System and method for collecting and evaluating statistics to establish network connections | |
CN110417879A (en) | A kind of message treatment method, device, equipment and storage medium | |
WO2021012795A1 (en) | Network node scheduling method and apparatus, electronic device and storage medium | |
CN110489440B (en) | Data query method and device | |
WO2023273544A1 (en) | Log file storage method and apparatus, device, and storage medium | |
US11582321B2 (en) | Service request processing method and related apparatus | |
US12041688B2 (en) | Screen projection method and system | |
WO2019104974A1 (en) | Dubbo platform-based automatic server starting and stopping method , server, and storage medium | |
KR20210083222A (en) | Method, apparatus, device and storage medium for processing voice data | |
WO2019047708A1 (en) | Resource configuration method and related product | |
WO2019232932A1 (en) | Node processing method and apparatus, and computer-readable storage medium and electronic device | |
CN112600761A (en) | Resource allocation method, device and storage medium | |
CN108337301A (en) | Network request processing method, device, server and the storage medium of application program | |
CN114756312A (en) | System and method for remote assistance optimization of local services | |
WO2021088671A1 (en) | Method for calling terminal capability, device, and computer storage medium | |
WO2020233364A1 (en) | Resource processing platform confirmation method and apparatus, and electronic device and medium | |
WO2021051879A1 (en) | Target parameter selection method in reverse proxy evaluation model and related apparatus | |
CN111314495A (en) | Communication method, device, equipment, storage medium and system based on LoRaWAN of Internet of things | |
WO2020238131A1 (en) | Web crawler system testing method and apparatus, storage medium, and electronic device | |
EP4142258A1 (en) | Edge computing network, data transmission method and apparatus, device and storage medium | |
CN114390239B (en) | Communication method, device, system, electronic device, and storage medium | |
US20240054107A1 (en) | File processing method, electronic device, and storage medium | |
CN115567602A (en) | CDN node back-to-source method, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20844916 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20844916 Country of ref document: EP Kind code of ref document: A1 |