Request processing method and device

By obtaining the resource requirements and preset constraints of the target period, the resource subset of the service period is automatically determined, which solves the problem of existing resource configuration relying on manual experience and realizes efficient and stable resource configuration and user request processing.

CN114599110BActive Publication Date: 2025-09-16JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210293158.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2025-09-16
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing resource allocation mainly relies on manual experience and lacks objectivity, resulting in low resource allocation efficiency and prone to errors, and difficulty in adapting to resource changes.

Method used

By obtaining the resource requirements of the target period, determining the resource subset of the service period according to the preset constraints, and processing user requests within the service period, automated and objective resource allocation is achieved.

Benefits of technology

It improves the automation level of resource allocation, reduces the waste of human resources, and ensures the objectivity of resource allocation and the stability of user request processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114599110B_ABST
    Figure CN114599110B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a request processing method and apparatus. A specific implementation of the method includes: obtaining the number of resource requirements for each target period in the target period set; determining, from the preset resource set, the resource subsets corresponding to each service period in the preset service period set based on the number of resource requirements corresponding to each target period, wherein each service period is composed of at least one target period in the target period set, and the resource requirements corresponding to each target period and the resource subsets corresponding to each service period meet preset constraints; for each service period, in response to receiving a user request within the service period, controlling the resources in the resource subset corresponding to the service period to process the received user request. This implementation helps to improve the degree of automation of resource configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a request processing method and apparatus. Background Art

[0002] In the development process of various industries, how to properly allocate resources is one of the fundamental issues that must be considered. Through proper resource allocation, we can avoid the situation where insufficient resources lead to the inability to provide services to users in a timely manner, and we can also avoid the situation where excessive resources lead to waste of resources.

[0003] Existing resource configurations are typically performed manually by technical personnel based on historical experience. For large-scale resource configuration scenarios, this approach relies heavily on the experience of resource configurers, lacks objectivity, and often results in significant changes to existing resource configurations due to a single resource change. This results in inefficient and error-prone resource allocation. Summary of the Invention

[0004] The embodiments of the present disclosure provide a request processing method and apparatus.

[0005] In a first aspect, an embodiment of the present disclosure provides a request processing method, the method comprising: obtaining the number of resource requirements for each target time period in a target time period set; determining, from a preset resource set, the resource subsets corresponding to each service time period in a preset service time period set based on the number of resource requirements corresponding to each target time period, wherein each service time period is composed of at least one target time period in the target time period set, and the number of resource requirements corresponding to each target time period and the resource subsets corresponding to each service time period meet preset constraints; for each service time period, in response to receiving a user request within the service time period, controlling the resources in the resource subset corresponding to the service time period to process the received user request.

[0006] In a second aspect, an embodiment of the present disclosure provides a request processing device, which includes: an acquisition unit, configured to acquire the number of resource requirements for each target time period in a target time period set; a determination unit, configured to determine, from a preset resource set, a resource subset corresponding to each service time period in a preset service time period set based on the number of resource requirements corresponding to each target time period, wherein each service time period is composed of at least one target time period in the target time period set, and the number of resource requirements corresponding to each target time period and the resource subset corresponding to each service time period meet preset constraints; a processing unit, configured to, for each service time period, in response to receiving a user request within the service time period, control the resources in the resource subset corresponding to the service time period to process the received user request.

[0007] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0009] The request processing method and device provided by the embodiments of the present disclosure obtain the resource demand number of each target time period, and then configure resources for each service time period composed of several target time periods according to the resource demand number and pre-set constraints. The constraints can be used to constrain the relationship between the resource demand number corresponding to each target time period and the resource subset corresponding to each service time period. Therefore, the constraints can be flexibly set according to the actual resource configuration requirements to ensure that the corresponding resources are rationally configured for each service time to process the user requests of the corresponding service time period under the premise of meeting the constraints, thereby improving the degree of automation of resource configuration. In addition, the constraints are used to ensure the objectivity of resource configuration in the process of resource configuration, thereby also improving the stability of user request processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present disclosure will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0012] Figure 2 is a flowchart of an embodiment of a request processing method according to the present disclosure;

[0013] Figure 3 is a flowchart of another embodiment of a request processing method according to the present disclosure;

[0014] Figure 4 is a flowchart of another embodiment of a request processing method according to the present disclosure;

[0015] Figure 5 is a schematic structural diagram of an embodiment of a request processing device according to the present disclosure;

