Resource determination method and device, equipment, storage medium and program product

Through the automated resource usage statistics interface and preset resource conversion relationships, the high cost and low accuracy problems caused by manual statistics in the recommendation system are solved, and efficient and accurate resource usage settlement is achieved.

CN118779352APending Publication Date: 2024-10-15TENCENT TECH (BEIJING) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310348906.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The resource usage statistics of existing recommendation systems rely on manual statistics, which results in high costs, low accuracy, and prone to errors.

Method used

Generate recommendation events by receiving recommendation requests, call the resource usage statistics interface to report data processing volume statistics on recommended nodes, convert data processing volume based on preset resource conversion relationships, generate resource statistics and usage results, and implement automatic statistics and reporting. .

Benefits of technology

It improves the efficiency and accuracy of resource usage settlement, reduces the dependence and error rate of manual statistics, and provides a real-time resource overview.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779352A_ABST
    Figure CN118779352A_ABST
Patent Text Reader

Abstract

The invention discloses a resource determination method and device, equipment, a storage medium and a program product, and relates to the technical field of computers. The method comprises the steps that a recommendation request is received, the recommendation request is used for generating a recommendation event, and the recommendation event comprises a plurality of recommendation nodes used for executing different data processing stages in the recommendation event; calling a resource usage statistical interface to carry out data processing amount statistical reporting on the recommendation nodes in the recommendation event, wherein the data processing amount is used for expressing the workload of data processing in the recommendation nodes; receiving a data processing amount corresponding to the recommended node reported by the resource usage statistical interface, and converting the data processing amount based on a preset resource conversion relationship to obtain resource statistical data, the resource statistical data being used for expressing data processing resources used in a node process execution process; and the resource usage result corresponding to the recommendation event is generated based on the resource statistical data corresponding to the recommendation node, so that the efficiency and accuracy of resource usage settlement are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource determination method, device, equipment, storage medium and program product. Background Art

[0002] The recommendation system has two major characteristics: data intensiveness and computing intensiveness. The former requires the system to maintain a large number of computing core resources, and the latter makes some services relatively complex. Therefore, the recommendation system is more sophisticated than ordinary backend systems, and the service usage settlement is more complicated. Among them, service usage refers to the amount of resources used in the data processing process when the recommendation system implements the recommendation service.

[0003] In the related art, the usage of each recommended sub-service is counted by manual usage statistics to obtain the corresponding cost of each business party.

[0004] However, the above method requires a lot of manpower costs, and due to the complexity of the recommendation system, manual statistics are prone to errors and the settlement accuracy is low. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for determining resources, which can determine the resources consumed by the recommended service. The technical solution is as follows.

[0006] In one aspect, a method for determining resources is provided, the method comprising:

[0007] receiving a recommendation request, the recommendation request being used to generate a recommendation event, the recommendation event including a plurality of recommendation nodes, the plurality of recommendation nodes being used to execute different data processing stages in the recommendation event;

[0008] Calling a resource usage statistics interface to perform statistical reporting of data processing volume for the recommended node in the recommendation event, where the data processing volume is used to express the workload of data processing in the recommended node;

[0009] receiving the data processing amount corresponding to the recommended node reported by the resource usage statistics interface, and converting the data processing amount based on a preset resource conversion relationship to obtain resource statistical data, wherein the resource statistical data is used to express the data processing resources used in the execution of the node process, and the data processing resources are resources used to execute the data processing process;

[0010] A resource usage result corresponding to the recommended event is generated based on the resource statistical data corresponding to the recommended node.

[0011] In another aspect, a device for determining resources is provided, the device comprising:

[0012] A recommendation request receiving module, used to receive a recommendation request, wherein the recommendation request is used to generate a recommendation event, wherein the recommendation event includes a plurality of recommendation nodes, and the plurality of recommendation nodes are used to execute different data processing stages in the recommendation event;

[0013] A statistics reporting module, used to call a resource usage statistics interface to perform statistics reporting on the data processing volume of the recommended node in the recommended event, where the data processing volume is used to express the workload of data processing in the recommended node;

[0014] a resource statistics data acquisition module, configured to receive the data processing amount corresponding to the recommended node reported by the resource usage statistics interface, and convert the data processing amount based on a preset resource conversion relationship to obtain resource statistics data, wherein the resource statistics data is used to express the data processing resources used in the execution of the node process, and the data processing resources are resources used to execute the data processing process;

[0015] The resource usage result generating module is used to generate the resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node.

[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement a method for determining resources as described in any of the above embodiments of the present application.

[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the storage medium, and the at least one computer program is loaded and executed by a processor to implement a method for determining resources as described in any of the above embodiments of the present application.

[0018] On the other hand, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the method for determining resources as described in any one of the above embodiments is implemented.

[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0020] A recommendation event is generated by receiving a recommendation request, and the resource usage statistics interface is called to report the data processing volume statistics of the recommended node in the recommendation event. The data processing volume corresponding to the recommended node reported by the resource usage statistics interface is received, and the data processing volume is converted based on a pre-set resource conversion relationship to obtain resource statistical data. The resource usage results corresponding to the recommendation event are generated based on the resource statistical data corresponding to the recommended node. Automatic statistics and reporting of the data processing volume are realized through the resource usage statistics interface, thereby obtaining resource statistical data and automatically generating resource usage results corresponding to the recommended event, thereby improving the efficiency and accuracy of resource usage settlement. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0023] Figure 2 is a flow chart of a method for determining resources provided by an exemplary embodiment of the present application;

[0024] Figure 3 This is a schematic diagram of recommendation scene division provided by an exemplary embodiment of the present application;

[0025] Figure 4 It is a schematic diagram of a resource settlement report provided by an exemplary embodiment of the present application;

[0026] Figure 5 is a flowchart of reporting data processing volume provided by an exemplary embodiment of the present application;

[0027] Figure 6 It is a statistical diagram of data processing volume provided by an exemplary embodiment of the present application;

[0028] Figure 7 It is a schematic diagram of a process of reporting resource usage provided by an exemplary embodiment of the present application;

[0029] Figure 8 It is a flowchart of a reporting procedure provided by an exemplary embodiment of the present application;

[0030] Fig. 9 is a flow chart of a data conversion method provided by an exemplary embodiment of the present application;

[0031] Fig.10is a flow chart of a method for generating resource usage results provided by an exemplary embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of a table structure provided by an exemplary embodiment of the present application;

[0033] Fig.12 is a structural block diagram of a resource determination device provided by an exemplary embodiment of the present application;

[0034] Fig.13 is a structural block diagram of a resource determination device module provided by an exemplary embodiment of the present application;

[0035] Fig.14 It is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0037] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0038] The recommendation system has two major characteristics: data intensiveness and computing intensiveness. The former requires the system to maintain a large number of computing core resources, and the latter makes some services relatively complex. Therefore, the recommendation system is more sophisticated than ordinary backend systems, and the service usage settlement is relatively complicated. Among them, service usage refers to the amount of computing device resources used in the data processing process when the recommendation system implements the recommendation service, such as: memory usage, CPU (Central Processing Unit) / GPU (Graphics Processing Unit) usage, data access volume, interface call volume, etc. In the related technology, the usage of each recommended sub-service is counted by manual statistics to obtain the corresponding cost of each business party. However, the above method requires a lot of manpower costs, and due to the complexity of the recommendation system, the manual statistics method is prone to errors and the settlement accuracy is low.

