CN114580212A - Resource optimal configuration method, device and equipment - Google Patents

Resource optimal configuration method, device and equipment Download PDF

Info

Publication number
CN114580212A
CN114580212A CN202210459413.0A CN202210459413A CN114580212A CN 114580212 A CN114580212 A CN 114580212A CN 202210459413 A CN202210459413 A CN 202210459413A CN 114580212 A CN114580212 A CN 114580212A
Authority
CN
China
Prior art keywords
local
sub
objective function
solution
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210459413.0A
Other languages
Chinese (zh)
Inventor
甘润生
吴华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210459413.0A priority Critical patent/CN114580212A/en
Publication of CN114580212A publication Critical patent/CN114580212A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]

Abstract

The embodiment of the specification discloses a resource optimal configuration method, a resource optimal configuration device and resource optimal configuration equipment. Obtaining a first sub-targeting function; solving the first sub-objective function according to the local constraint condition to generate a local solution of a main variable corresponding to each node; acquiring a second sub-objective function; solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the main variable; correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node; and performing optimized configuration on the resources according to the planned value of the main variable. Therefore, the problem of linear, nonlinear and mixed integer optimization can be solved by using a general or customized solver based on the type of the specific problem and performing correction optimization based on the solution of the specific problem.

Description

Resource optimal configuration method, device and equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource-based optimal configuration method, device, and apparatus.
Background
With the development of big data and artificial intelligence, the distributed optimization method has become an important tool for solving large-scale problems, and is widely applied to various specific resource configuration and optimization scenarios, including information recommendation problems, supply and site selection problems, and the like. The problems are basically separable problems constrained by global conditions or local conditions after being abstracted, but in the face of different types of problems, new algorithms are required to be developed, convergence needs to be verified in practice, and the problems are not flexible enough.
Based on this, a more adaptable resource optimization configuration scheme is needed.
Disclosure of Invention
One or more embodiments of the present specification provide a method, an apparatus, a device, and a storage medium for optimal configuration of resources, so as to solve the following technical problems: there is a need for a more adaptable resource-optimized configuration scheme.
To solve the above technical problems, one or more embodiments of the present specification are implemented as follows:
in a first aspect, an embodiment of the present specification provides a resource optimization configuration method, which is applied in a resource optimization scenario including a global constraint condition, a local constraint condition, and a main objective function, and the method includes: acquiring a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function; solving the first sub-objective function according to the local constraint condition to generate a local solution of a main variable corresponding to each node; acquiring a second sub-goal function, wherein the second sub-goal function comprises gradient information of the local solution and penalty items related to the global constraint condition; solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the main variable; correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node; and performing optimized configuration on the resources according to the planned value of the main variable.
In a second aspect, an embodiment of the present specification provides an apparatus for optimizing and configuring a resource, which is applied in a resource optimization scenario including a global constraint, a local constraint, and a main objective function, and the apparatus includes: the first acquisition module is used for acquiring a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function; the local solving module is used for solving the first sub-objective function according to the local constraint condition to generate a local solution of the main variable corresponding to each node; the second acquisition module is used for acquiring a second sub-target function, wherein the second sub-target function comprises gradient information of the local solution and penalty items related to the global constraint condition; the local correction solving module is used for solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node and corresponding to the main variable; the correction module is used for correcting the local solution by adopting the local correction value to generate a planning value of a main variable corresponding to each node; and the resource configuration module is used for carrying out optimal configuration on the resources according to the planned value of the main variable.
In a third aspect, embodiments of the present specification provide an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, embodiments of the present specification provide a non-volatile computer storage medium having stored thereon computer-executable instructions that, when read by a computer, cause the one or more processors to perform the method of the first aspect.
At least one technical scheme adopted by one or more embodiments of the specification can achieve the following beneficial effects: obtaining a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function;
solving the first sub-objective function according to the local constraint condition to generate a local solution of a main variable corresponding to each node; acquiring a second sub-goal function, wherein the second sub-goal function comprises gradient information of the local solution and penalty items related to the global constraint condition; solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the main variable; correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node; and performing optimized configuration on the resources according to the planned values of the main variables. Therefore, the method can use a general or customized solver based on the type of the specific problem, and carries out correction optimization based on the solution of the specific problem, solves the problems of linear, nonlinear and mixed integer optimization, and has more universality.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a diagram illustrating relevant constraints in an addressing problem according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for optimally configuring resources according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating loop iterations in solving for principal variables in accordance with an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for optimally configuring resources according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Detailed Description
The embodiment of the specification provides a resource optimal configuration method, a resource optimal configuration device, resource optimal configuration equipment and a storage medium.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
In practical application, a resource allocation or resource optimization problem often occurs, and after the resource allocation or resource optimization problem is abstracted, the resource allocation or resource optimization problem can be regarded as a resource optimization configuration problem in a resource optimization scene including a global constraint condition, a local constraint condition and a main objective function, and can include a linear or nonlinear optimization configuration problem.
For example, for a scenario in which multimedia information is recommended to a user, under K constraints, 1 is required to be allocated to I users in J of candidate multimedia information, and at this time, the following linear solution problem may be abstracted:
Figure 270424DEST_PATH_IMAGE001
wherein all users are abstracted as a principal variable xijEach user is abstracted as a node in a main variable, c is the estimated income after the user is recommended, m is the cost when the user is recommended, and b is the upper bound of the total cost. In other words, the problem is abstracted such that, under the global constraint condition (cost is limited) and the local constraint condition (recommendation is made to any one user), the value of the main objective function is maximized (i.e. one of the J pieces of information is selected to be pushed to I users, and the comprehensive benefit is maximized), and the planned value of the main variable (which may be a value between 0 and 1) is used to represent the probability of information pushing to the users.
For another example, taking a supply addressing question as an example, how a supply point should be established to deliver to a sales point with a daily consumption amount c is shown in fig. 1, and fig. 1 is a schematic diagram of relevant constraints in an addressing question according to an embodiment of the present disclosure. In the schematic diagram, the dotted circle represents the selling point for shipment, the solid circle represents the addresses to be selected, each address to be selected for shipment to the selling point has a local cost constraint corresponding to itself (for example, the local delivery distance of each address to be selected, that is, the delivery of a certain mileage cannot be exceeded every day), each address to be selected can be shipped to the selling point (not all shown in the figure), a plurality of addresses to be selected for construction are required to be selected for site under the condition that the total number of addresses to be selected meets the global constraint cost, and the total delivery distance (or the average delivery distance) is shortest, at this time, the problem can be abstracted as the following nonlinear problem:
Figure 708883DEST_PATH_IMAGE002
wherein d is the total cost of shipment, in other words, the problem is abstracted to minimize the value of the primary objective function (i.e. minimize the total delivery distance) under the condition that the global constraint condition and the local constraint condition are satisfied, and finally, the planning value (1 or 0) of the primary variable is obtained by solving to represent whether each address to be selected should be addressed or not
For another example, taking an investment scenario as an example, when a J-class resource is released to a I-class group to be invested, in order to achieve a maximized investment-to-profit ratio, the scenario may be abstracted as the following nonlinear problem:
Figure 635250DEST_PATH_IMAGE003
wherein p isijTo forecast revenue for investing the jth resource to the ith group cvrijIn order to estimate the rate of return,
Figure 121726DEST_PATH_IMAGE004
cost is the upper limit of the total cost (including capital, risk and experience costs) in the investment processijI.e. the cost consumption when the jth resource is released to the ith group,
Figure 678610DEST_PATH_IMAGE005
is the local upper cost limit when a single type of resource is put. In other words, the problem is abstracted such that the total investment is not exceeded when satisfied
Figure 476801DEST_PATH_IMAGE004
And the local cost of the investment sheet type resources does not exceed
Figure 597073DEST_PATH_IMAGE006
How to put J-type resources into I-type groups and obtain the maximum investment-profit ratio. Finally solving to obtain a principal variable xijThe projected value of (a) is used to characterize whether investment should be made to the ith class group for the jth class resource, for example, 0 may be used to characterize no release, and 1 may characterize release.
In practice, the invested resource may be an advertisement, and the group to be invested may be users to be advertised; still alternatively, the resource being invested may be a credit amount, and the group to be invested may be a project to be invested; still alternatively, the resource to be invested may be an entity material, the group to be invested may be an area to be invested, and the like.
In summary, it can be seen that, in the foregoing practical scenarios, there may be some linear or non-linear scenarios, and the resource configuration in such scenarios may be abstracted as a problem that solves the main objective function under the limitation of the local constraint condition and the global constraint condition.
Based on this, in order to solve these problems at the same time, embodiments of the present specification provide a two-layer solution scheme, where a first layer is used to solve to obtain a local solution of a decision variable, and a second layer is used to perform a correction solution based on a result of the first layer, so that the method can adapt to various different scenarios and has better universality.
In a first aspect, as shown in fig. 2, fig. 2 is a schematic flowchart of a method for optimizing and configuring a resource according to an embodiment of the present disclosure, where the method is applied in a resource optimization scenario including a global constraint, a local constraint, and a main objective function, and the flowchart in fig. 1 may include the following steps:
s201: a first sub-objective function is obtained, wherein the first sub-objective function is generated based on relaxation of the main objective function.
First, for the aforementioned linear or non-linear resource optimization configuration problem, it can be abstracted into the more general form:
Figure 373DEST_PATH_IMAGE007
wherein, (1) is the main objective function, (2) and (3) are the global constraint conditions, and (4) and (5) are the local constraint conditions. Both a and B are separable matrices corresponding to a principal variable x, which is a separable vector (x 1, x2, … …, xn). Arbitrary xiThe value of (c) may be continuous (i.e., a probability value from 0 to 1, which may be used to characterize the probability of configuration at that point), or an integer (i.e., 0 or 1, which may be used to characterize the non-configuration or configuration at that point).
For this purpose, the main objective function is first relaxed. For example, performing dual decomposition based on the global constraint described above changes the problem into a sub-problem that can be divided as follows:
Figure 790474DEST_PATH_IMAGE008
wherein, (6) is the first sub-targeting function.
Figure 951328DEST_PATH_IMAGE009
And
Figure 422761DEST_PATH_IMAGE010
for the dual coefficients associated with the global constraint, the superscript T represents the transpose of the matrix.
Figure 742884DEST_PATH_IMAGE011
And
Figure 907149DEST_PATH_IMAGE012
i.e. the relaxation term to the main objective function. x is the number ofiThe local solution of the corresponding principal variable at each node is characterized. Wherein A isiAnd BiI.e. the resource allocation coefficients corresponding to the nodes, aiAnd BiThe global resource allocation coefficient matrices a and B corresponding to the principal variables may be combined.
It is easy to understand that by introducing the slack term, in the case of the same value of the local solution, there will obviously be some difference between the first sub-objective function and the main objective function, but as long as the difference is tolerable (i.e. does not exceed the preset difference value), the solution at this time can be considered to be acceptable.
And S203, solving the first sub-objective function according to the local constraint condition to generate a local solution of the main variable corresponding to each node.
As described above, after the main objective function is relaxed based on the global constraint condition to obtain the first sub-objective function, the relaxed problem can be solved based on the invariant local constraint condition.
For the general first sub-objective function, a general solver may be used to solve the general first sub-objective function, for example, a general solver such as gurobi and cplex may be used to solve the general first sub-objective function to obtain a local solution x of the principal variable corresponding to each nodei. Of course, in practical application, the algorithm may be customized based on the actual problem, so as to accelerate the obtaining of the local solution of the principal variable corresponding to each node.
In this process, for each node, x is computediThen, A can be calculated on each nodeixiAnd BixiAnd, gradient information g of the local solution at each nodexi. When the primary objective function is a problem with non-linearity (i.e. the primary objective function is quadratic and differentiable, for example, the primary objective function in the addressing problem is quadratic and differentiable), approximate second-order gradient information may also be calculated at each node.
The approximately calculated second-order gradient information can pass through a Hessian matrix HxiIs expressed in terms of the form of (a). The Hessian matrix is a symmetric square matrix formed by second-order partial derivatives of a multivariate function and describes the local curvature of each node. The Hessian matrix Hxi may be in the specific form
Figure 70146DEST_PATH_IMAGE013
. Wherein the content of the first and second substances,
Figure 876428DEST_PATH_IMAGE014
is a dual multiplier of local constraints.
S205, a second sub-targeting function is obtained, wherein the second sub-targeting function comprises the gradient information of the local solution and a penalty item related to the global constraint condition.
In the foregoing process, local solutions at each node have been obtained. However, since the local solution is a solution obtained by relaxing the objective function, further optimization is possible for the local solution.
At this time, a new relaxation variable may be introduced to construct an optimization problem for the local solution based on the aforementioned local solution, i.e., how to correct each local solution while conforming to the aforementioned local constraint and global constraint when second-order gradient information of the local solution is already known and local constraint conditions of each node.
To this end, a second sub-objective function containing gradient information of the local solution and penalty terms related to the global constraint can be constructed as follows:
Figure 254319DEST_PATH_IMAGE015
wherein, (7) is the second sub-targeting function, yiI.e., the locally corrected solution of the principal variable for each node, r and t are newly introduced slack variables that are associated with another global constraint that constrains the locally corrected solution of the principal variable, as shown at (8) and (9).
Figure 261590DEST_PATH_IMAGE016
Namely, local correction solution factor term, (8)) And (9) another global constraint that should be satisfied for the locally corrected solution under the new slack variable,
Figure 724932DEST_PATH_IMAGE017
i.e. the dual coefficient factor term comprising the product of the relaxation variable and the transposed matrix of the dual coefficients,
Figure 600484DEST_PATH_IMAGE018
and
Figure 754254DEST_PATH_IMAGE019
namely the pre-set penalty coefficient is obtained,
Figure 260321DEST_PATH_IMAGE020
and
Figure 7698DEST_PATH_IMAGE021
the penalty item is related to the global constraint condition, the dual coefficient item acted in the first sub-targeting function is similar to the dual coefficient item acted in the first sub-targeting function, the value used for constraining the second sub-targeting function should meet the global constraint condition, and if the solution deviates from the global constraint condition, the penalty item is used for performing penalty display.
In which first order gradient information gxiAnd second order gradient information HxiAnd corresponding AiAnd BiMay be obtained based on solving the first sub-objective function in the foregoing step S203. Thus, the second sub-objective function can be solved, so as to obtain the local correction value corresponding to each node for the main variable.
And S207, solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node and corresponding to the main variable.
It should be noted that, if the main objective function is linear, it is easy to understand that the second-order gradient information of each local solution is 0, and in this case, the local correction value for the main variable corresponding to each node is also 0.
For non-linear main objective functionThen at this point, new local constraints may also be introduced
Figure 624624DEST_PATH_IMAGE022
Further relaxation is then performed on the second sub-objective function to solve for the corrected value of the local solution in a similar manner as described above for the first sub-objective function.
S209, correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node.
Furthermore, the local solution and the dual coefficient obtained by the first sub-objective function may be iterated based on the correction value, so as to generate a planning value of the principal variable corresponding to each node.
For example, new local constraints are added in a global constraint-like manner. The solution to the second sub-objective function is then converted into a problem solution of the form such that the correction values yi for the local variables and the correction values for the dual coefficients can be solved
Figure 649212DEST_PATH_IMAGE023
And
Figure 122918DEST_PATH_IMAGE024
Figure 295274DEST_PATH_IMAGE025
the local solution may be corrected based on the local correction value, and a planned value of the principal variable corresponding to each node may be generated.
Specifically, the local correction values solved by each node may be collected, the local solution of each node may be updated, and the values of the dual coefficients may be updated.
Updating the local solution and the dual coefficient according to the local correction value to generate an updated local solution and an updated dual coefficient; determining a value of the primary objective function according to the updated local solution; determining the value of the first sub-targeting function according to the updated local solution and the updated dual coefficient; and when the difference between the value of the main objective function and the value of the first sub objective function does not exceed a preset value, determining the updated local solution as the planning value of the main variable corresponding to each node.
If the difference between the value of the main objective function and the value of the first sub-objective function exceeds a preset value, the updated first order gradient information and second order gradient information of the local solution can be obtained through recalculation based on the updated local solution and the dual coefficient, and the second sub-objective function is solved based on the updated first order gradient information and second order gradient information of the local solution, so that a correction value is obtained again, and therefore loop iteration for the local solution and the dual coefficient is formed until the difference between the value of the main objective function and the value of the first sub-objective function does not exceed the preset value.
Specifically, the updating the local solution and the dual coefficient according to the local correction value to generate an updated local solution and an updated dual coefficient may include: updating the local solution to be the sum of the local solution and the local correction value, and generating an updated local solution; and updating the dual coefficient to be the sum of the local solution and the gradient of the dual coefficient, and generating the updated dual coefficient. Namely, the following updating method is adopted:
Figure 651911DEST_PATH_IMAGE026
wherein n is the number of iterations,
Figure 858901DEST_PATH_IMAGE027
i.e. in the (n-1) th iteration
Figure 503509DEST_PATH_IMAGE028
The gradient of (a) of (b) is,
Figure 100843DEST_PATH_IMAGE029
and
Figure 59572DEST_PATH_IMAGE030
the dual coefficients in the updated first sub-objective function are used for calculating a local solution in the nth iteration.
S211, performing optimized configuration on the resources according to the planned values of the main variables.
As described above, the principal variable can be regarded as a vector composed of local variables corresponding to a plurality of nodes. In the foregoing process, the values of the principal variables and the values of the local variables (i.e., local solutions) have been determined. And, it is readily understood that the resulting solution based on the foregoing approach is generally unlikely to be the exact integer solution.
In practical applications, the definition field of each local solution is either 1 or 0 (for example, for an address, either selected or unselected in the address selection problem) in some problems; in the case of continuous solution, the domain of each local solution may be a probabilistic solution between 0 and 1 (for example, for the information push problem, it is expressed as a push probability for various users).
Accordingly, when the resource optimization configuration is performed, the rounding operation can be performed on the finally obtained planning value according to actual needs.
For example, for the addressing problem, the solution obtained finally is required to be an integer solution, and at this time, the planning value may be rounded to generate an integer planning value that satisfies the global constraint condition (that is, each local solution is an integer 0 or an integer 1).
Meanwhile, after rounding, the value of the primary variable changes, which may violate the global constraint in the primary objective function. Therefore, whether the integer programming value meets the global constraint condition in the main objective function can be recalculated, if not, rounding is performed in other modes until the integer programming value meets the global constraint condition in the main objective function. Fig. 3 is a schematic diagram of loop iteration in solving the principal variables according to the embodiment of the present disclosure, as shown in fig. 3.
In particular, the rounding approaches may include approaches such as rounding up, rounding down, or probability rounding. The rounding-up may be to round up the local solution exceeding a certain value to 1, the rounding-down may be to round up the local solution smaller than the certain value to 0, and the probability rounding may be to randomly select one or more values from a plurality of values having similar values to perform the rounding-up or rounding-down, etc.
Obtaining a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function; solving the first sub-objective function according to the local constraint condition to generate a local solution of a main variable corresponding to each node; acquiring a second sub-goal function, wherein the second sub-goal function comprises gradient information of the local solution and penalty items related to the global constraint condition; solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the main variable; correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node; and performing optimized configuration on the resources according to the planned value of the main variable. Therefore, the problem that the correction optimization is carried out based on the solution of the specific problem can be solved by using a universal or customized solver based on the type of the specific problem, and the linear, nonlinear and mixed integer optimization problem is solved, so that the method is more universal.
Based on the same idea, one or more embodiments of the present specification further provide a device and an apparatus corresponding to the above method, as shown in fig. 4 and 5.
In a second aspect, as shown in fig. 4, fig. 4 is a schematic structural diagram of an apparatus for optimizing and configuring a resource provided in an embodiment of the present specification, and is applied to a resource optimization scenario including a global constraint, a local constraint, and a main objective function, where the apparatus includes:
a first obtaining module 401, configured to obtain a first sub-objective function, where the first sub-objective function is generated based on relaxation of the main objective function;
a local solving module 403, which solves the first sub-objective function according to the local constraint condition to generate a local solution of the principal variable corresponding to each node;
a second obtaining module 405, configured to obtain a second sub-objective function, where the second sub-objective function includes gradient information of the local solution and a penalty term related to the global constraint condition;
a local correction solving module 407, which solves the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the principal variable;
the correction module 409 corrects the local solution by using the local correction value to generate a planning value of a principal variable corresponding to each node;
and the resource configuration module 411 performs optimal configuration on the resources according to the planned values of the main variables.
Optionally, the second obtaining module 405 obtains a second sub-objective function including first order gradient information and second order gradient information of the local solution.
Optionally, the apparatus further includes a relaxation module 413, configured to determine a dual coefficient corresponding to each node, where the dual coefficient is related to the global constraint condition; constructing a dual term comprising the dual coefficient; and determining the sum of the even term and the main objective function as a first sub objective function.
Optionally, the correcting module 409 updates the local solution and the dual coefficient according to the local correction value, and generates an updated local solution and an updated dual coefficient; determining a value of the primary objective function according to the updated local solution; determining the value of the first sub-targeting function according to the updated local solution and the updated dual coefficient; and when the difference between the value of the main objective function and the value of the first sub objective function does not exceed a preset value, determining the updated local solution as the planning value of the main variable corresponding to each node.
Optionally, the correction module 409 updates the local solution to a sum of the local solution and the local correction value, and generates an updated local solution; and updating the dual coefficient to be the sum of the dual coefficient and the gradient of the dual coefficient, and generating the updated dual coefficient.
Optionally, the apparatus further includes a rounding module 415, which rounds the planned values of the main variables to generate integer planned values that satisfy the global constraint condition; correspondingly, the resource allocation module performs optimal allocation on the resources according to the rounded planning value of the main variable.
Optionally, the rounding module 415 rounds up, rounds down, or rounds up the projected values of the main variables.
Optionally, in the apparatus, the second sub-targeting function is pre-constructed by: constructing a local correction solution factor term, wherein the local correction solution factor term comprises a product of a local correction solution of a main variable and gradient information of the local solution; determining a relaxation variable and constructing a dual coefficient factor item, wherein the relaxation variable is related to another global constraint condition met by the local correction solution, and the dual coefficient factor item contains a product of the relaxation variable and a transpose matrix of the dual coefficient; constructing a penalty term comprising the slack variable; and determining the sum of the local correction solution factor item, the dual coefficient factor item and the penalty item as a second sub-target function.
Optionally, in the apparatus, the global constraint condition is used to constrain a global cost for configuring resources in a full number of nodes, the local constraint condition is used to constrain a local cost for configuring resources on any single node, the primary objective function is used to characterize an extreme value of a target benefit, and the planned value of the primary variable is used to characterize whether to configure resources into nodes or characterize a probability of configuring resources into nodes.
Optionally, in the apparatus, when the scenario is a pricing scenario for advertisement placement, the global constraint condition is used to constrain a placement cost of a full amount of advertisements, the local constraint condition is used to constrain a placement cost of a single advertisement placement, the main objective function is used to characterize a maximized return-on-investment ratio, and the projected value of the main variable is used to characterize whether an advertisement should be placed to a user; or when the resource optimization scene is an address selection scene, the global constraint condition is used for constraining the global delivery cost of a full number of addresses to be selected, the local constraint condition is used for constraining the local delivery distance of a single address to be selected, the main objective function is used for representing the minimized overall delivery distance, and the planning value of the main variable is used for representing whether each address to be selected should be established or not.
In a third aspect, as shown in fig. 5, fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of this specification, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, based on the same idea, the embodiments of this specification further provide a non-volatile computer storage medium corresponding to the method described above, and storing computer-executable instructions, which, when read by a computer, cause one or more processors to execute the method according to the first aspect.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A resource optimization configuration method is applied to a resource optimization scene containing global constraint conditions, local constraint conditions and a main objective function, and comprises the following steps:
acquiring a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function;
solving the first sub-objective function according to the local constraint condition to generate a local solution of a main variable corresponding to each node;
acquiring a second sub-goal function, wherein the second sub-goal function comprises gradient information of the local solution and penalty items related to the global constraint condition;
solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node for the main variable;
correcting the local solution by using the local correction value to generate a planning value of a main variable corresponding to each node;
and performing optimized configuration on the resources according to the planned value of the main variable.
2. The method of claim 1, wherein obtaining a second sub-targeting function that includes gradient information for the local solution comprises:
a second sub-targeting function is obtained that includes first order gradient information and second order gradient information of the local solution.
3. The method of claim 1, wherein the first sub-objective function is generated based on relaxing the master objective function, comprising:
determining a dual coefficient corresponding to each node, wherein the dual coefficient is related to the global constraint condition;
constructing a dual term comprising the dual coefficient;
and determining the sum of the even term and the main objective function as a first sub objective function.
4. The method of claim 3, wherein correcting the local solution using the local correction value to generate the projected value of the principal variable corresponding to each node comprises:
updating the local solution and the dual coefficient according to the local correction value to generate an updated local solution and an updated dual coefficient;
determining a value of the primary objective function according to the updated local solution;
determining the value of the first sub-targeting function according to the updated local solution and the updated dual coefficient;
and when the difference between the value of the main objective function and the value of the first sub objective function does not exceed a preset value, determining the updated local solution as the planning value of the main variable corresponding to each node.
5. The method of claim 4, wherein updating the local solution and the dual coefficients according to the local correction value, generating updated local solution and updated dual coefficients, comprises:
updating the local solution to a sum of the local solution and the local correction value, generating an updated local solution;
and updating the dual coefficient to be the sum of the dual coefficient and the gradient of the dual coefficient, and generating the updated dual coefficient.
6. The method of claim 3, wherein the second sub-targeting function is pre-constructed by:
constructing a local correction solution factor term, wherein the local correction solution factor term comprises a product of a local correction solution of a main variable and gradient information of the local solution;
determining a relaxation variable and constructing a dual coefficient factor item, wherein the relaxation variable is related to another global constraint condition met by the local correction solution, and the dual coefficient factor item contains a product of the relaxation variable and a transpose matrix of the dual coefficient;
constructing a penalty term comprising the slack variable;
and determining the sum of the local correction solution factor item, the dual coefficient factor item and the penalty item as a second sub-target function.
7. The method of claim 1, wherein the global constraint is used to constrain a global cost of configuring resources in a full number of nodes, the local constraint is used to constrain a local cost of configuring resources on any single node, the primary objective function is used to characterize an extremum of a target benefit, and the projected value of the primary variable is used to characterize whether or not to configure resources into nodes or a probability of configuring resources into nodes.
8. The method of claim 7, wherein,
when the resource optimization scene is an investment scene, the global constraint condition is used for constraining the total investment cost, the local constraint condition is used for constraining the local cost for single-class resource release, the main objective function is used for representing the maximized investment-to-profit ratio, and the planning value of the main variable is used for representing whether investment is to be performed on a group to be invested or not; alternatively, the first and second electrodes may be,
when the resource optimization scene is an address selection scene, the global constraint condition is used for constraining the global delivery cost of a full number of addresses to be selected, the local constraint condition is used for constraining the local delivery distance of a single address to be selected, the main objective function is used for representing the minimized overall delivery distance, and the planning value of the main variable is used for representing whether each address to be selected should be used for building a station.
9. An optimized configuration device of resources, which is applied to a resource optimization scenario containing global constraints, local constraints and a main objective function, the device comprising:
the first acquisition module is used for acquiring a first sub-objective function, wherein the first sub-objective function is generated based on relaxation of the main objective function;
the local solving module is used for solving the first sub-objective function according to the local constraint condition to generate a local solution of the main variable corresponding to each node;
the second acquisition module is used for acquiring a second sub-target function, wherein the second sub-target function comprises gradient information of the local solution and penalty items related to the global constraint condition;
the local correction solving module is used for solving the second sub-objective function according to the relaxed global constraint condition to generate a local correction value corresponding to each node and corresponding to the main variable;
the correction module is used for correcting the local solution by adopting the local correction value to generate a planning value of a main variable corresponding to each node;
and the resource configuration module is used for carrying out optimal configuration on the resources according to the planned values of the main variables.
10. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
CN202210459413.0A 2022-04-28 2022-04-28 Resource optimal configuration method, device and equipment Pending CN114580212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210459413.0A CN114580212A (en) 2022-04-28 2022-04-28 Resource optimal configuration method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210459413.0A CN114580212A (en) 2022-04-28 2022-04-28 Resource optimal configuration method, device and equipment