[0016] Figure 6 It is a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0017] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0018] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0019] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a request processing method or a request processing apparatus of the present disclosure can be applied.

[0020] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0021] Terminal devices 101, 102, and 103 interact with server 105 via network 104 to receive or send messages, etc. Various client applications may be installed on terminal devices 101, 102, and 103, such as browser applications, search applications, instant messaging tools, shopping applications, management applications, and the like.

[0022] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or they can be implemented as a single software or software module. No specific limitation is made here.

[0023] The server 105 may be a server that provides various services, such as a back-end server that provides support for client applications installed on the terminal devices 101, 102, and 103. The server 105 may obtain the resource demand number for each target period in the target period set from the terminal devices 101, 102, and 103, and then determine, from the preset resource set, resource subsets corresponding to each service period in the preset service period set based on the resource demand number corresponding to each target period. Thus, for each service period, in response to receiving a user request within the service period, the server 105 controls the resources in the resource subset corresponding to the service period to process the received user request.

[0024] It should be noted that the resource requirement number for each target time period in the above-mentioned target time period set can also be directly stored locally on the server 105. The server 105 can directly extract the resource requirement number for each target time period in the locally stored target time period set and process it. At this time, the terminal devices 101, 102, 103 and the network 104 may not exist.

[0025] It should be noted that the request processing method provided in the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the request processing device is generally provided in the server 105 .

[0026] It should also be noted that a request processing application may also be installed in the terminal devices 101, 102, and 103. The terminal devices 101, 102, and 103 may also determine, based on the request processing application and the number of resource requirements corresponding to each target time period, the resource subsets corresponding to each service time period in the preset service time period set from the preset resource set. Thus, for each service time period, in response to receiving a user request within the service time period, the resources in the resource subset corresponding to the service time period are controlled to process the received user request. In this case, the request processing method may also be executed by the terminal devices 101, 102, and 103, and accordingly, the request processing apparatus may also be provided in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may not include the server 105 and the network 104.

[0027] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitations are given here.

[0028] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0029] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a request processing method according to the present disclosure. The request processing method includes the following steps:

[0030] Step 201: Obtain the resource requirement number of each target period in the target period set.

[0031] In this embodiment, a time period can be a time period indicating a certain time range. A target time period can be any time period. A target time period set can be composed of multiple target time periods. Generally, the time ranges indicated by the target time periods in the target time period set can be different, and the durations corresponding to the target time periods can be the same or different. For example, a target time period set can be obtained by dividing a specified week into half-hour granularities. In this case, the duration corresponding to each target time period in the target time period set is half an hour.

[0032] Resources can be used to provide services, specifically to process user requests. Depending on the user requests in different application scenarios, resources can be of various types. For example, resources can be servers, terminal devices, threads, or human resources (such as service personnel).

[0033] As an example, in some application scenarios, the user request is for requesting an image processing service, in which case the resource may be a server for providing the image processing service. As another example, in some application scenarios, the user request is for requesting an online customer service representative, in which case the resource may be a customer service representative.

[0034] The resource requirement number may refer to the required number of resources. The resource requirement number for each target period may refer to the required number of resources within the target period. Figure 1 The server 105 shown in the figure can obtain the resource requirement number from a local or other storage device. The resource requirement number for each target period can be determined flexibly using various methods.

[0035] For example, the resource requirement for each target period can be set by technical personnel based on actual application requirements. In another example, the resource requirement for each target period can be predicted based on the resource requirement for each historical period.

[0036] Step 202 : According to the resource demand number corresponding to each target time period, a resource subset corresponding to each service time period in the preset service time period set is determined from the preset resource set.

[0037] In this embodiment, a preset resource set may consist of several pre-specified resources. A service period may be any period. A preset service period set may consist of several pre-specified service periods. Any two service periods in a service period set may have overlapping or non-overlapping time ranges. Generally, the duration of a service period is no less than the duration of a target period. Each service period may consist of at least one target period in the target period set.

[0038] For example, a target period set includes four periods on four specified dates, where the first target period is 0:00-6:00, the second target period is 6:00-12:00, the third target period is 12:00-18:00, and the fourth target period is 18:00-24:00. A service period set includes three service periods, where the first service period is 0:00-12:00, the second service period is 6:00-18:00, and the third service period is 12:00-24:00. In this case, the first service period corresponds to the first and second target periods. The second service period corresponds to the second and third target periods. The third service period corresponds to the third and fourth target periods.

