Service scheduling method and device, electronic equipment and storage medium

文档序号:7318 发布日期:2021-09-17 浏览:22次 中文

1. The service scheduling method is characterized in that the method is applied to a load balancer in a micro service architecture, and the load balancer is in communication connection with each micro service instance in the micro service; the method comprises the following steps:

receiving a service calling request sent by a terminal;

acquiring load information of each micro-service instance, wherein the load information is used for representing the capability of each micro-service instance for processing a service call request and the processing state of the current service call request;

and determining a target micro-service instance in each micro-service instance according to the load information, and sending the received service call request to the target micro-service instance.

2. The method of claim 1, wherein the obtaining load information of the respective microservice instances comprises:

acquiring the number of service calling requests received and the number of service calling requests successfully processed by each micro-service instance in a preset historical time period;

determining the success rate of processing the service call requests by each micro-service instance according to the received service call request number and the successfully processed service call request number;

acquiring the number of server requests processed currently by each micro-service instance;

and for each micro service instance, taking the server request number and the success rate of the current processing of the micro service instance as the load information of the micro service instance.

3. The method of claim 2, wherein the determining a target micro-service instance of the individual micro-service instances from the load information comprises:

sequencing each micro-service instance according to the success rate of each micro-service instance for processing the service call request to obtain a sequencing result;

and selecting a target micro-service instance from each micro-service instance according to the service calling request number of the current processing of each micro-service instance and the sequencing result.

4. The method of claim 2, wherein the load information further comprises time-consuming information; the determining a target micro-service instance of the micro-service instances according to the load information includes:

acquiring time-consuming information respectively corresponding to each micro-service processing service calling request;

sequencing each micro-service example according to the success rate of each micro-service example for processing the service calling request and the time consumption information to obtain a sequencing result;

and selecting a target micro-service instance from each micro-service instance according to the service calling request number of the current processing of each micro-service instance and the sequencing result.

5. The method according to claim 3 or 4, wherein the selecting a target micro-service instance from the respective micro-service instances according to the service invocation request number currently processed by the respective micro-service instance and the sorting result comprises:

acquiring the load occupancy rate of each micro service in each micro service according to the service call request number processed by each micro service instance at present and the service call request number processed in a preset historical time period;

selecting a first preset number of micro-service instances from each micro-service according to the load occupancy rate, and selecting a second preset number of micro-service instances from each micro-service according to the sorting result;

and selecting the micro service instances of the coincident part of the first number of micro service instances and the second preset number of micro service instances, and determining the target micro service instance from the micro service instances of the coincident part.

6. The data processing device is characterized by being applied to a load balancer in a micro-service architecture, wherein the load balancer is in communication connection with each micro-service instance in a micro-service; the device comprises:

a service call request receiving unit configured to receive a service call request transmitted by a terminal;

a load information obtaining unit, configured to obtain load information of each micro service instance, where the load information is used to represent a capability of each micro service instance for processing a service invocation request and a processing state of a current service invocation request;

an instance determining unit configured to determine a target micro-service instance in the respective micro-service instances according to the load information;

instance sending configured to send the received service invocation request to the target microservice instance.

7. The apparatus of claim 6, wherein the load information obtaining unit comprises:

the first service calling request number acquisition module is configured to acquire the number of the received service calling requests and the number of the successfully processed service calling requests of each micro service instance in a preset historical time period;

the success rate determining module is configured to determine the success rate of processing the service calling request by each micro service instance according to the number of the received service calling requests and the number of the successfully processed service calling requests;

the second service calling request number acquisition module is configured to acquire the server request number currently processed by each micro-service instance;

the load information acquisition module is configured to, for each micro-service instance, take the number of server requests currently processed by the micro-service instance and the success rate as the load information of the micro-service instance.

8. An electronic device, comprising:

a processor;

a memory for storing processor-executable instructions;

wherein the processor is configured to perform the service scheduling method of any one of claims 1-5.

9. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a service scheduling method, the method comprising the steps of the service scheduling method of any one of claims 1-5.

10. An application/computer program product, characterized in that it causes a computer to perform the steps of the service scheduling method according to any one of claims 1 to 5 when run on the computer.

Background

