Service scheduling method, device, electronic device and storage medium
By periodically adding pending services to the service processing queue and adjusting the interval time according to the expected processing timeout, the problem of business processing timeout is solved, and the dynamic balance of the service queue and the improvement of resource utilization is achieved.
Patent Information
- Application Number
- CN202110304039.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-03-22
AI Technical Summary
In the business processing system, the business queue cannot respond to a large number of pending services in a timely manner when the processing capacity is limited, resulting in a timeout of the business processing.
When the service processing queue does not meet normal working conditions, it periodically adds the pending services at a preset interval time until the queue meets normal working conditions, and updates the interval time according to the expected processing time, so as to achieve dynamic balance of the service queue.
Avoid business processing timeouts, ensure a stable growth in the number of services in the business queue, make full use of processing resources, and reduce resource waste.
Smart Images

Figure CN113094160B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer applications, and in particular to a service scheduling method, device, electronic device and storage medium. Background Art
[0002] In order to handle the significantly growing number of Internet services, many service processing systems use service queues to schedule services to be processed. Specifically, the unit responsible for processing services can obtain the services to be processed that are scheduled to the unit from the service queue. Since the service queue can be used as a buffer, when the service processing speed of the unit or the speed of new services to be processed fluctuates, the above solution can avoid the unit from being idle, make full use of the unit's processing capacity, and improve the stability of service processing.
[0003] However, in the above scheduling scheme, in order to give full play to the buffering effect of the business queue, it may happen that as many pending businesses as possible are added to the business queue. However, the processing capacity of the processing unit itself is limited and cannot respond in time to the large amount of pending businesses added to the business queue in a short period of time, which may cause the processing of the pending businesses to time out. Summary of the invention
[0004] In view of this, the present disclosure provides a service scheduling method, device, electronic device and storage medium to at least solve the technical problems in the related art. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a service scheduling method is proposed, which is characterized by comprising:
[0006] When the service processing queue is initially in an empty state, adding a first preset number of to-be-processed services to the service processing queue;
[0007] When the service processing queue does not meet the normal working conditions, the first interval length T 1 periodically adding a second preset number of pending services to the service processing queue until the service processing queue meets normal working conditions; the normal working conditions at least include: the service processing queue is full;
[0008] Among them, the first interval time T 1 is within a preset time interval, and the preset time interval includes the expected processing time T of the second preset number of pending services. 0 ; The first interval duration T 1 The expected processing time T 0 The time interval does not exceed the set threshold.
[0009] Optionally, the normal working conditions also include:
[0010] The duration that the service processing queue is in a non-empty state is greater than a preset duration threshold.
[0011] Optionally, the duration threshold includes:
[0012] The product of the capacity of the service processing queue and the expected processing time of a single service to be processed.
[0013] Optionally, the method further includes:
[0014] Update the expected processing time T of the second preset number of pending services 0 ;
[0015] According to the updated expected processing time T 0 , reset the first interval time T 1 .
[0016] Optionally, the service includes a session task, the service processing queue includes a session queue, and the expected processing time includes a session duration.
[0017] According to a second aspect of an embodiment of the present disclosure, a service scheduling device is provided, which is characterized by comprising:
[0018] A first adding module is configured to add a first preset number of to-be-processed businesses to the business processing queue when the business processing queue is initially in an empty state;
[0019] The second adding module is configured to, when the service processing queue does not meet the normal working conditions, 1 periodically adding a second preset number of pending services to the service processing queue until the service processing queue meets normal working conditions; the normal working conditions at least include: the service processing queue is full;
[0020] Among them, the first interval time T 1 is within a preset time interval, wherein the preset time interval includes the expected processing time T of the second preset number of pending services. 0 ; The first interval duration T 1 The expected processing time T 0 The time interval does not exceed the set threshold.
[0021] Optionally, the normal working conditions also include:
[0022] The duration that the service processing queue is in a non-empty state is greater than a preset duration threshold.
[0023] Optionally, the duration threshold includes:
[0024] The product of the capacity of the service processing queue and the expected processing time of a single service to be processed.
[0025] Optionally, the device further comprises:
[0026] An updating module is configured to update the expected processing time T of the second preset number of pending services. 0 ;
[0027] A reset module is configured to reset the expected processing time T according to the updated 0 , reset the first interval time T 1 .
[0028] Optionally, the service includes a session task, the service processing queue includes a session queue, and the expected processing time includes a session duration.
[0029] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including:
[0030] processor;
[0031] a memory for storing instructions executable by the processor;
[0032] The processor is configured to execute the instructions to implement the service scheduling method described in any of the above embodiments.
[0033] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is proposed. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the service scheduling method described in any of the above embodiments.
[0034] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is proposed, comprising a computer program / instruction, wherein the computer program / instruction implements the service scheduling method described in any of the above embodiments when executed by a processor.
[0035] In the above technical solution, on the one hand, when the business processing queue does not meet the normal working conditions, the first interval length T 1 Periodically add pending businesses to the business processing queue, which distributes the pending businesses at the time level. A large number of pending businesses will not be added to the business processing queue in a short period of time, thus avoiding the problem of business processing timeout to a certain extent.
[0036] On the other hand, since the expected processing time T of each service to be executed added to the service processing queue is 0 , and the first interval duration T 1They are all within the preset time range, so the speed of adding and consuming services in the service queue is similar, which can form a dynamic balance and realize the sharing of the services to be processed at the quantity level, which will not lead to a rapid increase in the number of services in the service queue and can also avoid the problem of service processing timeout caused by too many new services in the service processing queue in a short period of time.
[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description text are used to explain the principles, and do not constitute improper limitations on the present disclosure.
[0039] Figure 1 is a schematic diagram of an architecture of a business processing system according to an embodiment of the present disclosure;
[0040] Figure 2 is a flow chart of a service scheduling method according to an embodiment of the present disclosure;
[0041] Figure 3 is a schematic diagram showing a change in the number of service tasks in a service queue according to an embodiment of the present disclosure;
[0042] Figure 4 is a schematic block diagram of a service scheduling device according to an embodiment of the present disclosure;
[0043] Figure 5 is a structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0045] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of systems and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0046] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0047] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0048] With the development of the Internet, in order to handle the significantly increased number of Internet services, many business processing systems use business queues to schedule the services to be processed; specifically, the unit responsible for processing the services can obtain the services to be processed scheduled to the unit from the business queue. Since the business queue can be used as a buffer, when the business processing speed of the unit or the speed of adding new services to be processed fluctuates, the above solution can avoid the above unit from being idle, make full use of the processing capacity of the unit, and improve the stability of business processing.
[0049] However, in the above scheduling scheme, in order to give full play to the buffering effect of the business queue, it may happen that as many pending businesses as possible are added to the business queue. However, the processing capacity of the processing unit itself is limited and cannot respond in time to the large amount of pending businesses added to the business queue in a short period of time, which may cause the processing of the pending businesses to time out.
[0050] Taking the intelligent customer service system as an example, if the intelligent customer service or customer service client is regarded as the above-mentioned processing unit, then for each intelligent customer service or customer service client, an intelligent customer service session queue can be set accordingly; assuming that the depth of the intelligent customer service session queue is 10, that is, the number of customers that each intelligent customer service or customer service client can access at the same time is 10, then before the intelligent customer service or customer service client is ready to start working, its corresponding intelligent customer service session queue should be empty, and once the intelligent customer service starts working, its corresponding intelligent customer service session queue will receive 10 customer service sessions to be processed at a time. In the disclosed embodiment, the intelligent customer can be an intelligent robot.
[0051] In this case, the intelligent customer service or customer service client needs to process the above 10 customer service sessions added to the intelligent customer service session queue at a similar time. Due to the limited processing efficiency of the intelligent customer service or customer service client, it is easy to cause some of the customer service sessions to time out.
[0052] In view of this, the present disclosure aims to propose a technical solution for adding to-be-processed services to a service processing queue in batches periodically at preset time intervals, so as to solve the related problems in the above-mentioned related technologies.
[0053] During implementation, when the business processing queue does not meet normal working conditions, a certain amount of pending business can be periodically added to the business processing queue at a preset interval; and the above interval and the expected processing time of the certain amount of pending business added to the business processing queue can fall within the same time range.
[0054] In the above technical solution, on the one hand, before the business processing queue meets the normal working conditions, pending businesses will be periodically added to the business processing queue at preset time intervals, so that the pending businesses are distributed at the time level, and a large number of pending businesses will not be added to the business processing queue in a short period of time. Therefore, the problem of business processing timeout can be avoided to a certain extent.
[0055] On the other hand, since the expected processing time of each pending business added to the business processing queue falls within the same time range as the preset interval time, the addition and consumption of businesses in the business queue will form a dynamic balance, and the pending businesses are shared at the quantity level, which will not lead to a rapid increase in the number of businesses in the business queue, and can also avoid the problem of business processing timeout caused by too many new businesses in the business processing queue in a short period of time.
[0056] In addition, since the above business scheduling process can be automatically completed by a computer, there is no need to manually adjust the preset upper limit of the number of tasks in the business processing queue repeatedly, so the problem of waste of management resources in related technologies will not occur.
[0057] The technical solution is described below through specific embodiments and in combination with specific application scenarios.
[0058] See also Figure 1 , Figure 1 The schematic diagram of the architecture of a business processing system according to an embodiment of the present disclosure is shown. In the architecture, the business processing system includes at least a scheduling server, a business processing queue and a business processing unit, wherein the scheduling server can have a communication connection with an external business source.
[0059] The above-mentioned business source can be a source that can provide the business to be processed, such as the intelligent customer service access portal of the website, the database containing the business to be processed in the cloud computing system, etc. Its specific content and form can be designed according to specific needs, and the present disclosure does not need to be specifically limited.
[0060] The above-mentioned scheduling server can be a server that can obtain the services to be processed from the above-mentioned service sources, and schedule and distribute them to various service processing queues. It can be understood that it can be a dedicated server, a server cluster, or a logical server, virtual machine or server process divided from a cloud server; on the premise of being able to realize the above-mentioned functions, the specific implementation form can be designed by those skilled in the art according to the specific situation.
[0061] The above-mentioned business processing queue can be a first-in-first-out queue in a narrow sense, or it can include a buffer zone that does not strictly require a processing order and can be processed in parallel; the specific data structure used for implementation can be selected according to specific needs and the characteristics of various data structures.
[0062] For example, for an intelligent customer service system, if the intelligent customer service conversation queue is implemented based on a first-in-first-out queue, then it can be guaranteed that the customer service conversations added to the queue earlier will be processed earlier, which is conducive to customers getting fairer and more stable services; if the intelligent customer service conversation queue is implemented based on a buffer that does not strictly require a processing order and can be processed in parallel, then a single intelligent customer service can also make full use of the time waiting for customer replies and process multiple customer service conversations in parallel, which can improve the flexibility and efficiency of the service, but it may cause some customer service conversations in the above buffer to not be processed, resulting in processing timeout accidents.
[0063] The above-mentioned business processing unit can be an automated business processing program module, or an interactive terminal loaded with or integrated with the business processing unit. For example, if the business processing system is an online AI image enlargement system, and the business to be processed includes high-precision image enlargement processing through the AI system, then the business processing unit can be a program module that can provide the above-mentioned AI image enlargement processing function; for another example, if the above-mentioned business system is an intelligent customer service conversation system, then the above-mentioned business processing unit may be an interactive terminal with an intelligent customer service client installed, and the intelligent customer service client is used to process business.
[0064] It is understandable that in a larger-scale business processing system, the number of business processing queues and business processing units may be more than one. The above-mentioned business processing units may correspond to the business processing queues one by one, or multiple business processing units may share the same business processing queue. Multiple business processing queues may be managed and scheduled by multiple scheduling servers, or by one scheduling server. For example, in a cloud computing system including multiple cloud computing servers, the computing business to be processed may enter the business processing queue as the above-mentioned business to be processed, wherein each cloud computing server may occupy a business processing queue, or a computing cluster composed of multiple cloud computing servers may share a business processing queue; if there are multiple business processing queues in the above-mentioned cloud computing system, then each business processing queue may be provided with a scheduling server for management and scheduling, or a scheduling server less than the number of business processing queues may be provided to manage and schedule one or more business processing queues respectively.
[0065] visible, Figure 1 The example shown is only a possible example for the convenience of description and is not intended to limit the present disclosure.
[0066] Please refer to Figure 2 , Figure 2 It is a flowchart of a service scheduling method provided by an embodiment of the present disclosure. The method can be applied to a scheduling server, and includes steps S201 and S202 to complete the scheduling of services to be processed.
[0067] S201: Add a first preset number of to-be-processed services to a service processing queue.
[0068] In this example, you can first add pending businesses to the above-mentioned business processing queue, and the specific number of added businesses can be determined according to the preset value; taking the intelligent customer service system as an example, assuming that the business processing queue capacity corresponding to each intelligent customer service is 8, you can first add 4 pending businesses to it, and then perform subsequent scheduling. It can be understood that the specific number of the above-mentioned preset values can be determined according to specific needs. If you want to give full play to the full function of the business processing queue as soon as possible, you can choose a higher first preset number; if you want to reduce the backlog of pending businesses, you can choose a lower first preset number, so this disclosure does not need to further limit the first preset number. It can be understood that if the above-mentioned first preset number is 0, it means going directly to the next step.
[0069] S202: When the service processing queue does not meet normal working conditions, the service processing queue is reset with a first interval length T 1 is a period, and a second preset number of pending services are periodically added to the service processing queue until the service processing queue meets normal working conditions; wherein the first interval duration T1 is within a preset time interval, wherein the preset time interval includes the expected processing time T of the second preset number of pending services. 0 .
[0070] In this example, the above normal working conditions can be designed according to specific needs. For example, assuming that the aforementioned business that needs to be processed is an online picture AI enlargement business, and the server in the server cluster responsible for AI enlargement processing may need a period of time to initialize. In this case, if the server fails to complete the initialization, it can be considered as "not meeting normal working conditions". In specific implementations, technicians in this field can determine the specific standards of normal working conditions according to specific scenarios and needs.
[0071] In one embodiment shown, the above-mentioned normal working conditions may include that the time length of the business processing queue being in a non-empty state is greater than a preset time length threshold, or that the business processing queue is in a full state. Taking the intelligent customer service scenario as an example, assuming that according to statistics, 15 minutes after the intelligent customer service starts working and the corresponding business processing queue enters a non-empty state, the working capacity of the intelligent customer service will reach the expected normal state, then the above-mentioned time length threshold can be set to 15 minutes, so that within the first 15 minutes after the intelligent customer service starts working, the corresponding business processing queue will be identified by the above-mentioned scheduling server as not meeting the normal working conditions. For another example, setting the above-mentioned normal working condition to the business processing queue being in a full state can ensure that the second preset number of pending businesses will no longer be periodically added after the business processing queue is filled.
[0072] In one embodiment shown, the duration threshold may be the product of the capacity of the service processing queue and the expected processing time of a single service to be processed. For example, assuming that the capacity of the service processing queue is 10, and the expected processing time for processing one service to be processed is 90 seconds, the duration threshold may be set to 90 seconds * 10 = 900 seconds. With this solution, when the service processing queue is in a non-empty state for a time period greater than the duration threshold, the number of services to be processed that have been continuously processed by the processing unit that processes services in the service processing queue may be close to, equal to, or even greater than the capacity of the service processing queue, and therefore the service processing queue may be considered to have entered a normal working state. Of course, it is understandable that the method for selecting the duration threshold is only a feasible example, and those skilled in the art may also select other duration threshold standards according to specific needs. In some embodiments, we refer to the "processing unit that processes services in the service processing queue" as the processing unit corresponding to the service processing queue.
[0073] In this example, a second preset number of pending services may be periodically added to the service processing queue; specifically, the expected processing time T of the second preset number of pending services added is 0 , and the first interval duration T of the above cycle 1 Can be within the same preset time interval.
[0074] For example, if the expected processing time is T 0 If the first interval time T is 50 seconds, the preset time interval can be taken as "44 seconds to 56 seconds" including 50 seconds, so that the first interval time T 1 The value is also between "44 seconds and 56 seconds". The preset time interval can ensure that the preset interval time is close to the total estimated processing time of each added business to be processed, so that the speed of adding businesses in the business processing queue is close to the processing speed, so that the number of businesses in the business execution queue is maintained in a dynamic balance.
[0075] In practical applications, the preset time interval can be set to the expected processing time T 0 As the upper limit of the interval, the above preset interval time is slightly less than the above total expected processing time, that is, the speed of adding services in the service processing queue is slightly greater than the processing speed, so that the number of services in the service execution queue can be increased slowly. Since the growth rate of the number of services in the above service execution queue is low, the adverse effects of the backlog of services to be processed can be reduced; and because the number of services in the service execution queue will eventually grow to its capacity upper limit, the buffering effect of the queue can be better exerted, and the utilization rate of processing resources can be improved.
[0076] The specific value of the preset time interval can be set by those skilled in the art according to specific needs; for example, if the expected processing time T of the second preset number of pending services is 0 In order to slow down the growth of the number of services in the service execution queue, the time interval can be set to 85 seconds to 90 seconds, and the first interval time T of adding a second preset number of services to be processed to the service processing queue is 1 It can be any value between 85 seconds and 90 seconds.
[0077] It is also understandable that, when the service processing queue does not meet normal working conditions, the number of pending services added to the service processing queue each time can be determined according to specific needs. For example, one pending service can be added each time, or two, three, or other numbers that meet the service needs in a specific implementation scenario can be added, and the present disclosure does not need to be limited in detail.
[0078] See also Figure 3 , Figure 31 is a schematic diagram showing a change in the number of services in a service queue according to an embodiment of the present disclosure. In this example, a first interval time length T of adding a second preset number of services to be processed to the service processing queue is 1 =T, and the expected processing time of the second preset number of pending services is T 0 (5 / 3)T, where the second preset number is 5 units, which means that within the unit time T, 5 / (5 / 3)=3 units of business can be consumed in the business processing queue, and 5 units of business can be added, so that the average increase in the number of businesses in the business queue within the average time T is 5-3=2 units, and the growth curve shown in the figure can be obtained.
[0079] It can be seen that by controlling the relationship between the preset interval duration and the total estimated processing time of each added business to be processed, and then controlling the relationship between the business addition speed and processing speed in the business processing queue, the number of businesses in the business execution queue can achieve the expected slow growth.
[0080] In this example, the preset interval and the second preset number can be adjusted to meet new needs. For example, shortening the preset time interval can increase the growth rate of the number of services in the service processing queue, and for another example, reducing the second preset number can reduce the growth rate of the number of services in the service processing queue.
[0081] In one embodiment, the expected processing time T of the second preset number of pending services may also be 0 Update, so that according to the updated expected processing time T 0 , reset the first interval time T 1 For example, if the service processing efficiency of the service processing unit is reduced, it means that the expected processing time T 0 will become longer and may no longer meet the aforementioned total estimated processing time T 0 The first interval time T 1 The requirement of falling within the same preset time interval is met, so the speed of adding services in the service processing queue can be slowed down by increasing the above preset interval time.
[0082] By adopting this solution, the growth rate of the number of services to be processed can be adjusted when the service processing efficiency of the service processing unit changes, thereby avoiding service backlogs caused by too many services in the service processing queue, or resource idleness caused by too few services in the service processing queue.
[0083] In one embodiment, the above-mentioned business may include conversation tasks such as intelligent customer service conversation tasks, the above-mentioned business processing queue may include conversation queues such as intelligent customer service conversation queues, and the above-mentioned expected processing time may include conversation duration such as customer service conversation duration; it can be understood that the intelligent customer service conversation is only one implementable scenario of the present solution, and those skilled in the art may migrate the application scenarios of the above-mentioned technical solution according to specific needs.
[0084] The above content is all embodiments of the resource scheduling method disclosed in this disclosure. The present disclosure also provides embodiments of the corresponding resource scheduling device as follows:
[0085] See also Figure 4 , Figure 4 This is a schematic block diagram of a service scheduling device according to an embodiment of the present disclosure; the device can be applied to a scheduling server and may include the following modules:
[0086] A first adding module 501 is configured to add a first preset number of to-be-processed businesses to a business processing queue;
[0087] The second adding module 502 is configured to add the service processing queue to the service processing queue at a first interval length T when the service processing queue does not meet the normal working conditions. 1 periodically adding a second preset number of to-be-processed services to the service processing queue until the service processing queue meets normal working conditions;
[0088] Among them, the first interval time T 1 is within a preset time interval, wherein the preset time interval includes the expected processing time T of the second preset number of pending services. 0 ; The first interval duration T 1 The expected processing time T 0 The time interval does not exceed the set threshold.
[0089] In one embodiment, the above-mentioned normal working conditions may include that the time length during which the business processing queue is in a non-empty state is greater than a preset time length threshold, or that the business processing queue is in a full state; taking the intelligent customer service scenario as an example, assuming that according to statistics, the intelligent customer service will reach the expected normal state only after 15 minutes of continuous work from the beginning of work, then the above-mentioned time length threshold can be set to 15 minutes, so that the first 15 minutes after the intelligent customer service starts working are deemed to not meet the normal working conditions; for another example, setting the above-mentioned normal working conditions to the business processing queue being in a full state can ensure that the second preset number of pending businesses will no longer be periodically added after the business processing queue is filled.
[0090] In one embodiment, the duration threshold may be the product of the capacity of the service processing queue and the expected processing time of a single pending service; for example, assuming that the capacity of the service processing queue is 10, and the expected processing time for processing one pending service is 90 seconds, the duration threshold may be set to 90 seconds * 10 = 900 seconds. With this solution, when the duration of the service processing queue being in a non-empty state is greater than the duration threshold, the number of pending services continuously processed by the service processing queue may be greater than the capacity of the service processing queue, and therefore the service processing queue may be considered to have entered a normal working state. Of course, it is understandable that the method for selecting the duration threshold is only a feasible example, and technicians in this field may also select other duration threshold standards according to specific needs.
[0091] In one embodiment, the above-mentioned device may also include an update module and a reset module; wherein the above-mentioned update module may be configured to update the expected processing time of a second preset number of pending businesses, and the above-mentioned reset module may be configured to reset the above-mentioned preset interval time according to the updated expected processing time; by adopting this scheme, when the business processing efficiency of the business processing unit changes, the growth rate of the number of pending businesses may be adjusted, thereby avoiding business backlogs caused by too many businesses in the business processing queue, or resource vacancy caused by too few businesses in the business processing queue.
[0092] In one embodiment, the above-mentioned business may include a session task, the above-mentioned business processing queue may include a session queue, and the above-mentioned expected processing time may include session time consumption; it can be understood that the session is only an implementable scenario of the present solution, and those skilled in the art can migrate the application scenario of the above-mentioned technical solution according to specific needs.
[0093] Regarding the device in the above embodiment, the specific implementation method of each module therein has been described in detail in the embodiment describing the corresponding method, and will not be elaborated here.
[0094] The embodiment of the present disclosure further provides an electronic device, including:
[0095] processor;
[0096] a memory for storing instructions executable by the processor;
[0097] The processor is configured to execute the instructions to implement the service scheduling method as described in any of the above embodiments.
[0098] An embodiment of the present disclosure further provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the service scheduling method described in any of the above embodiments.
[0099] An embodiment of the present disclosure further provides a computer program product, which is configured to execute the service scheduling method described in any of the above embodiments.
[0100] Figure 5 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Figure 5 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 618 .
[0101] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the resource scheduling method described above. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0102] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0103] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0104] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the 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 input signals from the 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 boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed or optical lens system with focal length and optical zoom capability.
[0105] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 618. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0106] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as 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.
[0107] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 618 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 6G), or a combination thereof. In an exemplary embodiment, the communication component 618 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 618 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0109] In one embodiment of the present disclosure, the electronic device 600 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, microcontrollers, microprocessors or other electronic components to execute the above-mentioned resource scheduling method.
[0110] In an embodiment of the present disclosure, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to complete the resource scheduling method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0112] It should be understood that the present disclosure is not limited to the exact structures that have been 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.
[0113] It should be noted that, in the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises one..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0114] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
Claims
1. A service scheduling method, characterized in that: include: When the service processing queue is initially in an empty state, adding a first preset number of to-be-processed services to the service processing queue; When the business processing queue does not meet the normal working conditions, a second preset number of pending businesses are periodically added to the business processing queue with a first interval duration T1 as a period until the business processing queue meets the normal working conditions; wherein the first interval duration T1 is within a preset duration interval, and the preset duration interval contains the expected processing duration T0 of the second preset number of pending businesses; the time interval between the first interval duration T1 and the expected processing duration T0 does not exceed a set threshold; and the normal working conditions at least include: the business processing queue is full.
2. The service scheduling method according to claim 1, characterized in that: The normal working conditions also include: The duration that the service processing queue is in a non-empty state is greater than a preset duration threshold.
3. The service scheduling method according to claim 2, characterized in that: The duration thresholds include: The product of the capacity of the service processing queue and the expected processing time of a single service to be processed.
4. The service scheduling method according to claim 1, characterized in that: The method further comprises: Update the expected processing time T0 of the second preset number of pending services; The first interval duration T1 is reset according to the updated expected processing duration T0.
5. The service scheduling method according to claim 1, characterized in that: The service includes a session task, the service processing queue includes a session queue, and the expected processing time includes a session time.
6. A service scheduling device, characterized in that: include: A first adding module is configured to add a first preset number of to-be-processed businesses to the business processing queue when the business processing queue is initially in an empty state; The second adding module is configured to periodically add a second preset number of to-be-processed services to the service processing queue at a first interval T1 as a period when the service processing queue does not meet the normal working conditions, until the service processing queue meets the normal working conditions; Among them, the first interval duration T1 is within a preset duration range, wherein the preset duration range includes the expected processing duration T0 of the second preset number of pending services; the duration interval between the first interval duration T1 and the expected processing duration T0 does not exceed a set threshold; the normal working conditions at least include: the service processing queue is full.
7. The service scheduling device according to claim 6, characterized in that: The normal working conditions also include: The duration that the service processing queue is in a non-empty state is greater than a preset duration threshold.
8. The service scheduling device according to claim 7, characterized in that: The duration thresholds include: The product of the capacity of the service processing queue and the expected processing time of a single service to be processed.
9. The service scheduling device according to claim 6, characterized in that: The device also includes: An updating module, configured to update an expected processing time T0 of a second preset number of pending services; The reset module is configured to reset the first interval duration T1 according to the updated expected processing duration T0.
10. The service scheduling device according to claim 6, characterized in that: The service includes a session task, the service processing queue includes a session queue, and the expected processing time includes a session time.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the service scheduling method according to any one of claims 1 to 5. 12 . A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the service scheduling method according to claim 1 .
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the service scheduling method according to any one of claims 1 to 5 is implemented.