[0039] The resource subset may be a subset of the above-mentioned resource set. The resources in the resource subset corresponding to each service period may provide services for user requests received during that service period. After obtaining the resource requirements for each target period, the resource subset corresponding to each service period may be determined from the preset resource set based on preset constraints. The constraints may be pre-set by a technician based on actual application requirements. The constraints may be used to constrain the relationship between the resource requirements corresponding to each target period and the resource subset corresponding to each service period. For example, the constraints may include the quotient of the sum of the resource requirements of the resource subsets corresponding to each service period and the sum of the resource requirements of each target period being greater than a preset threshold.

[0040] Specifically, an expression can be used to express the relationship between the resource requirements corresponding to each target period and the resource subsets corresponding to each service period. Then, the expression can be optimized according to the resource requirements and constraints of each target period to obtain the resource subsets corresponding to each service period.

[0041] Optionally, the constraints may also be used to constrain the relationship between resource subsets corresponding to each service period. As an example, the constraints may include that the quotient of the sum of the number of resources included in the resource subsets corresponding to each service period and the sum of the number of resource requirements corresponding to each target period is greater than a preset threshold, and that there is no intersection between the resource subsets corresponding to each service period.

[0042] Therefore, the constraints can be flexibly set according to the actual application requirements, so that the resource subsets determined for each service period meet the actual demand targets.

[0043] Step 203: For each service period, in response to receiving a user request within the service period, controlling the resources in the resource subset corresponding to the service period to process the received user request.

[0044] In this embodiment, for each preset service period, if a user request is received within the service period, the resources in the resource subset corresponding to the service period may be controlled to process the user request to obtain a processing result.

[0045] According to different processing methods for different user requests, various methods can be flexibly used to control the resources in the resource subset corresponding to the service period to process the user request. Among them, the number of resources to process each user request can be specifically set according to the actual application scenario.

[0046] For example, if the resource is a server, you can control the server in the corresponding resource subset to handle user requests. If the resource is human resources (such as customer service personnel), you can control the terminal devices used by customer service personnel (such as desktop computers, tablets, mobile phones, etc.) to connect to the terminal devices used by the customer service personnel, so that the customer service personnel can understand user requests in a timely manner and handle them accordingly.

[0047] In some optional implementations of this embodiment, the constraint condition may include that the difference between the first total number of resources and the second total number of resources meets a preset condition. The first total number of resources may be determined based on the sum of the number of resources included in the resource subsets corresponding to each service period. For example, the sum of the number of resources included in the resource subsets corresponding to each service period may be directly determined as the first total number of resources. The second total number of resources may be determined based on the sum of the number of resource requirements corresponding to each target period. For example, the sum of the number of resource requirements corresponding to each target period may be directly determined as the second total number of resources.

[0048] The difference between the total number of the first resources and the total number of the second resources can be calculated to represent the difference between the actual configured resource consumption and the predicted resource demand. Based on this, constraints can be determined according to the requirements for the difference between the actual configured resource consumption and the predicted resource demand in actual applications to control the difference between the actual configured resource consumption and the predicted resource demand, thereby achieving resource configuration that meets application requirements and thus achieving corresponding service goals for user request processing.

[0049] Optionally, the first total number of resources may be determined based on a weighted sum of the number of resources included in the resource subsets corresponding to each service period, wherein the weight of each service period is determined based on processing capability information of the resources in the resource subset corresponding to the service period.

[0050] The processing capacity information of each resource can be used to indicate the resource's ability to process user requests. The methods for determining and representing the processing capacity of different resources may vary. For example, if the resource is a server, the server's processing capacity can be determined based on information such as the server's hardware and software configuration and network speed. For another example, if the resource is human resources, the processing capacity of customer service personnel can be the equivalent number of customer service personnel.

[0051] Generally, after obtaining the processing capacity information of each resource, the processing capacity information of each resource can be further normalized and the normalized processing capacity information can be used to update the processing capacity information of each resource. For example, after obtaining the processing capacity of each resource, the processing capacity of any resource can be selected as the standard processing capacity. The quotient of the processing capacity of each resource and the standard processing capacity is then determined as the processing capacity information of the resource. This represents the equivalent number of resources of each resource relative to the resource selected as the standard.

