Method, device, electronic device and storage medium for determining application submodule

By combining the greedy algorithm with randomization and the simulated annealing algorithm, the sub-modules of the recommendation system API are determined, which solves the problems of high sub-module determination cost and poor stability in the existing technology, and improves the stability and performance of the application.

CN113204398BActive Publication Date: 2024-09-27MIGU CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110587661.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2024-09-27
Estimated Expiration
2041-05-27

AI Technical Summary

Technical Problem

When the existing technology determines sub-modules for the recommendation system API, the cost and risk are high. When there are many sub-modules, the code complexity increases, the stability risks are greater, and it is difficult to effectively meet the performance index constraints.

Method used

A greedy algorithm combined with randomization is used to generate the initial combination results, and candidate sub-modules are screened through a simulated annealing algorithm to ensure that the performance index consumption value is less than the constraint value, and a sub-module combination suitable for the operating environment is selected.

Benefits of technology

It effectively reduces the blindness of project development, improves the stability and performance of the application, ensures that the sub-modules that can be included are determined during the application design stage, and reduces the need for later adjustments and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113204398B
    Figure CN113204398B
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device and storage medium for determining application submodules; the method comprises: obtaining utility estimation scores and performance index consumption values ​​of each of a plurality of candidate submodules of a first application, and performance index constraint values ​​of the first application under a first operating environment; according to the utility estimation scores and performance index consumption values ​​of each of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules; a simulated annealing algorithm is used to solve the plurality of initial combination results to obtain a first combination result. The present invention can determine the submodules that an application can include in the application design stage, can effectively reduce the blindness of later project development, and improve the stability of application operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for determining an application submodule. Background Art

[0002] The recommendation system is used to recommend information and products of interest to users based on their information needs and interests. The recommendation system API (Application Programming Interface) is the interface between users and the recommendation system. The recommendation system API inputs user information and environment information and outputs recommendation results.

[0003] In order to meet the diverse needs of users, the recommendation system API used in complex scenarios generally provides optional sub-modules with multiple functions for users to choose from, in addition to the essential sub-modules that provide basic functions. Taking the song recommendation API in a music app as an example, its recommendation process includes many sub-modules, and the functions involved in these sub-modules include: various types of recommendation recalls, the latest and hottest content, online sorting, various mixing strategies, manual intervention, etc.

[0004] However, in a specific operating environment, the resources supporting the recommendation system, such as memory resources, CPU resources, bandwidth resources, IO resources, etc., are limited. In order to ensure service quality and meet performance constraints, the optional sub-modules in the recommendation system API are generally not all selected in actual applications, but only some of them. Therefore, it is necessary to determine the sub-modules supported by the recommendation system API in a specific operating environment.

[0005] In the prior art, when determining sub-modules for the recommendation system API, generally all sub-modules that may be used in the scenario are integrated first; then, performance stress testing is performed after the recommendation process is designed and developed; if the performance indicator constraints are not met, a large number of code adjustments and optimizations are manually performed, such as adding cache or concurrent processing, until the performance indicator constraints are met.

[0006] The above method is acceptable when applied to the recommendation system API with fewer sub-modules. However, if there are more sub-modules in the recommendation system API, the cost and risk of this method are relatively high, which not only increases the overall complexity of the code, but also brings hidden dangers to the stability of online service operation, such as the risk of memory overflow caused by insufficient estimation of cache overhead.

[0007] In addition to the aforementioned recommendation system, for applications with optional submodules, when deployed in a specific operating environment, it is also necessary to determine the submodules based on the resources provided by the actual operating environment. For such applications, the prior art also adopts a method of integrating all submodules first, then performing performance stress testing, and then manually adjusting and optimizing the code when the performance indicator constraints are not met. Therefore, the prior art method for determining application submodules also has the disadvantages of relatively high costs and risks. Summary of the invention

[0008] In view of the above-mentioned defects existing in the prior art, the present invention provides a method, device, electronic device and storage medium for determining an application submodule.

[0009] The present invention provides a method for determining an application submodule, comprising:

[0010] Obtaining utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of the first application, and performance indicator constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance indicator consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators;

[0011] According to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules;

[0012] A simulated annealing algorithm is used to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are sub-modules included in the first application when running in the first operating environment.

[0013] According to a method for determining an application submodule provided by the present invention, the method generates multiple initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of each of multiple candidate submodules of the first application, including:

[0014] Sorting the plurality of candidate submodules of the first application program according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, and obtaining a first number of first initial results according to the sorting results;

[0015] generating a second number of second initial results in a randomized manner;

[0016] The initial combination result is obtained according to the first initial result and the second initial result.

[0017] According to a method for determining an application submodule provided by the present invention, the method of sorting a plurality of candidate submodules of a first application according to their respective utility estimation scores and performance indicator consumption values, and obtaining a first number of initial combination results according to the sorting results, comprises:

[0018] Sorting multiple candidate submodules in the first application program in descending order according to the utility estimation scores, selecting N submodules in sequence from the sorting results, and obtaining an initial combination result of the multiple candidate submodules; wherein the sum of the performance indicator consumption values ​​of the N submodules is less than the performance indicator constraint value;

[0019] Calculate L utility estimation densities for each of the plurality of candidate submodules in the first application, sort the plurality of candidate submodules in the first application in the order of the L utility estimation densities, generate L sorting results, and select N of the L sorting results in turn. z submodules, and obtaining L initial combination results of the multiple candidate submodules;

[0020] Wherein, L represents the number of types of performance indicators, 1≤Z≤L, the z-th utility estimation score density is the ratio between the utility estimation score of the candidate submodule and the z-th performance indicator consumption value; the N z The sum of the performance indicator consumption values ​​of the sub-modules is less than the performance indicator constraint value.

[0021] According to a method for determining an application submodule provided by the present invention, the method of using a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result includes:

[0022] Step S1, taking multiple initial combination results as current solutions;

[0023] Step S2: generating a pending new solution according to the current solution at the current temperature value, and determining whether to update the current solution with the pending new solution according to a comparison result between the performance indicator consumption value of the pending new solution and the performance indicator constraint value, and a comparison result between the utility evaluation score of the current solution and the utility estimation score of the pending new solution;