[0039] The resource determination method provided in the embodiment of the present application generates a recommendation event by receiving a recommendation request, calls a resource usage statistics interface to perform data processing volume statistics reporting on the recommended node in the recommendation event, receives the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converts the data processing volume based on a pre-set resource conversion relationship to obtain resource statistical data, generates a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node, and realizes automatic statistics and reporting of the data processing volume through the resource usage statistics interface, thereby obtaining resource statistical data and automatically generating resource usage results corresponding to the recommended event, thereby improving the efficiency and accuracy of resource usage settlement.

[0040] First, let's introduce the implementation environment of this application. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, and the implementation environment includes: a server 110.

[0041] The server 110 is used to execute the resource determination method provided in the embodiment of the present application, and can determine the amount of resources required to implement the recommendation function.

[0042] In some embodiments, the server 110 is used to implement the recommendation system function, and has a built-in SDK (Software Development Kit) interface as a resource usage statistics interface, which is used to implement the regular reporting of the data processing volume corresponding to the recommendation request. The server 110 receives a recommendation request, which is used to generate a recommendation event. The recommendation event includes multiple recommendation nodes, and the multiple recommendation nodes are used to execute different data processing stages in the recommendation event. Schematically, a recommendation event refers to a recommendation service that needs to be implemented in a certain recommendation scenario. For example, in the recommendation scenario of pushing trailers on the homepage of the long video software interface, it is necessary to implement the recommendation service of recommending trailers with high popularity. The recommendation event includes multiple recommendation nodes for implementing the recommendation service, which are respectively used to execute recall, rough sorting, fine sorting, re-sorting, etc. for obtaining different data processing stages of trailers with high popularity. Optionally, the recommendation request can be automatically generated by the server 110 in the process of implementing the recommendation system function, or it can be sent externally, and this application does not limit this. The server 110 calls the resource usage statistics interface based on the received recommendation request to perform data processing volume statistics reporting on the recommended node in the recommendation event, wherein the data processing volume is used to express the workload of data processing in the recommended node. The server 110 receives the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converts the data processing volume based on a pre-set resource conversion relationship to obtain resource statistical data, wherein the resource statistical data is used to express the data processing resources used during the execution of the node process, and the data processing resources are the resources used to execute the data processing process. The server 110 generates a resource usage result corresponding to the recommendation event based on the resource statistical data corresponding to the recommended node.

[0043] In some embodiments, the implementation environment further includes a terminal 120 and a communication network 130. The server 110 and the terminal 120 transmit data via the communication network 130. In some embodiments, the terminal 120 is used to generate a recommendation request based on user operations or needs and send the recommendation request to the server 110. The server 110 receives the recommendation request, calls the resource usage statistics interface to perform data processing volume statistics reporting on the recommended node in the recommended event, receives the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converts the data processing volume based on a pre-set resource conversion relationship to obtain resource statistics data, and generates a resource usage result corresponding to the recommended event based on the resource statistics data corresponding to the recommended node. The server 110 sends the resource usage result back to the terminal 120 via the communication network 130.

[0044] The above-mentioned terminal is optional. The terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart TV, a smart car, and other terminal devices, which are not limited to the embodiments of the present application.

[0045] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0046] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0047] In some embodiments, the above server can also be implemented as a node in a blockchain system.

[0048] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0049] For illustration, please refer to Figure 2 , which shows a flowchart of a method for determining resources provided by an exemplary embodiment of the present application. The method can be applied to a terminal, a server, or both. The present application embodiment takes the method applied to a terminal as an example for explanation. Figure 2 As shown, the method comprises the following steps:

[0050] Step 210: Receive a recommendation request.

[0051] The recommendation request is used to generate a recommendation event, and the recommendation event includes multiple recommendation nodes, and the multiple recommendation nodes are used to execute different data processing stages in the recommendation event.

[0052] Optionally, different data processing stages include but are not limited to recall, rough sorting, fine sorting, re-sorting and other data processing stages for obtaining target recommendation data, wherein the target recommendation data refers to the data that needs to be recommended corresponding to the recommendation request.

[0053] In some embodiments, recall is used to obtain first recommended data within a first quantity threshold range from the full amount of data, coarse sorting is used to obtain second recommended data within a second quantity threshold range from the first recommended data, fine sorting is used to obtain third recommended data within a third quantity threshold range from the second recommended data, and reordering is used to sort and adjust the third recommended data to obtain fourth recommended data, wherein the quantity ranges of the recommended data are, from large to small, the first quantity threshold range, the second quantity threshold range, and the third quantity threshold range, and the first recommended data, the second recommended data, the third recommended data, and the fourth recommended data meet the recommended screening requirements, and the recommended data are, in order of the degree of conformity with the recommended screening requirements, the first recommended data, the second recommended data, the third recommended data, and the fourth recommended data. In some embodiments, the recommended screening requirements are determined based on the recommendation request. Optionally, the recommended screening requirements can be screening requirements indicated by any recommendation request, such as data features meeting user interest features, or data heat index reaching a heat threshold, which is not limited in this application.