[0052] Based on the differences in the processing capabilities of various resources in actual scenarios, different weights are assigned to each resource to further accurately determine the actual configured resource consumption, thereby improving the rationality of the calculated resource configuration results and meeting the actual service goals as much as possible.

[0053] In some optional implementations of this embodiment, the number of service time period sets may be at least two, and each service time period set may correspond to a different time period. The time period can be set by a technician based on actual application requirements. For example, the time period may be one day, with each day corresponding to one service time period set. In this case, the request processing method described above can be used to determine the resource subset corresponding to each service time period in the service time period set corresponding to each time period.

[0054] As an example, the resource subsets corresponding to each service time period in the service time period set corresponding to each time period can be calculated using the following formula:

[0055]

[0056]

[0057] Where d represents the dth time period, D represents the number of time periods, i represents the ith target period, t represents the number of target periods, k represents the kth service period, K represents the number of service periods, F(k, t) is a Boolean value indicating whether the kth service period includes the tth target period, j represents the jth resource, and u represents the number of resources included in the resource set. j represents the number of equivalent resources of j. m represents the number of resource requirements. schedule(j, k, d) is an unknown Boolean value, indicating whether resource j belongs to the resource subset corresponding to service period k. Therefore, △ d,t This represents the absolute value of the difference between the actual resource requirements for the resource subsets corresponding to each service period and the predicted resource requirements m. F is the objective function to be optimized. The constraint can be to minimize F. In this case, the corresponding schedule (j, k, d) can be determined by minimizing F, thereby obtaining the subsets corresponding to each service period.

[0058] Optionally, after obtaining the resource subsets corresponding to the respective service periods, the resource subsets corresponding to the respective service periods may be further organized as resource configuration results (eg, generating charts, tables, etc.) for browsing by relevant users.

[0059] The method provided by the above-mentioned embodiment of the present disclosure obtains the resource demand number for each target time period, and then configures resources for each service period composed of several target time periods based on the resource demand number and pre-set constraints. The constraints can be used to constrain the relationship between the resource demand number corresponding to each target time period and the resource subset corresponding to each service period. Therefore, the constraints can be flexibly set according to the actual resource configuration requirements to ensure that the corresponding resources are rationally configured for each service time to process user requests in the corresponding service period under the premise of satisfying the constraints. Compared with the existing manual resource configuration method, the degree of automation of resource configuration is greatly improved, human resources are saved, and the use of constraints avoids the problem of high subjectivity in the manual resource configuration process.

[0060] Further references Figure 3 , which shows a process 300 of another embodiment of a request processing method. The process 300 of the request processing method includes the following steps:

[0061] Step 301: Obtain service demand information for each target period in the target period set.

[0062] In this embodiment, a service may be any of a variety of services provided by a resource. Service requirement information may be used to describe the required service. The service requirement information may include the number of user requests, response time, the number of response requests corresponding to the response time, and request processing time.

[0063] The number of user requests corresponding to each target period may refer to the number of user requests received during the target period. The number of user requests may be determined using various methods. For example, the number of user requests may be pre-set by a technician based on actual application requirements. For another example, the average of the actual number of user requests for each historical target period that coincides with the duration of the target period may be determined as the number of user requests corresponding to the target period.

[0064] The response time corresponding to each target period may refer to the time from when a user request is submitted to when the request begins to be processed. The number of response requests corresponding to each response period may refer to the number of user requests processed within the target period that meet the response time. The request processing time corresponding to each target period may refer to the time it takes to process the user request.

[0065] Generally, service requirements can be set based on actual service goals. For example, suppose the predicted number of user requests within a specified service period is 30, the service goal is that 85% of user requests can be responded to within 15 seconds, and the average processing time for user requests is 120 seconds. In this case, based on the service goal, the number of user requests can be determined to be 30, the response time can be 15 seconds, the corresponding number of response requests can be 25.5 (30 * 85% = 25.5), and the request processing time can be 120 seconds.

[0066] Step 302: Determine the resource requirements for each target period using the Erlang formula based on the service requirement information.

[0067] In this embodiment, the Erlang C formula can be used to determine the resource requirements for each target period based on the service demand information. The Erlang C formula is an existing mathematical formula for calculating the number of agents (consultants) required in a call center. Call centers primarily use this formula to calculate the number of personnel and trunk lines required to meet service level targets. For example, based on hourly call volume, the number of personnel required to achieve an 80% connection rate within 20 seconds is quantified. The Erlang C formula is generally expressed as follows:

[0068]

[0069] u=λ*T s

[0070] p=u / m

[0071]

[0072]

[0073] Where λ represents the incoming line volume per unit time, such as the incoming line volume per second (unit: lines / second).s Indicates the average handling time of each incoming call (in seconds / call). m indicates the number of agents. u indicates the traffic intensity (i.e., the number of agents required). p indicates the occupancy rate. c represents the probability of waiting for processing. w Indicates the average waiting time. t indicates the service level (or timeliness), such as connecting the incoming call within t seconds. W t It represents the probability of responding to an incoming call within t seconds.

[0074] Based on this, the Erlang C formula is transformed and applied to this embodiment. The number of user requests corresponding to the target period can be corresponded to λ, the response time can be corresponded to t, and the number of response requests can be corresponded to W. t Correspondingly, the request processing time is compared with T s Corresponding to the resource requirement number and m, the resource requirement number of each target period can be calculated based on the number of user requests, response time, number of response requests corresponding to the response time, and request processing time.

[0075] The specific calculation process can be expressed as follows:

[0076] S=min{m:W t (m, t) ≥ T, m∈N}

[0077] Where S represents the number of resource requirements in the target period. N is a natural number. T represents the response probability (which can be determined based on the quotient of the number of response requests and the number of user requests). W t This is W in the above Erlang C formula t This formula means taking the value that makes W t The minimum value of m that is not less than T is the resource requirement.

[0078] Step 303 : According to the resource demand number corresponding to each target time period, a resource subset corresponding to each service time period in the preset service time period set is determined from the preset resource set.

[0079] Step 304 : For each service period, in response to receiving a user request within the service period, controlling resources in the resource subset corresponding to the service period to process the received user request.

[0080] The execution process not specifically described in this embodiment can be referred to Figure 2 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0081] In some optional implementations of this embodiment, loss information for each resource in a preset resource set may be obtained, and then the resource requirements for each target period determined may be updated using this loss information. The loss information for each resource may represent the loss of that resource due to various reasons (e.g., its lifespan, environmental impact, etc.). For example, if the resource is human resources, the loss information may represent manpower loss. Generally, the loss information may be represented by a numerical value between 0 and 1.

[0082] Specifically, various methods can be used to update the resource requirements determined for each target period using the loss information for that target period. For example, the product of the loss information and the determined resource requirements can be first calculated, and then the sum of the obtained product and the determined resource requirements can be calculated as the updated resource requirements.

[0083] For another example, the difference between 1 and the loss information may be calculated first, and then the quotient of the determined resource requirement number and the calculated difference may be calculated as the updated resource requirement number.

[0084] The method provided by the above-mentioned embodiments of the present disclosure can further improve the accuracy of the determined resource demand number for each target time period by considering the natural loss information of each resource and updating the resource demand number for each target time period based on the loss information, thereby ensuring the accuracy of subsequent resource configuration based on the resource demand number.

[0085] Further references Figure 4 , which shows a process 400 of another embodiment of a request processing method. The process 400 of the request processing method includes the following steps:

[0086] Step 401: Obtain the resource requirement number of each target period in the target period set.

[0087] Step 402: Obtain the validity period information of each resource in the preset resource set.

[0088] In this embodiment, the validity period information can be used to indicate whether each resource is valid for each service period in the service period set. For any resource, if the resource is valid for a service period, it means that the resource can be used to process user requests during that service period. Correspondingly, if the resource is invalid for a service period, it means that the resource cannot be used to process user requests during that service period.

[0089] The validity period of each resource can be flexibly configured by technical personnel based on the actual application scenario or application requirements. For example, if the resource is a server, the validity period of each resource can be set based on the server's time for processing user requests. For another example, if the resource is human resources, the validity period of each resource can be set based on the working hours of each customer service representative.

[0090] Step 403 : According to the resource demand quantity and effective time information corresponding to each target time period, a resource subset corresponding to each service time period is determined from the preset resource set.

[0091] In this embodiment, the effective time information of each resource can also be used as a constraint condition, and the resource subsets corresponding to each service period can be determined by optimizing the expression constructed based on the demand.

[0092] Step 404 : For each service period, in response to receiving a user request within the service period, controlling resources in the resource subset corresponding to the service period to process the received user request.

