Method, apparatus and device for determining traffic calculation power, and storage medium
By receiving traffic requests, calculating their capacity value and discount factor at their current stage, determining the value of the traffic requests based on feature information and category, and allocating computing power according to the value proportion, the problem of online traffic pressure and computing power allocation for candidate sets is solved, achieving intelligent and efficient resource utilization.
Patent Information
- Application Number
- CN202211372211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In information recommendation or search systems, existing technologies cannot effectively solve the problem of online traffic pressure and computing power allocation for large candidate sets, resulting in resource waste and inefficiency.
By receiving traffic requests, the system calculates the capacity value and discount factor of the current stage, determines the value of the traffic requests based on feature information and category, and allocates computing power according to the proportion of value.
It enables intelligent and personalized computing power allocation, improves resource utilization efficiency and cost-effectiveness, and optimizes the traffic processing process.
Smart Images

Figure CN115981836B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to the technical field of deep learning and cloud computing, and more particularly to a method and device for determining traffic computing power, and a storage medium. BACKGROUND
[0002] With the development of deep learning technology in recent years, the complexity of search algorithms is increasing, and the demand for computing power supply has also increased explosively. In information recommendation or search systems, to cope with the online traffic pressure and large candidate set, the entire retrieval process is generally designed as a funnel-type cascade architecture with a decreasing candidate set, mainly including recall, coarse ranking, fine ranking, mechanism, etc. In mainstream search and recommendation systems, the computing power is generally allocated equally for each traffic request. SUMMARY
[0003] The present disclosure provides a method and device for determining traffic computing power, and a storage medium.
[0004] According to a first aspect of the present disclosure, a method for determining traffic computing power is provided, comprising: receiving at least one traffic request at the same time; for each traffic request in the at least one traffic request, calculating a capacity value of the stage where the traffic request is located based on the characteristic information of the stage; determining a discount factor corresponding to the stage where the traffic request is located from a pre-generated discount factor set; determining the value of the traffic request based on the capacity value and the discount factor; and determining the computing power value corresponding to each traffic request in the at least one traffic request based on the value of the traffic request.
[0005] According to a second aspect of the present disclosure, a device for determining traffic computing power is provided, comprising: a receiving module configured to receive at least one traffic request at the same time; a calculating module configured to calculate a capacity value of the stage where the traffic request is located based on the characteristic information of the stage for each traffic request in the at least one traffic request; a first determining module configured to determine a discount factor corresponding to the stage where the traffic request is located from a pre-generated discount factor set; a second determining module configured to determine the value of the traffic request based on the capacity value and the discount factor; and a third determining module configured to determine the computing power value corresponding to each traffic request in the at least one traffic request based on the value of the traffic request.
[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any implementation manner of the first aspect.
[0007] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any implementation form of the first aspect.
[0008] According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method as described in any implementation form of the first aspect.
[0009] It is to be understood that the details described in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0011] Figure 1 is an exemplary system architecture diagram to which the present disclosure can be applied;
[0012] Figure 2 is a flowchart of one embodiment of the method for determining traffic computing power according to the present disclosure;
[0013] Figure 3 is a flowchart of another embodiment of the method for determining traffic computing power according to the present disclosure;
[0014] Figure 4 is Figure 3 is a decomposition flowchart of the step of generating a discount factor set of the method for determining traffic computing power shown in;
[0015] Figure 5 is a schematic diagram of one application scenario of the method for determining traffic computing power according to the present disclosure;
[0016] Figure 6 is a schematic diagram of another application scenario of the method for determining traffic computing power according to the present disclosure;
[0017] Figure 7 is a structural schematic diagram of one embodiment of the apparatus for determining traffic computing power according to the present disclosure;
[0018] Figure 8 is a block diagram of an electronic device for implementing the method for determining traffic computing power according to the embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are cited as illustrative examples. Various details of the embodiments of the present disclosure are described herein in order to provide a thorough understanding thereof. It will be understood by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of brevity and clarity, various well-known functions and constructions are not described herein in detail.
[0020] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] Figure 1 An exemplary system architecture 100 is shown, which can apply the embodiments of the method for determining traffic computing power or the apparatus for determining traffic computing power.
[0022] As shown in Figure 1 The system architecture 100 can include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0023] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send information, etc. Various client applications can be installed on the terminal devices 101, 102, 103.
[0024] The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-mentioned electronic devices. They can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made herein.
[0025] The server 105 can provide various services. For example, the server 105 can analyze and process at least one traffic request obtained from the terminal devices 101, 102, 103, and generate a processing result (e.g., determine the computing power value corresponding to each traffic request).
[0026] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0027] It should be noted that the method for determining traffic computing power provided in this embodiment is generally executed by server 105, and correspondingly, the device for determining traffic computing power is generally located in server 105.
[0028] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0029] Continue to refer to Figure 2 The document illustrates a flow 200 of an embodiment of a method for determining traffic computing power according to the present disclosure. The method for determining traffic computing power includes the following steps:
[0030] Step 201: Receive at least one traffic request at the same time.
[0031] In this embodiment, the execution entity of the method for determining traffic computing power (e.g., Figure 1 The server 105 shown will receive at least one traffic request at the same time. That is, the aforementioned execution entity will receive multiple traffic requests at the same time, and the aforementioned execution entity will obtain all the traffic requests received at the same time.
[0032] Step 202: For each traffic request in at least one traffic request, calculate the capacity value of the stage in which the traffic request is located based on the characteristic information of the stage in which the traffic request is located.
[0033] In this embodiment, for each of the at least one traffic request, the execution entity calculates the capacity value of the traffic request's current stage based on the characteristic information of that stage. Specifically, the execution entity first determines the current stage of the traffic request, where the stage refers to a stage in the search process, generally including the recall stage, coarse ranking stage, fine ranking stage, and sorting stage. Here, the execution entity can determine the current stage of the traffic request based on a preset strategy, such as obtaining the current stage information of the traffic request from the code when a traffic request is received, or obtaining the current stage information of the traffic request by looking up a dictionary, etc. This embodiment does not specifically limit this approach.
[0034] After determining the stage where the traffic request currently locates, the execution subject obtains characteristic information of the stage where the traffic request locates, which generally includes the queue length of the current stage, the CPU (central processing unit) utilization and GPU (graphics processing unit) utilization of the system in the current stage, and the like. Here, the queue length generally refers to the length of the candidate set in the current stage. Then, the execution subject calculates the capacity value of the stage where the traffic request locates based on the characteristic information.
[0035] Step 203, determining the discount factor corresponding to the stage where the traffic request locates from the pre-generated discount factor set.
[0036] In this embodiment, the execution subject determines the discount factor corresponding to the stage where the traffic request locates from the pre-generated discount factor set. The discount factor can also be referred to as a discount rate, a discount coefficient, and the like. The discount factor is a concept commonly used in reinforcement learning, which will not be described here. In this embodiment, the execution subject pre-generates the discount factor set, which includes discount factors corresponding to different stages of traffic requests in different categories. Therefore, after receiving a traffic request, the execution subject determines the category information of the received traffic request, which can include popular requests, unpopular requests, and the like in multiple dimensions, which is not specifically limited in this embodiment. Then, the execution subject obtains the discount factors of the traffic request in different stages in the category from the pre-generated discount factor set, and then determines the discount factor corresponding to the stage where the traffic request locates according to the traffic request stage information.
[0037] Step 204, determining the value of the traffic request based on the capacity value and the discount factor.
[0038] In this embodiment, the execution subject determines the value of the traffic request based on the capacity value and the discount factor. After determining the capacity value of each stage where the traffic request locates and the discount factor corresponding to each stage where the traffic request locates, the execution subject calculates the value of the current stage where the traffic request locates based on the capacity value of each stage where the traffic request locates and the discount factor corresponding to each stage where the traffic request locates.
[0039] Step 205, determining the computing power value corresponding to each traffic request in at least one traffic request based on the value of each traffic request.
[0040] In this embodiment, the execution entity determines the computing power value corresponding to each traffic request based on the value of each traffic request in at least one traffic request. Specifically, the execution entity can obtain the current total computing power value, then calculate the total value of all traffic requests at the current moment based on the value of each received traffic request, and finally determine the computing power value corresponding to the proportion of each traffic request's value in the total value from the current total computing power value, and set this computing power value as the computing power value corresponding to the traffic request. That is, the higher the proportion of the traffic request's value, the higher its obtained computing power value, meaning that the computing power value of each traffic request is directly proportional to the value of that traffic request.
[0041] The method for determining traffic computing power provided in this embodiment first receives at least one traffic request at the same time; then, for each of the at least one traffic requests, it calculates the capacity value of the current stage of the traffic request based on the characteristic information of the current stage; and determines the discount factor corresponding to the current stage of the traffic request from a pre-generated set of discount factors; then, it determines the value of the traffic request based on the capacity value and the discount factor; finally, it determines the computing power value corresponding to each traffic request based on the value of each of the at least one traffic requests. The method for determining traffic computing power in this embodiment first calculates the value of the traffic request based on the capacity value and the discount factor of the current stage, and then allocates computing power based on the value of each traffic request. This achieves more intelligent and personalized computing power allocation for traffic, thereby improving the rationality and efficiency of computing power allocation, that is, maximizing the cost-effectiveness of resource investment given a resource ceiling.
[0042] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0043] Continue to refer to Figure 3 , Figure 3 A flow 300 of another embodiment of a method for determining traffic computing power according to the present disclosure is shown. The method for determining traffic computing power includes the following steps:
[0044] Step 301: Receive at least one traffic request at the same time.
[0045] In this embodiment, the execution entity of the method for determining traffic computing power (e.g., Figure 1 The server 105 shown will receive at least one traffic request at the same time. Step 301 is basically the same as step 201 in the previous embodiment. For the specific implementation, please refer to the above description of step 201, which will not be repeated here.
[0046] Step 302: For each traffic request in at least one traffic request, determine the stage of the traffic request based on a preset strategy.
[0047] In this embodiment, for each of the at least one traffic request, the aforementioned execution entity can determine the current stage of the traffic request based on a preset strategy. For example, when a traffic request is received, the current stage information of the traffic request can be obtained from the code, or the current stage information of the traffic request can be obtained by looking up a dictionary, etc. This embodiment does not make specific limitations on this.
[0048] Step 303: Obtain the characteristic information of the stage in which the traffic request is located.
[0049] In this embodiment, the execution entity obtains the characteristic information of the stage in which the traffic request is located. The characteristic information includes the queue length of the current stage, the CPU utilization and GPU utilization of the current system, etc. The queue length here generally refers to the length of the candidate set of the current stage.
[0050] Step 304: Determine the capacity value of the stage in which the traffic request is located by summing the products of the queue length, CPU utilization, and GPU utilization with preset parameters.
[0051] In this embodiment, the execution entity calculates the capacity value of the stage of the traffic request based on the aforementioned feature information. Specifically, it determines the capacity value of the stage of the traffic request by summing the products of the queue length, CPU utilization, and GPU utilization with preset parameters. The specific calculation formula is as follows:
[0052] Qi ,j =[α*queue_length+β*cpu_usage+γ*gpu_uasage]
[0053] Among them, Q i,j Let be the capacity value of traffic i in stage j, queue_length be the queue length, cpu_usage be the CPU utilization, gpu_usage be the GPU utilization, and α, β, and γ be preset parameters.
[0054] Based on the above steps, the capacity value at the stage of the traffic request can be calculated quickly and accurately.
[0055] Step 305: Determine the category information of the traffic request.
[0056] In the embodiment, the execution subject determines the category information of the traffic request. The category can include popular request, unpopular request, and the like, and is not limited in the embodiment. For example, the execution subject can perform semantic recognition on the traffic request, and determine which category in the preset category information the traffic request belongs to based on the semantic recognition result.
[0057] In step 306, the discount factor corresponding to the stage of the traffic request is determined from the discount factor set based on the category information of the traffic request and the stage information of the traffic request.
[0058] In the embodiment, the execution subject determines the discount factor corresponding to the stage of the traffic request from the discount factor set based on the category information of the traffic request and the stage information of the traffic request. In the embodiment, the execution subject can pre-generate the discount factor set, and the discount factor set includes discount factors corresponding to different stages of traffic requests in different categories. Therefore, after receiving the traffic request, the execution subject can determine the category information of the received traffic request, and then obtain the discount factors of the traffic request in different stages in the category from the pre-generated discount factor set to obtain a first discount factor set. Then, the discount factor corresponding to the stage of the traffic request is determined from the first discount factor set based on the stage information of the traffic request. Therefore, the discount factor corresponding to the stage of the traffic request can be quickly and accurately determined.
[0059] In step 307, the value of the traffic request is calculated based on the capacity value of the traffic request in each stage and the discount factor of the traffic request in the stage.
[0060] In the embodiment, the execution subject calculates the value of the traffic request based on the capacity value of the traffic request in each stage and the discount factor of the traffic request in the stage. After determining the capacity value of the traffic request in each stage and the discount factor corresponding to each stage of the traffic request, the execution subject calculates the value of the traffic request based on the capacity value of the traffic request in each stage and the discount factor corresponding to each stage of the traffic request. The value of the i th traffic is represented as The value of the i th traffic can be calculated based on the following formula
[0061]
[0062] wherein, r i is the i th traffic; Q i,1 , Q i,2 , …, Q i,NThe capacity value of the flow request in the i th stage is respectively. Thus, the value of the flow request in the stage is calculated based on the capacity value of the stage where the flow request is located and the discount factor of the stage where the flow request is located, so that the value corresponding to each flow request is more accurately represented.
[0063] In step 308, the current total computing power value is obtained.
[0064] In the embodiment, the execution subject obtains the current total computing power value, that is, the total computing power value of the current system.
[0065] In step 309, the current total value is calculated based on the value of each flow request.
[0066] In the embodiment, the execution subject calculates the current total value based on the value of each flow request, that is, the value of each flow request at the current time is added and summed, and the current total value is obtained.
[0067] In step 310, the computing power value corresponding to the flow request is determined based on the proportion of the value of each flow request in the current total value and the current total computing power value.
[0068] In the embodiment, the execution subject determines the computing power value corresponding to the flow request based on the proportion of the value of each flow request in the current total value and the current total computing power value. Specifically, the execution subject can obtain the current total computing power value, then calculate the total value of all flow requests at the current time based on the value of each flow request received, and finally determine the computing power value corresponding to the proportion based on the proportion of the value of each flow request in the total value and the current total computing power value, and determine the computing power value as the computing power value corresponding to the flow request. That is, the higher the value proportion of each flow request, the higher the computing power value it obtains, that is, the computing power value of each flow request is proportional to the value of the flow request.
[0069] As can be seen from Figure 3 , compared with Figure 2 the corresponding embodiment, the method for determining the flow computing power in the embodiment first calculates the capacity value of the current stage where the flow request is located based on the characteristic information of the stage where the flow request is located, then determines the discount factor corresponding to the stage where the flow request is located from the discount factor set based on the category information of the flow request and the stage information where the flow request is located, then calculates the value of the flow request based on the capacity value of each stage and the discount factor of the stage where the flow request is located, and finally determines the computing power value corresponding to the flow request based on the value of each flow request, so as to realize more intelligent and personalized allocation of computing power for the flow, thereby improving the rationality and efficiency of the computing power allocation, that is, under the condition of given resource upper limit, the cost performance of resource investment is maximized.
[0070] With reference to both Figure 4 , which shows Figure 3 The decomposition flow 400 of the generating discount factor set step of the method for determining traffic capacity shown. The generating discount factor set step includes:
[0071] Step 401, respectively, obtain a historical traffic request set under each category in at least one category.
[0072] In this embodiment, the historical traffic request set under each category in at least one category is obtained respectively, and the historical traffic request set can refer to all traffic requests in the category in a historical time period.
[0073] Step 402, for each historical traffic request in the historical traffic request set, determine the stage of the historical traffic request and the candidate web page set corresponding to the stage.
[0074] Since the target of the method for determining traffic capacity in this embodiment is to adjust the discount factor by regulating the information such as the queue length, the model selection, etc. of the traffic in each stage, so as to ultimately realize the maximum traffic value.
[0075] M traffic in the historical traffic request set is processed through N stages, wherein M and N are both positive integers, which can be represented as:
[0076]
[0077]
[0078]
[0079]
[0080] C1 is the cost constraint, that is, for any one stage, the cost of the stage must be less than or equal to its cost C j ;
[0081] C2 is the time constraint, that is, for any one request traffic, the time consumption of N stages must be less than or equal to the specified time consumption T.
[0082] C3 is the auxiliary constraint, that is, for any one traffic request, it must have a value greater than or equal to 0 in any one stage.
[0083] For a real-time search system, it is not practical to perform the above optimization online and it will bring more difficulties. In order to simplify the analysis and improve the robustness of the system, the embodiment will split the above N stages into N sub-problems, which facilitates monitoring and reliable intervention of each stage, thereby improving the robustness of the system. For example, when the system undergoes a huge change, the parameters of each stage can be dynamically adjusted at any time. Based on this, the C1 and C2 constraints are split:
[0084] Q i,j ≤D j
[0085]
[0086] Specifically, for stage j, the value maximization of the traffic can be regarded as a sub-problem of the above:
[0087]
[0088]
[0089]
[0090]
[0091] Assume that Y j (r i ,Q i,j ) is monotonically increasing, but its derivative with respect to Q i,j is monotonically decreasing, that is, its value will increase more and more slowly with the increase of the configured resources.
[0092] In the embodiment, for each historical traffic request in the historical traffic request set, the stage of the historical traffic request is determined, and the candidate webpage set corresponding to the stage is determined. That is, the traffic i is refined into the i th Query, and the j th stage is the specific screening stage, and a dimension k is added to represent the URL level parameter and feature information.
[0093] In step 403, the retention probability of the candidate webpage is determined based on the webpage features corresponding to each candidate webpage in the candidate webpage set.
[0094] In the embodiment, the retention probability of the candidate webpage is determined based on the webpage features corresponding to each candidate webpage in the candidate webpage set.
[0095] In some optional implementations of this embodiment, step 403 includes: for each candidate webpage in the candidate webpage set, obtaining the webpage features corresponding to the candidate webpage, wherein the webpage features include: webpage authority features, webpage click features, and / or webpage relevance features; and calculating the retention probability of the candidate webpage based on the webpage features.
[0096] In this implementation, for each candidate webpage in the candidate webpage set, the corresponding webpage features are obtained, such as: webpage authority feature (authority_feature), webpage click feature (click_feature), and / or webpage correlation feature (correlation_feature); then the information of the k-th URL of traffic request i can be represented as Q. i,j,k :
[0097] Q i,j,k =[authority_feature k click_feature k ,…,correlation_feature k ]
[0098] Discount factor Y for traffic request i under the elastic candidate set j (r i Q i,j,k This can be viewed as 1 - the probability P of removing a URL that would otherwise appear in the final Top 40 of the sort. DropTop40 In other words, if no URLs are deleted from the candidate set, there is no discount loss. If URLs are deleted from the candidate set but have no impact on the final Top 40 recall, it can also be considered as having no discount impact on the total value. j (r i Q i,j,k This can be represented as:
[0099] Y j (r i Q i,j,k )=1-P DropTop40
[0100] Specifically, for the specific information of the k URLs of the i-th query, multiple dimensions of features are considered.
[0101] Finally, the aforementioned execution entity calculates the retention probability Q of the candidate webpages based on the webpage features. i,j Q i,j It can be represented as:
[0102] Q i,j ={Q i,j,1 *f(Q i,j,1 ),Qi,j,2 *f(Q i,j,2 ),…,Q i,j,k *f(Q i,j,k )}
[0103] Where, f(Q) i,j,k ()∈{0,1}. If it is 0, it means to discard; if it is 1, it means to keep.
[0104] The above steps make the retention probability of the identified candidate web pages more accurate.
[0105] In some optional implementations of this embodiment, the webpage features also include webpage timeliness features; in this case, step 403 further includes: in response to determining that the webpage features include webpage timeliness features, determining that the retention probability of the candidate webpage is 1.
[0106] In this implementation, if the executing entity determines that the webpage features include the webpage timeliness feature, then the retention probability of the candidate webpage can be directly set to 1. That is, the webpage timeliness feature has the highest priority, thus ensuring the timeliness of the webpage.
[0107] Step 404: Based on the retention probability of each candidate webpage in the candidate webpage set, determine the discount factor corresponding to the stage of the historical traffic request under the current category.
[0108] In this embodiment, based on the retention probability of each candidate webpage in the candidate webpage set, the discount factor f(Q) corresponding to the stage of the historical traffic request under the current category is determined. i,j,k ), f(Q i,j,k It can be represented in the following form:
[0109] f(Q i,j,k )=(1-(α*authority_featur k &β*click_feature k &…&γ*correlation_feature k ))
[0110] Based on the above steps, a set of discount factors is generated, which includes discount factors corresponding to different stages of traffic requests of at least one category, thereby maximizing the value of traffic.
[0111] Continue to refer to Figure 5 , Figure 5An application scenario of the method for determining traffic computing power according to the present disclosure is shown in a schematic diagram. In this application scenario, the execution subject first receives three traffic requests at the same time. Then the execution subject adaptively allocates computing power, that is, adaptively allocates computing power for the three traffic requests. Specifically, for each of the three traffic requests, the execution subject calculates the capacity value of the stage where the traffic request is located based on the characteristic information of the stage; then determines the discount factor corresponding to the stage where the traffic request is located from the pre-generated discount factor set; then determines the value of the traffic request based on the capacity value and the discount factor; and finally determines the computing power value corresponding to each traffic request based on the value of the traffic request, thereby obtaining the final computing power allocation result, for example, 30% of the computing power is allocated to the first traffic request; 30% of the computing power is allocated to the second traffic request; and 40% of the computing power is allocated to the third traffic request. Thus, the computing power is dynamically allocated according to the value generated by the traffic request at the current time, so that the global optimum is obtained under the given total computing power.
[0112] With reference to the foregoing Figure 6 , Figure 6 Another application scenario of the method for determining traffic computing power according to the present disclosure is shown in a schematic diagram. In this application scenario, for traffic request i, the execution subject determines the capacity value of the stage where traffic i is located based on the queue length, CPU utilization and GPU utilization corresponding to the stage information of traffic request i. And determines the discount factor of the stage where traffic i is located based on the characteristic information (click feature, authority feature, relevance feature, etc.) of the stage where traffic i is located.
[0113] In the process of determining the discount factor, the following constraint conditions are based on:
[0114]
[0115]
[0116]
[0117]
[0118] Assuming that the different stages where traffic i is located are stage 1, stage 2, stage 3,..., stage M, based on the above constraint conditions, the discount factor of traffic i in stage 1 is Y1, the discount factor of traffic i in stage 2 is Y2, the discount factor of traffic i in stage 3 is Y3,..., and the discount factor of traffic i in stage M is Y M .
[0119] Finally, the value of traffic request i can be obtained based on the discount factor of traffic i in each stage as Q i*Y1*Y2*Y3*......*Y M Thus, the executing subject can allocate computing power for the traffic request i based on the value of the traffic request i.
[0120] In this application scenario, the regulation actions are divided according to Query level, URL level, and Feature level, and the regulation operators have the same base class and uniform interface specification. The regulation decision maker can determine the regulation gear settings of each stage according to the parameter set and call the regulation operators to perform computing power regulation. Each regulation stage includes a control flow (Control Level) and a feedback flow (Feedback Level). The control flow can give the regulation gears of other downstream stages according to the features and signals seen in the current stage, and the feedback flow can determine the actual regulation gears according to the regulation gear suggestions given by other stages and the features and signals seen in the current stage. In this way, each regulation stage can see the actual regulation states of other stages and make comprehensive judgments according to their guidance suggestions for the current stage, and finally obtain the global optimal solution on the whole link.
[0121] Further reference is made to Figure 7 As an implementation of the method shown in the above figures, the present disclosure provides one embodiment of a device for determining traffic computing power, which corresponds to the method embodiment shown in Figure 2 The device can be applied in various electronic devices.
[0122] As shown in Figure 7 The device 700 for determining traffic computing power in this embodiment includes a receiving module 701, a calculation module 702, a first determination module 703, a second determination module 704, and a third determination module 705. The receiving module 701 is configured to receive at least one traffic request at the same time. The calculation module 702 is configured to calculate the capacity value of the stage where the traffic request is located based on the feature information of the stage where the traffic request is located for each traffic request in the at least one traffic request. The first determination module 703 is configured to determine the discount factor corresponding to the stage where the traffic request is located from the pre-generated discount factor set. The second determination module 704 is configured to determine the value of the traffic request based on the capacity value and the discount factor. The third determination module 705 is configured to determine the computing power value corresponding to each traffic request in the at least one traffic request based on the value of the traffic request.
[0123] In this embodiment, the specific processing of the receiving module 701, the calculation module 702, the first determination module 703, the second determination module 704, and the third determination module 705 in the device 700 for determining traffic computing power and the technical effects brought by them can be respectively referred to Figure 2The relevant description of steps 201-205 in the corresponding embodiment will not be repeated here.
[0124] In some optional implementation of the present embodiment, the computing module is further configured to: determine the stage where the traffic request is located based on the preset policy; obtain feature information of the stage where the traffic request is located, wherein the feature information comprises queue length, CPU utilization and GPU utilization; and determine the capacity value of the stage where the traffic request is located by multiplying the queue length, the CPU utilization and the GPU utilization by the value of the sum of the preset parameters.
[0125] In some optional implementation of the present embodiment, the first determining module comprises: a first determining submodule configured to determine the category information of the traffic request; and a second determining submodule configured to determine the discount factor corresponding to the stage where the traffic request is located from the discount factor set based on the category information of the traffic request and the stage information where the traffic request is located.
[0126] In some optional implementation of the present embodiment, the discount factor set contains discount factors corresponding to different stages of traffic requests of at least one category, and the apparatus further comprises a generating module for generating the discount factor set, the generating module comprising: an obtaining submodule configured to obtain a historical traffic request set under each category of the at least one category respectively; a third determining submodule configured to determine, for each historical traffic request in the historical traffic request set, the stage where the historical traffic request is located and a candidate webpage set corresponding to the stage; a fourth determining submodule configured to determine a retention probability of each candidate webpage in the candidate webpage set based on a webpage feature corresponding to the candidate webpage; and a fifth determining submodule configured to determine the discount factor corresponding to the stage where the historical traffic request is located under the current category based on the retention probability of each candidate webpage in the candidate webpage set.
[0127] In some optional implementation of the present embodiment, the fourth determining submodule comprises: an obtaining unit configured to obtain, for each candidate webpage in the candidate webpage set, a webpage feature corresponding to the candidate webpage, wherein the webpage feature comprises webpage authority feature, webpage click feature and / or webpage relevance feature; and a computing unit configured to compute the retention probability of the candidate webpage based on the webpage feature.
[0128] In some optional implementation of the present embodiment, the webpage feature further comprises webpage timeliness feature; and the fourth determining submodule further comprises: a determining unit configured to determine that the retention probability of the candidate webpage is 1 in response to determining that the webpage feature comprises webpage timeliness feature.
[0129] In some optional implementations of this embodiment, the second determining module is further configured to: calculate the value of the traffic request based on the capacity value of the traffic request at each stage and the discount factor of the traffic request at that stage.
[0130] In some optional implementations of this embodiment, the second determining module is further configured to: obtain the current total computing power value; calculate the current total value based on the value of each traffic request; and determine the computing power value corresponding to the traffic request based on the proportion of the value of each traffic request in the current total value and the current total computing power value.
[0131] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0132] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0133] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0134] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0135] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the method of determining traffic capacity. For example, in some embodiments, the method of determining traffic capacity can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the method of determining traffic capacity described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method of determining traffic capacity by any other appropriate means, such as by means of firmware.
[0136] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0137] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0138] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0139] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0140] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0141] Cloud computer refers to a technology system that accesses elastic and scalable shared physical or virtual resource pools through a network, the resources can include servers, operating systems, networks, software, applications or storage devices, etc., and the resources can be deployed and managed in a demand-based and self-service manner. Through cloud computing technology, efficient and powerful data processing capabilities can be provided for artificial intelligence, blockchain and other technical applications and model training.
[0142] The computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, or a server of a distributed system, or a server combined with a blockchain.
[0143] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, the steps described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which is not limited herein.
[0144] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for determining traffic computing power, comprising: receiving at least one traffic request at the same time; for each traffic request in the at least one traffic request, calculating a capacity value of a stage where the traffic request is based on feature information of the stage; determining a discount factor corresponding to the stage where the traffic request is from a pre-generated discount factor set based on category information of the traffic request and stage information where the traffic request is; determining a value of the traffic request based on the capacity value and the discount factor; determining a computing power value corresponding to each traffic request in the at least one traffic request respectively based on the value of the traffic request; wherein the discount factor set contains discount factors corresponding to different stages of traffic requests in at least one category; the discount factor set is generated by the following steps: respectively acquiring a historical traffic request set under each category in the at least one category; for each historical traffic request in the historical traffic request set, determining the stage where the historical traffic request is and a candidate webpage set corresponding to the stage; determining a retention probability of each candidate webpage in the candidate webpage set based on webpage features corresponding to the candidate webpage; determining a discount factor corresponding to the stage where the historical traffic request is under the current category based on the retention probability of each candidate webpage in the candidate webpage set.
2. The method of claim 1, wherein, The capacity value of the stage where the traffic request is calculated based on the feature information of the stage, comprising: determining the stage where the traffic request is based on a pre-set strategy; acquiring feature information of the stage where the traffic request is, wherein the feature information includes queue length, CPU utilization and GPU utilization; determining the capacity value of the stage where the traffic request is as the sum of the product of the queue length, CPU utilization and GPU utilization and pre-set parameters.
3. The method of claim 1, wherein, The retention probability of each candidate webpage in the candidate webpage set is determined based on webpage features corresponding to the candidate webpage, comprising: for each candidate webpage in the candidate webpage set, acquiring webpage features corresponding to the candidate webpage, wherein the webpage features include webpage authority features, webpage click features, and / or webpage relevance features; calculating the retention probability of the candidate webpage based on the webpage features.
4. The method of claim 3, wherein, The webpage features further include webpage timeliness features; and The retention probability of the candidate webpage is determined as 1 in response to determining that the webpage features include webpage timeliness features. The value of the traffic request is determined based on the capacity value and the discount factor, comprising:
5. The method of claim 1, wherein, calculating the value of the traffic request at a stage based on the capacity value of the traffic request at each stage and the discount factor of the traffic request at the stage. The computing power value corresponding to each traffic request is determined based on the value of the traffic request, comprising:
6. The method of claim 1, wherein, acquiring a current total computing power value; calculating a current total value based on the value of each traffic request; determine, based on a proportion of a value of each of the traffic requests in the current total value and the current total computing power value, a computing power value corresponding to the traffic request.
7. An apparatus for determining traffic computing power, comprising: a receiving module configured to receive at least one traffic request at a same time; a computing module configured to, for each of the at least one traffic request, compute a capacity value of a stage where the traffic request is based on feature information of the stage; a first determining module configured to determine, based on category information of the traffic request and stage information where the traffic request is, a discount factor corresponding to the stage where the traffic request is from a pre-generated discount factor set; a second determining module configured to determine a value of the traffic request based on the capacity value and the discount factor; a third determining module configured to determine, based on the value of each of the at least one traffic request, a computing power value corresponding to the traffic request respectively; wherein the discount factor set contains discount factors corresponding to different stages of traffic requests of at least one category, and the apparatus further comprises a generating module for generating the discount factor set, the generating module comprising: an obtaining sub-module configured to obtain a historical traffic request set under each of the at least one category respectively; a first determining sub-module configured to, for each historical traffic request in the historical traffic request set, determine a stage where the historical traffic request is and a candidate webpage set corresponding to the stage; a second determining sub-module configured to determine a retention probability of each candidate webpage in the candidate webpage set based on a webpage feature corresponding to the candidate webpage; a third determining sub-module configured to determine, based on the retention probability of each candidate webpage in the candidate webpage set, a discount factor corresponding to the stage where the historical traffic request is under a current category.
8. The apparatus of claim 7, wherein, The computing module is further configured to: determine the stage where the traffic request is based on a pre-set strategy; obtain feature information of the stage where the traffic request is, wherein the feature information comprises a queue length, a CPU utilization rate and a GPU utilization rate; determine a value of a sum of products of the queue length, the CPU utilization rate and the GPU utilization rate and a pre-set parameter as the capacity value of the stage where the traffic request is.
9. The apparatus of claim 7, wherein, The second determining sub-module comprises: an obtaining unit configured to, for each candidate webpage in the candidate webpage set, obtain a webpage feature corresponding to the candidate webpage, wherein the webpage feature comprises a webpage authority feature, a webpage click feature and / or a webpage relevance feature; a computing unit configured to compute the retention probability of the candidate webpage based on the webpage feature.
10. The apparatus of claim 9, wherein, The webpage feature further comprises a webpage timeliness feature; and The second determining sub-module further comprises: a determining unit configured to, in response to determining that the webpage feature comprises a webpage timeliness feature, determine that the retention probability of the candidate webpage is 1. The second determining module is further configured to:
11. The apparatus of claim 7, wherein, The value of the traffic request at the stage is calculated based on the capacity value of the traffic request at each stage and the discount factor of the traffic request at the stage.
12. The apparatus of claim 7, wherein, The third determining module is further configured to: obtain a current total computing power value; calculate a current total value based on the value of each traffic request; determine the computing power value corresponding to the traffic request based on the proportion of the value of each traffic request in the current total value and the current total computing power value. 13.An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication;wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6. 14.A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-6. 15.A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Patent Citations
Data processing method, device thereof and equipment and readable storage medium
CN113177670A
Flow computing power distribution method and device, electronic equipment and storage medium
CN114371930A