Publications (1)

Publication Number Publication Date
CN114580212A true CN114580212A (en) 2022-06-03

Family

ID=81785617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210459413.0A Pending CN114580212A (en) 2022-04-28 2022-04-28 Resource optimal configuration method, device and equipment

Country Status (1)

Country Link
CN (1) CN114580212A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276718A1 (en) * 2004-03-09 2007-11-29 Intel Corporation Methods and apparatus for resource allocation in computer architectures
CN103500369A (en) * 2013-10-11 2014-01-08 南京大学 Water resource optimum dispatching method based on mixed shaping plan and decomposition
CN104835168A (en) * 2015-05-15 2015-08-12 东华理工大学 Fast multi-phase image segmentation method based on global convex variational model
CN106656308A (en) * 2017-01-05 2017-05-10 清华大学 Method and device for planning tasks in space information network
CN108197693A (en) * 2017-09-21 2018-06-22 中国科学院长春光学精密机械与物理研究所 Compression evolution Hybrid Particle Swarm Optimization based on phase difference wavefront reconstruction
CN112417695A (en) * 2020-11-25 2021-02-26 湘潭大学 Integer programming based large-scale interference resource scheduling method and device
CN112818280A (en) * 2019-11-18 2021-05-18 华为技术有限公司 Information processing method and related equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276718A1 (en) * 2004-03-09 2007-11-29 Intel Corporation Methods and apparatus for resource allocation in computer architectures
CN103500369A (en) * 2013-10-11 2014-01-08 南京大学 Water resource optimum dispatching method based on mixed shaping plan and decomposition
CN104835168A (en) * 2015-05-15 2015-08-12 东华理工大学 Fast multi-phase image segmentation method based on global convex variational model
CN106656308A (en) * 2017-01-05 2017-05-10 清华大学 Method and device for planning tasks in space information network
CN108197693A (en) * 2017-09-21 2018-06-22 中国科学院长春光学精密机械与物理研究所 Compression evolution Hybrid Particle Swarm Optimization based on phase difference wavefront reconstruction
CN112818280A (en) * 2019-11-18 2021-05-18 华为技术有限公司 Information processing method and related equipment
CN112417695A (en) * 2020-11-25 2021-02-26 湘潭大学 Integer programming based large-scale interference resource scheduling method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LIN PENG ET AL.: "Distributed multi-agent optimization subject to nonidentical constraints and communication delays", 《AUTOMATICA》 *
MUNNA LAL JATAV ET AL.: "Optimization of Resource and Energy for D2D enable Communication System using Constraint"s-based Function", 《IEEE XPLORE》 *
黄晓舸 等: "小蜂窝网络中不活跃用户的最优能量效率资源分配方案", 《电子与信息学报》 *