[0024] Step S3, lowering the current temperature value. If the lowered current temperature value is greater than the preset lower temperature limit, re-execute step S2. If the lowered current temperature value is less than or equal to the preset lower temperature limit, execute the next step.

[0025] Step S4: From the multiple combination results of the multiple candidate submodules corresponding to the current solution, select a combination result whose utility evaluation score meets a preset requirement as a first combination result.

[0026] According to a method for determining an application submodule provided by the present invention, generating a pending new solution according to the current solution at a current temperature value includes:

[0027] Determine the temperature range in which the current temperature value lies;

[0028] According to the preset corresponding relationship between the temperature range and the number of randomly reversed elements, a corresponding number of elements in the current solution are randomly reversed to obtain a pending new solution.

[0029] According to a method for determining an application submodule provided by the present invention, the number of the random inversion elements is proportional to a first ratio, and the first ratio is the ratio of the highest temperature value included in the temperature interval to the initial temperature value set in the simulated annealing algorithm.

[0030] According to a method for determining an application submodule provided by the present invention, the method of using a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result includes:

[0031] A simulated annealing algorithm is used to perform parallel solution operations on the multiple combination results of the multiple candidate submodules, and a first combination result is determined according to the results of the parallel solution operations.

[0032] The present invention also provides a device for determining an application submodule, comprising:

[0033] A data acquisition module, used to acquire utility estimation scores and performance index consumption values ​​of each of a plurality of candidate submodules of the first application, and performance index constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance index consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators;

[0034] An initial combination result generating module, configured to generate a plurality of initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, each of which includes part or all of the plurality of candidate submodules;

[0035] A sub-module determination module is used to use a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are the sub-modules included in the first application when running in the first operating environment.

[0036] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for determining the application submodule when executing the program.

[0037] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for determining the application sub-module are implemented.

[0038] The method, device, electronic device and storage medium for determining application submodules provided by the present invention use a simulated annealing algorithm to judge whether each candidate submodule in the first application is suitable for the first operating environment, and select a submodule combination that satisfies the performance index constraint value and has the largest utility evaluation score from each candidate submodule, so that the submodules that the application can include can be determined in the application design stage, which can effectively reduce the blindness of later project development and improve the stability of application operation. In the process of implementing the simulated annealing algorithm, the combination of a greedy algorithm and randomization is used to determine the initial solution, which helps to ensure the quality of the initial solution, avoid completely blind randomization, and accelerate the speed of convergence to the global optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A flowchart of a method for determining an application submodule provided by the present invention;

[0041] Figure 2 A schematic diagram of a device for determining an application submodule provided by the present invention;

[0042] Figure 3 An example physical structure diagram of an electronic device is provided. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Figure 1 A flow chart of a method for determining an application submodule provided by the present invention, such as Figure 1 As shown, the method for determining the application submodule provided by the present invention includes:

[0045] Step 101: Obtain utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of a first application, and performance indicator constraint values ​​of the first application in a first operating environment.

[0046] In the present invention, the first application is an application that needs to determine the submodules it contains based on the resources provided by the actual operating environment. In this embodiment, the first application is a recommendation system API in a certain application scenario, such as a song recommendation API for a personal radio station in a music app (hereinafter referred to as a song recommendation API). In other embodiments, the first application may also be other types of applications, such as a product recommendation API in a shopping app.

[0047] The candidate submodules of the first application are functional submodules that the first application can theoretically include. Taking the song recommendation API as an example, the candidate submodules may include: user portrait submodule, song content tag recall submodule, singer follow submodule, liking or collection behavior submodule, song or singer negative feedback submodule, online sorting submodule, hot song and singer submodule, latest song submodule, mixed arrangement submodule, manual operation submodule, etc.

[0048] It should be noted that, in the present invention, the candidate submodules of the first application only refer to the optional functional submodules in the first application. The mandatory functional submodules in the first application, such as the user request parameter verification submodule and the input data preprocessing submodule, must be included in the first application and do not need to be selected using the method of the present invention.

[0049] The utility evaluation score is used to reflect the importance of the candidate submodule in the first application. The functions corresponding to the candidate submodule can usually be applied to different types of applications. For example, the user portrait submodule can be used not only for the song recommendation API of the personal radio station in the music app, but also for the product recommendation API in the shopping app. The importance of submodules with the same function may be different in different applications. Therefore, in the present invention, the utility evaluation score is used to reflect the importance of the candidate submodule in the first application.

[0050] Different candidate submodules have their own utility evaluation scores. In this embodiment, the utility evaluation scores of the candidate submodules are preset. In other embodiments, the setting process of the utility evaluation scores will be described.

[0051] Performance indicators are well-known concepts to those skilled in the art. In this embodiment, the performance indicators include call duration and memory usage. In other embodiments, the performance indicators may also include at least one of the following indicators: CPU usage, bandwidth usage, and I / O usage.

[0052] The performance indicator consumption value is used to reflect the value of the candidate submodule on the corresponding performance indicator. For example, in this embodiment, the performance indicator includes the call time and the memory usage, then the performance indicator consumption value of the online sorting submodule in the song recommendation API includes two components, one of which is used to describe the call time of the online sorting submodule, and the other is used to describe the memory usage of the online sorting submodule during operation.

[0053] Different candidate submodules have their own performance indicator consumption values. The performance indicator consumption values ​​of each candidate submodule can be obtained through testing. For example, the calling time of the candidate submodule can be obtained through mock testing; the candidate submodule is called through mock testing, and a Java Heap snapshot is dumped, and then the memory usage can be calculated using the MAT memory snapshot analysis tool.

[0054] It is easy for those skilled in the art to understand that the first application can be deployed in different operating environments. When the first application is deployed in different operating environments, the resources that different operating environments can provide to the first application are different. For example, when deploying the song recommendation API, operator A can provide it with 100G of memory resources when deploying it, and operator B can provide it with 50G of memory resources when deploying it. In the present invention, the first operating environment is used to represent the operating environment of the first application.

[0055] Based on the resources that the first operating environment can provide, a performance indicator constraint value of the first application program in the first operating environment can be obtained. The performance indicator constraint value is used to reflect the upper limit value of the resources that the first operating environment can provide in terms of the corresponding performance indicator.