With the development of computer software technology, computer application programs are more powerful and more complex. In order to ensure the development efficiency of applications, people begin to develop or update applications or services in a way of micro-service architecture.

In a microservice architecture, a microservice generally consists of multiple instances, and when a microservice initiates a Remote Call (RPC) request, the request is sent to the corresponding instance. However, with the expansion of the application system functions and the splitting of complex business logic, the number of micro-service instances is increasing, and when the instances are called, once the called service instances have insufficient processing capacity, the normal operation of the micro-service is likely to be affected.

Disclosure of Invention

To overcome the problems in the related art, the present disclosure provides a service scheduling method, apparatus, electronic device, and storage medium.

According to a first aspect of the embodiments of the present disclosure, a service scheduling method is provided, where the method is applied to a load balancer in a micro service architecture, where the load balancer is in communication connection with each micro service instance in a micro service; the method comprises the following steps:

receiving a service calling request sent by a terminal;

acquiring load information of each micro-service instance, wherein the load information is used for representing the capability of each micro-service instance for processing a service call request and the processing state of the current service call request;

and determining a target micro-service instance in each micro-service instance according to the load information, and sending the received service call request to the target micro-service instance.

Optionally, the obtaining load information of each micro service instance includes:

acquiring the number of service calling requests received and the number of service calling requests successfully processed by each micro-service instance in a preset historical time period;

determining the success rate of processing the service call requests by each micro-service instance according to the received service call request number and the successfully processed service call request number;

acquiring the number of server requests processed currently by each micro-service instance;

and for each micro service instance, taking the server request number and the success rate of the current processing of the micro service instance as the load information of the micro service instance.

Optionally, the determining, according to the load information, a target micro service instance in the respective micro service instances includes:

sequencing each micro-service instance according to the success rate of each micro-service instance for processing the service call request to obtain a sequencing result;

and selecting a target micro-service instance from each micro-service instance according to the service calling request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the load information further includes time consumption information; the determining a target micro-service instance of the micro-service instances according to the load information includes:

acquiring time-consuming information respectively corresponding to each micro-service processing service calling request;

sequencing each micro-service example according to the success rate of each micro-service example for processing the service calling request and the time consumption information to obtain a sequencing result;

and selecting a target micro-service instance from each micro-service instance according to the service calling request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the selecting, according to the service invocation request number currently processed by each micro-service instance and the sequencing result, a target micro-service instance from each micro-service instance includes:

acquiring the load occupancy rate of each micro service in each micro service according to the service call request number processed by each micro service instance at present and the service call request number processed in a preset historical time period;

selecting a first preset number of micro-service instances from each micro-service according to the load occupancy rate, and selecting a second preset number of micro-service instances from each micro-service according to the sorting result;

and selecting the micro service instances of the coincident part of the first number of micro service instances and the second preset number of micro service instances, and determining the target micro service instance from the micro service instances of the coincident part.

According to a second aspect of the embodiments of the present disclosure, there is provided a service scheduling apparatus, applied to a load balancer in a micro-service architecture, where the load balancer is in communication connection with each micro-service instance in a micro-service; the device comprises:

a service call request receiving unit configured to receive a service call request transmitted by a terminal;

a load information obtaining unit, configured to obtain load information of each micro service instance, where the load information is used to represent a capability of each micro service instance for processing a service invocation request and a processing state of a current service invocation request;

an instance determining unit configured to determine a target micro-service instance in the respective micro-service instances according to the load information;

instance sending configured to send the received service invocation request to the target microservice instance.

Optionally, the load information obtaining unit includes:

the first service calling request number acquisition module is configured to acquire the number of the received service calling requests and the number of the successfully processed service calling requests of each micro service instance in a preset historical time period;

the success rate determining module is configured to determine the success rate of processing the service calling request by each micro service instance according to the number of the received service calling requests and the number of the successfully processed service calling requests;

the second service calling request number acquisition module is configured to acquire the server request number currently processed by each micro-service instance;

and the load information acquisition module is configured to take the server request number and the success rate of the current processing of the micro service instance as the load information of the micro service instance for each micro service instance.

Optionally, the instance determining unit includes:

the ordering module is configured to order the micro-service examples according to the success rate of processing the service call request by the micro-service examples to obtain an ordering result;