[0093] Optionally, after obtaining the resource subsets corresponding to each service period, if updated valid time information of resources in the resource set is received, the constraint conditions may be updated using the new valid time information to recalculate the resource subsets corresponding to each service period.

[0094] In this way, it can be ensured that when the time for resources to provide services changes, the effective time information and constraints of the resources after update can be used to re-allocate resources, thereby improving the flexibility and convenience of resource configuration adjustment and avoiding the complexity of resource configuration adjustment.

[0095] The execution process not specifically described in this embodiment can be referred to Figure 2 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0096] The method provided by the above-mentioned embodiments of the present disclosure can be closer to the actual application scenario by obtaining the effective time information of each resource and using the effective time information as a constraint condition, thereby further ensuring the rationality of the resource configuration results, avoiding a large number of resource configuration adjustments, and ensuring the stability of resource configuration and user request processing.

[0097] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a request processing device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0098] like Figure 5As shown, the request processing apparatus 500 provided in this embodiment includes an acquisition unit 501, a determination unit 502, and a processing unit 503. The acquisition unit 501 is configured to acquire the resource requirement number of each target period in the target period set; the determination unit 502 is configured to determine, from the preset resource set, the resource subsets corresponding to each service period in the preset service period set based on the resource requirement number corresponding to each target period, wherein each service period is composed of at least one target period in the target period set, and the resource requirement number corresponding to each target period and the resource subset corresponding to each service period meet preset constraints; the processing unit 503 is configured to, for each service period, in response to receiving a user request within the service period, control the resources in the resource subset corresponding to the service period to process the received user request.

[0099] In this embodiment, the specific processing of the acquisition unit 501, the determination unit 502 and the processing unit 503 and the technical effects thereof can be referred to in the respective Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.

[0100] In some optional implementations of this embodiment, the above-mentioned acquisition unit 501 is further configured to: obtain service demand information for each target time period in the target time period set, wherein the service demand information includes the number of user requests, response time, the number of response requests corresponding to the response time, and the request processing time; based on the service demand information, determine the resource demand number for each target time period using the Erlang formula.

[0101] In some optional implementations of this embodiment, the above-mentioned constraints include that the difference between the total number of the first resources and the total number of the second resources meets the preset conditions, wherein the total number of the first resources is determined based on the sum of the number of resources included in the resource subsets corresponding to each service time period, and the total number of the second resources is determined based on the sum of the number of resource requirements corresponding to each target time period.

[0102] In some optional implementations of this embodiment, the total number of first resources is determined based on the weighted sum of the number of resources included in the resource subsets corresponding to each service period, wherein the weight of each service period is determined based on the processing capacity information of the resources in the resource subset corresponding to the service period.

[0103] In some optional implementations of this embodiment, the acquisition unit 501 is further configured to: acquire loss information of each resource in the preset resource set; and update the determined resource requirement number for each target time period using the loss information.

[0104] In some optional implementations of this embodiment, the number of the service time period sets is at least two, and each service time period set corresponds to a different time period.

[0105] In some optional implementations of this embodiment, the above-mentioned acquisition unit 501 is further configured to: obtain the effective time information of each resource in the preset resource set, wherein the effective time information is used to indicate whether each resource is valid for each service period; and the above-mentioned determination unit 502 is further configured to: determine the resource subset corresponding to each service period from the preset resource set according to the resource demand number and effective time information corresponding to each target period.

[0106] The device provided by the above-mentioned embodiment of the present disclosure obtains the resource demand number of each target time period in the target time period set through an acquisition unit; the determination unit determines the resource subset corresponding to each service time period in the preset service time period set from the preset resource set according to the resource demand number corresponding to each target time period, wherein each service time period is composed of at least one target time period in the target time period set, and the resource demand number corresponding to each target time period and the resource subset corresponding to each service time period meet the preset constraint conditions; for each service time period, the processing unit controls the resources in the resource subset corresponding to the service time period to process the received user request in response to receiving a user request within the service time period, thereby flexibly setting the constraint conditions according to the actual resource configuration requirements to ensure that the corresponding resources are reasonably configured for each service time to process the user request of the corresponding service time period under the premise of meeting the constraint conditions, thereby improving the degree of automation of resource configuration, and using the constraint conditions to ensure the objectivity of resource configuration in the process of resource configuration, thereby also improving the stability of user request processing.