[0056] It is easy for those skilled in the art to understand that the sum of the performance indicator consumption values ​​of all sub-modules included in the first application when it is running in the first operating environment should not be greater than the corresponding performance indicator constraint value. For example, in this embodiment, the performance indicators include call duration and memory usage, and the corresponding performance indicator constraint values ​​include call duration constraint value and memory usage constraint value. If the call duration constraint value is 200 milliseconds and the memory usage constraint value is 4G, then the sum of the call duration consumption values ​​of all sub-modules included in the first application when it is running in the first operating environment should not be greater than 200 milliseconds, and the sum of the memory usage consumption values ​​of all sub-modules included in the first application when it is running in the first operating environment should not be greater than 4G.

[0057] In summary, in this step, when determining the submodules included in the first application when it is running in the first operating environment, it is first necessary to determine multiple candidate submodules for the first application, obtain the utility estimation points and performance index consumption values ​​of each of these candidate submodules, and also determine the performance index constraint values ​​of the first application in the first operating environment. In subsequent steps, the submodules included in the first application when it is running in the first operating environment will be determined based on these data.

[0058] The above data obtained in this step can be stored in a relational data table. Table 1 below shows the type of candidate submodules determined, the utility evaluation score of each candidate submodule, the performance indicator consumption value of each candidate submodule, and the performance indicator constraint value of the first application when the first application is a song recommendation API.

[0059] As shown in Table 1, when the first application is a song recommendation API, there are 23 candidate submodules in total. The names and codes of the 23 submodules can be found in the description in Table 1. The 23 candidate submodules have their own utility evaluation scores, which can be expressed in the form of a matrix [v1, v2, v3, v4, v5, ..., v 23 ,] indicates that v1 corresponds to the user's real-time favorite song recall submodule coded 1, v2 corresponds to the user's offline favorite song recall submodule coded 2, ..., v 23 The same style song restriction submodule corresponding to code 23. The 23 candidate submodules have their own performance index consumption values. In this embodiment, the performance index includes the call duration and the memory usage. Therefore, the performance index consumption value can be divided into two matrices, where [c 11 ,c 12,……,c 1N ,] represents the call time consumption value of each of the 23 candidate submodules, where c 11 The call time consumption value of the user's real-time favorite song recall submodule corresponding to code 1, c 12 The call time consumption value of the user offline preference recall submodule corresponding to code 2, ..., c 1N (N is 23) corresponds to the call time consumption value of the submodule of the same genre song restriction with code 23. Similarly, the matrix [c 21 ,c 22 ,……,c 2N ,] represents the memory usage consumption value of each of the 23 candidate submodules, where c 21 The memory usage value of the user's real-time favorite song recall submodule corresponding to code 1, c 22 The memory usage consumption value of the user offline preference recall submodule corresponding to code 2, ..., c 2N (N is 23) corresponds to the memory usage consumption value of the submodule for limiting songs of the same genre with code 23. The performance indicator constraint value of the first application includes two components, one of which is the service call duration, which is 100 milliseconds in Table 1, and the other is the memory usage, which is 200G in Table 1.

[0060] Table 1

[0061]

[0062]

[0063] Step 102: Generate multiple initial combination results by combining a greedy algorithm with randomization, each of which includes part or all of the multiple candidate sub-modules.

[0064] In the previous step, multiple candidate submodules of the first application program, as well as the utility estimation scores and performance index consumption values ​​of each of these candidate submodules, have been determined, and the performance index constraint values ​​of the first application program in the first operating environment have also been determined. In this step, a combination of a greedy algorithm and randomization is required to generate multiple initial combination results.

[0065] Specifically, the process of generating multiple initial combination results is:

[0066] Sorting the plurality of candidate submodules of the first application program according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, and obtaining a first number of first initial results according to the sorting results;

[0067] generating a second number of second initial results in a randomized manner;

[0068] The initial combination result is obtained according to the first initial result and the second initial result.

[0069] Since the process of generating multiple groups of initial combination results is closely related to the subsequent process of solving the multiple initial combination results using the simulated annealing algorithm, the generation process of the multiple initial combination results will be explained together with specific examples in the following text.

[0070] Step 103: Use a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are sub-modules included in the first application when running in the first operating environment.

[0071] In this step, the simulated annealing algorithm is used to screen the multiple combination results of the multiple candidate submodules to obtain a first combination result; then, the submodules included in the first application when running in the first operating environment are determined according to the first combination result. Wherein, the performance indicator consumption value of the first combination result is less than the performance indicator constraint value, and the utility evaluation score of the first combination result meets the preset requirements; the performance indicator consumption value of the first combination result is obtained based on the performance indicator consumption value of each submodule included in the first combination result, and the utility evaluation score of the first combination result is obtained based on the utility evaluation score of each submodule included in the first combination result.

[0072] When selecting several candidate submodules from the plurality of candidate submodules of the first application, the following optimization target model should be satisfied:

[0073]

[0074]

[0075]

[0076] …

[0077]

[0078] x i =1 or 0.

[0079] In the above formula, n represents the total number of candidate submodules in the first application; x i Represents the binary value of the i-th candidate submodule. When x i = 0, it means that the i-th candidate submodule is not selected in the combination result of the candidate submodules.i =1, it means that the i-th candidate submodule is selected in the combination results of the candidate submodules; i Represents the utility estimate score of the i-th candidate submodule; Limit j (j=1, ..., m) represents the jth component of the performance indicator constraint value. For example, in the previous embodiment, the performance indicator includes the two indicators of call duration and memory usage, and the value of j is 2; c ji represents the performance indicator consumption value of the i-th candidate submodule under the j-th component of the performance indicator constraint value. 11 Indicates the consumption value of the first component (calling duration) of the first candidate submodule (user real-time favorite song recall submodule).

[0080] In this embodiment, a simulated annealing algorithm (SA) is used to screen candidate submodules. Since the goal of SA is to find the minimum value, the target value of max in the aforementioned optimization target model is taken as the opposite number to meet the requirements of SA.

[0081] In this embodiment, a simulated annealing algorithm is used to screen multiple combination results of the multiple candidate submodules to obtain a first combination result, including:

[0082] Step S1, using a combination of a greedy algorithm and randomization to obtain multiple initial combination results as the current solution;

[0083] Step S2: generating a pending new solution according to the current solution at the current temperature value, and determining whether to update the current solution with the pending new solution according to a comparison result between the performance indicator consumption value of the pending new solution and the performance indicator constraint value, and a comparison result between the utility evaluation score of the current solution and the utility estimation score of the pending new solution;

[0084] Step S3, lowering the current temperature value. If the lowered current temperature value is greater than the preset lower temperature limit, re-execute step S2. If the lowered current temperature value is less than or equal to the preset lower temperature limit, execute the next step.

[0085] Step S4: From the multiple combination results of the multiple candidate submodules corresponding to the current solution, select a combination result whose utility evaluation score meets a preset requirement as a first combination result.

[0086] In this embodiment, the preset requirement is that the utility estimation score is maximized.

[0087] In order to better understand the contents of step 102 and step 103, the specific implementation process of step 102 and step 103 is further explained below in conjunction with examples.

[0088] Step S11, setting initial values ​​of parameters in the simulated annealing algorithm according to utility estimation scores and performance indicator consumption values ​​of multiple candidate submodules of the first application, and performance indicator constraint values ​​of the first application in the first operating environment.

[0089] According to the basic principles of the simulated annealing algorithm, the following parameters need to be set:

[0090] Initial temperature value: in this embodiment, a sufficiently large initial temperature value T may be set, such as 100000;

[0091] The lower limit of the temperature at which the simulated annealing algorithm ends T min , for example -8 ;

[0092] The number of disturbance states at the same temperature is K, for example, 100;

[0093] The temperature drop rate delta (a value less than 1 but close to 1), for example, 0.99.

[0094] In addition, corresponding parameters need to be set according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, and the performance indicator constraint values ​​of the first application in the first operating environment.

[0095] Taking the aforementioned song recommendation API as an example, the following parameters need to be set:

[0096] Parameters used to represent multiple candidate submodules in the song recommendation API. This parameter is represented by X. According to the previous description, there are 23 candidate submodules in the song recommendation API. Each candidate submodule can be represented by a unique encoding value. The encoding value of the candidate submodule is assigned to the corresponding parameter X. i (X i is the i-th component of X), the parameter settings of each candidate sub-module in the song recommendation API can be realized.

[0097] A parameter used to represent the utility evaluation scores of multiple candidate submodules in the song recommendation API. This parameter is represented by V. According to the previous description, the expression of parameter V is: [v1, v2, v3, v4, v5, ..., v 23 ,].

[0098] A parameter used to represent the performance index consumption values ​​of multiple candidate submodules in the song recommendation API. This parameter is represented by C. According to the previous description, the expression of parameter C is: [[c 11 ,c 12 ,……,c 1N ,],[c 21 ,c 22 ,……,c 2N,]].

[0099] A parameter used to represent the performance metric constraint value of the first application in the first operating environment. This parameter is represented by Limit. According to the previous description, the expression of the parameter Limit is: {s1: x ms, s2: yG}, where s1 represents the first component of the performance metric constraint value, which is used to describe the call duration x, and the unit of x is ms (milliseconds); s2 represents the second component of the performance metric constraint value, which is used to describe the memory occupancy y, and the unit of y is G (gigabytes).

[0100] Step S12: Generate multiple groups of initial solutions that meet the performance metric constraint values according to the initial values of the parameters in the simulated annealing algorithm.

[0101] In this embodiment, according to the foregoing parameter X, parameter C, and parameter Limit, K groups of initial solutions a[K][n] that meet the Limit constraint can be initialized. Where K is the number of perturbation states at the same temperature as described above, and n is the number of candidate sub-modules.

[0102] When generating K groups of initial solutions that meet the Limit constraint, they can be generated by randomization. However, in order to improve the efficiency of searching for the global optimal solution, in this embodiment, a strategy of "combining a small part of greed and a large part of randomization" can be adopted to generate the initial solutions. Specifically, among the K groups of initial solutions, L groups of initial solutions (L < K) can be generated by the greedy strategy, and the remaining K - L groups of initial solutions are generated by randomization.

[0103] Taking the song recommendation API as an example, the greedy strategy is divided into two types:

[0104] a. Arrange multiple candidate sub-modules X in the song recommendation API in descending order of the utility prediction score V of each sub-module, and sequentially select the sub-modules that meet the Limit constraint to form a group of initial solutions;

[0105] b. Arrange in descending order of the utility prediction score density m (m = utility prediction score V / consumption C of the corresponding performance metric x) of multiple candidate sub-modules X in the song recommendation API, and sequentially select the sub-modules that meet the Limit constraint to form L groups of initial solutions. Where L represents the number of performance metrics. For example, if the performance metrics include call duration and memory occupancy, then the value of L is 2; if the consumption C is 0, then m = utility prediction score V / s, where s represents a number close to 0, such as 0.01.

[0106] It can be seen from the above example that a total of three groups of initial solutions can be obtained by adopting the greedy strategy, that is, the value of L is 3. The remaining K - 3 groups of initial solutions are generated by randomization.

[0107] The expression of each group of initial solutions is [xi1 ,x i2 ,…,x i23 ], where i represents the i-th group of initial solutions; x ij The value is 0 or 1.

[0108] When x ij When the value of is 0, it means that the jth submodule in the i-th group of initial solutions is not selected. ij When the value of is 1, it means that the jth submodule in the i-th group of initial solutions is selected. For example, the initial solution [1,0,1,0…0,1] of the song recommendation API represents the selection of “user real-time favorite song recall submodule, user offline tag recall submodule and same style song restriction submodule”.

[0109] Step S13, determine whether the current temperature value reaches the lower temperature limit, if not, execute step S14, otherwise, execute step S19.

[0110] In step S11, the initial value of the temperature and the lower limit of the temperature are set respectively. During the simulated annealing process, the temperature value is variable. The execution flow of the step can be determined according to the relationship between the current temperature value and the lower limit of the temperature.

[0111] Step S14: When the current temperature value remains unchanged, determine whether the number of times i of executing steps S15-S17 is greater than the number of disturbance states K at the same temperature. If so, execute step S18; otherwise, take the current solution a[i] as a feasible solution, generate a new solution b[i] to be determined, and then execute the next step.