[0054] In some embodiments, a recommendation event refers to a recommendation service that needs to be implemented in a certain recommendation scenario. For example, in the recommendation scenario of pushing trailers on the home page of a long video software interface, it is necessary to implement a recommendation service of recommending trailers with high popularity. The recommendation event includes multiple recommendation nodes for implementing the recommendation service, which are respectively used to execute different data processing stages such as recall, rough sorting, fine sorting, and re-sorting to obtain trailers with high popularity.

[0055] In some embodiments, the recommendation request is sent by the client corresponding to the business party, and the business party refers to an object that has a recommendation demand and needs to use the resource determination method provided by the embodiment of the present application. Schematically, the business party is a supplier of a certain graphic and text social software, and the software needs to push graphic and text information that conforms to the user's browsing tendency in the software interface based on the user's historical behavior. The implementation of the above push needs to send a recommendation request through the client installed with the software. For example, when the user enters the homepage of the software, the client sends a recommendation request to request the recommendation of 10 graphic and text information pushed on the current homepage based on the user's historical browsing tendency.

[0056] In some embodiments, the recommendation request is used to generate multiple recommendation events corresponding to different recommendation scenarios. The recommendation scenarios include any scenario where there is a recommendation demand, such as various fields and various applications. For example, please refer to Figure 3 , Figure 3 is a schematic diagram of recommended scene division provided by an exemplary embodiment of the present application, such as Figure 3 As shown, taking long videos as an example, the device types indicated horizontally are divided into host side, mobile side, mini program, international version, car version, etc., and the page types indicated vertically are divided into home page, channel page, navigation bar, etc., and the recommendation scenes corresponding to different recommendation types are staggered horizontally and vertically. For example, recommendation scene 310 refers to the video information corresponding to the "Featured Home Page" recommended on the home page of the host side, and recommendation scene 320 refers to the "Hot Articles List" that recommends article information according to the popularity of the article on the channel page of the mini program.

[0057] Step 220: Call the resource usage statistics interface to perform data processing volume statistics reporting on the recommended nodes in the recommended event.

[0058] The data processing amount is used to express the workload of data processing in the recommendation node. In some embodiments, the data processing amount is obtained by statistically analyzing the workload of data processing based on different statistical dimensions. Optionally, the data processing amount is implemented as the number of requests for the recommendation node, which is used to express the number of times the corresponding data processing stage is executed in the recommendation node, or the data processing amount is implemented as the amount of data required to be processed in the recommendation node to execute the corresponding data processing stage, or the data processing amount is implemented as the number of processed items, which is used to express the number of recommendation nodes. Illustratively, the recommendation event is implemented as recommending 3 pieces of text and image information in the field of A, 2 pieces of video information in the field of B, and 1 piece of text and image information in the field of C. Assuming that the implementation of the recommendation event requires executing the data processing stages of recall, coarse sorting, fine sorting, and re-arrangement respectively through 4 recommendation nodes, the data processing amount can be implemented as the number of times the recall is executed in the recommendation event, or the data processing amount can be implemented as the amount of data that needs to be traversed when executing the recall. For example, the recommendation event needs to traverse 10,000 pieces of text and image information in the field of A, 2,000 pieces of video information in the field of B, and 3,000 pieces of text and image information in the field of C in order to execute the recall. Then the data processing amount is implemented as the amount of data that needs to be traversed when executing the recall, which is 14,000 pieces of information. Alternatively, the data processing amount can also be implemented as the number of recommendation nodes being 4, that is, the type of data processing method corresponding to different data processing stages.

[0059] In some embodiments, the resource usage statistics interface is used to perform real-time statistics and periodic reporting of data processing volume. During this process, the resource usage reporting interface will periodically aggregate and report the real-time statistical data processing volume to prevent a surge in the reported data volume, thereby reducing data storage costs.

[0060] For example, taking scheduled reporting every 5 minutes as an example, assuming that the receiving speed of recommendation requests is 100 per second, and the recommendation requests received within 5 minutes are aggregated to obtain 100 groups of reporting requests, then real-time reporting will generate 30,000 reports corresponding to 30,000 recommendation requests within 5 minutes, while scheduled reporting only needs to generate 100 reports.

[0061] Step 230: receiving the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converting the data processing volume based on a preset resource conversion relationship to obtain resource statistical data.

[0062] Among them, resource statistics are used to express the data processing resources used during the execution of the node process. Data processing resources are the resources used to execute the data processing process, such as the memory occupied by storing data during the data processing process, the called interfaces, the CPU / GPU used, and other resources.

[0063] In some embodiments, the resource conversion relationship is used to indicate the conversion relationship between data processing volume and resource statistical data, that is, based on the resource conversion relationship, the data processing workload in the recommended node can be converted into data processing resources used during the execution of the node process.

[0064] In some embodiments, a unit resource parameter is preset according to a preset resource conversion relationship, which is used to implement a conversion process corresponding to the resource conversion relationship, wherein the unit resource parameter is used to express the amount of resources used in the processing process of the unit data processing volume when the unit data processing volume is used as the base unit.

[0065] Schematically, the data processing volume is implemented as the number of requests, which is used to express the number of times the corresponding data processing stage is executed in the recommended node. The resource conversion relationship indicates a unit resource parameter, which is used to express the data processing resources used by the node process in executing a data processing stage. The unit resource parameters are summed and counted according to the number of requests to obtain resource statistical data, that is, the data processing resources used by the node process in multiple executions corresponding to the number of requests.

[0066] Step 240: Generate resource usage results corresponding to the recommended events based on the resource statistical data corresponding to the recommended nodes.

[0067] In some embodiments, the resource usage result is used to express the sum of resource statistics data corresponding to multiple recommended nodes in the recommended event.

[0068] Optionally, the resource usage result generation process is implemented by summing up the resource statistical data corresponding to a plurality of recommendation nodes in the recommendation event, to obtain the resource usage result corresponding to the recommendation event.

