Data processing method and electronic equipment
By constructing a global conflict graph in the mixed integer programming MIP problem, determining the target path and solving it, the problem of low parallel solution efficiency is solved, and efficient and accurate solution effect is achieved.
Patent Information
- Application Number
- CN202510573613.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-18
AI Technical Summary
When solving the MIP problem of mixed integer programming in parallel, the existing technology has the problem of low solution efficiency, especially when solving each node in parallel, resulting in waste of computing resources and reduced efficiency.
By constructing a global conflict graph, the target path is determined based on the target variables and constraints, and only the target path is solved. The global conflict graph is used to display the conflict relationship between multiple variables, improving the solution efficiency and accuracy.
By constructing a global conflict graph, only the target path is solved, the calculation amount is reduced, the solution efficiency and accuracy are improved, the calculation of invalid paths is avoided, and the overall solution efficiency and accuracy are improved.
Smart Images

Figure CN120336671A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a data processing method and an electronic device. Background Art
[0002] A solver is a software tool used to find the optimal solution or multiple feasible solutions that satisfy a set of constraints. Solvers can be widely applied in multiple fields, such as supply chain management, logistics planning, manufacturing, financial investment, energy distribution, etc. In these scenarios, the solver can formulate the optimal strategy to maximize profits or minimize costs.
[0003] When dealing with the Mixed Integer Programming (MIP) problem, the commonly used solution method for the solver is usually the Branch & Bound method, that is, starting from the original problem, branching the variables in the original problem during the solution process to generate new sub-problems. As the solution progresses, more and more sub-problems are generated. To improve the exploration efficiency of the sub-problems, a parallel method or framework is usually used to explore the sub-problems.
[0004] During the parallel solution process, each node is solved separately, resulting in low solution efficiency. Summary of the Invention
[0005] In view of this, this application provides a data processing method and an electronic device, and the specific solutions are as follows:
[0006] A data processing method, including:
[0007] Obtain at least one target variable corresponding to the supply chain parameters of the target object, and the constraints between the at least one target variable, where the target object is an object in the supply chain scenario, and the supply chain parameters are parameters that at least affect the efficiency of the supply chain events of the target object in the supply chain scenario;
[0008] Use a solver to determine a global conflict graph based on the at least one target variable and the constraints. The global conflict graph includes the conflict relationships between multiple variables, and the conflict relationships are determined based on the constraints or the prior knowledge of the target variables. The multiple variables include the target variables and the intermediate variables generated during the solution process of the target variables;
[0009] Determine a target path for solving the supply chain parameters based on the global conflict graph;
[0010] Solve based on the variables in the target path to determine the value of the supply chain parameters.
[0011] Further, obtaining at least one target variable corresponding to the supply chain parameters of the target object, and the constraint conditions among the at least one target variable include at least one of the following:
[0012] Obtaining at least one spare part variable corresponding to the spare part parameters of the target object, and the constraint conditions among the at least one spare part variable;
[0013] Obtaining at least one production scheduling variable corresponding to the production scheduling parameters of the target object, and the constraint conditions among the at least one production scheduling variable;
[0014] Obtaining at least one logistics variable corresponding to the logistics parameters of the target object, and the constraint conditions among the at least one logistics variable.
[0015] Further, determining a target path for solving the supply chain parameters based on the global conflict graph includes:
[0016] Determining a target path from the solution paths composed of at least one variable based on the conflict information corresponding to each variable in the global conflict graph, where the conflict information is at least related to the conflict relationship between variables;
[0017] Solving based on the variables in the target path to determine the value of the supply chain parameters includes:
[0018] Solving based on the target path to determine the values of the at least one target variable, and based on the values of the at least one target variable to determine the values of the supply chain parameters of the target object.
[0019] Further, determining a target path from the solution paths composed of at least one variable based on the conflict information corresponding to each variable in the global conflict graph includes:
[0020] Determining the parameter values of the conflict relationships corresponding to the specific variables in each solution path in the global conflict graph;
[0021] Determining the solution status information of each solution path;
[0022] Based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path, determining a target path from the solution paths.
[0023] Further, determining a target path from the solution paths based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path includes:
[0024] Determining the score of each solution path based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path;
[0025] Select a target path from the solution paths based on the scores of each of the solution paths.
[0026] Further, the using the solver to determine a global conflict graph based on the at least one target variable and the constraint conditions includes:
[0027] Construct a local conflict graph and an initial global conflict graph based on the at least one target variable and the constraint conditions, the initial global conflict graph being composed of at least one local conflict graph;
[0028] If it is determined that an infeasible state occurs during the solution process using the target solver in the solver, determine the variable corresponding to the infeasible state as a conflict node;
[0029] Update the target local conflict graph corresponding to the target solver based on the information corresponding to the conflict node;
[0030] Update the initial global conflict graph based on the updated target local conflict graph to obtain a global conflict graph.
[0031] Further, the updating the initial global conflict graph based on the updated target local conflict graph includes:
[0032] If it is determined that the variables in the updated target local conflict graph do not match the target variables in the initial global conflict graph, perform a variable restoration operation on the variables in the updated target local conflict graph to obtain a target local conflict graph after variable restoration, the variables in the target local conflict graph after variable restoration matching the target variables in the initial global conflict graph;
[0033] Update the target local conflict graph after variable restoration to the initial global conflict graph.
[0034] Further, the number of solvers is multiple, and the determining a target path for solving the supply chain parameters based on the global conflict graph includes:
[0035] Determine the target path corresponding to each solver respectively based on the conflict information corresponding to the specific variables in each solution path in the global conflict graph, the target path corresponding to each solver respectively being one of the solution paths corresponding to each solver.
[0036] Further, the solving based on the variables in the target path includes:
[0037] If the number of solving resources is less than the number of the target paths, determine a first group of target paths and a second group of target paths, where the first group of target paths are the target paths assigned to the solving resources for solution, and the second group of target paths are the target paths not assigned to the solving resources;
[0038] Using the solving resource information obtained by solving the target paths in the first group of target paths by the solving resource, determine the resource allocation information for solving the target paths in the second group of target paths, so that after at least the solution of the first target path in the first group of target paths is completed, solve the second target path in the second group of target paths based on the resource allocation information.
[0039] An electronic device, comprising:
[0040] A processor, configured to obtain at least one target variable corresponding to the supply chain parameters of a target object, and the constraint conditions between the at least one target variable, where the target object is an object in a supply chain scenario, and the supply chain parameters are parameters in the supply chain scenario that at least affect the efficiency of the supply chain events of the target object; use a solver to determine a global conflict graph based on the at least one target variable and the constraint conditions, where the global conflict graph includes conflict relationships between multiple variables, and the conflict relationships are determined based on the constraint conditions or the prior knowledge of the target variables, and the multiple variables include the target variables and intermediate variables generated during the solution process of the target variables; determine a target path for solving the supply chain parameters based on the global conflict graph; solve based on the variables in the target path to determine the value of the supply chain parameters;
[0041] A memory, configured to store a program required for the processor to execute the above processing procedure. Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0043] Figure 1 It is a flowchart of a data processing method disclosed in an embodiment of the present application;
[0044] Figure 2 It is a flowchart of a data processing method disclosed in an embodiment of the present application;
[0045] Figure 3A schematic diagram of the conflict relationship between different variables in the global conflict graph disclosed in the embodiments of the present application;
[0046] Figure 4 A schematic diagram of determining a target path disclosed in the embodiments of the present application;
[0047] Figure 5 A flowchart of a data processing method disclosed in the embodiments of the present application;
[0048] Figure 6 A schematic diagram of determining a constraint condition based on the variable corresponding to the infeasible state disclosed in the embodiments of the present application;
[0049] Figure 7 A flowchart of a data processing method disclosed in the embodiments of the present application;
[0050] Figure 8 A schematic diagram of a data processing method disclosed in the embodiments of the present application;
[0051] Figure 9 A schematic diagram of the structure of an electronic device disclosed in the embodiments of the present application. Detailed implementation manners
[0052] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, rather than to limit the present application.
[0053] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0054] The terms "first", "second", etc. in the specification, claims and the above-mentioned accompanying drawings of the present application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0055] The present application discloses a data processing method, and its flowchart is as Figure 1 shown, including:
[0056] Step S11: Obtain at least one target variable corresponding to the supply chain parameters of the target object, as well as the constraint conditions among at least one target variable. The target object is an object in the supply chain scenario, and the supply chain parameters are parameters in the supply chain scenario that at least affect the efficiency of the supply chain events of the target object.
[0057] Step S12: Use a solver to determine a global conflict graph based on at least one target variable and the constraint conditions. The global conflict graph includes the conflict relationships among multiple variables. The conflict relationships are determined based on the constraint conditions or the prior knowledge of the target variables. The multiple variables include the target variables and the intermediate variables generated during the solution process of the target variables.
[0058] Step S13: Determine the target path for solving the supply chain parameters based on the global conflict graph.
[0059] Step S14: Solve based on the variables in the target path to determine the value of the supply chain parameters.
[0060] A solver is a software tool used to find the optimal solution or multiple sets of feasible solutions that satisfy a set of constraint conditions. Solvers can be widely applied in multiple fields, such as supply chain management, logistics planning, manufacturing, financial investment, energy distribution, etc. In these scenarios, the solver can formulate the optimal strategy to maximize profit or minimize cost. When the solver is dealing with the mixed integer programming (MIP) problem, the commonly used solution method is usually the Branch & Bound method, that is, starting from the original problem, branching the variables in the original problem during the solution process to generate new sub-problems. As the solution progresses, more and more sub-problems are generated. To improve the exploration efficiency of the sub-problems, a parallel method or framework is usually used to explore the sub-problems. During the parallel solution process, each node is solved separately, resulting in a relatively low solution efficiency.
[0061] Based on this, in this solution, when it is necessary to solve the supply chain parameters of the target object, it is required to use a solver to determine the global conflict graph based on at least one target variable corresponding to the supply chain parameters and the constraint conditions among at least one target variable. Then, use the global conflict graph to determine the target path of the supply chain parameters, and only solve the target path to quickly obtain the optimal solutions of each target variable, so as to determine the value of the supply chain parameters. Since only the target path is solved, it is not necessary to solve the variables on all paths, reducing the amount of calculation and improving the solution efficiency. In addition, the target path is determined based on the global conflict graph, and the global conflict graph includes the conflict relationships among multiple variables, ensuring the accuracy of the determined target path and improving the solution accuracy.
[0062] The data processing method disclosed in this embodiment can be applied to a supply chain scenario. What needs to be determined is the value of the supply chain parameter of the target object. The target object is an object in the supply chain scenario, and the supply chain parameter is a parameter that at least affects the efficiency of the supply chain event of the target object in the supply chain scenario.
[0063] The supply chain scenario refers to supply chain events such as the production and transportation of the target object. By adjusting the supply chain parameters, the purpose is to improve the efficiency of the supply chain event and reduce the cost of the supply chain event. Among them, the supply chain parameters may include: spare part parameters, production scheduling parameters, logistics parameters, etc. of the target object.
[0064] Specifically, if the supply chain parameter is a spare part parameter, at least one spare part variable corresponding to the spare part parameter of the target object and the constraint conditions between at least one spare part variable need to be obtained; if the supply chain parameter is a production scheduling parameter, at least one production scheduling variable corresponding to the production scheduling parameter of the target object and the constraint conditions between at least one production scheduling variable need to be obtained; if the supply chain parameter is a logistics parameter, at least one logistics variable corresponding to the logistics parameter of the target object and the constraint conditions between at least one production scheduling variable need to be obtained.
[0065] The spare part variable can be: the quantity of parts to be prepared for different production lines. By solving the spare part variables corresponding to the spare part parameter, the purpose of reasonably allocating parts is achieved; the production scheduling variable can be: the production volume arranged for different production lines. By solving the production scheduling variables in the production scheduling parameter, the purpose of improving production efficiency and reducing production costs is achieved; the logistics variable can be: the locations passed by the transportation route during the transportation of the target object, etc. By solving the logistics variables in the logistics parameter, the purpose of shortening the logistics time and reducing the logistics cost is achieved.
[0066] There may be constraint conditions for the target variables in at least one target variable. Among them, the constraint condition can be the constraint condition of a certain target variable itself, or the constraint condition between at least two target variables. For example: for the target variable x, its constraint condition can be: x > 3; or, for the target variables x and y, its constraint condition is: x + y < 12, etc.
[0067] After obtaining at least one target variable corresponding to the supply chain parameter of the target object and the constraint conditions of at least one target variable, a global conflict graph is determined based on at least one target variable and the constraint conditions. The global conflict graph includes the conflict relationships between multiple variables. The multiple variables include target variables and intermediate variables generated during the solution process of the target variables. For example: the target variables include: x1, x2, and x3. During the solution process of the target variables, intermediate variables are obtained, such as: y1, y2, z1, z2, and z3; in addition, the conflict relationships between multiple variables are determined based on the constraint conditions or the prior knowledge of the target variables.
[0068] The global conflict graph is obtained by a solver. Each solver corresponds to a local conflict graph, and at least one local conflict graph constitutes a global conflict graph. Through this global conflict graph, information in multiple concurrently solving solvers can be exchanged to ensure the solving efficiency and accuracy. Moreover, through the global conflict graph composed of at least one local conflict graph, the conflict area can be quickly and accurately identified. The conflict area is the conflict relationship between variables and variables.
[0069] After determining the global conflict graph, the target path can be determined using the global conflict graph. The target path is the path selected from multiple paths in the global conflict graph. This path is the selected path with exploration potential and is most likely a non-invalid path. An invalid path means an infeasible state occurs during the solving process and the solving cannot continue. At this time, the solving efficiency will be reduced due to the solving of the invalid path. Since the global conflict graph is composed of information in multiple concurrently solving solvers, the information contained in the global conflict graph is more complete. The target path determined using the global conflict graph comprehensively considers the information on different paths in the global conflict graph, so the determined target path is more accurate, aiming to improve the overall solving efficiency.
[0070] After determining the target path, only the variables in the target path are solved to finally determine the value of the supply chain parameter. In this process, there is no need to solve the variables in the non-target paths in the global conflict graph, reducing the calculation amount in the process of determining the value of the supply chain parameter.
[0071] The data processing method disclosed in this embodiment, when it is necessary to determine the supply chain parameter of the target object, first obtains at least one target variable corresponding to the supply chain parameter of the target object and the constraint conditions between at least one target variable, and uses a solver to determine the global conflict graph based on at least one target variable and the constraint conditions, so as to determine the target path for solving the supply chain parameter based on the global conflict graph, and only solve the target path, thereby determining the value of the supply chain parameter. This solution constructs a global conflict graph to show the conflict relationship between multiple variables involved in the solving process through the global conflict graph, so as to determine the target path and only solve the target path, improving the solving efficiency without having to solve the variables in all paths.
[0072] This embodiment discloses a data processing method, and its flowchart is as Figure 2 shown, including:
[0073] Step S21, obtain at least one target variable corresponding to the supply chain parameter of the target object, and the constraint conditions between at least one target variable. The target object is an object in the supply chain scenario, and the supply chain parameter is a parameter that at least affects the efficiency of the supply chain event of the target object;
[0074] Step S22: Use a solver to determine a global conflict graph based on at least one target variable and constraint conditions. The global conflict graph includes conflict relationships among multiple variables. The conflict relationships are determined based on constraint conditions or prior knowledge of the target variables. The multiple variables include the target variables and intermediate variables generated during the solution process of the target variables.
[0075] Step S23: Based on the conflict information corresponding to each variable in the global conflict graph, determine a target path from the solution paths composed of at least one variable. The conflict information is at least related to the conflict relationships among the variables.
[0076] Step S24: Solve based on the target path to determine the values of at least one target variable, so as to determine the values of the supply chain parameters of the target object based on the values of at least one target variable.
[0077] When it is necessary to determine the values of the supply chain parameters of the target object, it is necessary to first obtain at least one target variable corresponding to the supply chain parameters and the constraint conditions among at least one target variable, so that after determining the values of at least one target variable based on at least one target variable and the constraint conditions among at least one target variable, the values of the supply chain parameters can be determined based on the values of at least one target variable.
[0078] When determining the values of at least one target variable based on at least one target variable and the constraint conditions among at least one target variable, the solver first constructs a global conflict graph using at least one target variable and constraint conditions, so as to select a target path based on the global conflict graph, thereby achieving the purpose of improving the solution efficiency on the basis of ensuring the accuracy of the target path determination.
[0079] The global conflict graph includes multiple variables and the conflict information corresponding to each variable. The conflict information is at least related to the conflict relationships among the variables. The conflict information corresponding to a variable can be: the variable has a conflict, or the variable has no conflict. Among them, for a variable having a conflict, it can be that there are other variables in the global conflict graph that have a conflict relationship with this variable. For a variable having no conflict, it can be that there are no other variables in the global conflict graph that have a conflict relationship with this variable, that is, any other variable in the global conflict graph has no conflict relationship with this variable.
[0080] The global conflict graph is composed of the conflict relationships among variables. The global conflict graph includes multiple variables and the conflict information corresponding to each variable. Thus, multiple solution paths in the global conflict graph can be determined along the variables and the conflict relationships among the variables, such as Figure 3As shown, it is a schematic diagram of the conflict relationships among different variables in the global conflict graph, including: Node 1 - Node 5, where Node 1 corresponds to Variable 1, Node 2 corresponds to Variable 2, Node 3 corresponds to Variable 3, Node 4 corresponds to Variable 4, and Node 5 corresponds to Variable 5. There are conflict relationships between Node 1 and Node 2 and Node 3, and between Node 2 and Node 4 and Node 5. According to the current schematic diagram, multiple solution paths can be determined. Among them, Solution Path 1 is: Node 1, Node 2, and Node 4; Solution Path 2 is: Node 1, Node 2, and Node 5.
[0081] According to the global conflict graph, select one of the multiple solution paths as the target path. For example: Figure 3 Solution Path 2 in []. After taking Solution Path 2 as the target path, only solve the variables in this Solution Path 2. And in order to reduce the calculation of invalid branches, do not solve the variables in Solution Path 1.
[0082] After determining the target path, solve the target path to determine the values of at least one target variable. And after determining the values of at least one target variable, determine the values of the supply chain parameters of the target object based on the values of at least one target variable.
[0083] In addition, the conflict relationships are determined based on constraint conditions or prior knowledge of the target variables. Therefore, when there are conflicts among variables, the target path can be selected from the solution paths based on the constraint conditions of the variables, or based on the prior knowledge of the variables, or based on both the constraint conditions and the prior knowledge of the variables simultaneously.
[0084] For example: Continuing with the Figure 3 global conflict graph shown as an example. In Figure 3 , if the value of Node 4 is contradictory to a certain prior knowledge, such as: the value of Node 2 is 2.6, then the branches under Node 2 can take 2 and 3, that is, the value of Node 4 is 2 and the value of Node 5 is 3. However, there is a pre-recorded prior knowledge that determines that there is an infeasible solution when this value goes to 3. Therefore, Solution Path 2 corresponding to Node 5 will not be selected as the target path, and for the remaining Solution Path 1, it needs to be continuously judged based on the constraint conditions until the target path is selected.
[0085] In addition, selecting the target path based on the constraint conditions can be specifically:
[0086] Determine the parameter values of the conflict relationships corresponding to the specific variables in each solution path in the global conflict graph; determine the solution status information of each solution path; based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path, determine the target path from the solution paths.
[0087] Determine each solution path in the global conflict graph. Each solution path in the global conflict graph includes a specific variable, and the specific variable can be the end node in the solution path, that is, the specific variable in each solution path is the last variable to be calculated in its corresponding current solution path. Take Figure 3 the global conflict graph shown in Figure 3 as an example. For the solution path 1 in
[0088] Figure 3 , the solution path 1 includes: node 1, node 2, and node 4. Node 4 is the end node in this solution path 1, so node 4 is the specific path in the solution path 1.
[0089] In addition, since a solution path is directly selected from multiple solution paths in the global conflict graph as the target path, and only the variables in the target path are solved, for the solution paths that are not determined as the target path, they are not solved. Therefore, during the solution process, the end node (i.e., the specific variable) in each solution path will affect the determination of the solution path. After the solution path is determined, the parameter values of the conflict relationships corresponding to the specific variables in each solution path will also affect whether this solution path can be determined as the target path.
[0090] Among them, the parameter value of the conflict relationship corresponding to the specific variable in each solution path can be: the number of conflict relationships corresponding to the specific variable in each solution path, that is, determine how many conflict relationships the specific variable in each solution path exists in, and determine this number as the parameter value of the conflict relationship corresponding to the specific variable.
[0091] For example: there is a constraint condition 1: x + y ≤ 1, a constraint condition 2: y + z ≤ 1, and a constraint condition 3: x + z > 2. Each constraint condition corresponds to a conflict relationship. If x is the specific variable in a certain solution path, then the parameter value of the conflict relationship corresponding to this specific variable x is 2. If y is the specific variable in a certain solution path, then the parameter value of the conflict relationship corresponding to this specific variable y is 2. If z is the specific variable in a certain solution path, then the parameter value of the conflict relationship corresponding to this specific variable z is 1.
[0092] In addition, when determining the target path, since multiple solution paths are parallel, the solution status information of each solution path will also affect the determination of the target path. Therefore, the solution status information of each solution path needs to be referred to.
[0093] In this embodiment, the solution status information of the solution path can be determined based on the feasible solution and the relaxed solution for the current problem. The feasible solution is a solution that can satisfy all the constraint conditions of the current problem, and the relaxed solution is a solution that can satisfy all the constraint conditions of the current problem except the target constraint condition. Among them, the target constraint condition can be an integer constraint condition, that is, this target constraint condition requires the final solution to be an integer, while the relaxed solution can be a non-integer. For example, if a solution of 2.6 is obtained, it can be used as a relaxed solution but not as a feasible solution.
[0094] Among them, to determine the solution status information of the solution path based on the feasible solution and the relaxed solution for the current problem, specifically, the solution status information of the solution path can be determined based on the relative gap Gap between the feasible solution and the relaxed solution. Among them, the relative gap Gap can be:
[0095]
[0096] Among them, dualBound is the relaxed solution and primalBound is the feasible solution.
[0097] As the solution progresses deeper on the solution path, the value of the relative gap Gap between the feasible solution and the relaxed solution will gradually decrease until it approaches 0 at the end to reach the optimal solution. Therefore, the solution status information of the solution path can be directly characterized based on the relative gap Gap between the feasible solution and the relaxed solution, and the deeper the solution path, the easier it is to be selected.
[0098] After determining the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path, one solution path is selected as the target path from multiple solution paths based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path.
[0099] Specifically, it can be: determining the score of each solution path based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path; selecting the target path from the solution paths based on the scores of each solution path.
[0100] Since the deeper the solution path is explored, the more likely it is to be selected, and the smaller the corresponding relative gap Gap will be for the deeper solution path; in addition, the smaller the parameter value of the conflict relationship corresponding to a specific variable, the more likely it is to be selected. Therefore, when calculating the score of each solution path, the two parameters can be directly multiplied, that is, multiply the solution state information of each solution path by the parameter value of the conflict relationship corresponding to the specific variable in that solution path, and determine the product obtained as the score of that solution path, that is:
[0101]
[0102] where V i is the score of the i-th solution path, is the number of conflict relationships corresponding to the i-th specific variable.
[0103] After calculating the scores V i of each solution path obtained, sort or compare the scores V i corresponding to the multiple solution paths obtained, select the smallest score V i , and determine the solution path corresponding to this smallest score V i as the target path, so as to ensure that only the most potential solution paths are solved, thereby reducing the solution of unnecessary solution paths; in addition, the solution of this target path is realized based on the global conflict graph, considering the global conflict relationships, avoiding the occurrence of getting stuck in local optimal solutions.
[0104] As the solution progresses, as long as a new solution path appears, the above process of determining the target path will be repeatedly executed, that is, the target path is dynamically determined during the solution process, so as to ensure that the currently selected target path can always be solved during the solution process.
[0105] As Figure 4 shown, it is a schematic diagram for determining the target path, Figure 4 the left side in Figure 4 is a schematic diagram of the final target path determination method in the existing solution,
[0106] For Figure 4 the solution on the left side, when calculating to reach a certain node, if different branches appear, that is, different solution paths appear, it is necessary to solve the different solution paths separately to determine the solution path that finally needs to be selected under the current node. When continuing to solve the next node according to the solution path selected at the current node, if different solution paths appear again, it is necessary to continue to solve the different solution paths separately until no different solution paths appear at all nodes, so as to determine the final target path. As Figure 4 the left first part inFigure 4 Different solution paths appear at the position marked as 1), that is, the path from node 1 to node 2 and the path from node 1 to node 3 appear. Therefore, in the existing scheme, different solution paths are calculated separately, such as Figure 4 In the first part on the left, we solve the problem along the path from node 1 to node 2. If we find that the solution has not reached the optimal solution, we continue to try the path from node 1 to node 3 and solve it, that is, Figure 4 The second part on the left, Figure 4 In the second part on the left, when the solution reaches the position of node 3, the solution is continued. It can be determined that the path of node 3-node 2 and the path of node 3-node 4 appear. Therefore, the different solution paths currently determined are calculated respectively, such as Figure 4 The second part on the left is calculated according to the solution path of node 1-node 3-node 2. When it is found that the solution has not reached the optimal solution, the path of node 1-node 3-node 4 is continued to be tried to solve it, that is, Figure 4 The third part on the left side is determined until the optimal solution is obtained. Then the path that obtains the optimal solution is determined as the target path. This process requires multiple attempts and multiple calculations.
[0107] And as Figure 4 As shown on the right, according to the method disclosed in this embodiment, at node 1 ( Figure 4 In the figure, different solution paths appear at the position marked as 1), that is, the path from node 1 to node 2 appears, and the path from node 1 to node 3 also appears. At this time, they are not solved, but the two paths are compared, such as: the score of each path is calculated separately, and the final path is selected according to the score. That is, after calculating the scores of the path from node 1 to node 2 and the path from node 1 to node 3, the path from node 1 to node 3 is selected for solution. When the solution reaches the position of node 3, the path from node 3 to node 2 and the path from node 3 to node 4 appear. At this time, Instead of solving the problem directly, the two paths are compared. For example, the score of each path is calculated separately, and the final path is selected according to the score. After calculating the scores of the path of node 1-node 3-node 2 and the path of node 1-node 3-node 4, the path of node 1-node 3-node 4 is selected for solving, and finally the target path is determined. In this process, there is no need to perform multiple solution calculations. It is only necessary to calculate the scores of different paths when different paths exist, and select the corresponding path based on the scores. There is no need to calculate infeasible paths, which saves computing resources and improves solution efficiency.
[0108] The data processing method disclosed in this embodiment, when determining that it is necessary to solve the value of the supply chain parameter of the target object, after obtaining at least one target variable corresponding to the supply chain parameter and the constraint conditions among at least one target variable, uses a solver to determine a global conflict graph based on at least one target variable and the constraint conditions, so as to use the conflict information corresponding to each variable in the global conflict graph to determine a target path from the solution paths composed of at least one variable. The conflict information is at least related to the conflict relationship between variables, that is, it realizes selecting one from the solution paths of the global conflict graph including the conflict information corresponding to each variable as the target path, ensuring the accuracy of the target path selection, avoiding the solution of variables in invalid paths, and improving the solution efficiency.
[0109] This embodiment discloses a data processing method, and its flowchart is as Figure 5 shown, including:
[0110] Step S51, obtain at least one target variable corresponding to the supply chain parameter of the target object, and the constraint conditions among at least one target variable. The target object is an object in the supply chain scenario, and the supply chain parameter is a parameter that at least affects the efficiency of the supply chain event of the target object;
[0111] Step S52, construct a local conflict graph and an initial global conflict graph based on at least one target variable and the constraint conditions. The initial global conflict graph is composed of at least one local conflict graph;
[0112] Step S53, if it is determined that an infeasible state occurs during the solution process using the target solver in the solver, determine the variable corresponding to the infeasible state as a conflict node;
[0113] Step S54, update the target local conflict graph corresponding to the target solver based on the information corresponding to the conflict node;
[0114] Step S55, update the initial global conflict graph based on the updated target local conflict graph to obtain a global conflict graph;
[0115] Step S56, determine a target path for solving the supply chain parameter based on the global conflict graph;
[0116] Step S57, solve based on the variables in the target path to determine the value of the supply chain parameter.
[0117] It is necessary to solve the supply chain parameters of the target object in the supply chain scenario. In fact, it is to solve the original problem. During the process of solving the original problem, multiple intermediate solving problems will be generated. Each solver can correspond to one problem, and a solver is used to solve one problem. This results in that during the solving process of each solver, the local conflict graph constructed for each solver is only used to represent the conflict relationships among different variables involved in the solving problem corresponding to the current solver. Through the local conflict graph, it is impossible to determine the conflict relationships among all variables involved in the original problem. Therefore, in this embodiment, when it is determined that there is a local conflict graph, an initial global conflict graph is constructed, and as the solving progresses, the local conflict graph is updated. At the same time, the initial global conflict graph will also be updated accordingly, so as to be able to display the relationships among various variables involved in the solving process based on the updated global conflict graph, thereby ensuring the full utilization of the information generated by parallel solvers to achieve the purpose of optimizing the solving path.
[0118] First, determine at least one target variable corresponding to the supply chain parameter and the constraint conditions among at least one target variable. After determining at least one target variable and the constraint conditions among at least one target variable, use a solver to solve it. During the solving process, construct a local conflict graph for each solver, and construct an initial global conflict graph based on the local conflict graph. For example: During the solving process, 2 solvers are involved. Then, one local conflict graph is constructed for each solver, and a total of 2 local conflict graphs need to be constructed. Based on these 2 local conflict graphs, a complete initial global conflict graph is obtained.
[0119] While the initial global conflict graph is being constructed, each solver is solving. During the solving process, if a new conflict node is detected, then the local conflict graph in that solver will be updated. When at least one local conflict graph is updated, the initial global conflict graph also needs to be updated along with the update of at least one local conflict graph to obtain an updated global conflict graph, so that the global conflict graph can always match the local conflict graphs corresponding to each solver, avoiding the situation where a certain local conflict graph has been updated while the global conflict graph has not been updated, which may lead to inaccurate determination of the target path based on the un-updated global conflict graph in time, and further lead to the problem that the optimal solution cannot be obtained when solving the target path.
[0120] As the solving of each solver progresses, when an infeasible state appears in a certain solver, or other states that can generate conflicts, the variable corresponding to the infeasible state or other states that can generate conflicts is determined as a conflict node. When there is no solution in the solver that can simultaneously satisfy all given constraint conditions for a variable, the variable is determined as the variable corresponding to the infeasible state.
[0121] Among them, the detection of whether there are conflict nodes in the solver can be specifically based on the information in the global conflict graph and / or the solution information of other solvers to detect conflict nodes. Among them, the solution information of other solvers can be: the feasible solutions, relaxation solutions, etc. of other solvers, and can also be based on the historical solution status information of the current solver or other solvers. For example: based on the analysis of the historical solution status information of Solver 2, it is determined that Solver 1 will not encounter an infeasible state when solving according to the current path; or, based on the analysis of the feasible solutions and relaxation solutions of Solver 3, combined with the feasible solutions and relaxation solutions of Solver 1, it can be determined that Solver 1 will encounter an infeasible state when continuing to solve according to the current path, etc.
[0122] Furthermore, when an infeasible state occurs during the solving process, the schematic diagram of the constraint conditions determined based on the variables corresponding to the infeasible state can be as Figure 6 shown, and after determining the constraint conditions, conflict nodes are further determined. Figure 6 In , , , and take certain values, it will lead to the final λ, and λ is the infeasible state. No matter which path depth the nodes , , , and calculate along respectively, the finally obtained state is always infeasible. Therefore, this situation is determined as an infeasible state. In order to avoid the recurrence of the current infeasible state, the current infeasible state needs to be recorded. At this time, conflict constraints can be constructed and the conflict constraints are recorded.
[0123] Then lines A, B, C, and D in Figure 6 can be constructed. Lines A, B, C, and D all represent the same kind of conflict constraint. If line A is used as the constraint condition for this situation, when the nodes , , , and take the values corresponding to line A, it is considered infeasible; or, if line B is used as the constraint condition for this situation, when the nodes , , , and take the values corresponding to line B, it is considered infeasible; or, if line C is used as the constraint condition for this situation, when the nodes , , , and When the value corresponding to line C is obtained, it is considered infeasible; or, line D is used as the constraint condition for this case. When nodes , , , and obtain the values corresponding to line D, it is considered infeasible. When actually determining the constraint conditions, since the constraint of line A is too weak and the constraint of line D is too strong, line C or line B can be used as the constraint condition; in addition, for line C and line B, in Figure 6 , since line B includes the necessary node , that is, only by passing through this necessary node can λ be deduced, and line C does not pass through this node. Therefore, line B can be used as the constraint condition corresponding to the infeasible state shown in Figure 6 , and this constraint condition of line B is further determined as a conflict node.
[0124] If a conflict node is detected in the target solver during the solution process, the target local conflict graph corresponding to the target solver is updated based on the information corresponding to the conflict node, so that the local conflict graph always corresponds to the solution state of the solver; and after the target local conflict graph is updated, the initial global conflict graph is updated. When updating the initial global conflict graph, only the part corresponding to the target local conflict graph in the initial global conflict graph needs to be updated, or, further, only the part corresponding to the conflict node detected in the target local conflict graph in the initial global conflict graph needs to be updated.
[0125] Further, when updating the initial global conflict graph based on the updated target local conflict graph, specifically:
[0126] If it is determined that the variables in the updated target local conflict graph do not match the target variables in the initial global conflict graph, a variable restoration operation is performed on the variables in the updated target local conflict graph to obtain a target local conflict graph after variable restoration, and the variables in the target local conflict graph after variable restoration match the target variables in the initial global conflict graph; the target local conflict graph after variable restoration is updated to the initial global conflict graph.
[0127] During the solution process of the solver, each solver may involve multiple variables. During the solution process, it may be necessary to perform preprocessing on some of these variables, namely the Presolve pre-solving technique, which is mainly used to analyze, simplify, and transform the problem before the formal solution, so as to reduce the scale of the problem, remove redundant information, simplify the constraint conditions, etc., in order to solve more efficiently. For example, for the first solver, the variables it involves may include: x1, y1, z1. After preprocessing, it is determined that the variable z1 can be removed and not calculated first. During the solution process of each solver, it is possible to directly solve based on the preprocessed variables. The local conflict graph corresponding to each solver can also be displayed according to the preprocessed variables. In the global conflict graph, however, it is necessary to restore the variables preprocessed by each solver to ensure that the variables in different local conflict graphs in the global conflict graph are aligned.
[0128] This requires directly restoring the variables preprocessed by each solver when determining the construction of the initial global conflict graph. Alternatively, when updating the initial global conflict graph, perform the variable restoration Post-presolve operation on the variables in the target local conflict graph that needs to be updated, and then update the initial global conflict graph after restoration. Among them, the variable restoration operation is as follows: during the preprocessing process, the variables and constraints of the original problem may be renumbered or merged. The variable restoration operation is to record the mapping relationship of the variables or constraints preprocessed during the preprocessing process, and when the conditions are met, restore the variables or constraints according to the mapping relationship. The conditions are met when the solution is completed or a new global conflict graph is needed.
[0129] For example, for the second solver, the variables it involves may include: x2, y2, z2. Among them, during preprocessing, the variable k is introduced, and x2 and y2 are removed. Among them, k = x2 + y2, then the mapping relationship k = x2 + y2 is added. After the second local conflict graph corresponding to the second solver is updated, when updating the initial global conflict graph based on the second local conflict graph, it is necessary to restore the variables in the second local conflict graph, that is, according to the mapping relationship k = x2 + y2, delete the variable k and restore the variables x2 and y2, so that the variables in the restored second local conflict graph can be aligned with the variables in the initial global conflict graph.
[0130] The data processing method disclosed in this embodiment, when it is necessary to solve the supply chain parameters of a target object in a supply chain scenario, determines at least one target variable corresponding to the supply chain parameters and the constraint conditions among at least one target variable. Then, a local conflict graph and an initial global conflict graph are constructed using at least one target variable and the constraint conditions. During the solution process of the solver, if a conflict node is detected, it is necessary to first update the target local conflict graph corresponding to the target solver where the conflict node is detected, and accordingly update the initial global conflict graph to obtain a global conflict graph, so as to ensure that the global conflict graph is updated in real time as the solution progresses, to ensure the accuracy of the information in the global conflict graph, thereby enabling the accuracy of the target path determined based on the global conflict graph, and thus achieving the purpose of improving the solution efficiency.
[0131] This embodiment discloses a data processing method, and its flowchart is as Figure 7 shown, including:
[0132] Step S71: Obtain at least one target variable corresponding to the supply chain parameters of the target object, and the constraint conditions among at least one target variable. The target object is an object in the supply chain scenario, and the supply chain parameters are parameters that at least affect the efficiency of the supply chain event of the target object;
[0133] Step S72: Use multiple solvers to determine a global conflict graph based on at least one target variable and the constraint conditions. The global conflict graph includes the conflict relationships among multiple variables, and the conflict relationships are determined based on the constraint conditions or the prior knowledge of the target variables. The multiple variables include the target variables and the intermediate variables generated during the solution process of the target variables;
[0134] Step S73: Based on the conflict information corresponding to the specific variables in each solution path in the global conflict graph, determine the target path corresponding to each solver. The target path corresponding to each solver is one of the solution paths corresponding to each solver;
[0135] Step S74: Solve based on the variables in the target path to determine the value of the supply chain parameters.
[0136] During the process of using the solver to solve at least one target variable corresponding to the supply chain parameters of the target object in the supply chain scenario, there may be multiple solvers, and the multiple solvers solve in parallel to ensure the solution efficiency.
[0137] Each solver corresponds to a local conflict graph respectively, and the local conflict graphs corresponding to each solver will be updated to the global conflict graph. The information in the solving processes of multiple solvers is summarized through the global conflict graph, so that during the solving process, the information in the global conflict graph can be used to determine the target path of each solver, thereby realizing guiding the solving process of each solver with the global conflict graph and achieving the purpose of optimizing the solving path.
[0138] Then, during the parallel solving process of multiple solvers, there may be a situation of insufficient solving resources, that is, due to the limitation of solving resources, multiple solvers cannot perform parallel solving. Then, when solving multiple solvers, it is necessary to allocate solving resources.
[0139] If the number of solving resources is not less than the number of target paths, that is, the number of solving resources is not less than the number of solvers, then corresponding solving resources can be allocated to each solver respectively. At this time, multiple solvers can achieve parallel solving, and only the solving resources adapted to each solver need to be determined; if the number of solving resources is less than the number of target paths, that is, the number of solving resources is less than the number of solvers, then during the solving process of multiple solvers, at least some solvers cannot perform parallel solving with other solvers, and this requires the allocation of solving resources.
[0140] Specifically, if the number of solving resources is less than the number of target paths, determine the first group of target paths and the second group of target paths. The first group of target paths are the target paths that are allocated solving resources for solving, and the second group of target paths are the target paths that are not allocated solving resources; use the solving resource information for solving the target paths in the first group of target paths based on the solving resources to determine the resource allocation information for solving the target paths in the second group of target paths, so as to solve the second target path in the second group of target paths based on the resource allocation information after at least the first target path in the first group of target paths is solved.
[0141] When the number of solving resources is less than the number of target paths, that is, the target paths of some solvers can be processed in parallel. Only after at least one of the solvers in the parallel processing is solved, there will be idle solving resources to solve the target paths corresponding to the remaining solvers. Therefore, the target paths corresponding to multiple solvers are divided into two parts, namely the first group of target paths and the second group of target paths. The first group of target paths are the target paths that are allocated solving resources and can be solved in time, and the second group of target paths are the target paths that are not allocated solving resources. It is necessary to wait until a target path in the first group of target paths is solved, and then use the solving resources of the solved target path to solve the target paths in the second group of target paths.
[0142] In the solution process of each target path in the first group of target paths, the resource allocation information for solving each target path in the second group of target paths can be determined based on the information of the solution resources allocated to each target path in the first group of target paths currently.
[0143] Among them, the information of the solution resources allocated to each target path in the first group of target paths can be: the solution efficiency of the solution resources, etc. Based on the information of the solution resources allocated to each target path in the first group of target paths and combining with the solution status information of each target path in the first group of target paths, the solution speed of each target path in the first group of target paths can be predicted, so as to determine the solution resources that first complete the solution task of the target paths in the first group of target paths, and allocate these solution resources, so that when solving the target paths in the second group of target paths, the target paths in the second group of target paths can be solved according to the allocated result; and, as the solution of each target path in the first group of target paths deepens, the predicted solution resources that first complete the solution task of the target paths in the first group of target paths can be dynamically adjusted, and the solution resources for the target paths in the second group of target paths can be re-allocated based on the dynamically adjusted solution resources.
[0144] In addition, it can also be: in the solution process of each target path in the first group of target paths, based on the information of the solution resources allocated to each target path in the first group of target paths, combining with the first solution information of each target path in the first group of target paths and the second solution information of each target path in the second group of target paths, predict the target paths in the second group of target paths that do not need to be solved continuously, and only allocate solution resources to the remaining target paths in the second group of target paths.
[0145] The first solution information of each target path in the first group of target paths can be: the feasible solutions of each target path in the first group of target paths, and the second solution information of each target path in the second group of target paths can be: the relaxation solutions of each target path in the second group of target paths.
[0146] Compare the feasible solutions of each target path in the first group of target paths with the relaxation solutions of each target path in the second group of target paths. If it is determined that the feasible solution of the first target path in the first group of target paths is better than the relaxation solution of the second target path in the second group of target paths, it can be determined that there is no need to allocate solution resources to the second target path in the second group of target paths, that is, the second target path in the second group of target paths does not need to be calculated, so as to achieve the purpose of optimizing resource allocation and avoid waste of solution resources.
[0147] The schematic diagram of the data processing method disclosed in this embodiment can be as Figure 8As shown in the figure, it includes: multiple solvers and a global conflict graph. Among them, the conflict information in the multiple solvers interacts with the information in the global conflict graph in real time. That is, when the conflict information in a certain solver changes, the global conflict graph will also be updated. In addition, the global conflict graph records the conflict information between variables, and the variables and the relationships between variables in the conflict information can be mapped to the solution space. The mapping relationship is represented by a dotted line between the global conflict graph and the solution space. In addition, various solution information in each solver, such as: feasible solutions, relaxed solutions, historical records, etc., as well as solution algorithm information, can be stored in the storage space. The solver can interact with the storage space to store the solution information in the storage space or obtain the information in the storage space to achieve dynamic adjustment of the solution path. By Figure 8 The schematic diagram shown can solve the supply chain parameters of the target object in the supply chain scenario.
[0148] The data processing method disclosed in this embodiment, when it is necessary to solve the supply chain parameters of the target object in the supply chain scenario, obtains at least one target variable corresponding to the supply chain parameters and the constraint conditions between at least one target variable, uses multiple solvers to determine the global conflict graph, and during the solution process, determines the target path corresponding to each solver based on the global conflict graph, so as to solve the target path in each solver respectively, ensuring that each solver only solves its corresponding target path. On the basis of ensuring parallel solution of multiple solvers, each solver only solves its corresponding target path, thereby improving the solution efficiency.
[0149] This embodiment discloses an electronic device, and its structural schematic diagram is as Figure 9 shown, including:
[0150] A processor 91 and a memory 92.
[0151] Among them, the processor 91 is used to obtain at least one target variable corresponding to the supply chain parameters of the target object, and the constraint conditions between at least one target variable. Among them, the target object is an object in the supply chain scenario, and the supply chain parameters are parameters that at least affect the efficiency of the supply chain event of the target object; use a solver to determine the global conflict graph based on at least one target variable and the constraint conditions. The global conflict graph includes the conflict relationships between multiple variables, and the conflict relationships are determined based on the constraint conditions or the prior knowledge of the target variables. The multiple variables include the target variables and the intermediate variables generated during the solution process of the target variables; determine the target path for solving the supply chain parameters based on the global conflict graph; solve based on the variables in the target path to determine the value of the supply chain parameters;
[0152] The memory 92 is used to store the program required for the processor to execute the above processing process.
[0153] The electronic device disclosed in this embodiment is implemented based on the data processing method disclosed in the above embodiment, which will not be elaborated here.
[0154] When the electronic device disclosed in this embodiment needs to determine the supply chain parameters of a target object, it is necessary to first obtain at least one target variable corresponding to the supply chain parameters of the target object and the constraint conditions between at least one target variable, and use a solver to determine a global conflict graph based on at least one target variable and the constraint conditions, so as to determine a target path for solving the supply chain parameters based on the global conflict graph, and only solve the target path, thereby determining the value of the supply chain parameters. By constructing a global conflict graph, this solution shows the conflict relationships between multiple variables involved in the solution process through the global conflict graph, so as to determine the target path and only solve the target path, improving the solution efficiency without having to solve the variables in all paths.
[0155] The embodiment of the present application also provides a readable storage medium, on which a computer program is stored. The computer program is loaded and executed by a processor to implement the steps of the above data processing method. The specific implementation process can refer to the description of the corresponding part of the above embodiment, and this embodiment will not be elaborated.
[0156] The present application also proposes a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementation manners of the above data processing method. The specific implementation process can refer to the description of the corresponding embodiment above and will not be elaborated.
[0157] In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
[0158] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits, or dedicated circuits, etc. However, for this application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of this application, in essence, or the part that makes contributions to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.
[0159] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0160] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)), etc.
Claims
1. A data processing method, comprising: obtaining at least one target variable corresponding to the supply chain parameters of a target object, and the constraint conditions between the at least one target variable, wherein the target object is an object in a supply chain scenario, and the supply chain parameters are parameters in the supply chain scenario that at least affect the efficiency of the supply chain events of the target object; using a solver to determine a global conflict graph based on the at least one target variable and the constraint conditions, wherein the global conflict graph includes conflict relationships between multiple variables, and the conflict relationships are determined based on the constraint conditions or prior knowledge of the target variables, and the multiple variables include the target variables and intermediate variables generated during the solution process of the target variables; determining a target path for solving the supply chain parameters based on the global conflict graph; solving based on the variables in the target path to determine the value of the supply chain parameters.
2. The method according to claim 1, wherein obtaining at least one target variable corresponding to the supply chain parameters of a target object, and the constraint conditions between the at least one target variable, at least includes one of the following: obtaining at least one spare part variable corresponding to the spare part parameters of the target object, and the constraint conditions between the at least one spare part variable; obtaining at least one production scheduling variable corresponding to the production scheduling parameters of the target object, and the constraint conditions between the at least one production scheduling variable; obtaining at least one logistics variable corresponding to the logistics parameters of the target object, and the constraint conditions between the at least one logistics variable.
3. The method according to claim 1, wherein determining a target path for solving the supply chain parameters based on the global conflict graph includes: determining a target path from the solution paths composed of at least one variable based on the conflict information corresponding to each variable in the global conflict graph, and the conflict information is at least related to the conflict relationships between variables; The solving based on the variables in the target path to determine the value of the supply chain parameters includes: solving based on the target path to determine the values of the at least one target variable, so as to determine the value of the supply chain parameters of the target object based on the values of the at least one target variable.
4. The method according to claim 3, wherein determining a target path from the solution paths composed of at least one variable based on the conflict information corresponding to each variable in the global conflict graph includes: determining the parameter values of the conflict relationships corresponding to the specific variables in each solution path in the global conflict graph; determining the solution status information of each solution path; determining a target path from the solution paths based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path.
5. The method according to claim 4, wherein determining a target path from the solution paths based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path includes: determining the score of each solution path based on the solution status information of each solution path and the parameter values of the conflict relationships corresponding to the specific variables in each solution path; Select a target path from the solution paths based on the scores of each of the solution paths.
6. The method according to claim 1, wherein the using the solver to determine a global conflict graph based on the at least one target variable and the constraint conditions includes: Constructing a local conflict graph and an initial global conflict graph based on the at least one target variable and the constraint conditions, the initial global conflict graph being composed of at least one local conflict graph; If it is determined that an infeasible state occurs during the solution process using the target solver in the solver, determining the variable corresponding to the infeasible state as a conflict node; Updating the target local conflict graph corresponding to the target solver based on the information corresponding to the conflict node; Updating the initial global conflict graph based on the updated target local conflict graph to obtain a global conflict graph.
7. The method according to claim 6, wherein the updating the initial global conflict graph based on the updated target local conflict graph includes: If it is determined that the variables in the updated target local conflict graph do not match the target variables in the initial global conflict graph, performing a variable restoration operation on the variables in the updated target local conflict graph to obtain a target local conflict graph after variable restoration, wherein the variables in the target local conflict graph after variable restoration match the target variables in the initial global conflict graph; Updating the target local conflict graph after variable restoration to the initial global conflict graph.
8. The method according to claim 1, wherein the number of solvers is multiple, and the determining a target path for solving the supply chain parameters based on the global conflict graph includes: Determining a target path corresponding to each solver based on the conflict information corresponding to a specific variable in each solution path in the global conflict graph, the target path corresponding to each solver being one of the solution paths corresponding to each solver.
9. The method according to claim 8, wherein the solving based on the variables in the target path includes: If the number of solving resources is less than the number of target paths, determining a first group of target paths and a second group of target paths, the first group of target paths being the target paths assigned to the solving resources for solution, and the second group of target paths being the target paths not assigned to the solving resources; Using the solving resource information for solving the target paths in the first group of target paths based on the solving resources to determine resource allocation information for solving the target paths in the second group of target paths, so as to solve the second target path in the second group of target paths based on the resource allocation information after at least the solution of the first target path in the first group of target paths is completed.
10. An electronic device, comprising: A processor is configured to obtain at least one target variable corresponding to supply chain parameters of a target object, and constraint conditions among the at least one target variable, where the target object is an object in a supply chain scenario, and the supply chain parameters are parameters in the supply chain scenario that at least affect the efficiency of a supply chain event of the target object; use a solver to determine a global conflict graph based on the at least one target variable and the constraint conditions, where the global conflict graph includes conflict relationships among multiple variables, the conflict relationships are determined based on the constraint conditions or prior knowledge of the target variable, and the multiple variables include the target variable and intermediate variables generated during the solution process of the target variable; determine a target path for solving the supply chain parameters based on the global conflict graph; solve based on the variables in the target path to determine the value of the supply chain parameters; A memory is configured to store a program required for the processor to execute the above processing procedure.
Citation Information
Cited By
Data optimization method and device and electronic equipment
CN122402556A