and the selection module is configured to select a target micro-service instance from each micro-service instance according to the service call request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the load information further includes time consumption information; the instance determination unit includes:

the time-consuming information acquisition module is configured to acquire time-consuming information respectively corresponding to each micro-service processing service calling request;

the sequencing module is configured to sequence the micro-service examples according to the success rate of processing the service calling request of each micro-service example and the time consumption information to obtain a sequencing result;

and the sequencing module is configured to select a target micro-service instance from each micro-service instance according to the service call request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the selecting module includes:

the occupancy rate acquisition module is configured to acquire the load occupancy rate of each micro service in each micro service according to the service call request number processed by each micro service instance currently and the service call request number processed in a preset historical time period;

an instance selection module configured to select a first preset number of micro-service instances from the respective micro-services according to the load occupancy rate, and select a second preset number of micro-service instances from the respective micro-services according to the sorting result;

the instance determining module is configured to select a micro service instance with a superposed part from the first number of micro service instances and the second preset number of micro service instances, and determine the target micro service instance from the superposed micro service instances.

According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:

a processor;

a memory for storing processor-executable instructions;

wherein the processor is configured to perform any of the service scheduling methods described above.

In a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, in which instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform one of the service scheduling methods described above.

According to a fifth aspect of embodiments of the present disclosure, there is provided an application program/computer program product which, when run on a computer, causes the computer to perform the steps of the service scheduling method as described in any one of the above embodiments.

The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:

according to the service scheduling method, the service scheduling device, the electronic equipment and the storage medium, the responsible equalizer is arranged in the micro-service architecture, when the load equalizer receives a server request sent by a server, the load information of each micro-service instance is obtained to determine a target micro-service instance in each micro-service instance, and the received service call request is sent to the target micro-service instance for processing. Therefore, the micro-service instance with better service call request processing state and processing capability can be effectively selected from the plurality of micro-service instances, and the condition that the normal operation of the micro-service is influenced due to the selection of the micro-service instance with insufficient processing capability can be further avoided.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

FIG. 1 is a flow chart illustrating a method of service scheduling in accordance with an exemplary embodiment;

FIG. 2 is another flow diagram illustrating a service schedule in accordance with an exemplary embodiment;

FIG. 3 is a flowchart of step S130 in FIG. 1;

FIG. 4 is another flowchart of step S130 in FIG. 1;

FIG. 5 is another flow chart illustrating a service schedule according to an example embodiment

FIG. 6 is a block diagram illustrating a service scheduler in accordance with an exemplary embodiment;

FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

Fig. 1 is a flow chart illustrating a service scheduling method according to an exemplary embodiment, and the method is used for a load balancer in a micro-service architecture, the load balancer is connected with each micro-service instance in the micro-service, and the method includes the following steps:

in step S110, a service invocation request transmitted by the terminal is received.

In the embodiment provided by the disclosure, a load balancer is arranged in the micro service architecture, the load balancer is in communication connection with each micro service instance in the micro service, and the load balancer can receive a server request sent by a terminal so as to send the server request to a corresponding instance in the micro service for processing. The service invocation request may include a service IP address, a service port number, a service ID, and the like.

In step S120, load information of each microservice instance is acquired.

Because there are multiple micro-service instances in a general micro-service, the number of requests processed by each micro-service instance currently is different, and the processing capabilities of different micro-service instances may be different, the embodiment of the present disclosure needs to obtain load information of each micro-service instance, so as to select a suitable micro-service instance to process the service invocation request, thereby avoiding the problem that the selected micro-service instance cannot normally operate due to insufficient processing capability or excessive load. In practical application, when the micro-service instance is started, micro-service information can be automatically registered to the zookeeper of the distributed system, the micro-service instance is identified to be started, and a service calling request sent by a terminal can be processed. When the micro service instance is closed, the registered micro service instance information can be automatically logged out of the distributed system zookeeper, the micro service instance service is identified to be closed, and the service call request sent by the terminal cannot be processed. Therefore, the load balancer can acquire load information of each micro-service instance from the distributed system zookeeper. For clarity and completeness of the scheme description, the load information of each micro-service instance will be elaborated in the following embodiments.