[0112] In this step, i represents the number of times step S15 to step S17 are executed when the current temperature value remains unchanged. Obviously, when the process is executed for the first time, the value of i is 1; the maximum value of i is K.

[0113] At the beginning, the current solution a[i] is one of the K initial solutions a[K][n] (the second dimension n in a[K][n] is omitted). In subsequent operations, the iterative optimization result will be saved in the current solution a[i].

[0114] In this embodiment, the pending new solution b[i] may be generated according to the simulated degradation algorithm in the prior art.

[0115] Step S15: Determine whether the pending new solution b[i] meets the Limit constraint. If so, execute the next step. If not, increase the number i by 1 and re-execute step S14.

[0116] It is common knowledge for those skilled in the art to determine whether the pending new solution b[i] meets the Limit constraint, and therefore it will not be repeated here.

[0117] Step S16: Calculate the utility estimate score corresponding to the current solution and the utility estimate score corresponding to the pending new solution.

[0118] In the previous steps, the utility estimation scores of the plurality of candidate submodules in the first application have been known. Both the current solution and the pending new solution describe a possibility of the candidate submodules included in the first application.

[0119] According to the candidate submodules included in the first application program determined by the current solution or the pending new solution, the utility estimation score of the current solution or the pending new solution can be calculated.

[0120] For example, if the current solution or the pending new solution is in the form of (1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0), then the utility estimation scores of the sub-modules numbered 1, 3, 4, 5, 7, 8, 9, 13, 15, 16, 17, 18, 20 and 22 are added together to obtain the utility estimation score of the current solution or the pending new solution.

[0121] That is, the calculation formula for the utility estimate v′ of the current solution or the pending new solution is:

[0122]

[0123] Among them, x i (i=1, 2, ..., n) is the value of each element in the current solution or the new solution to be determined.

[0124] Step S17: Based on the utility estimation score corresponding to the current solution and the utility estimation score corresponding to the pending new solution, determine whether the pending new solution b[i] is acceptable. If it is acceptable, the new solution b[i] replaces a[i] as the current solution. If it is not acceptable, b[i] is discarded and a[i] is kept as the current solution. Then, the number i is increased by 1 and step S14 is executed again.

[0125] In this step, the Metropolis criterion in the simulated degradation algorithm can be used to determine whether the new solution b[i] is acceptable. This criterion accepts bad solutions with a certain probability (making the recommended utility value smaller), so that the algorithm has the global optimization ability to get rid of local extreme values ​​and avoid premature convergence. The criterion for accepting the new solution b[i] is:

[0126]

[0127] df=E(x new )-E(x).

[0128] Where t is the current temperature value, exp is the natural exponent, and df is the utility estimate of the new solution b[i] of the i-th inner loop under the current temperature value t (E(x new )) is the difference between the utility estimate score (E(x)) of the current solution a[i]; the smaller the current temperature value t is, the smaller the probability of cooling Y is; the higher the current temperature value T is, the greater the probability of cooling Y is.

[0129] The cooling probability Y reflects the probability of accepting the new solution b[i] as the new current solution a[i]. Specifically, if b[i] is greater than a[i], that is, –b[i]<-a[i], then df<0, then according to the calculation formula of the cooling probability Y, Y=1, so the pending new solution b[i] must replace the current solution a[i]. If df>=0, then according to the probability To decide whether to replace a[i] with b[i], that is, randomly generate a floating point number p between [0,1] to see if it is in Between, if Then replace the current solution a[i] with the pending new solution b[i]; otherwise, keep a[i] as the current solution unchanged.

[0130] Step S18: Update the current temperature value according to the temperature drop rate, and then re-execute step S13.

[0131] In the previous step S11, the magnitude of the temperature drop rate delta has been preset. In this step, the current temperature value t can be multiplied by the temperature drop rate delta to obtain an updated temperature value t.

[0132] Step S19: traverse the finally obtained solution a[i], and determine the sub-modules included in the first application when it runs in the first running environment according to the solution with the maximum utility estimate score.

[0133] In the previous step, the final solution is obtained according to the simulated annealing algorithm. There are K final solutions. In this step, the K final solutions are traversed and the solution with the maximum utility estimate score is selected from them, thus obtaining the first combination result. The solution with the maximum utility estimate score has n components, each component corresponding to a candidate submodule of the first application program. Depending on whether the value of each component is 0 or 1, it can be determined whether the candidate submodule corresponding to each component is selected.

[0134] For example, according to the simulated annealing algorithm, the solution of the song recommendation API with the maximum utility estimate score is calculated to be (1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0). Combined with the above Table 1, it can be seen that the sub-modules included in the song recommendation API when running in the first operating environment include: user real-time favorite song recall sub-module, user offline tag recall sub-module, user offline behavior similarity recall sub-module, user follow singer recall sub-module, user collection behavior recall sub-module, user song negative feedback processing sub-module, user singer negative feedback processing sub-module, XGBoost online sorting sub-module, hot song recall sub-module, hot singer recall sub-module, latest song recall sub-module, latest singer recall sub-module, singer non-duplicate processing sub-module, and different module recall song mixed arrangement sub-module.

[0135] The method for determining the application submodule provided by the present invention uses a simulated annealing algorithm to judge whether each candidate submodule in the first application is suitable for the first operating environment, and selects a submodule combination that satisfies the performance index constraint value and has the largest utility evaluation score from each candidate submodule, so that the submodules that the application can include can be determined in the application design stage, which can effectively reduce the blindness of the later project development and improve the stability of the application operation. In the process of implementing the simulated annealing algorithm, the combination of a greedy algorithm and randomization is used to determine the initial solution, which helps to ensure the quality of the initial solution, avoid completely blind randomization, and accelerate the speed of convergence to the global optimal solution.

[0136] Based on any of the above embodiments, in this embodiment, generating a pending new solution according to the current solution at the current temperature value includes:

[0137] Determine the temperature range in which the current temperature value lies;

[0138] According to the preset corresponding relationship between the temperature range and the number of randomly reversed elements, a corresponding number of elements in the current solution are randomly reversed to obtain a pending new solution.