[0069] Schematically, the recommendation event is implemented as a recommendation service that requires recommending trailers with high popularity in the recommendation scenario of pushing trailers on the home page of the long video software interface. The recommendation event includes two recommendation nodes, recall and reorder. The first resource statistical data corresponding to the recall recommendation node is used to express the data processing resources used by the recall service in the recommendation event, and the second resource statistical data corresponding to the reorder recommendation node is used to express the data processing resources used by the reorder service in the recommendation event. The resource usage result corresponding to the recommendation event is implemented as the sum of the first resource statistical data and the second resource statistical data, which is used to express the data processing resources required to implement the recommendation service that requires recommending trailers with high popularity in the recommendation scenario of pushing trailers on the home page of the long video software interface.

[0070] In some embodiments, after generating the resource usage results, the resource determination method provided in the embodiments of the present application further includes a real-time report generation process. In some embodiments, the process is implemented as generating a resource settlement report according to a settlement period, and optionally, the resource settlement report includes resource statistical data within the settlement period and resource usage results within the settlement period.

[0071] For illustration, take one hour as an example, please refer to Figure 4 , Figure 4 This is a schematic diagram of a resource settlement report provided by an exemplary embodiment of the present application. Figure 4 As shown in the figure, the recommendation request sent by business party A within one hour generates recommendation events P1, P2, and P3. Recommendation event P1 includes recommendation node S 1(p1) , Recommended Node S 2(p1) and recommended node S 3(p1) , the recommended event P2 includes the recommended node S 1(p2) and recommended node S 2(p2) , the recommended event P3 includes the recommended node S 1(p3) and recommended node S 2(p3) The resource settlement report 400 corresponding to business party A within this hour includes resource usage results 410, resource usage results 420 and resource usage results 430 corresponding to recommended events P1, P2 and P3, respectively, as well as the recommended node S 1(p1) , Recommended Node S 2(p1) and recommended node S 3(p1) The corresponding resource statistical data 411, resource statistical data 412 and resource statistical data 413 respectively, the recommended node S 1(p2) and recommended node S 2(p2) The corresponding resource statistics data 421 and resource statistics data 422 respectively, the recommended node S 1(p3) and recommended node S 2(p3)The corresponding resource statistical data 431 and resource statistical data 432 respectively.

[0072] In some embodiments, the business party sending the recommendation request needs to use the pre-agreed exchange resources to exchange the recommended service corresponding to the recommendation request with the service party executing the resource determination method. Optionally, the business party can determine the exchange resources that need to be delivered to the service party based on the above resource settlement report. In an exemplary manner, the business party uses 1.5 times the resource usage result in the resource settlement report as the exchange resource, and delivers the exchange resource to the service party in exchange for the recommended service corresponding to the recommendation request.

[0073] To summarize, the method provided in the embodiment of the present application generates a recommendation event by receiving a recommendation request, calls the resource usage statistics interface to perform data processing volume statistics reporting on the recommended node in the recommendation event, receives the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converts the data processing volume based on a pre-set resource conversion relationship to obtain resource statistical data, generates a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node, and realizes automatic statistics and reporting of the data processing volume through the resource usage statistics interface, thereby obtaining resource statistical data and automatically generating resource usage results corresponding to the recommended event, thereby improving the efficiency and accuracy of resource usage settlement.

[0074] The method provided in the embodiment of the present application can provide a high-real-time resource overview to the business party by generating a resource settlement report according to the settlement cycle.

[0075] Please refer to Figure 5 , Figure 5 1 is a flowchart of reporting data processing volume provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Figure 5 As shown, in some embodiments, the statistical reporting process of data processing volume includes the following steps:

[0076] Step 510: Call the resource usage statistics interface to collect statistics on the data processing volume of the recommendation node in the recommendation event.

[0077] In some embodiments, the resource usage statistics interface counts the data processing volume of the recommended nodes in the recommended event based on specified statistical dimensions. Optionally, the statistical dimensions include the number of requests, data access volume, number of nodes, etc., wherein the number of requests is used to express the number of times a single recommended node in the recommended event executes the corresponding data processing stage, the data access volume is used to express the amount of data that a single recommended node in the recommended event needs to access to execute a data processing stage once, and the number of nodes is used to express the number of recommended nodes in the recommended event.

[0078] For illustration, please refer to Figure 6 , Figure 6 is a statistical diagram of data processing volume provided by an exemplary embodiment of the present application, such as Figure 6 As shown, statistical result 610 is the result of counting the data processing volume of recommended nodes in recommendation event A with the number of requests as the statistical dimension, including the number of requests corresponding to recommended node a, recommended node b and recommended node c in recommendation event A respectively, statistical result 620 is the result of counting the data processing volume of recommended nodes in recommendation event A with the data access volume as the statistical dimension, including the data access volume corresponding to recommended node a, recommended node b and recommended node c in recommendation event A respectively, statistical result 630 is the result of counting the data processing volume of recommended nodes in recommendation event A with the data access volume as the statistical dimension, including the number of recommended nodes in recommendation event A.

[0079] In some embodiments, the resource usage statistics interface is used to record recommendation requests. Schematically, each time a recommendation request is received, the resource usage statistics interface is called once, and the resource usage statistics interface counts and records the data processing volume corresponding to the recommendation request.

[0080] Step 520: Call the timer based on the call to the resource usage statistics interface.

[0081] Among them, the timer is used to periodically trigger the usage reporting task.

[0082] In some embodiments, the timer is implemented as a counter, and the data processing volume corresponding to the recommendation request is aggregated by the counter to realize the timed reporting, that is, when the data processing volume corresponding to the recommendation request counted by the counter reaches the reporting threshold, the counter triggers the usage reporting task. Schematically, taking 100 recommendation requests per second as an example, a timed report is performed every 30,000 recommendation requests received, that is, the reporting period is 5 minutes.

[0083] Step 530: Report the data processing volume counted by the resource usage statistics interface in the current timing period according to the timing period of the timer.

[0084] Illustratively, if the timing period of the timer is 5 minutes, the data processing volume counted by the resource usage statistics interface within the 5 minutes is reported every 5 minutes.