In step S130, a target microservice instance in each microservice instance is determined according to the load information, and a service invocation request is sent to the target microservice instance.

The load information in the embodiment of the present disclosure may be one or more of the number of service invocation requests processed by each micro-service instance currently, the size of the success rate of processing in the historical period, the processing time consumption, and the like. The load information is used to represent the capability of each micro-service instance to process the service invocation request and the processing state of the current service invocation request, for example, the processing capability of the micro-service instance can be represented by the success rate of the service invocation request processing and the time consumption information of the service invocation request processing, and the processing state of the current server request of each micro-service instance can be represented by the number of the currently processed server requests.

According to the service scheduling method provided by the embodiment of the disclosure, the responsible equalizer is arranged in the micro-service architecture, when the load equalizer receives a server request sent by a server, the load information of each micro-service instance is acquired to determine a target micro-service instance in each micro-service instance, and the received service call request is sent to the target micro-service instance for processing. Therefore, the micro-service instance with better service call request processing state and processing capability can be effectively selected from the plurality of micro-service instances, and the condition that the normal operation of the micro-service is influenced due to the selection of the micro-service instance with insufficient processing capability can be further avoided.

In order to elaborate how to obtain the load information of each micro service, in another embodiment provided by the present disclosure, based on the above embodiment, as shown in fig. 2, the step S120 may further include the following steps:

in step S121, the number of received service invocation requests and the number of successfully processed service invocation requests of each microservice instance within the preset history time period are obtained.

In order to determine the processing capability of each micro-service instance in the micro-service for processing the service invocation request, the number of the service invocation requests received within the preset historical time period and the number of the service invocation requests successfully processed may be selected. The preset historical time period may be set as required, and may be, for example, one hour, one day, or several days in the past. The general micro-service instance processes the service call request to be processed when receiving the service call request, and the processing result is generally successful processing and unsuccessful processing (i.e. processing failure), and if the processing result is unsuccessful processing, the micro-service instance can be processed by re-processing or scheduling to other instances.

In step S122, a success rate of processing the service invocation request by each micro-service instance is determined according to the number of the received service invocation requests and the number of the successfully processed service invocation requests.

When the success rate of each micro-service instance for processing the service call request is determined, the number of the successfully processed service call requests in the preset historical time period may be divided by the number of the received server requests, and the obtained numerical value is used as the success rate of each micro-service instance for processing the micro-service call request in the preset historical time period. The number of received service invocation requests refers to the total number of service invocation requests received by one micro-service instance in a preset historical time period.

Step S123, acquiring the number of server requests processed currently by each micro-service instance;

and step S124, regarding each micro service instance, taking the server request number and the success rate of the current processing of the micro service instance as the load information of the micro service instance.

The method comprises the steps that the server request number and the success rate of current processing of each micro-service instance are used as load information, wherein the micro-service call request number of the current processing can be used for showing the processing state of the current service call request of each micro-service instance, namely how many server requests are currently processed by each micro-service instance; the success rate of server request processing can be used to represent the capability of each microservice instance to process service call requests. Therefore, the target micro-service instance determined by obtaining the load information of each micro-service instance can well process the currently received service call request, and the problem that the normal operation of the micro-service is influenced due to the fact that the micro-service cannot be normally processed due to insufficient processing capacity or overlarge load pressure of the micro-service instance is solved.

In order to further embody how to determine the target microservice instance from the respective microservice instances, in combination with the above embodiment, in a further embodiment provided by the present disclosure, as shown in fig. 3, the step S130 may further include the following steps:

in step S131, the micro-service instances are sorted according to the success rate of processing the service invocation request by each micro-service instance, so as to obtain a sorting result.

In step S132, a target microservice instance is selected from each microservice instance according to the service invocation request number and the sequencing result of the current processing of each microservice instance.

In the embodiment of the disclosure, when the success rate of processing the service invocation request by each micro-service instance is obtained, the micro-service instances with the higher success rate are preferentially selected when the success rate is obtained, the micro-service instances with the higher success rate are ranked according to the order of the success rate, that is, the micro-service instances with the higher success rate are ranked in the front and the micro-service instances with the lower success rate are ranked in the back.