[0139] In the simulated annealing algorithm, the initial value of the temperature is generally set to a higher value, and then it is continuously reduced. When the temperature value is high, mathematically speaking, the exploration range of the optimal solution of the target solution function has only been carried out for a short time, so it can be explored in a larger domain to avoid falling into the local optimal solution too early; exploring in a larger domain means that there are more elements that can be randomly reversed in the neighborhood of the independent variable. As the temperature value continues to decrease, in order to ensure the convergence speed of the target solution, it can only be explored in a smaller domain. Exploring in a smaller domain means that there are fewer elements that can be randomly reversed in the neighborhood of the independent variable. That is, in this embodiment, the number of randomly reversed elements is proportional to the first ratio, which is the ratio of the highest temperature value included in the temperature interval to the initial temperature value set in the simulated annealing algorithm.

[0140] In this embodiment, according to the preset correspondence between the temperature interval in which the current temperature value is located and the number of randomly reversed elements, a preset number of elements in the current solution may be randomly reversed in the neighborhood to obtain a pending new solution.

[0141] For example, in this embodiment, the temperature values ​​in the simulated annealing algorithm are divided into three temperature intervals, the first temperature interval includes temperature values ​​greater than 2 / 3T, the second temperature interval includes temperature values ​​greater than 1 / 3T and less than or equal to 2 / 3T, and the third temperature interval includes temperature values ​​less than or equal to 1 / 3T; wherein T represents the initial temperature value set in the simulated annealing algorithm.

[0142] The preset correspondence between the temperature range and the number of random inversion elements is:

[0143] If the current temperature is within the first temperature interval, the number of randomly reversed elements is 3;

[0144] If the current temperature is within the second temperature interval, the number of randomly reversed elements is 2;

[0145] If the current temperature is within the third temperature interval, the number of randomly reversed elements is 1.

[0146] The above division of temperature intervals is only for illustration purposes. In other embodiments, the number of temperature intervals, the division method, etc. may be adjusted.

[0147] After determining the number of randomly reversed elements, you can randomly reverse a preset number of elements in the current solution, including:

[0148] If the current temperature is within the first temperature interval, randomly reverse 3 elements of the a[i] array;

[0149] If the current temperature is within the second temperature range, randomly reverse two elements of the a[i] array;

[0150] If the current temperature is within the third temperature range, randomly reverse one element of the a[i] array.

[0151] In this embodiment, the number of randomly inverted elements is variable. However, in order to ensure that changes occur only in a small neighborhood around the current solution, the maximum number of inversions is controlled to be about 10% of the total number of candidate submodules.

[0152] In this embodiment, random inversion means that if the value of one of the elements a[i][j] of the a[i] array is 0, then the value of the element b[i][j] in the pending new solution obtained after the inversion is 1; conversely, if the value of one of the elements a[i][j] of the a[i] array is 1, then the value of the element b[i][j] in the pending new solution obtained after the inversion is 0.

[0153] For example, a position randomly reversed in the current solution corresponds to the hot song recall submodule. If its value is 1 (representing selection), the pending new solution will not select this submodule; if its value is 0 (representing non-selection), the pending new solution will select this submodule.

[0154] The method for determining the application sub-module provided by the invention divides the temperature value in the simulated annealing algorithm into multiple temperature intervals, sets a larger exploration range in the temperature interval with higher temperature values ​​to avoid falling into the local optimal solution too early, and sets a smaller exploration range in the temperature interval with smaller temperature values ​​to ensure the convergence speed of the target solution.

[0155] Based on any of the above embodiments, in this embodiment, the simulated annealing algorithm is used to solve the multiple initial combination results to obtain the first combination result, including:

[0156] A simulated annealing algorithm is used to perform parallel solution operations on the multiple combination results of the multiple candidate submodules, and a first combination result is determined according to the results of the parallel solution operations.

[0157] Since the simulated annealing algorithm theoretically converges to the global optimal solution of the objective function with a probability of 1 (i.e., convergence in a statistical sense, rather than a definite convergence), in this embodiment, the simulated annealing algorithm can be run in parallel to solve the multiple combination results of the multiple candidate submodules. When the number of concurrent times is N, N optimal solutions are obtained, from which the final optimal solution is selected. The first combination result is determined according to the final optimal solution.

[0158] For example, assuming that the number of concurrent times N is 3, and the utility estimates of the three optimal solutions are 376.0, 265.0, and 312.4, respectively, the solution with a utility estimate of 376.0 is selected as the final optimal solution. According to the value (0 or 1) of each position in the final optimal solution, the first combination result is determined, and then the submodules included in the first application when running in the first operating environment are determined according to the first combination result.

[0159] The method for determining application sub-modules provided by the present invention performs parallel screening of multiple combination results of the multiple candidate sub-modules through a simulated annealing algorithm, and determines the sub-modules included in the first application when running in a first operating environment based on the parallel screening results, thereby accelerating and increasing the speed and probability of finding the global optimal solution.

[0160] Based on any of the above embodiments, in this embodiment, obtaining the utility estimation scores of the plurality of candidate submodules of the first application includes:

[0161] A utility estimation score is calculated for the candidate submodule in the first application according to the importance of the candidate submodule in the application scenario of the first application and the importance of the candidate submodule irrelevant to the application scenario.

[0162] In the previous embodiment, the utility estimation scores of the candidate submodules in the first application program are preset. In this embodiment, the calculation process of the utility estimation score is described.

[0163] In this embodiment, the utility evaluation score is calculated based on the importance of the candidate submodule in the application scenario of the first application and the importance of the candidate submodule regardless of the application scenario.

[0164] Candidate submodules are generally applicable to a variety of application scenarios. In different application scenarios, the importance of the same candidate submodule may be different. For example, the user's real-time favorite song recall submodule is more important in the private radio scenario, because the private radio business requires that similar songs to the songs the user has just listened to can be recommended as soon as possible; but in fixed-scene radio stations, such as Chinese song radio stations, its importance will be relatively low, and this scenario requires more submodules such as user offline preferences.

[0165] The importance of the candidate sub-module is not only related to the application scenario, but also to its own function. For example, the similar song deduplication processing sub-module will be used in different application scenarios, which proves that the importance of the sub-module itself is relatively high.