[0085] In some embodiments, the above step 520 also includes a timer checking process to ensure that the timer has been triggered. In some embodiments, the timer checking process includes the following situations:

[0086] For illustration, please refer to Figure 7 , Figure 7FIG. 1 is a flowchart of resource usage reporting provided by an exemplary embodiment of the present application. Figure 7 As shown, resource usage reporting is implemented through the SDK program 710. The SDK program 710 includes an SDK interface 701 as a resource usage reporting interface and a counter 702 as a timer. In response to receiving a recommendation request, the SDK interface 701 is called, and the counter 702 is accessed through the SDK interface 701. The counter 702 increments and periodically triggers the usage reporting task. In response to the usage reporting task being triggered, the data processing volume counted by the SDK interface 710 in the current timing period is reported, the reported data processing volume is received and stored in the database 720, and the data processing volume is read from the database 720 to the data settlement platform 730. The data settlement platform 730 performs an offline calculation task on the data processing volume, that is, based on a pre-set resource conversion relationship, the data processing volume is converted to obtain resource statistical data, and a resource usage result corresponding to the recommended event is generated based on the resource statistical data, and a resource settlement report including the resource statistical data and the resource usage result is generated according to the settlement cycle.

[0087] The first , in response to the timer not being triggered, setting a timing period and triggering the timer.

[0088] In some embodiments, setting the timing period and triggering the timer is achieved through program initialization. Optionally, the timing period is a preset period, or the timing period is determined based on the receiving speed of the recommendation requests and the storage requirements. The storage requirements are used to indicate the number of recommendation requests that the machine can receive within a specified time range.

[0089] The second In response to the timer being triggered, the data processing volume counted by the resource usage statistics interface in the current timing period is aggregated to obtain the target data processing volume corresponding to the current timing period.

[0090] In some embodiments, in order to reduce the reporting overhead, only the target data processing volume among the data processing volumes counted by the resource usage statistics interface in the current timing period is reported, and the target data processing volume meets the preset reporting conditions, and the reporting conditions are used to filter the target data processing volume among the data processing volumes counted by the resource usage statistics interface in the current timing period. Optionally, when there are multiple identical recommendation requests in the current timing period, the reporting condition is implemented as the reception time of the recommendation request being the earliest among the multiple identical recommendation requests.

[0091] In some embodiments, the above-mentioned timer check process is executed once each time the resource usage reporting interface is called. During the timer check process, in response to the timer not being triggered within the historical period, setting the timing period and triggering the timer must be executed and only executed once, thereby ensuring that within the historical period, the timer is in a triggered state when the resource usage reporting interface is called.

[0092] For illustration, please refer to Figure 8 , Figure 8 1 is a flowchart of a reporting procedure provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Figure 8 As shown, the reporting program includes the following steps: step 810, calling the resource usage reporting interface, executing the above-mentioned timer checking process in response to calling the resource usage reporting interface, checking whether the timer is initialized, that is, checking whether the timer has been triggered, in response to the timer not being triggered, executing step 820, initializing the reporting program, and setting the timer to execute the report, that is, setting the timing period and triggering the timer, in response to the timer being triggered, judging whether the data processing volume meets the preset reporting conditions, and when the data processing volume meets the reporting conditions, executing step 830, performing parameter analysis on the data processing volume, that is, analyzing the recommendation time generated by the recommendation request based on the data processing volume, the recommendation nodes included in the recommendation request, etc.

[0093] To summarize, the method provided in the embodiment of the present application counts the data processing volume of the recommended node in the recommendation event by calling the resource usage statistics interface, calls the timer, and reports the data processing volume counted by the resource usage statistics interface within the current timing period according to the timing period of the timer, thereby realizing the timed reporting of the data processing volume, reducing the data reporting pressure when the number of recommendation requests is large, and reducing data storage overhead.

[0094] The method provided in the embodiment of the present application sets a timing period and triggers the timer in response to the timer not being triggered, and aggregates the data processing volume counted by the resource usage statistics interface in the current timing period in response to the timer being triggered, and obtains the target data processing volume corresponding to the current timing period, thereby realizing the check of the timer, ensuring that the timer has been triggered, and being able to implement the timing reporting function.

[0095] Please refer to Fig. 9 , Fig. 9 1 is a flow chart of a data conversion method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Fig. 9As shown, in some embodiments, the above step 230 is implemented as the following steps:

[0096] Step 231, obtaining preset unit resource parameters.

[0097] The unit resource parameter is used to indicate the amount of resources used in the processing of the unit data processing volume when the unit data processing volume is used as the base unit.

[0098] Optionally, the resource conversion relationship includes at least one of the following situations:

[0099] The first ,The resource conversion relationship is the conversion relationship between the ,number of requests and resource statistics data.

[0100] The number of requests is used to express the number of times the corresponding data processing stage is executed in the recommendation node.

[0101] At this time, the unit resource parameter is used to express the data processing resources used when the recommendation node in the recommendation event executes a corresponding data processing stage.

[0102] The second ,The resource conversion relationship is the conversion relationship between data access ,volume and resource statistical data.

[0103] The data access amount is used to express the amount of data processing resources used to execute the corresponding data processing stage in the recommendation node.

[0104] At this time, the unit resource parameter is used to express the data processing resources used by the recommendation node in the recommendation event during the execution of a data processing stage.

[0105] The third ,The resource conversion relationship is the conversion relationship between the ,number of nodes and the resource statistics.

[0106] The number of nodes is used to express the number of recommended nodes in the recommendation event.

[0107] At this time, the unit resource parameter is used to express the data processing resources used by a recommendation node in the recommendation event to execute the corresponding data processing stage.

[0108] Step 232, convert the data processing amount based on the unit resource parameter to obtain resource statistical data.

[0109] In some embodiments, the unit resource parameters are summed and counted according to the data processing volume to obtain resource statistical data.

[0110] Taking the resource conversion relationship, which is the conversion relationship between the number of requests and resource statistical data, as an example, in some embodiments, the data processing volume includes the number of requests, the number of requests is used to express the number of times the corresponding data processing stage is executed in the recommended node, and the unit resource parameter is used to express the data processing resources used by the node process in a single execution of the corresponding data processing stage. The process of obtaining the resource statistical data is implemented by summing and counting the unit resource parameters according to the number of requests to obtain the resource statistical data.