[0107] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server in (600). Figure 6 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0108] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0109] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0111] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the electronic device: obtains the resource requirement number for each target period in the target period set; determines, from the preset resource set, resource subsets corresponding to each service period in the preset service period set based on the resource requirement number corresponding to each target period, wherein each service period is composed of at least one target period in the target period set, and the resource requirement number corresponding to each target period and the resource subset corresponding to each service period meet preset constraints; for each service period, in response to receiving a user request within the service period, controls the resources in the resource subset corresponding to the service period to process the received user request.

[0113] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor. For example, they may be described as: a processor including an acquisition unit, a determination unit, and a processing unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the acquisition unit may also be described as a "unit for acquiring the number of resource requirements for each target time period in a target time period set."

[0116] The above description is merely a preferred embodiment of the present disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also encompass other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by mutually replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A request processing method, comprising: Get the resource requirements for each target period in the target period set; Determining, from the preset resource set, resource subsets corresponding to each service period in the preset service period set based on the resource demand numbers corresponding to each target period, wherein each service period is composed of at least one target period in the target period set, and the resource demand numbers corresponding to each target period and the resource subsets corresponding to each service period meet preset constraints; For each service period, in response to receiving a user request within the service period, controlling resources in the resource subset corresponding to the service period to process the received user request; The constraint condition includes that the difference between the first total number of resources and the second total number of resources meets a preset condition, wherein the first total number of resources is determined based on a weighted sum of the number of resources included in the resource subsets corresponding to the respective service time periods, the weight of each service time period is determined based on the processing capacity information of the resources in the resource subset corresponding to the service time period, the second total number of resources is determined based on the sum of the resource requirements corresponding to the respective target time periods, and there is no intersection between the resource subsets corresponding to the respective service time periods; The method further comprises: The processing capability information of each resource is normalized, and the processing capability information of each resource is updated using the normalized processing capability information.

2. The method according to claim 1, wherein The obtaining of the resource requirement number for each target period in the target period set includes: Obtaining service demand information for each target period in the target period set, wherein the service demand information includes the number of user requests, response time, the number of response requests corresponding to the response time, and request processing time; According to the service demand information, the resource demand number for each target period is determined using the Erlang formula.

3. The method according to claim 2, wherein: The method further comprises: Obtaining loss information of each resource in the preset resource set; and After determining the resource requirements for each target period using the Erlang formula based on the service requirement information, the method further includes: The resource requirement number determined for each target time period is updated using the loss information.

4. The method according to claim 1, wherein The number of the service period sets is at least two, and each service period set corresponds to a different time period.

5. The method according to any one of claims 1 to 4, wherein: The method further comprises: Obtaining validity period information of each resource in the preset resource set, wherein the validity period information is used to indicate whether each resource is valid for each service period; and The determining, from the preset resource set according to the number of resource demands corresponding to each target time period, the resource subsets corresponding to each service time period in the preset service time period set includes: According to the resource demand number corresponding to each target time period and the effective time information, a resource subset corresponding to each service time period is determined from the preset resource set.

6. A request processing device, wherein: The device comprises: An acquiring unit configured to acquire the resource demand number of each target period in the target period set; a determining unit configured to determine, from a preset resource set, resource subsets corresponding to respective service periods in a preset service period set based on the resource demand numbers corresponding to respective target periods, wherein each service period is composed of at least one target period in the target period set, and the resource demand numbers corresponding to respective target periods and the resource subsets corresponding to respective service periods meet preset constraints; a processing unit configured to, for each service period, in response to receiving a user request within the service period, control resources in the resource subset corresponding to the service period to process the received user request; The constraint condition includes that the difference between the first total number of resources and the second total number of resources meets a preset condition, wherein the first total number of resources is determined based on a weighted sum of the number of resources included in the resource subsets corresponding to the respective service time periods, the weight of each service time period is determined based on the processing capacity information of the resources in the resource subset corresponding to the service time period, the second total number of resources is determined based on the sum of the resource requirements corresponding to the respective target time periods, and there is no intersection between the resource subsets corresponding to the respective service time periods; The device further comprises: The updating unit is configured to normalize the processing capability information of each resource and use the normalized processing capability information to update the processing capability information of each resource.

7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Self-adaptive resource allocation method and device

    CN106911592A

  • Resource allocation method, device and equipment

    CN112099956A

  • Load balancing method and device of server, server and storage medium

    CN113254208A

  • Distributed system service distribution method and device

    CN113765964A