In addition, the number of service call requests processed by each micro-service instance at present is also considered in the embodiment of the present disclosure, so that it is possible to avoid a situation that the service call requests cannot be processed in time due to a large load pressure caused by a large number of currently processed service call requests although the success rate of processing the service call requests by the selected target micro-service in the past is high.

In another embodiment provided by the present disclosure, it is further considered that time-consuming information of the micro-service processing service invocation request is taken into consideration as load information, so that the determined target micro-service instance is more effective, and therefore, as shown in fig. 4, the step S130 may specifically include the following steps:

in step S133, time-consuming information respectively corresponding to each micro-service processing service invocation request is obtained.

The time consumption information may be time consumption information generated when each micro service processes the service invocation request within a preset historical time period, and the shorter the time consumption is, the stronger the processing capability of the micro service instance can be reflected, so that the time consumption information of the micro service instance processing the service invocation request is taken as load information to be considered, and the processing capability of the micro service instance is further reflected.

In step S134, the microservice instances are sorted according to the success rate and the time consumption information of the microservice instance processing service invocation request, so as to obtain a sorting result.

In step S135, a target microservice instance is selected from each microservice instance according to the number of service invocation requests currently processed by each microservice instance and the sequencing result.

According to the embodiment of the disclosure, the time-consuming information generated when each service instance processes the service call request and the success rate of each micro-service instance processing the service call request are used as the load information together, so that the processing capability of the micro-service instance can be embodied more comprehensively. When the target micro-service instance is selected from all the micro-service instances, the micro-service instance with higher success rate and shorter time consumption is preferentially selected, so that the processing efficiency of the service calling request can be effectively improved. In addition, the number of service call requests processed by each micro-service instance at present is also considered in the embodiment of the present disclosure, so that it is possible to avoid a situation that the service call requests cannot be processed in time due to a large load pressure caused by a large number of currently processed service call requests although the success rate of processing the service call requests by the selected target micro-service in the past is high.

In conjunction with the above embodiment, to further illustrate how to select a target microservice instance from various microservice instances, in a further embodiment provided by the present disclosure, as shown in fig. 5, the above step S132 or S135 may further include the following steps:

in step S141, the load occupancy rate of each microservice in each microservice is obtained according to the number of service invocation requests currently processed by each microservice instance and the number of service invocation requests processed in the preset history time period.

In step S142, a first preset number of micro-service instances are selected from each micro-service according to the load occupancy rate, and a second preset number of micro-service instances are selected from each micro-service according to the sorting result.

In step S143, a microservice instance in which the first number of microservice instances and the second number of microservice instances overlap is selected, and a target microservice instance is determined from the overlapping microservice instances.

In the embodiment of the disclosure, when the number of currently processed micro services of each micro service instance is obtained and the number of service call requests processed in the preset historical time period, the load occupancy rate of each micro service in each micro service can be obtained by dividing the number of currently processed micro services by the number of service call requests processed in the preset historical time period. In an embodiment, the number of service call requests processed within the preset history time period may be an average number of service call requests processed within the preset history time period for each micro-service instance. Since the micro-service instances in the historical time period generally run normally, the number of requests processed by the micro-service instances in the historical time period can be taken as a reference, for example, the micro-service instances can be taken as a full load running condition, and then the number of the micro-services currently processed is divided by the number of the service call requests processed in the preset historical time period, so that the micro-service instances can be regarded as the load occupancy rate of each micro-service in each micro-service. If the number of the requests processed by the current micro-service instance is larger than the number of the requests in the historical time period, the micro-service instance is likely to be operated at full load; if the number of requests processed by the current micro-service instance is far less than the number of requests in the historical time period, the load occupation rate of the micro-service instance is low.

The method and the device for processing the micro service call requests select the micro service instances with the first preset number from the micro services according to the obtained load occupancy rates, and can select the micro service instances with the first preset number from the micro service instances according to the low-to-high sequence of the occupancy rates, which is equivalent to select the micro service instances with the first preset number from the micro service instances according to the processing states of the current service call requests of the instances; and then selecting a second preset number of micro-service examples from the micro-service examples according to the success rate or a sequencing result obtained according to the success rate and the time consumption information, wherein the second preset number of micro-service examples are equivalent to the second preset number of micro-service examples with better processing capability selected from the micro-service examples according to the processing capability of the micro-service. And finally, selecting a target micro-service instance (if the number of the overlapped parts is multiple, one can be determined from the multiple overlapped parts) from the two overlapped parts, which is equivalent to selecting the target micro-service instance from the instance with better state of the current processing server request and the instance with better processing capability at the same time, so that the selected micro-service instance can well process the server request sent by the load balancer, and the processing of the service call request is prevented from being influenced by the processing capability and the state of the processed micro-service instance.