[0111] Indicatively, assuming the number of requests is x and the unit resource parameter is c, the recommended node is s j The resource statistics data is implemented as Among them, S is used to represent the recommended node, Recommended nodes j Resource statistics.

[0112] In some embodiments, the resource usage result generation process is implemented by summing up the resource statistical data corresponding to multiple recommendation nodes in the recommendation event to obtain the resource usage result corresponding to the recommendation event.

[0113] Schematically, the recommended event p includes multiple recommended nodes s k (k is a positive integer), for multiple recommended nodes s in the recommended event p k Corresponding resource statistics Sum the results to get the resource usage result Cost corresponding to the recommended event p ,in,

[0114] In some embodiments, the recommendation request is used to generate multiple recommendation events corresponding to different recommendation scenarios. For example, taking the business party promoting social software with pictures and texts as an example, assuming that a homepage recommendation request from the business party is received, the homepage recommendation request is used to generate multiple recommendation events corresponding to different recommendation scenarios, including recommendation event A recommending pictures and texts that match the interests of the business party's users in the homepage main interface, and recommendation event B recommending the most popular terms in the historical period in the homepage search box. In the case where a recommendation request generates multiple recommendation events, please refer to Fig.10 , Fig.10 1 is a flow chart of a method for generating resource usage results provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Fig.10 As shown, the method comprises the following steps:

[0115] Step 1010: Obtain multiple data processing amounts and multiple resource statistical data corresponding to multiple recommended nodes.

[0116] In some embodiments, based on the reporting program, multiple data processing amounts corresponding to multiple recommended nodes are obtained, and unit resource parameters corresponding to the multiple recommended nodes are respectively obtained, and the unit resource parameters are summed and counted according to the data processing amounts used to obtain multiple data processing amounts. The embodiment of the present application takes the data processing amount as the number of requests as an example for explanation, and the unit resource parameter is implemented as the cost unit price corresponding to the data processing resource used in the process of the recommended node executing the corresponding data processing stage once. Assuming that the recommended node s k The number of requests is x, the unit cost is c, and the recommended node is s k The resource statistics data is implemented as Among them, S is used to represent the recommended node, Recommended nodes k Resource statistics.

[0117] Step 1020 , based on multiple data processing amounts and multiple resource statistical data, obtain first resource usage results corresponding to multiple recommendation nodes in the first recommendation event.

[0118] Optionally, the first recommended event is used to represent a single recommended event among multiple recommended events.

[0119] In some embodiments, the first resource usage result is the resource usage result of a single node in the first recommendation event, which is obtained by summing up and counting the resource statistical data of the recommended node according to the data processing volume of the first recommended node, wherein the first recommended node is a single recommended node among multiple recommended nodes.

[0120] In some embodiments, the process of obtaining the first resource usage result includes the following steps:

[0121] first step , summing up multiple data processing amounts corresponding to the first recommendation node in multiple recommendation events to obtain the event data processing amount corresponding to the first recommendation node in the multiple recommendation events.

[0122] Schematically, for multiple recommended events p k A single recommended node j The corresponding data processing volume Sum (k is a positive integer) to get multiple recommended events p k The corresponding event data processing volume, Among them, P represents the recommended event, S represents the recommended node, k represents the number of recommended events, and j is the identifier of the recommended node.

[0123] Step 2, dividing the multiple resource statistical data according to the ratio of the multiple data processing amounts to the event data processing amounts, and obtaining the first resource usage results corresponding to the multiple recommended nodes in the first recommended event.

[0124] Schematically, recommended nodes j The resource statistics for Recommended events i Recommended nodes j The corresponding data processing volume is Multiple recommended events k The corresponding event data processing volume is Then, the resource statistical data is divided according to the ratio of data processing volume to event data processing volume to obtain the recommended node s j In a single recommended event p i The corresponding first resource usage result is implemented as the following formula:

[0125]

[0126] Step 1030 , summing up the first resource usage results corresponding to the multiple recommended nodes in the first recommended event, to obtain the resource usage result corresponding to the first recommended event.

[0127] Indicatively, the first recommended event p i Multiple recommended nodes k The corresponding first resource usage results are The first resource usage results are summed to obtain the first recommended event p i The corresponding resource usage result is

[0128] In summary, the method provided in the embodiment of the present application converts the data processing volume based on the unit resource parameter to obtain resource statistical data, thereby improving the accuracy of resource settlement.

[0129] The method provided in the embodiment of the present application sums and counts the unit resource parameters according to the number of requests to obtain resource statistical data, thereby improving the accuracy of resource settlement.

[0130] The method provided in the embodiment of the present application sums up the resource statistical data corresponding to multiple recommendation nodes in the recommendation event, obtains the resource usage result corresponding to the recommendation event, realizes the automatic settlement of the resource usage result, and improves the efficiency of resource settlement.

[0131] Please refer to Fig.11 , Fig.11 is a schematic diagram of a table structure provided by an exemplary embodiment of the present application, such as Fig.11As shown, in some embodiments, different recommendation events or different recommendation nodes in recommendation events are implemented by different servers, and Table 1110 can be obtained by reporting the data processing volume. Table 1110 includes multiple parameter contents obtained by parsing the recommendation request based on the report, wherein the service name is used to indicate the recommendation node in the recommendation event, the container name indicates a container such as a called server, the event identifier indicates the recommendation event to which the call belongs, and the usage indicates the usage of the call, that is, the data processing volume.

[0132] By summing, we can get table 1120 with (service name, container name, event ID) as the primary key, which means the usage of the server for a certain service in a certain scenario, that is, the resource statistics of a single recommended node in multiple recommended events. In some embodiments, the usage standard is different for different servers, so it is necessary to determine the resource statistics of a single recommended node based on the ratio of the data processing volume of a single recommended node in a single recommended event to the data processing volume of a single recommended node in multiple recommended events. For example, the resource statistics of a single recommended node in a single recommended event are obtained by multiplying the ratio by a unit resource parameter. The unit resource parameter is the cost unit price in table 1130.