[0166] Based on the above two points, in this embodiment, the utility evaluation score is calculated based on both the importance of the candidate submodule in the application scenario of the first application and the importance of the candidate submodule regardless of the application scenario. The corresponding calculation formula is:

[0167] v i =r×v a +(1-r)×v b .

[0168] Among them, v a represents the first utility evaluation score set based on the importance of the candidate submodule in the application scenario of the first application program, v b It represents the second utility evaluation score set based on the importance of the candidate submodule that is independent of the application scenario, and r represents the coefficient, and its value range is 0.0<=r<=1.0.

[0169] v a 、v b And the specific value of r can be set according to the historical numerical value. For example, as an optional implementation method, a machine learning model for evaluating the aforementioned first utility evaluation score can be trained based on the historical numerical value, and then the first utility evaluation score for the specific candidate submodule is obtained by using the machine learning model. Similarly, a machine learning model for evaluating the aforementioned second utility evaluation score can also be trained based on the historical numerical value, and then the second utility evaluation score for the specific candidate submodule is obtained by using the machine learning model.

[0170] The method for determining the application submodule provided by the present invention combines the importance balance assessment in the industry with a more targeted importance assessment in a specific scenario, so that the calculated utility evaluation score is more in line with the actual situation.

[0171] The following is a complete description of the method of the present invention by taking the song recommendation API application as an example.

[0172] In the design phase of the song recommendation API, 23 candidate submodules X were extracted based on the song recommendation scenario. The utility estimates of each submodule were grouped into V; the performance indicator consumption values ​​of each submodule (performance indicators include call duration and memory persistence) were grouped into C. The data V and C are shown in detail in Table 2 below:

[0173] Other important parameters include:

[0174] Initial temperature T: 100000;

[0175] The lower limit of the temperature at which the algorithm ends Tmin: 1e-8;

[0176] The number of disturbance states at the same temperature K: 100;

[0177] Temperature drop rate delta (less than 1 but close to 1): 0.99;

[0178] Number of concurrent execution threads: 10.

[0179] Table 2

[0180]

[0181]

[0182] SA is implemented in Java, combined with different performance indicator constraints, and the maximum estimated utility score and related solutions in the song recommendation scenario are obtained as follows:

[0183] Group 1: The service call duration limit is required to be controlled within 200ms; the recommended service memory usage does not exceed 4G.

[0184] The results obtained by the simulated annealing algorithm are:

[0185] The maximum estimated utility score is 376.0;

[0186] The total consumption of current performance indicators is: call duration 200ms, memory usage 2.4G;

[0187] The optimal solution is: (1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0);

[0188] The submodules included in the song recommendation API when running in the first operating environment include: user real-time favorite song recall submodule, user offline tag recall submodule, user offline behavior similarity recall submodule, user follow singer recall submodule, user collection behavior recall submodule, user song negative feedback processing submodule, user singer negative feedback processing submodule, XGBoost online sorting submodule, hot song recall submodule, hot singer recall submodule, latest song recall submodule, latest singer recall submodule, singer non-duplicate processing submodule, and different module recall song mixed arrangement submodule.

[0189] Group 2: The service call duration limit is required to be controlled within 100ms; it is recommended that the service memory usage does not exceed 2G.

[0190] The results obtained by the simulated annealing algorithm are:

[0191] The maximum estimated utility score is 265.0;

[0192] The total consumption of the current performance indicators is: call duration 99ms, memory usage 1.3499999999999999G;

[0193] The optimal solution is: (1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0);

[0194] The submodules included in the song recommendation API when running in the first operating environment include: user real-time favorite song recall submodule, user offline tag recall submodule, user followed singer recall submodule, user collection behavior recall submodule, user song negative feedback processing submodule, user singer negative feedback processing submodule, hot song recall submodule, hot singer recall submodule, and different module recall song mixed arrangement submodule.

[0195] Judging from the results of Group 1 and Group 2, for the song recommendation scenario, the SA adopted by the present invention can obtain the optimal solution with the maximum recommended estimated utility; among them, the recommendation sub-modules with higher estimated utility scores and moderate index consumption, such as: user real-time favorite song recall sub-module, user follow singer recall sub-module, user collection behavior recall sub-module, hot spot recall sub-module, and different module recall song mixed arrangement sub-module are all taken into consideration in the final recommendation process; at the same time, under the condition that the call time index constraint is relatively ample (the call time of Group 1 is 200ms), the XGBoost online sorting module with greater estimated utility but higher index consumption is added; in the subsequent development stage of the project, the optimal solution obtained by SA will be used as the core component of the song recommendation service; it can effectively reduce the blindness of the development stage and improve the stability of the subsequent online recommendation service operation.

[0196] Based on any of the above embodiments, Figure 2 A schematic diagram of a device for determining an application submodule provided by the present invention, such as Figure 2 As shown, the device for determining the application submodule provided by the present invention includes:

[0197] The data acquisition module 201 is used to acquire utility estimation scores and performance index consumption values ​​of each of the plurality of candidate submodules of the first application program, and the performance index constraint value of the first application program under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application program; and the performance index consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indexes;

[0198] An initial combination result generating module 202 is used to generate a plurality of initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, each of which includes part or all of the plurality of candidate submodules;

[0199] The sub-module determination module 203 is used to use a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are the sub-modules included in the first application when running in the first operating environment.

[0200] The device for determining application submodules provided by the present invention uses a simulated annealing algorithm to determine whether each candidate submodule in the first application is suitable for the first operating environment, and selects a submodule combination that satisfies the performance index constraint value and has the largest utility evaluation score from each candidate submodule, so that the submodules that the application can include can be determined in the application design stage, which can effectively reduce the blindness of later project development and improve the stability of application operation. The combination of a greedy algorithm and randomization to determine the initial solution helps to ensure the quality of the initial solution, avoids completely blind randomization, and accelerates the speed of convergence to the global optimal solution.

[0201] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the following method:

[0202] Obtaining utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of the first application, and performance indicator constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance indicator consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators;

[0203] According to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules;

[0204] A simulated annealing algorithm is used to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are sub-modules included in the first application when running in the first operating environment.