Fig. 6 is a block diagram illustrating a service scheduler in accordance with an example embodiment. Referring to fig. 6, the apparatus includes a service invocation request receiving unit 10, a load information obtaining unit 20, an instance determining unit 30, and an instance sending unit 40.

A service invocation request receiving unit 10 configured to receive a service invocation request sent by a terminal;

a load information obtaining unit 20, configured to obtain load information of each micro service instance, where the load information is used to characterize a capability of each micro service instance for processing a service invocation request and a processing state of a current service invocation request;

an instance determining unit 30 configured to determine a target micro service instance in the respective micro service instances according to the load information;

instance sending 40 configured to send the received service invocation request to the target microservice instance.

Optionally, the load information obtaining unit includes:

the first service calling request number acquisition module is configured to acquire the number of the received service calling requests and the number of the successfully processed service calling requests of each micro service instance in a preset historical time period;

the success rate determining module is configured to determine the success rate of processing the service calling request by each micro service instance according to the number of the received service calling requests and the number of the successfully processed service calling requests;

and the second service calling request number acquisition module is configured to acquire the server request number currently processed by each micro-service instance, and take the server request number currently processed by each micro-service instance and the success rate as the load information.

Optionally, the instance determining unit includes:

the ordering module is configured to order the micro-service examples according to the success rate of processing the service call request by the micro-service examples to obtain an ordering result;

and the selection module is configured to select a target micro-service instance from each micro-service instance according to the service call request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the load information further includes time consumption information; the instance determination unit includes:

the time-consuming information acquisition module is configured to acquire time-consuming information respectively corresponding to each micro-service processing service calling request;

the sequencing module is configured to sequence the micro-service examples according to the success rate of processing the service calling request of each micro-service example and the time consumption information to obtain a sequencing result;

and the sequencing module is configured to select a target micro-service instance from each micro-service instance according to the service call request number of the current processing of each micro-service instance and the sequencing result.

Optionally, the selecting module includes:

the occupancy rate acquisition module is configured to acquire the load occupancy rate of each micro service in each micro service according to the service call request number processed by each micro service instance currently and the service call request number processed in a preset historical time period;

an instance selection module configured to select a first preset number of micro-service instances from the respective micro-services according to the load occupancy rate, and select a second preset number of micro-service instances from the respective micro-services according to the sorting result;

the instance determining module is configured to select a micro service instance with a superposed part from the first number of micro service instances and the second preset number of micro service instances, and determine the target micro service instance from the superposed micro service instances.

With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

According to the service scheduling method provided by the embodiment of the disclosure, the responsible equalizer is arranged in the micro-service architecture, when the load equalizer receives a server request sent by a server, the load information of each micro-service instance is acquired to determine a target micro-service instance in each micro-service instance, and the received service call request is sent to the target micro-service instance for processing. Therefore, the micro-service instance with better service call request processing state and processing capability can be effectively selected from the plurality of micro-service instances, and the condition that the normal operation of the micro-service is influenced due to the selection of the micro-service instance with insufficient processing capability can be further avoided.

Fig. 7 is a block diagram illustrating an apparatus 800 for service scheduling according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.

Referring to fig. 7, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.

The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.

The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.

Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.

The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.

The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The apparatus 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described data processing methods.

In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

The disclosed embodiments also provide a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the above-mentioned service scheduling method.

There is also provided an application program/computer program product according to an embodiment of the present disclosure, and in yet another embodiment provided by the present disclosure, there is also provided a computer program product including instructions, which when run on a computer, cause the computer to perform the steps of the service scheduling method according to any one of the above embodiments.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber, DSL (Digital Subscriber Line)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a DVD (Digital Versatile Disk)), or a semiconductor medium (e.g., an SSD (Solid State Disk)), etc.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种资源调度方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!