[0133] The cost unit price in Table 1130 can be calculated from Table 1140. Table 1140 is pre-acquired and used to represent machine performance, where a resource entity can represent a CPU / GPU or a memory, disk or other related unit, and its type is represented by the resource type. The unit price is the resource unit price, which is determined based on the resource entity of the container. If the resource entity is implemented as a memory, the resource unit price refers to the price corresponding to obtaining or using this memory. The cost unit price in Table 1130 is determined by Table 1140 according to the preset cost algorithm, that is, the unit resource parameter. This table is updated daily, and can accurately obtain an overview of container resource usage on that day.

[0134] Thus, the cost and total cost of a scenario at each service node can be calculated, that is, the resource usage results corresponding to the recommended event and the resource statistics corresponding to the recommended node can be obtained. By aggregating all scenarios of a business owner, that is, all recommended events generated by the recommendation request sent by the business owner, a daily / monthly report can be presented to the relevant business owner.

[0135] Fig.12 is a structural block diagram of a resource determination device provided by an exemplary embodiment of the present application, such as Fig.12 As shown, the device includes the following parts:

[0136] A recommendation request receiving module 1210 is used to receive a recommendation request, wherein the recommendation request is used to generate a recommendation event, wherein the recommendation event includes a plurality of recommendation nodes, and the plurality of recommendation nodes are used to execute different data processing stages in the recommendation event;

[0137] The statistics reporting module 1220 is used to call the resource usage statistics interface to perform statistics reporting on the data processing volume of the recommended node in the recommendation event, where the data processing volume is used to express the workload of data processing in the recommended node;

[0138] The resource statistics data acquisition module 1230 is used to receive the data processing amount corresponding to the recommended node reported by the resource usage statistics interface, and convert the data processing amount based on a preset resource conversion relationship to obtain resource statistics data, wherein the resource statistics data is used to express the data processing resources used in the execution of the node process, and the data processing resources are resources used to execute the data processing process;

[0139] The resource usage result generating module 1240 is used to generate a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node.

[0140] Please refer to Fig.13 , Fig.13 is a structural block diagram of a resource determination device module provided by an exemplary embodiment of the present application, such as Fig.13 As shown, in some embodiments, the statistics reporting module 1220 includes:

[0141] The data statistics unit 1221 is used to call the resource usage statistics interface to count the data processing amount of the recommendation node in the recommendation event;

[0142] A timer calling unit 1222, configured to call a timer based on calling the resource usage statistics interface, wherein the timer is used to periodically trigger a usage reporting task;

[0143] The data reporting unit 1223 is used to report the data processing volume counted by the resource usage statistics interface in the current timing period according to the timing period of the timer.

[0144] In some embodiments, the statistics reporting module 1220 further includes:

[0145] A timer initialization unit 1224, configured to set the timing period and trigger the timer in response to the timer not being triggered;

[0146] The data aggregation unit 1225 is used to aggregate the data processing volume counted by the resource usage statistics interface in the current timing period in response to the timer being triggered, so as to obtain the target data processing volume corresponding to the current timing period.

[0147] The data reporting unit 1223 is used to report the target data processing volume according to the timing period.

[0148] In some embodiments, the resource statistics data acquisition module 1230 includes:

[0149] The unit resource parameter acquisition unit 1231 is used to acquire a preset unit resource parameter, where the unit resource parameter is used to indicate the amount of resources used in the processing of the unit data processing amount when the unit data processing amount is used as a reference unit;

[0150] The resource statistical data acquisition unit 1232 is used to convert the data processing amount based on the unit resource parameter to obtain the resource statistical data.

[0151] In some embodiments, the resource usage result generating module 1240 is used to sum the resource statistical data corresponding to the multiple recommendation nodes in the recommendation event to obtain the resource usage result corresponding to the recommendation event.

[0152] In some embodiments, the recommendation request is used to generate multiple recommendation events corresponding to different recommendation scenarios; the resource usage result generation module 1240 includes:

[0153] The data acquisition unit 1241 is used to acquire multiple data processing amounts and multiple resource statistical data corresponding to the multiple recommended nodes;

[0154] A first resource usage result obtaining unit 1242 is configured to obtain first resource usage results corresponding to each of the plurality of recommendation nodes in a first recommendation event based on the plurality of data processing amounts and the plurality of resource statistical data;

[0155] The resource usage result obtaining unit 1243 is configured to sum the first resource usage results respectively corresponding to the multiple recommendation nodes in a single recommendation event to obtain the resource usage result corresponding to the first recommendation event.

[0156] In some embodiments, the first resource usage result acquisition unit 1242 is used to sum up multiple data processing amounts corresponding to the first recommended node in the multiple recommended events to obtain event data processing amounts corresponding to the multiple recommended events;

[0157] The multiple resource statistical data are divided according to the ratio of the multiple data processing amounts to the event data processing amount, so as to obtain the first resource usage results corresponding to the multiple recommendation nodes in the first recommendation event.

[0158] In some embodiments, the apparatus further comprises:

[0159] The resource settlement report generation module 1250 is used to generate a resource settlement report according to a settlement period, wherein the resource settlement report includes resource statistical data within the settlement period and resource usage results within the settlement period.

[0160] To summarize, the device provided in the embodiment of the present application generates a recommendation event by receiving a recommendation request, calls the resource usage statistics interface to perform data processing volume statistics reporting on the recommended node in the recommendation event, receives the data processing volume corresponding to the recommended node reported by the resource usage statistics interface, and converts the data processing volume based on a pre-set resource conversion relationship to obtain resource statistical data, generates a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node, and realizes automatic statistics and reporting of the data processing volume through the resource usage statistics interface, thereby obtaining resource statistical data and automatically generating resource usage results corresponding to the recommended event, thereby improving the efficiency and accuracy of resource usage settlement.

[0161] It should be noted that the resource determination device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0162] Fig.14 A structural block diagram of a terminal 1400 provided by an exemplary embodiment of the present application is shown.

[0163] Typically, the terminal 1400 includes a processor 1401 and a memory 1402 .

[0164] The processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0165] The memory 1402 may include one or more computer-readable storage media, which may be non-transitory. The memory 1402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1402 is used to store at least one instruction, which is used to be executed by the processor 1401 to implement the resource determination method provided in the method embodiment of the present application.