[0205] It should be noted that the electronic device in this embodiment can be a server, a PC, or other devices in specific implementation, as long as its structure includes the following: Figure 3 The processor 310, communication interface 320, memory 330 and communication bus 340 shown in the figure, wherein the processor 310, communication interface 320, memory 330 communicate with each other through the communication bus 340, and the processor 310 can call the logic instructions in the memory 330 to execute the above method. This embodiment does not limit the specific implementation form of the electronic device.

[0206] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0207] Furthermore, an embodiment of the present invention discloses a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided by the above-mentioned method embodiments, for example, including:

[0208] Obtaining utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of the first application, and performance indicator constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance indicator consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators;

[0209] According to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules;

[0210] A simulated annealing algorithm is used to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are sub-modules included in the first application when running in the first operating environment.

[0211] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:

[0212] Obtaining utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of the first application, and performance indicator constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance indicator consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators;

[0213] According to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules;

[0214] A simulated annealing algorithm is used to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate sub-modules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate sub-modules included in the first combination result are sub-modules included in the first application when running in the first operating environment.

[0215] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0216] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining an application submodule, characterized in that: include: Obtaining utility estimation scores and performance indicator consumption values ​​of each of a plurality of candidate submodules of the first application, and performance indicator constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance indicator consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators; According to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application, a greedy algorithm combined with randomization is used to generate a plurality of initial combination results, each of which includes part or all of the plurality of candidate submodules; A simulated annealing algorithm is used to solve the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate submodules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate submodules included in the first combination result are submodules included when the first application is running in the first operating environment; The method of generating a plurality of initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program includes: Sorting the plurality of candidate submodules of the first application program according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, and obtaining a first number of first initial results according to the sorting results; generating a second number of second initial results in a randomized manner; The initial combination result is obtained according to the first initial result and the second initial result.

2. The method for determining an application submodule according to claim 1, characterized in that: The step of sorting the plurality of candidate submodules according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, and obtaining a first number of first initial results according to the sorting results, includes: Sort multiple candidate submodules in the first application program in descending order according to the utility estimation score, and select N submodules, and obtain an initial combination result of the multiple candidate submodules; wherein the N The sum of the performance indicator consumption values ​​of the submodules is less than the performance indicator constraint value; Calculate for each of the candidate submodules in the first application L The utility estimation density is divided into multiple candidate submodules in the first application according to the L The order of the utility estimate density is generated L The sorting results are as follows: L Select the sorted results one by one sub-modules, and obtain the multiple candidate sub-modules L The initial combination results; in, L Indicates the number of types of performance indicators, , No. z The utility estimation score density is the density of the utility estimation score of the candidate submodule and the z The ratio between the consumption values ​​of the performance indicators; The sum of the performance indicator consumption values ​​of the sub-modules is less than the performance indicator constraint value.

3. The method for determining an application submodule according to claim 1, characterized in that: The method of using a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result includes: Step S1, taking multiple initial combination results as current solutions; Step S2: generating a pending new solution according to the current solution at the current temperature value, and determining whether to update the current solution with the pending new solution according to a comparison result between the performance indicator consumption value of the pending new solution and the performance indicator constraint value, and a comparison result between the utility evaluation score of the current solution and the utility estimation score of the pending new solution; Step S3, lowering the current temperature value. If the lowered current temperature value is greater than the preset lower temperature limit, re-execute step S2. If the lowered current temperature value is less than or equal to the preset lower temperature limit, execute the next step. Step S4: From the multiple combination results of the multiple candidate submodules corresponding to the current solution, select a combination result whose utility evaluation score meets a preset requirement as a first combination result.

4. The method for determining an application submodule according to claim 3, characterized in that: The step of generating a pending new solution according to the current solution at the current temperature value includes: Determine the temperature range in which the current temperature value lies; According to the preset corresponding relationship between the temperature range and the number of randomly reversed elements, a corresponding number of elements in the current solution are randomly reversed to obtain a pending new solution.

5. The method for determining an application submodule according to claim 4, characterized in that: The number of the random inversion elements is proportional to a first ratio, where the first ratio is a ratio of a maximum temperature value included in the temperature interval to an initial temperature value set in the simulated annealing algorithm.

6. The method for determining an application submodule according to claim 1, characterized in that: The method of using a simulated annealing algorithm to solve the multiple initial combination results to obtain a first combination result includes: A simulated annealing algorithm is used to perform parallel solution operations on the multiple combination results of the multiple candidate submodules, and a first combination result is determined according to the results of the parallel solution operations.

7. A device for determining an application submodule, characterized in that: include: A data acquisition module, used to acquire utility estimation scores and performance index consumption values ​​of each of a plurality of candidate submodules of the first application, and performance index constraint values ​​of the first application under the first operating environment; wherein the utility estimation scores are used to reflect the importance of the candidate submodules in the first application; and the performance index consumption values ​​are used to reflect the values ​​of the candidate submodules on the corresponding performance indicators; An initial combination result generating module, configured to generate a plurality of initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, each of which includes part or all of the plurality of candidate submodules; a submodule determination module, configured to use a simulated annealing algorithm to perform a solution operation on the multiple initial combination results to obtain a first combination result; the sum of the performance indicator consumption values ​​of the multiple candidate submodules included in the first combination result is less than the performance indicator constraint value, and the multiple candidate submodules included in the first combination result are submodules included when the first application is running in the first operating environment; The method of generating a plurality of initial combination results by combining a greedy algorithm with randomization according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program includes: Sorting the plurality of candidate submodules of the first application program according to the utility estimation scores and performance indicator consumption values ​​of the plurality of candidate submodules of the first application program, and obtaining a first number of first initial results according to the sorting results; generating a second number of second initial results in a randomized manner; The initial combination result is obtained according to the first initial result and the second initial result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for determining the application sub-module as described in any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for determining the application sub-module as claimed in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Hardware-software partitioning method based on greedy simulated annealing algorithm

    CN102508721A

  • Application program management method and device

    CN107423097A

  • Cloud resource optimal configuration method and device, electronic equipment and readable storage medium

    CN111176753A

  • Information display method and device

    CN111767452A

  • System and Method for Developing Application based onRespository

    KR1020030021554A