Similar Documents

Publication Publication Date Title
US10839255B2 (en) Load-balancing training of recommender system for heterogeneous systems
CN106295832B (en) Product information pushing method and device
JP2022505434A (en) Deep reinforcement learning for production scheduling
CN114202370A (en) Information recommendation method and device
Chiarella et al. Dynamics of beliefs and learning under aL-processes—the heterogeneous case
CN113011483B (en) Method and device for model training and business processing
US10997525B2 (en) Efficient large-scale kernel learning using a distributed processing architecture
CN110020427B (en) Policy determination method and device
Alemany et al. Symmetry issues in mixed integer programming based Unit Commitment
CN107590690B (en) Data processing method and device and server
CN104361415B (en) A kind of choosing method and device for showing information
US20200410355A1 (en) Explainable machine learning based on heterogeneous data
Paul An efficient implementation of the robust tabu search heuristic for sparse quadratic assignment problems
Lubell-Doughtie et al. Practical distributed classification using the alternating direction method of multipliers algorithm
Yang et al. A tighter cut generation strategy for acceleration of Benders decomposition
Rajmohan et al. Group influence based improved firefly algorithm for design space exploration of datapath resource allocation
Hirose Interpretable modeling for short-and medium-term electricity demand forecasting
Bouman et al. Recoverable robustness by column generation
CN114580212A (en) Resource optimal configuration method, device and equipment
Stadtler Linear and mixed integer programming
Bordel et al. Process execution in humanized Cyber-physical systems: Soft processes
Zhang et al. Revolve-based adjoint checkpointing for multistage time integration
US20160330016A1 (en) Element replication device, element replication method, and program
Li et al. A feedback neural network for solving convex quadratic bi-level programming problems
Raravi et al. Task assignment algorithms for heterogeneous multiprocessors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220603