[0166] In some embodiments, the terminal 1400 also includes other components, which can be understood by those skilled in the art. Fig.14 The structure shown in the figure does not constitute a limitation on the terminal 1400, and the terminal 1400 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0167] The embodiment of the present application also provides a computer device, which can be implemented as follows: Figure 1 The terminal or server shown. The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the resource determination method provided by the above-mentioned method embodiments.

[0168] An embodiment of the present application further provides a computer-readable storage medium, on which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the resource determination method provided in the above-mentioned method embodiments.

[0169] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the resource determination method provided by the above-mentioned method embodiments is implemented.

[0170] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0171] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0172] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining resources, characterized in that: The method comprises: receiving a recommendation request, the recommendation request being used to generate a recommendation event, the recommendation event including a plurality of recommendation nodes, the plurality of recommendation nodes being used to execute different data processing stages in the recommendation event; Calling a resource usage statistics interface to perform statistical reporting of data processing volume for the recommended node in the recommendation event, where the data processing volume is used to express the workload of data processing in the recommended node; receiving the data processing amount corresponding to the recommended node reported by the resource usage statistics interface, and converting the data processing amount based on a preset resource conversion relationship to obtain resource statistical data, wherein the resource statistical data is used to express the data processing resources used in the execution of the node process, and the data processing resources are resources used to execute the data processing process; A resource usage result corresponding to the recommended event is generated based on the resource statistical data corresponding to the recommended node.

2. The method according to claim 1, characterized in that The calling of the resource usage statistics interface to perform data processing volume statistics reporting on the recommended node in the recommendation event includes: Calling a resource usage statistics interface to count the data processing volume of the recommended node in the recommended event; Based on the call of the resource usage statistics interface, a timer is called, and the timer is used to periodically trigger a usage reporting task; The data processing volume counted by the resource usage statistics interface in the current timing period is reported according to the timing period of the timer.

3. The method according to claim 2, characterized in that Before calling the timer, the method further includes: In response to the timer not being triggered, setting the timing period and triggering the timer; In response to the timer being triggered, aggregating the data processing volume counted by the resource usage statistics interface in the current timing period to obtain a target data processing volume corresponding to the current timing period; The reporting of the data processing amount counted by the resource usage statistics interface in the current timing period according to the timing period of the timer includes: The target data processing volume is reported according to the timing period.

4. The method according to any one of claims 1 to 3, characterized in that: The converting of the data processing amount based on the preset resource conversion relationship to obtain resource statistical data includes: Acquire a preset unit resource parameter, where the unit resource parameter is used to represent the amount of resources used in a processing process of a unit data processing amount when the unit data processing amount is used as a reference unit; The data processing volume is converted based on the unit resource parameter to obtain the resource statistical data.

5. The method according to claim 4, characterized in that The data processing amount includes the number of requests, which is used to express the number of times the corresponding data processing stage is executed in the recommended node, and the unit resource parameter is used to express the data processing resources used in the process of the node process executing the corresponding data processing stage once; Alternatively, the data processing volume includes data access volume, and the data access volume is used to express the number of data processing resources used to execute a corresponding data processing stage in the recommended node, and the unit resource parameter is used to express the data processing resources used by the node process to execute a corresponding data processing stage.

6. The method according to any one of claims 1 to 3, characterized in that: The generating a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node includes: The resource statistical data respectively corresponding to the multiple recommendation nodes in the recommendation event are summed to obtain the resource usage result corresponding to the recommendation event.

7. The method according to any one of claims 1 to 3, characterized in that: The recommendation request is used to generate multiple recommendation events corresponding to different recommendation scenarios; The generating a resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node includes: Acquire multiple data processing amounts and multiple resource statistical data corresponding to the multiple recommended nodes; Based on the multiple data processing amounts and the multiple resource statistical data, obtain first resource usage results corresponding to the multiple recommendation nodes in the first recommendation event respectively; The first resource usage results respectively corresponding to the multiple recommendation nodes in the first recommendation event are summed to obtain the resource usage result corresponding to the first recommendation event.

8. The method according to claim 7, characterized in that The obtaining first resource usage results corresponding to the plurality of recommendation nodes in the first recommendation event respectively based on the plurality of data processing amounts and the plurality of resource statistical data includes: Summing multiple data processing amounts corresponding to the first recommendation node in the multiple recommended events to obtain event data processing amounts corresponding to the multiple recommended events; The multiple resource statistical data are divided according to the ratio of the multiple data processing amounts to the event data processing amount, so as to obtain the first resource usage results corresponding to the multiple recommendation nodes in the first recommendation event.

9. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A resource settlement report is generated according to a settlement period, wherein the resource settlement report includes resource statistical data within the settlement period and resource usage results within the settlement period.

10. A resource determination device, characterized in that: The device comprises: A recommendation request receiving module, used to receive a recommendation request, wherein the recommendation request is used to generate a recommendation event, wherein the recommendation event includes a plurality of recommendation nodes, and the plurality of recommendation nodes are used to execute different data processing stages in the recommendation event; A statistics reporting module, used to call a resource usage statistics interface to perform statistics reporting on the data processing volume of the recommended node in the recommended event, where the data processing volume is used to express the workload of data processing in the recommended node; a resource statistics data acquisition module, configured to receive the data processing amount corresponding to the recommended node reported by the resource usage statistics interface, and convert the data processing amount based on a preset resource conversion relationship to obtain resource statistics data, wherein the resource statistics data is used to express the data processing resources used in the execution of the node process, and the data processing resources are resources used to execute the data processing process; The resource usage result generating module is used to generate the resource usage result corresponding to the recommended event based on the resource statistical data corresponding to the recommended node.

11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the resource determination method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the resource determination method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the method for determining resources as claimed in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and apparatus for determining resources consumed by tasks

    CN105868070A

  • Request quantity control method, device, storage medium and computer equipment

    CN110493362A

  • Request control method and device and electronic equipment

    CN111970339A

  • Resource processing method and device

    CN113312166A

  • Database management method and system of data center

    CN113392092A