Method for generating execution information, electronic device, storage medium, and chip system

Through machine learning, optimized preprocessing unit sequence is generated, which solves the invalid preprocessing problem caused by the full traversal strategy in the solver, and improves the solution efficiency and response speed.

WO2024239711A1PCT designated stage expired Publication Date: 2024-11-28HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/075167
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-22
Filing Date
2024-02-01
Publication Date
2024-11-28

Smart Images

  • Figure CN2024075167_28112024_PF_FP_ABST
    Figure CN2024075167_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence and provides a method for generating execution information, an electronic device, a storage medium, and a chip system, which can improve the solving efficiency of a solver. The method comprises: determining a transition probability matrix corresponding to a target model through machine learning, wherein an element in the transition probability matrix represents the probability that one of a plurality of units is transfered to a next unit, and the plurality of units comprise N pre-processing units; and generating a pre-processing unit sequence based on the transition probability matrix, wherein the pre-processing unit sequence is configured to define an execution sequence of at least one pre-processing unit.
Need to check novelty before this filing date? Find Prior Art

Description

Execution information generation method, electronic device, storage medium and chip system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 22, 2023, with application number 202310583839.1 and application name “Execution Information Generation Method, Electronic Device, Storage Medium and Chip System”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence technology, and in particular to an execution information generation method, electronic device, storage medium, and chip system. Background Art

[0003] Many practical problems encountered in real-world application scenarios, such as production scheduling, can be addressed using planning models such as linear programming. For example, supply chain production planning must meet objectives such as maximizing factory demand and minimizing total cost, while also satisfying the constraints specified by the actual business scenario. The complex relationships between production variables, objectives, and constraints can be summarized in a linear programming model. By solving this linear programming model, production strategy information can be obtained, allowing for the rational arrangement of production plans to better match output with demand, improve production efficiency, and avoid inefficient operations.

[0004] Solvers are one of the tools used to solve linear programming models. Currently, some solvers use a full-pass strategy during the preprocessing phase. For example, one open-source solver executes each preprocessing unit sequentially, with each unit executed for a fixed number of rounds. However, in real-world applications, different scenarios and problems require different preprocessing units. This full-pass strategy results in the execution of some ineffective but time-consuming preprocessing units, delaying the solution and reducing the solver's response speed.

[0005] Summary of the Invention

[0006] The present application provides an execution information generation method, electronic device, storage medium and chip system, which reduces the execution of invalid preprocessing units by optimizing the execution order of preprocessing units, saves the time consumed in the preprocessing stage, and thus improves the solution efficiency of the solver.

[0007] In the first aspect, the technical solution of the present application provides a method for generating execution information in the preprocessing stage of a solver, wherein the preprocessing includes executing N preprocessing units to simplify the target model, where N is an integer greater than 1, and the target model is constructed based on the problem to be solved in the application scenario, and the solver is used to solve the simplified target model; the method specifically includes: determining the transition probability matrix corresponding to the target model through machine learning; the elements in the transition probability matrix represent the probability that one unit in multiple units transfers to the next unit; the multiple units include N preprocessing units; based on the transition probability matrix, a preprocessing unit sequence is generated; the preprocessing unit sequence is used to limit the execution order of at least one preprocessing unit. In this way, a corresponding preprocessing unit sequence is generated according to the transition probability matrix to obtain an optimized sequence, and model simplification is performed according to the preprocessing sequence, which can reduce the execution of invalid preprocessing units, reduce the time consumed by the preprocessing process, improve the solution efficiency, and thus speed up the solver's response to actual problems.

[0008] As one possible implementation, determining the transition probability matrix corresponding to the target model includes: constructing a first bipartite graph corresponding to the target model; obtaining a first eigenvector based on the first bipartite graph; inputting the first eigenvector into a first neural network; and generating a first transition probability matrix based on the output of the first neural network. Constructing a bipartite graph for the target model and obtaining eigenvectors based on the bipartite graph allows for the extraction of relationships between nodes in the target model using the bipartite graph structure and reflecting them in the eigenvectors, thereby enabling the integration of planning problems with neural networks.

[0009] As a possible implementation method, the multiple units include 1 empty unit and N preprocessing units; based on the transition probability matrix, a preprocessing unit sequence is generated, including: selecting the first unit according to the N+1 probability values ​​corresponding to the empty unit in the transition probability matrix; wherein the N+1 probability values ​​corresponding to the empty unit are the probability values ​​of the empty unit transferring to 1 empty unit and N preprocessing units respectively; when the first unit is an empty unit, an empty sequence is generated; when the first unit is a non-empty unit, selecting the i+1th unit according to the probability values ​​of the N+1 elements corresponding to the i-th unit; wherein the probability values ​​of the N+1 elements corresponding to the i-th unit are the probability values ​​of the i-th unit transferring to 1 empty unit and N preprocessing units respectively, 1≤i≤N; when the i+1th unit is an empty unit, stopping sequence generation and taking the sequence composed of the first i units as the preprocessing unit sequence. This implementation provides a practical logical mechanism for generating sequences based on a transition probability matrix. The empty unit serves as an end identifier. After its introduction, the neural network can learn the transfer relationship between each preprocessing unit and the end identifier, so that when there is no need to execute subsequent preprocessing units, the execution can be stopped in time, saving time.

[0010] As a possible implementation, the i+1th unit is selected based on the probability values ​​of the N+1 elements corresponding to the i-th unit. This includes: generating the i-th random probability value corresponding to the i-th unit based on probability sampling; dividing [0, 1] into multiple intervals corresponding to the N+1 elements; determining the interval to which the i-th random probability value belongs as the sampling interval, and selecting the next unit pointed to by the element corresponding to the sampling interval as the i+1th unit. This selection method based on probability sampling ensures that each preprocessing unit has an equal chance of being selected. This allows for full learning during the training phase based on the feedback provided by various sequences, thus avoiding underfitting.

[0011] As one possible implementation, after generating the preprocessing unit sequence, the method further includes: if the currently generated preprocessing unit sequence is not an empty sequence, executing the corresponding preprocessing units in sequence according to the execution order defined by the preprocessing unit sequence to simplify the target model. In this implementation, after providing the preprocessing unit sequence, a simplification service is also provided to meet the diverse needs of users.

[0012] As a possible implementation, after simplifying the target model, the method further includes: obtaining a second bipartite graph corresponding to the simplified target model; performing graph embedding via a graph neural network based on the simplified second bipartite graph to obtain a second eigenvector; inputting the second eigenvector into the first neural network; generating a second transition probability matrix based on the output of the first neural network; generating a second preprocessing unit sequence based on the second transition probability matrix; the second preprocessing unit sequence is used to limit the execution order of the preprocessing units in the second round of model simplification. The output of the preprocessing unit sequence is at least one round, and the output of multiple rounds of the sequence can be used to perform multiple rounds of simplification on the target model, resulting in a more comprehensive simplification effect.

[0013] As a possible implementation, the method includes a training phase and an application phase. During the training phase, after obtaining the bipartite graph corresponding to the simplified target model, the method further includes: determining a first value based on the degree of simplification of the second bipartite graph compared to the first bipartite graph; determining the value of a first reward function based on the first value; and backpropagating the value of the first reward function to the first neural network to update the parameters of the first neural network. The first reward function is equivalent to the feedback of the environment to the simplification action. Through this feedback, the first neural network can determine the direction of parameter adjustment and thus adjust the parameters.

[0014] As a possible implementation, after generating the preprocessing unit sequence, the method further includes: if the preprocessing unit sequence is an empty sequence, stopping model simplification and using a solver to solve the simplified target model. Providing a solution service can meet the user's solution needs.

[0015] As one possible implementation, during the training phase, after using a solver to solve the simplified target model, the method further includes: determining a second value based on the solver's efficiency in solving the simplified target model; determining a value of a second reward function based on the second value; and backpropagating the value of the second reward function to the first neural network to update parameters in the first neural network. The second reward function is equivalent to feedback from the environment regarding the entire solution action (including preprocessing). Through this feedback, the first neural network can determine the direction of parameter adjustment and subsequently adjust the parameters.

[0016] As a possible implementation, the first neural network includes an input layer, an output layer, and at least two hidden layers.

[0017] As a possible implementation, the first neural network includes at least one of a multi-layer perceptron (MLP), a fully connected neural network (FCNN), a feedforward neural network (FNN), and a back-propagation neural network (BP). This implementation provides a practical and feasible specific network structure of the first neural network.

[0018] As a possible implementation, machine learning, including reinforcement learning, is employed; the first neural network is deployed within the reinforcement learning agent. During research, the inventors discovered that solving the MP problem using a reinforcement learning-based network architecture achieves superior training results compared to other machine learning techniques. For specific results, please refer to the detailed description of the embodiments.

[0019] As a possible implementation, during the reinforcement learning training phase, the deep reinforcement learning PPO algorithm is used to train the first neural network. The PPO algorithm training mechanism has better training effects than a single value mechanism or policy mechanism.

[0020] In a second aspect, the technical solution of the present application also provides an electronic device for sending data through a data transmission interface, the electronic device comprising: one or more processors; a memory; at least one application; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute a method as described in any one of the first aspects above.

[0021] In a third aspect, the technical solution of the present application further provides a storage medium comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute any of the methods described in the first aspect above.

[0022] In a fourth aspect, the technical solution of the present application also provides a chip system, comprising: a communication interface for inputting and / or outputting data; a processor for executing a computer executable program so that a device equipped with the chip system executes a method as described in any one of the above-mentioned first aspects.

[0023] The execution information generation method, electronic device, storage medium and chip system provided in the embodiments of the present application use machine learning to obtain a transition probability matrix that can achieve better model simplification effect and / or solution efficiency for different models, and then generate a corresponding preprocessing unit sequence based on the transition probability matrix to obtain an optimized sequence. Executing model simplification according to the preprocessing sequence can reduce the execution of invalid preprocessing units. Compared with the fixed execution order and number of execution rounds in the full traversal strategy, the solution proposed in the present application, while ensuring the model simplification effect, further reduces the consumed time, improves the solution efficiency, and thereby speeds up the speed at which the solver responds to actual problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is an example diagram of the LP solver solution process;

[0025] FIG2 is a flowchart of the presolve execution process in the solver in the related art;

[0026] FIG3 is an example diagram of a preprocessing process using a heuristic preprocessing operator selection based on expert experience in the related art;

[0027] FIG4 is a diagram illustrating an example of a system architecture of the method proposed in an embodiment of the present application;

[0028] FIG5 is a schematic diagram of a flow chart of a method proposed in an embodiment of the present application;

[0029] FIG6 is an example diagram of determining a preprocessing unit sequence based on probability sampling in a method provided in an embodiment of the present application;

[0030] Figure 7 is a bipartite graph of the relationships between the Presolve operators of the open source solver Clp;

[0031] FIG8 is a flowchart illustrating an example of a training phase of a method according to an embodiment of the present application;

[0032] FIG9 is a flowchart illustrating an example of a method provided in an embodiment of the present application during the deployment phase;

[0033] FIG10 is a flowchart illustrating an example of a method for integrating a training phase and a deployment phase according to an embodiment of the present application;

[0034] FIG11 is an example of a Presolve operator transition probability matrix in an embodiment of the present application;

[0035] FIG12 is an example diagram of determining a preprocessing unit sequence based on a transition probability matrix;

[0036] Figure 13 is an example diagram of the network architecture for reinforcement learning. DETAILED DESCRIPTION

[0037] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0038] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0039] The execution information generation method, electronic device, storage medium, and chip system provided in the embodiments of the present application can be applied to multiple application scenarios in multiple technical fields such as industrial production, logistics planning, supply chain, medical care, and cloud services. For example, they can be used to solve many practical problems such as supply chain production planning, production capacity simulation, facility site selection with capacity constraints, and shipping inventory routing.

[0040] Engineering optimization problems arise in various production operation scenarios. Various decision-making activities may involve resource allocation, often requiring the search for engineering planning solutions that maximize resource utilization efficiency or minimize total costs within predetermined objectives. Mathematical programming (MP) aims to solve the problem of maximizing or minimizing a specific objective within certain resource and conditional constraints. MP is a tool for addressing engineering optimization and other problems. It is a model constructed based on the complex relationships between variables, constraints, and objectives in actual application scenarios.

[0041] MP can be divided into many different branches, such as linear programming, nonlinear programming, multi-objective programming, dynamic programming, parametric programming, combinatorial optimization and mixed integer programming, stochastic programming, fuzzy programming, etc.

[0042] Among them, linear programming (LP): when the constraints and objectives are linear and all variables are continuous, the MP model is a linear programming LP model.

[0043] Mixed integer programming (MIP): When the constraints and objectives are linear and some variables have integer restrictions, the MP model is considered to be a mixed integer programming MIP model.

[0044] Linear programming is an important branch of optimization problems. Many practical problems encountered in operational research can be solved using linear programming. For example, the production planning problem of a supply chain needs to meet the goals of maximizing factory demand and minimizing total cost, while also meeting the hard and soft constraints specified by the actual business scenario. The model constructed based on these production planning requirements can be simplified to the following linear programming problem: min c T x; Ax=b; x≥0.

[0045] Where x is the variable, A is the constraint matrix, b is a vector whose size corresponds to the number of constraints, and c is a vector whose size corresponds to the number of variables.

[0046] Linear programming has extensive applications in real-world production scenarios. Take supply chain scheduling, for example. To ensure timely delivery to customers, product manufacturers must make rational decisions about production plans for each product. Therefore, scheduling lies in the middle of Huawei's supply chain, at the tail end of the planning domain. It plays a crucial role in bridging and coordinating the uncertainties of various upstream plans while also addressing downstream manufacturing and logistics constraints.

[0047] Some manufacturing companies produce a wide variety of products in their pan-network (B-end) product lines. The assembly relationships between these products are highly coupled, requiring joint decisions for all items and all factories. Practical problems are often large-scale, multi-objective optimization problems, aiming to formulate production, transportation, and delivery plan instructions over a period of time to optimize management indicators such as demand delivery, cost, information technology outsourcing (ITO), production balance, and plan stability. During this process, it is necessary to consider the production rules of each factory and production line, production capacity limits, raw material matching, and item substitution rules. As can be seen from this, production scheduling problems consider numerous constraints and are therefore generally considered to be typical of large-scale linear programming problems.

[0048] In recent years, with the rapid increase in the complexity and scale of actual business scenarios, MP problems in some industries have become extremely large and complex, putting new demands on the tools used to solve the problems.

[0049] For example, the MP problem in industry has the following difficulties:

[0050] 1) Large scale, often the scale of variables and constraints exceeds the order of millions, or even reaches the order of tens of millions.

[0051] 2) Time is short, often requiring output solutions in minutes.

[0052] 3) Fast changes. Not only the input data changes quickly, but the iteration frequency of the model is also high.

[0053] Generally speaking, scale is considered one of the most fundamental challenges in this field, as increasing scale increases the difficulty of resolving other bottlenecks. This technological trend places new demands on solver performance.

[0054] Solvers are software packages for solving MP problems. Solvers are information-based tools used to find the optimal solution among feasible solutions. They typically address complex business scenarios with large amounts of data and numerous constraints. Currently, solvers are primarily categorized into two types: commercial and open source.

[0055] LP solvers are software packages for solving LP problems. MIP solvers are software packages for solving MIP problems.

[0056] In addition to being directly modeled as LP problems (i.e., LP models), various problems in real-world applications may also be modeled as other MP problems (i.e., MP models), such as MIP problems (MIP models). MIP problems can be relaxed into a series of LP problems for solution through techniques such as branch and bound. In a general MIP problem solution process, solving the LP problem is a crucial step in the overall MIP solution. Furthermore, many optimization algorithms, besides MIP problems, can be decomposed into a series of LP subproblems, which are then solved one by one. Therefore, in many real-world scenarios modeled as MP models, solving the LP problem is an indispensable step.

[0057] Since the LP solver is an integral part of the MIP solver, commercial solvers are typically released as a single LP / MIP solver. Generally speaking, in the embodiments of this application, when the MIP solver is mentioned, unless otherwise specified, it can be understood that the MIP solver includes the LP solver.

[0058] From the perspective of the MIP solver itself, it has the following characteristics:

[0059] There are many open-source MIP solvers, but their performance is often unstable and lags behind some commercial solvers. Furthermore, open-source solvers sometimes struggle to adapt to real-world MIP problems. For example, for a common supply chain scheduling problem, the average solution time for a native open-source solver is over four times that of a commercial solver.

[0060] Furthermore, traditional solver testing environments rely on public benchmark data, which differs significantly from real-world production data. Benchmark problems have fewer variables and constraints, making them relatively easy to solve. However, in real-world industrial data, models often have tens of millions of variables and constraints, and the constraint matrices are low-rank and ill-conditioned (mathematically unstable), making them more difficult to solve. Therefore, methods that can improve solver performance are essential. Effectively simplifying the complex original model, reducing the number of variables and constraints, and lowering the complexity of the solution, can positively impact solver performance.

[0061] For example, one known solver mentions Presolve and the addition of specific types of constraints. These specific types of constraints are directly recognized by the solver and can help improve the efficiency of the pre-solve module. Essentially, this allows users to identify specific types of constraints and variables based on the characteristics of the model, reducing the complexity of the solver's identification. Furthermore, other solvers have also added automatic parameter adjustment functionality, housed in the scaling module. This module is considered part of preprocessing and primarily functions to normalize parameters.

[0062] It can be seen that to deal with the scale problem of the MP model, a feasible technical means is to preprocess the model to be solved. The role of preprocessing is to simplify the model and then solve it to reduce the complexity of the solution.

[0063] Taking LP solvers as an example, they typically integrate both simplex and interior-point algorithms to address problems in different scenarios. Real-world LP problems are often large and contain numerous redundant variables and constraints. Simplifying the model using the Presolve module can significantly improve the efficiency of simplex or interior-point solvers, making it an indispensable component of the solver.

[0064] Referring to Figure 1, the preprocessing process for the LP solver may involve the following modules:

[0065] Preprocessing Module (Presolve): The Presolve module is added before solving. Its main function is to simplify the model, such as performing variable and constraint simplification, and returning an equivalent (or approximately equivalent within a given threshold) model that is more friendly to solving. This simplified model is called the presolved model. Solving based on the presolved model can reduce solution complexity.

[0066] Post-processing (Postsolve): After the solver obtains the solution of the presolved model, the Postsolve module is used to restore the solution of the presolved model to the solution of the original model.

[0067] Clean Up: If the presolved model is not completely equivalent to the original model, that is, the solution restored by the Postsolve module has not yet reached the optimal solution of the original model, the Clean Up module is required to perform additional iterative solutions to obtain the optimal solution of the original problem.

[0068] As shown in Figure 1, the general solution process of the LP solver is:

[0069] The original problem (original model M) is simplified using the Presolve module. The simplified model M' is then called the presolved model. The solution phase then begins, finding the optimal solution x' for the presolved model. The Postsolve module then converts the optimal solution of the presolved model into an optimal solution or approximate solution to the original problem. If the converted solution is not the optimal solution to the original problem, the Clean Up module performs additional iterations to find the optimal solution to the original problem.

[0070] It should be noted that many commercial MIP solvers will perform product updates on the MIP Presolve module. The MIP Presolve module generally refers to the preprocessing operations performed before the MIP problem solves a series of LP problems. The preprocessing operator of this module generally takes into account the property that the variables are integers. In order to distinguish this module from the Presolve module in the LP solver, in the embodiment of the present application, the MIP Presolve module is referred to as the Node Presolve module. The Node Presolve module is generally used to reduce the scale of the problem, increase the number of initial root node integer variables, and identify, convert and process specific constraints, thereby reducing the algorithm complexity of subsequent branches. The preprocessing at this stage permanently changes the problem, that is, all LP subproblem solutions in the MIP solver are based on the model after processing at this stage.

[0071] The execution information generation method provided in most embodiments of this application can be applied to the Presolve module of the LP solver (i.e., the Presolve module shown in Figure 1), which is equivalent to a technical improvement to the Presolve module. However, it is not excluded that this method can also be applied to other modules such as Node Presolve, and other embodiments can be obtained with adaptability. The following examples are mostly applied to the Presolve module of the LP solver.

[0072] The Presolve module is an essential component of commercial solvers and efficient open-source LP solvers. It consists of many specific operators (units). Typically, the Presolve module follows a common process, sequentially applying different operator operations. The execution flow can be summarized in Figure 2.

[0073] Specifically, after inputting the problem to be solved (i.e., the original unsimplified model), the Presolve module first executes some simple Presolve operators to simplify redundant variables and constraints, and then iterates some Presolve operators in a certain number of rounds and order.

[0074] For example, the Presolve module of an LP solver implements the following two functions:

[0075] 1. Delete redundant constraints and variables in the model, and tighten the upper and lower bounds of constraints and variables.

[0076] 2. If the model being solved has no feasible solution or the solution is unbounded, preprocessing can be used to make early judgments in some scenarios.

[0077] In some embodiments, the method proposed in the embodiments of the present application focuses on improving the preprocessing function 1. Therefore, it can be understood as studying how to select a combination process of preprocessing operators based on a scenario where the model has a feasible solution and the solution is bounded, so as to efficiently and effectively delete redundant constraints and variables of the model, and tighten the upper and lower bounds of constraints and variables, thereby accelerating the solution process and reducing the overall time required.

[0078] Taking Clp (Coin-or linear programming) as an example, Clp is an open source linear programming solver. The execution of the preprocessing operator (i.e., the Presolve operator) in its Presolve module is implemented through corresponding code, with a relatively fixed order and number of rounds. The specific operations of the multiple Presolve operators in Clp are shown in Table 1.1 below:

[0079] Table 1.1

[0080] Table 1.1 shows a total of 15 preprocessing operators. "make fixed," "test redundant," "dupcol," "twoxtwo," ..., and "duprow3" are the names of the preprocessing operators, and "Index" represents the index of each preprocessing operator. Short description briefly describes the operation performed by the corresponding preprocessing operator. Executing these preprocessing operators can simplify variables and constraints in the model.

[0081] Taking the "make fixed" operator as an example, the operation it performs is: if the upper and lower bounds of the variables in the solved model are numerically equal, then these variables are fixed and the columns containing the changed variables are deleted according to the fixed values.

[0082] It should be noted that in the embodiments of this application, an operator is a computing unit, and therefore, an operator can also be referred to as a "unit." The Presolve operator (preprocessing operator) is an operator used in the Presolve module to simplify the model. For example, Table 1.1 above shows 15 different preprocessing operators, namely "make fixed," "test redundant," ..., and "duprow3." Preprocessing operators can also be referred to as preprocessing units.

[0083] During the research process, the inventors found that commercial solvers or efficient open source solvers have the following characteristics in terms of the execution strategy of the Presolve module:

[0084] Currently, the execution flow strategy of the Presolve module of most solvers is the full traversal strategy. Different solvers adopt different processing methods to accelerate, and these processing methods also have their own problems:

[0085] Open source solvers: They generally execute operators sequentially, and each operator executes a fixed number of rounds.

[0086] Commercial solver: Given default parameters or a manual parameter setting interface, sales staff can set parameters based on their experience and execute various preprocessing operators based on the relevant parameters.

[0087] An advanced approach for commercial solvers: Different operators are merged based on heuristics. For example, referring to the process shown in Figure 3, the preprocessing operator selection is primarily based on heuristics based on expert experience. In this approach, the heuristics are fixed and black-box, with only an interface to enable or disable heuristic merging. This approach relies on human experience, and its reliability remains to be studied.

[0088] The inventors further discovered that different problems require different Presolve operators. The full-pass strategy commonly used in related technologies results in the execution of some ineffective but time-consuming Presolve operators. This prolongs the computational time of the preprocessing phase, slowing down the solution and affecting solution efficiency.

[0089] Furthermore, different Presolve operators influence each other, and the resulting presolved models are likely to be different depending on the order in which they are executed. This means that due to the mutual influence between operators, the execution order of operators and the number of rounds each operator executes may affect the degree of model simplification. Therefore, the traditional fixed-order or heuristic execution strategies mentioned above may not achieve the most effective model simplification, and there is room for further improvement in model simplification.

[0090] Therefore, how to better configure the execution process of different Presolve operators to complete the model simplification of the LP problem, on the one hand, improve the effectiveness of simplification, and / or, on the other hand, reduce the time consumption of the Presolve module, thereby improving the full-process solution performance of the LP problem, is a problem that needs to be solved in this technical field.

[0091] In view of this, an embodiment of the present application proposes a method for generating execution information in the solver preprocessing stage to solve the above problems.

[0092] This method proposes a method that uses a neural network to learn the transition probability matrix from one Presolve operator to the next Presolve operator, and then generates an adaptive Presolve operator sequence based on the probability matrix, thereby replacing the traditional Presolve operator sequence with a fixed order and number of rounds.

[0093] Illustratively, the method provided in the embodiment of the present application can be executed based on the system architecture shown in FIG4 .

[0094] The system architecture can be divided into a server and a client (user side). The server includes a first server for providing MP solver solution services, a second server for providing preprocessing services, an operations optimization platform for providing AI services, and a storage system for providing storage services.

[0095] Users can upload batch model data through terminal devices, and the server side can perform reinforcement learning model training on the batch model data together with the historical models stored in the operations optimization platform. After the data uploaded by the user is desensitized, it is stored on the operations optimization platform together with the model and solution result files used by the solver solution service in the first server and managed by the operations optimization platform. In one embodiment, the storage system can serve as an auxiliary storage system of the operations optimization platform. The entire system architecture can be deployed on the operations optimization platform, and the operations optimization platform provides data storage and management services.

[0096] Specifically, on the user side, the user uploads data of the actual problem to be solved in the application scenario through the terminal device. This data is also the data used to construct the target model to be solved. The target model can be one of the MP models, such as the LP model.

[0097] In some embodiments, the target model can be constructed on a user's terminal device, so that the data uploaded by the user through the terminal device can be the constructed target model. In other embodiments, the target model is constructed on a first server, and the user uploads data, and the first server constructs the corresponding target model based on the user's uploaded data.

[0098] The first server is equipped with a solver for solving the target model and provides solution services. The solver is a software package used to solve the target model. The solver simplifies the target model before solving it. The second server is responsible for providing a preprocessing operator sequence. Before solving the problem, the first server accesses the second server to obtain the preprocessing operator sequence.

[0099] In some embodiments, the method provided in this application combines multiple machine learning techniques such as reinforcement learning, multi-layer perceptron (fully connected neural network), and graph neural network. During the training phase and application deployment phase, a dynamic, multi-step loop approach is used to train and predict the neural network. Therefore, the preprocessing service provided by the second server is a dynamic, multi-step preprocessing service based on probability graphs and suitable for solvers.

[0100] In some embodiments, the core process of the execution information generation method provided in the embodiments of the present application can be implemented based on a second server. The second server can be provided with a configuration management module and a training and deployment engine, wherein the training and deployment engine is used to train a neural network using user-uploaded models and historical models as training data sets, and use the trained neural network to predict the transition probability matrix, and output a preprocessing operator sequence based on the transition probability matrix through probability sampling.

[0101] The configuration management module provides an interface for adjusting various parameters of the training and deployment engines to make the training process more controllable.

[0102] The second server returns the preprocessing operator sequence (ie, the preprocessing unit sequence) to the first server. The first server simplifies the target model according to the preprocessing operator sequence and solves the simplified model.

[0103] When the first server and the second server are in operation, they can call the AI ​​services provided in the operations optimization platform, and various data generated by the first server, the second server and the operations optimization platform during operation can be stored in the storage system.

[0104] The first server and the second server can be implemented based on different independent servers or different server clusters. In other embodiments, the first server and the second server can be integrated into the same server or the same server cluster.

[0105] An operations optimization platform is a comprehensive platform that provides AI-related services. For example, ModelArts is a one-stop AI platform for developers. It provides massive data preprocessing and interactive intelligent annotation, large-scale distributed training, automated model generation, and on-demand deployment of end-edge-cloud models for machine learning and deep learning. It assists users in creating and deploying models and managing the entire AI workflow.

[0106] The storage system may be a large-scale distributed storage system. For example, the storage system may be a storage system that provides an object storage service (OBS), which allows users to store data of any type and size.

[0107] The execution information generation method proposed in the embodiment of the present application effectively utilizes the mutual influence relationship between the Presolve operator and the Presolve operator, thereby providing an effective and efficient Presolve execution process. The process is mainly divided into two parts: constructing a Presolve transition probability matrix and constructing a Presolve operator sequence based on the Presolve transition probability matrix.

[0108] In some embodiments, the method proposed in the embodiments of the present application can be applied to the Presolve module, which is equivalent to obtaining an improved Presolve module. The improved Presolve module can be used to replace the Presolve module in the existing LP solver to achieve more effective and efficient model simplification.

[0109] Specifically, referring to FIG5 , the execution information generation method proposed in the embodiment of the present application may include the following steps:

[0110] 501, determining the transition probability matrix corresponding to the target model through machine learning;

[0111] 502. Generate a preprocessing unit sequence based on the transition probability matrix.

[0112] Before executing step 501, it is necessary to first determine the target model. The target model is the original planning model to be simplified, constructed based on the problem to be solved in the application scenario. The target model can be any MP model, such as the LP model or the MIP model. The target model can be a historical model or a newly created model that has never been solved.

[0113] After determining the target model, it is necessary to construct a bipartite graph (also called a factor graph, bipartite graph) corresponding to the target model, and then generate the feature vectors of each node based on the bipartite graph through representation learning.

[0114] In some embodiments, representation learning can specifically be performed based on a bipartite graph, using a graph neural network to perform graph embedding to obtain a feature vector.

[0115] The feature vector is then input into the first neural network, and the first neural network outputs a transition probability matrix.

[0116] The transition probability matrix consists of multiple elements, each representing the probability of transitioning from one unit to the next. Specifically, an element in the transition probability matrix represents the probability that the next unit will be executed after the current unit completes execution. A unit is any one of the multiple units, which include N preprocessing units.

[0117] A preprocessing unit, also known as a preprocessing operator or presolve operator, is a unit that represents an operator. Multiple units represent multiple operators. A preprocessing unit sequence, also known as a presolve operator sequence, defines the execution order of at least one preprocessing unit (presolve operator).

[0118] The number of preprocessing units is N, meaning the Presolve module includes N preprocessing operators. The preprocessing process involves executing multiple preprocessing units sequentially, following the execution sequence of the preprocessing units, to simplify the target model. N is an integer greater than 1.

[0119] After determining the transition probability matrix, in some embodiments, probability sampling can be used to generate a corresponding preprocessing unit sequence based on the transition probability matrix. The probability sampling method can be simple random sampling, systematic sampling, stratified sampling, etc.

[0120] Specifically, in some embodiments, a null operator (null cell) is introduced. The multiple cells described above include one null cell and N preprocessing cells. The transition probability matrix includes N+1 elements corresponding to the null cell, representing the probability values ​​of the null cell transferring to one null cell and N preprocessing cells, respectively. In the transition probability matrix, the probability values ​​of the N+1 elements corresponding to the i-th cell are the probability values ​​of the i-th cell transferring to one null cell and N preprocessing cells, respectively, where 1≤i≤N.

[0121] In this case, step 502 may specifically include the following operations:

[0122] According to the N+1 probability values ​​corresponding to the empty unit in the transition probability matrix, the first unit is selected; if the first unit is an empty unit, an empty sequence is generated; if the first unit is a non-empty unit, the i+1th unit is selected according to the probability values ​​of the N+1 elements corresponding to the i-th unit; if the i+1th unit is an empty unit, sequence generation is stopped, and the sequence composed of the first i units is used as the preprocessing unit sequence.

[0123] Among them, according to the probability value of the N+1 elements corresponding to the i-th unit, the i+1-th unit is selected. The i-th random probability value corresponding to the i-th unit can be generated based on probability sampling; then [0, 1] is divided into multiple intervals corresponding to the N+1 elements; the interval in which the i-th random probability value falls is defined as the sampling interval, and the next unit pointed to by the element corresponding to the sampling interval is selected as the i+1-th unit.

[0124] For example, suppose N is 2, and the ith unit corresponds to 3 elements P i 0 、P i 1 and P i 2 , the probability values ​​are 0.1, 0.3 and 0.6 respectively, indicating that the probability of the i-th unit transferring to the empty unit is 0.1, the probability of transferring to the first unit is 0.3, and the probability of transferring to the second unit is 0.6. Referring to Figure 6, these three elements divide [0,1] into three intervals, namely [0,0.1) [0.1,0.4) [0.4,1). Then, using simple random sampling, a probability value is randomly generated. Assuming that the randomly generated probability value is 0.7, the interval where 0.7 falls is [0.4,1), then this interval is the sampling interval, and the corresponding element is P i 2 , P i 2The next unit pointed to is the second unit, which is the i+1th unit. The three elements shown in Figure 6 are only for illustrative purposes. In actual application scenarios, the number of elements may reach dozens, hundreds, or even thousands.

[0125] It should be noted that, in the process shown in FIG5 , operations such as constructing a target model, simplifying, and solving are only auxiliary explanations and are not necessary technical features of the method provided in the embodiment of the present application. As can be seen from the system architecture shown in FIG4 , steps 501 and 502 can be implemented based on an independent execution entity (i.e., the second server), and operations such as model simplification and solving can not be performed in the execution entity, so simplification and solving operations are not necessary technical features. That is, the method consisting of steps 501 and 502 can be used as an independent service or in the form of an independent product for users.

[0126] For example, the method provided in the embodiments of the present application can be transformed into an online service that receives user-provided data, outputs a preprocessing unit sequence based on the method provided in the embodiments of the present application, and provides feedback to the user. In other words, the method can be a software product that provides a preprocessing unit sequence and is compatible with commercial or open source solvers, thereby solving user needs through collaboration with commercial or open source solvers.

[0127] In some embodiments, after the preprocessing unit sequence is generated, if the currently generated preprocessing unit sequence is a non-empty sequence, the corresponding preprocessing units are executed in sequence according to the execution order defined by the preprocessing unit sequence to simplify the target model.

[0128] During the training phase, as shown in FIG5 , after simplifying the target model, the function value of the first reward function is calculated according to the degree of simplification and back-propagated to the first neural network to update the parameters of the first neural network according to the value of the first reward function.

[0129] To avoid confusion and provide a clear description, in the embodiment of the present application, the reward function corresponding to the simplification operation is defined as the first reward function; the reward function corresponding to the solution operation is defined as the second reward function.

[0130] Specifically, the first reward function is determined based on the degree of change in the bipartite graph of the target model before and after simplification. After performing one round of simplification on the target model, the bipartite graph corresponding to the simplified target model is reconstructed. To prevent confusion, the bipartite graph after one round of simplification is defined as the second bipartite graph, and the bipartite graph before simplification is defined as the first bipartite graph. The first value is determined based on the degree of simplification of the second bipartite graph compared to the first bipartite graph.

[0131] The first value is a quantitative value representing the degree of simplification. For example, the first value can be the ratio or difference between the number of edges and nodes in the second bipartite graph and the number of edges and nodes in the first bipartite graph, or the ratio of the number of deleted nodes and edges to the total number of original edges and nodes. The first value is an independent variable of the first reward function.

[0132] For example, in one feasible solution, the first reward function can be the difference in model size (e.g., the number of non-zero elements in the constraint matrix) before and after the simplification operation. Specifically, the first value can be the difference in model size (e.g., the number of non-zero elements in the constraint matrix) before and after the simplification operation, and the first reward function is equal to the first value.

[0133] It should be noted that after the first round of model simplification is performed, if the preprocessing unit sequence generated in the first round is not empty, then the next round of simplification will be repeated based on the current simplified model.

[0134] For example, the second round of operations is as follows:

[0135] A second bipartite graph corresponding to the simplified target model is obtained; based on the simplified second bipartite graph, graph embedding is performed through a graph neural network to obtain a second eigenvector; the second eigenvector is input into the first neural network; based on the output of the first neural network, a second transition probability matrix is ​​generated; based on the second transition probability matrix, a second preprocessing unit sequence is generated; the second preprocessing unit sequence is used to limit the execution order of the preprocessing units in the second round of model simplification.

[0136] To prevent confusion, the eigenvector, transfer probability matrix, and preprocessing unit sequence in the first round of operation are defined as the first eigenvector, the first transfer probability matrix, and the first preprocessing unit sequence, respectively. Correspondingly, the corresponding definitions in the second round of operation are defined as the second eigenvector, the second transfer probability matrix, and so on.

[0137] The above is only an example of the first two rounds of operations. During the actual operation, at least one round of model simplification operations can be performed. In each round of operation, based on the bipartite graph of the current model (which may be the model after the previous round of simplification), the feature vector is extracted and input into the first neural network. Then, according to the output transition probability matrix, a new preprocessing unit sequence is generated, and according to the new preprocessing unit sequence, a new round of simplification operations is performed, and the first reward function value of this round is fed back to the first neural network to update the parameters. In this way, the loop is executed in multiple steps until the generated preprocessing unit sequence is an empty sequence, and the model simplification is stopped. Then the solution link is entered, and the solver is used to solve the simplified target model.

[0138] It should be noted that the method provided in the embodiment of the present application involves multiple neural networks, among which the first neural network specifically refers to a neural network that takes a feature vector as input and directly or indirectly outputs a transition probability matrix.

[0139] In some embodiments, the first neural network includes an input layer, an output layer, and at least two hidden layers.

[0140] The first neural network can be a multilayer perceptron (MLP), a fully connected neural network (FCNN), a feedforward neural network (FNN), or a back propagation (BP) neural network. The definitions of MLP, FCNN, FNN, and BP neural networks may overlap. For example, the first neural network may be both an MLP and an FCNN.

[0141] Updating the parameters of the first neural network may include updating connection weights and biases.

[0142] As mentioned above, when the generated pre-processing unit is an empty sequence, the solution phase is entered. In some embodiments, during the training phase, after the simplified target model is solved by the solver, a second value is determined based on the efficiency of the solver in solving the simplified target model. The second value is a quantitative value representing the solution efficiency. For example, the solution efficiency can be directly expressed in terms of the solution time. The second value can be a value obtained based on the solution time, such as the solution time or the ratio of a predetermined constant to the solution time.

[0143] The second value is an independent variable of the second reward function, and the value of the second reward function can be calculated based on the second value. The value of the second reward function is back-propagated to the first neural network to update the parameters of the first neural network.

[0144] For example, in one feasible solution, the second reward function can be the total time taken to solve the problem (target model), where the total time is the sum of the time taken for each simplification step plus the time required to solve the problem after simplification. That is, the second value is the total time taken to solve the problem, and the second reward function is equal to the second value.

[0145] It should be noted that the back propagation of the first reward function value and the back propagation of the second reward function value are in an and / or relationship, that is, only one of them can be executed, or both can be executed.

[0146] In some embodiments, the value of the first reward function may be fed back to the first neural network only after model simplification is performed, without feeding back the value of the second reward function to the first neural network. In such embodiments, the first neural network is trained only based on the degree of model simplification. The neural network obtained under such training method, based on the sequence of preprocessing units generated thereby, will achieve positive results at least in terms of the degree of model simplification.

[0147] In other embodiments, only the value of the second reward function can be back-propagated to the first neural network, without feeding the value of the first reward function back to the first neural network. This training method is intended to improve the efficiency of the solution and significantly improve the solution performance.

[0148] In another embodiment, both the value of the first reward function and the value of the second reward function can be fed back. With this training method, the model simplification effect and solution performance are improved.

[0149] The method provided in the embodiments of the present application is intended to continuously learn, through machine learning, such as a neural network, the potential impact of the execution order of preprocessing operators on model simplification and / or model solution efficiency. Through training, an optimized execution order that achieves better model simplification and / or solution efficiency is obtained. The execution order is determined based on a transition probability matrix, which is obtained through machine learning.

[0150] The impact of the execution order of preprocessing operators on the simplification effect or solution efficiency can also be understood from another perspective as the impact of the mutual influence and relationship between preprocessing operators on the simplification effect or solution efficiency.

[0151] For example, taking the LP solver as an example, the relationships between the various Presolve operators in the LP solver are different and can be summarized into the following two categories:

[0152] After a Presolve operator is executed, if it effectively simplifies the model, it may activate the effectiveness of certain Presolve operators. The activation levels of these activated Presolve operators may also vary, and some activated Presolve operators can more effectively simplify the model.

[0153] After a Presolve operator is executed, regardless of whether it effectively simplifies the model, some Presolve operators will never be activated. These Presolve operators that cannot be activated are queued after the Presolve operator, and they will not be able to simplify the model but will waste time.

[0154] The solution provided in the embodiment of the present application effectively utilizes the mutual influence relationship between Presolve operators, thereby improving the processing performance of the Presolve module.

[0155] Specifically, taking the open source solver Clp as an example, this LP solver contains the 15 Presolve operators listed in Table 1.1. The relationship between these Presolve operators can be represented by the bipartite graph in Figure 7.

[0156] The two subsets in the bipartite graph are the effects set and the activation conditions set:

[0157] In the effects collection, the effects of each Presolve operator on the model are divided into the following three categories:

[0158] a) Reduce constraints: Operator operations remove constraints. For example, the operators with indices 1, 3, 4, 5, 6, 7, and 14 in Table 1.1 can be classified as reduce constraints.

[0159] b) Fix variables: Operator operations fix variables and delete columns. For example, the operators with indices 0, 2, 8, 10, 11, and 12 in Table 1.1 can be classified as fix variables.

[0160] c) Tight bounds: Operator operations tighten the upper and lower bounds. For example, the two operators with indices 9 and 13 in Table 1.1 can be classified as having tight bounds.

[0161] In the activation conditions set, the activation conditions for each Presolve operator execution are divided into the following four categories:

[0162] a) Bounds comparison: Operator activation requires comparing upper and lower bounds. For example, the operators with indexes 0, 1, 6, 9, and 12 in Table 1.1 can be classified as bounds comparisons.

[0163] b) Column coefficients: Operator activation is related to the coefficients of the column; for example, the two operators with index 2 and 8 in Table 1.1 can be divided into column coefficients.

[0164] c) Row coefficients: Operator activation is related to the coefficients of the row; for example, the three operators with indexes 4, 5, and 14 in Table 1.1 can be divided into row coefficients.

[0165] d) Non-zero entries: Operator activation is related to the number of non-zero entries in the row and column. For example, the five operators with indices 3, 7, 10, 11, and 13 in Table 1.1 can be classified as non-zero entries.

[0166] In Figure 7, if there is an edge connecting a class in the effects set with a class in the activation conditions set, it means that the operation of the operator in the effects class will activate the operator in the connected activation conditions class. Therefore, this bipartite graph reflects the mutual influence relationship between each Presolve operator:

[0167] If there is no edge between the effects class and the activation conditions class, the Presolve operator in the effects class can never activate the Presolve operator of the connected activation conditions class, so the transition probability is 0;

[0168] If there is an edge between the effects class and the activation conditions class, then the Presolve operator in the effects class may activate a Presolve operator in the connected activation conditions class. Therefore, the present embodiment proposes using machine learning to learn this transition probability, thereby reflecting the degree of this activation.

[0169] As shown in FIG8 to FIG10 , illustratively, the execution information generation method provided in the embodiment of the present application can be divided into two stages: an offline training stage and an online deployment stage.

[0170] In the offline training phase, it is responsible for offline training of the neural network. In the online deployment phase, it is responsible for using the trained neural network to predict the transition probability matrix of the Presolve operator and deploying it in the solver.

[0171] First, let's briefly explain the operation logic of the training phase, as shown in Figure 8:

[0172] During the offline training phase, a dynamic multi-step sequence generation method is used, as follows:

[0173] Select the historical model Hi.

[0174] The first neural network generates a transition probability matrix P, thereby generating a Presolve operator sequence S. If S is an empty sequence, the Presolve module is terminated and the solution module is entered. After the solution is completed, the reward function corresponding to the model solution efficiency (the second reward function) is returned to update the model parameters of the first neural network.

[0175] If S is a non-empty sequence, the Presolve module is entered to simplify the model, and the model Hi is updated to the simplified model Hi'. At the same time, the reward function (first reward function) corresponding to the degree of model simplification is returned, thereby updating the model parameters of the first neural network.

[0176] The process of outputting the transition probability matrix, generating the preprocessing unit sequence, and simplifying the model is repeated until the generated sequence is an empty sequence. The Presolve module terminates and enters the solution module.

[0177] Next, with reference to Figure 9, the operational logic of the deployment phase (application or testing phase) is briefly described:

[0178] Assume that the target model to be solved is M.

[0179] The first neural network generates a transition probability matrix P, which in turn generates a Presolve operator sequence S. If S is an empty sequence, the Presolve module terminates and the Solver module begins. If S is a non-empty sequence, the Presolve module continues to simplify the model. The model M' is updated to the simplified model.

[0180] The process of outputting the transition probability matrix, generating the preprocessing unit sequence, and simplifying the model is repeated until the generated sequence is an empty sequence. The Presolve module terminates and enters the solution module.

[0181] The following is a detailed description of the corresponding process using a specific embodiment, integrating the training phase and the deployment phase, with reference to Figure 10. Taking the LP solver as an example, the specific process can be as follows:

[0182] During the offline training phase:

[0183] T1, collect historical LP model files and construct training datasets.

[0184] For example, a historical model Hi is selected as the model used in the training phase, and a corresponding training data set is constructed. The model used in the training phase can be a historical model.

[0185] The process of constructing a training data set includes constructing a bipartite graph corresponding to the target model, and then obtaining a feature vector of the target model in its current state based on the bipartite graph. The feature vector can be directly input into the first neural network. Exemplarily, constructing a bipartite graph corresponding to the target model and then obtaining a feature vector of the target model in its current state based on the bipartite graph can specifically include the following process:

[0186] First, the simplified linear programming problem at the current time point (the simplified LP model) is extracted, and the linear programming problem is equivalently represented using a bipartite graph.

[0187] The nodes on one side of the bipartite graph are the constraints (rows) of the linear program, and the nodes on the other side are the variables (columns) of the linear program. The characteristics of the constraint nodes include the upper and lower bounds of the constraint; the characteristics of the variable nodes include the upper and lower bounds of the variable, as well as the weight of the variable in the objective function of the linear program. The edge connecting the constraint node and the variable node represents the non-zero value of the constraint matrix in that row and column of the linear program problem, and the weight on the edge represents the specific value of the constraint matrix in that row and column.

[0188] Then, the various structural features of the bipartite graph are counted and converted into feature vectors. For example, in one embodiment, 18 structural features of the bipartite graph are counted (see Table 1.2 below), which shows the 18 bipartite graph structural features used by the Presolve module. These specific structural features are normalized to form a fixed-length vector, which serves as the state vector (i.e., feature vector) of the LP model at that moment.

[0189] Table 1.2

[0190] T2, passes the feature vector to the first neural network and outputs the transfer probability matrix.

[0191] The input of the first neural network is a feature vector, but the output of the first neural network may not be in matrix form. Therefore, it is necessary to construct a transition probability matrix based on the output data, that is, to organize the output data, filter the row data or column data of the matrix, and then form a corresponding matrix.

[0192] T3, through probability sampling, generates a preprocessing unit sequence (Presolve operator sequence) according to the transition probability matrix.

[0193] In some embodiments, the preprocessing unit sequence can be composed of the index values ​​of multiple Presolve operators to be executed. Taking the multiple Presolve operators shown in Table 1.1 as an example, a preprocessing unit sequence of (3, 5, 8, 9, 13) means that the five preprocessing operators named "twoxtwo", "gubrow", "tighten action", "remove dual", and "slack singleton" are executed in sequence.

[0194] T4, the LP solver executes each preprocessing unit (Presolve operator) in sequence according to the preprocessing unit sequence to simplify the model.

[0195] After the model is simplified, the first reward function of the degree of model simplification is calculated and fed back to the first neural network.

[0196] It should be noted that, in some embodiments, each time a preprocessing unit sequence is generated, that is, after a round of model simplification is completed, the value of the first reward function is calculated and fed back to the first neural network to update its parameters;

[0197] In another embodiment, after performing multiple rounds of model simplification, that is, when the generated preprocessing unit sequence is an empty sequence, the value of the first reward function of the model simplification can be calculated and fed back to the first neural network.

[0198] The first neural network updates its own model parameters based on the value of the first reward function, for example, updating the edge coefficients and biases of the edges connecting neurons.

[0199] T5, the above step 4) is repeated cyclically until the generated preprocessing unit sequence is an empty sequence.

[0200] After a round of model simplification, the bipartite graph is regenerated based on the simplified model, and the eigenvectors of its each node are obtained and passed to the first neural network again to generate a new transition probability matrix distribution, thereby generating a new Presolve operator sequence (i.e., preprocessing unit sequence); the LP solver simplifies the model again according to the new Presolve operator sequence, and calculates the first reward function for feedback, or, after all preprocessing operator sequences are executed, calculates the first reward function and feeds back.

[0201] In the figure, the historical model Hi is simplified to obtain the model Hi'. After the simplification process is completed, the LP solver stops the preprocessing module and enters the subsequent solution module, where it calculates the second reward function for model solution efficiency and feeds it back to the neural network for training. In other words, the presolved model of Hi is solved and the value of its second reward function is evaluated.

[0202] Online deployment phase (application or testing phase):

[0203] A1, deploy the trained first neural network online;

[0204] A2: After the target model is input into the solver, the solver generates the problem to be solved, that is, the feature vector corresponding to the target model, and passes it to the trained first neural network to generate a transition probability matrix;

[0205] A3, based on the transition probability matrix, generates a sequence of Presolve operators;

[0206] A4, the LP solver performs model simplification according to the Presolve operator sequence.

[0207] A5: Generate the corresponding eigenvector based on the simplified model and pass it to the trained first neural network again to generate a new transition probability matrix, thereby generating a new Presolve operator sequence; the LP solver simplifies the model again based on the new Presolve operator sequence.

[0208] A6: Repeat steps A4-A5 until the generated Presolve operator sequence is empty. The LP solver stops the preprocessing module and enters the subsequent solution module to obtain the optimal solution for the model.

[0209] It should be noted that the numbers before the above steps, such as T1-T5, A1-A6, etc., are only for the convenience of distinguishing different steps to make the logic clearer. These step numbers are not used to limit the order of step execution.

[0210] Several specific embodiments are listed below to illustrate all or part of the solutions provided in the embodiments of the present application.

[0211] In one embodiment, the number of Presolve units owned by the LP solver is set to A, that is, N=A, and these operators are labeled as {1, 2, ..., A} in a certain order.

[0212] It should be noted that different solvers may have different types and numbers of Presolve operators. The above table 1.1 is only an example. The value of A depends on the actual number of Presolve operators in the solver.

[0213] Empty cells are introduced and marked as 0. When the Presolve sequence selects an empty operator, the sequence generation is stopped. It should be noted that, in this embodiment, the preprocessing unit sequence does not contain empty cells.

[0214] For example, in this embodiment, the transition probability matrix between the constructed Preosolve operators can be shown in FIG11 . In which, the element P in the matrix j i Represents the transition probability from Presolve operator j to Presolve operator i, that is, after executing Presolve operator j, the probability that the next operator executed is Presolve operator i.

[0215] It is worth noting that P0 i represents the probability that operator i is the starting operator (the first operator) of the sequence, and P j 0 Represents the probability that the Presolve operator j is the sequence termination operator (the last operator).

[0216] Next, based on the transition probability matrix shown in Figure 11, construct the Presolve operator sequence, as shown in Figure 12:

[0217] First, according to the probability distribution (P0 0 , P0 1 ,...,P0 A ) Generate the starting operator:

[0218] If the starting operator is 0, it is an empty sequence, the Presolve module terminates, and enters the solution module; if the generated starting operator is not 0, the generated starting operator is set to i1.

[0219] Then, according to the probability distribution (P i1 0 , P i1 1 ,...,P i1 A ) generates the second operator:

[0220] If the generated operator is 0, stop generating the sequence and enter the Presolve module with the current sequence {i1} to simplify the model; if the generated operator is not 0, set the generated operator to i2.

[0221] More generally, suppose that the sequence {i1, i2, ..., i j}, according to the probability distribution (P i1 0 , P i1 1 ,...,P i1 A ) Generate the j+1th operator: If the generated operator is 0, stop generating the sequence and use the current sequence {i1, i2, ..., i j} Enter the Presolve module to simplify the model; if the generated operator is not 0, set the generated operator to i j+1 , and loop to generate the next operator until the generated operator is 0, and stop generating the sequence.

[0222] It should be noted that what is generated in the sequence are the names, indexes or IDs of the operators, not the operators themselves. j} in i1, i j etc. all represent the ID or index of the operator. During execution, the solver will search for the corresponding operator based on the index or name in the sequence and perform the specific operation of the operator.

[0223] It should be noted that the dynamic multi-step operator sequence generation method is adopted in both the training and deployment states. In the preprocessing module, model simplification is performed dynamically in multiple rounds. That is, one round generates a preprocessing operator sequence, performs a model simplification, and then generates the next round of sequence, and performs the next round of model simplification. In this way, multiple steps of dynamic simplification are gradually performed, and the number of Presolve operators executed in each round is dynamically adjusted. This mechanism avoids the time-consuming training and deployment disadvantages of executing only one Presolve operator per round, and avoids the disadvantage of insufficient model simplification caused by the one-time generation of the Presolve sequence scheme through the neural network.

[0224] The embodiments of the present application propose an LP solver Presolve framework for dynamic multi-step operator sequence generation based on probability graphs. For example, in some embodiments, the solver Presolve framework can be deployed in a neural network architecture for reinforcement learning.

[0225] However, it should be noted that the application to reinforcement learning is only for illustrative purposes, and does not exclude the fact that the method proposed in the embodiment of this application (LP solver Presolve framework for dynamic multi-step operator sequence generation based on probability graph) can also be applied to other network architectures. Therefore, regardless of the underlying network architecture or the specific reinforcement learning strategy adopted, generating Presolve operators based on the distribution of the Presolve operator transition probability matrix or dynamically generating Presolve sequences in multiple steps falls within the scope of protection of this application.

[0226] The following uses reinforcement learning as an example to explain:

[0227] As shown in Figure 13, the reinforcement learning framework is divided into three parts: LP Solver, Presolve Agent, and PPO Trainer. The first neural network is deployed in the Presolve Agent, and the above method can be implemented based on the Presolve Agent.

[0228] LP Solver: Linear programming solver, used to read the linear programming model, select the presolve operator according to the action passed by the Presolve Agent, and perform the solution operation;

[0229] Presolve Agent: This preprocessing agent is responsible for obtaining the current state from the LP Solver, transforming the feature vector based on the current state, passing it to the first neural network, and outputting the probability transition matrix of the presolve operator. It then extracts the sequence of presolve operators to be executed next and passes it to the LP Solver. The Presolve Agent also obtains the reward after the previous action is executed from the LP Solver, thus forming a <state, action, reward> sequence that is later used to update the parameters of the first neural network.

[0230] Exemplarily, the first neural network may specifically be the MLP actor shown in FIG13 .

[0231] PPO Trainer: Uses the Proximal Policy Optimization (PPO) algorithm to update the neural network parameters based on the <state, action, reward> sequence collected by the Presolve Agent. The PPO algorithm is also known as Proximal Policy Optimization (PPO) for deep reinforcement learning.

[0232] These three modules work together to train the first neural network that meets the expected requirements based on the input model set.

[0233] It should be noted that the bipartite graph in part a) of the Presolve Agent represents a bipartite graph. The bipartite graph here is not the relationship bipartite graph between preprocessing operators, but the bipartite graph corresponding to the target model. The bipartite graph is converted from the probability graph of the target model. Part a) performs the representation learning process and extracts features based on the bipartite graph corresponding to the target model to obtain the feature vector of each node, where f1, f2, ..., f N is the eigenvector.

[0234] In Figure 13, min{c Tx|L≤Ax≤U,l≤x≤u} represents the linear programming model (target model), input represents input, presolve represents preprocessing, LP solve represents LP solution, output represents output, continue represents continue, routine represents routine, execute represents execution, and record data represents record data. bipartite graph represents a bipartite graph, feature vector represents feature vector, action represents action, extract features represents feature extraction, MLP actor represents the multilayer perceptron (MLP actor), inference probabilities represent reference probabilities, i.e., the transition probability matrix; probabilities P represents probability P, and actions a represents action a. clipped ratios represents clipping ratios, advantages represents the update amplitude in the gradient direction, entropies represents entropy, MLP critic represents the multilayer perceptron evaluation network, and evaluation represents the evaluation network. α and θ in Jv(α) and Jπ(θ) represent parameters to be updated, update represents update, and backpropagation represents backpropagation.

[0235] Based on the reinforcement learning framework, the specific implementation process may include:

[0236] The solver collects data problem instances and stores them in an instance set; trains the first neural network and deploys the trained first neural network online.

[0237] After the Presolve module is deployed online, graph embedding representation extraction is performed: the solver generates a graph-based problem description and uses a graph neural network to extract the graph embedding representation.

[0238] The Presolve module then executes: The transition probability matrix is ​​output by the first neural network (MLP actor) to obtain a sequence of Presolve operators for model simplification. If the model is effectively simplified, the simplified model is re-input into the neural network loop to continue simplification until the inferred sequence of Presolve operators is empty and the model cannot be simplified.

[0239] Enter the solution phase and complete the solution. After the solution is completed, the feasibility is judged and the solution quality is checked from multiple dimensions.

[0240] In summary, the embodiments of the present application propose a solver preprocessing framework based on a probability graph. Each time, the next execution operator is selected based on the previously executed preprocessing operator and the probability transfer matrix between operators, and a virtual operator is set as the stopping condition for preprocessing. The Presolve framework does not require setting any hyperparameters related to the sequence and number of rounds, and effectively utilizes the mutual influence between Presolve operators. At the same time, it can be deployed lightweight without a neural network.

[0241] Furthermore, this preprocessing mechanism employs a dynamic multi-step operator sequence generation method. Each time the neural network outputs an operator probability transition distribution based on the current model, it samples a preprocessing operator sequence for execution. This reduces the number of interactions with the neural network (reducing network overhead) while ensuring the effectiveness and efficiency of the Presolve module deletion.

[0242] An embodiment of the present application further provides an electronic device, which may include: a processor; a memory; at least one application; and one or more computer programs, wherein the one or more computer programs are stored in the memory and include instructions. When the instructions are executed, the electronic device may perform any of the methods described in the above embodiments.

[0243] An embodiment of the present application further provides a storage medium comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute a method as described in any one of the above embodiments.

[0244] An embodiment of the present application also provides a chip system, comprising: a communication interface for inputting and / or outputting data; and a processor for executing a computer executable program so that a device equipped with the chip system executes a method as described in any one of the above embodiments.

[0245] The following examples illustrate the technical effects that can be achieved by the solution provided in the embodiments of the present application by combining several practical application scenarios:

[0246] Application Scenario 1: Multi-factory production scheduling problem

[0247] Scheduling is a core issue in supply chain management. The following data is derived from real-world industrial scenarios. From a modeling perspective, scheduling is a typical large-scale, multi-objective, sparsely constrained, and multi-variable allocation problem. The inputs are user order requirements and existing processing resources, such as raw materials and production capacity. The output is a production plan based on order requirements, such as processing volume, transportation volume, and delivery volume. The desired output is to minimize processing costs and processing time while maximizing order fulfillment, meaning on-time and in-quantity delivery to meet customer needs. Furthermore, all constraints must be met, such as the material assembly relationship.

[0248] Comparison of technical effects:

[0249] Table 2.1

[0250] Please refer to Table 2.1, which shows the solution provided by the embodiment of this application, which is used with a self-developed solver (such as the Tianchou solver) to serve the supply chain in a real industrial scenario and solve the production scheduling problem of multiple factories.

[0251] Multi-factory production scheduling engine - small: When using the expert experience-based Presolve method (i.e., the default strategy in Table 2.1) for solving, the average solution time for the production scheduling problem for the entire data set is 5.45 seconds (i.e., end-to-end time). However, using the solution provided by the embodiment of this application (i.e., Online Presolve in Table 2.1) for solving, the average solution time for the entire data set is reduced to 3.24 seconds, saving 40% time and significantly improving solution efficiency. Small represents a small-scale production scheduling engine.

[0252] Multi-Plant Scheduling Engine - Medium (Generalization Test): The neural network (first neural network) trained using the Multi-Plant Scheduling Engine - Small dataset was deployed to the Multi-Plant Scheduling Engine - Medium to test generalization. The test results showed that when using the expert experience-based preprocessing method (i.e., the default strategy in Table 2.1) for solving the scheduling problem, the average solution time for the entire dataset was 36.4 seconds (end-to-end time). However, using the solution provided in the embodiments of this application, the average solver time for the entire dataset was reduced to 25.9 seconds, achieving a 29% improvement.

[0253] To verify the universality of the method in this application's embodiment, the same comparative test was conducted on the open source solver Clp. Please refer to Table 2.2, which shows the experimental results of the solution provided in this application's embodiment, combined with the open source solver Clp, on a multi-factory production scheduling problem dataset. It can be observed that the results are similar to those achieved on the self-developed solver.

[0254] Table 2.2

[0255] By observing Tables 2.1 and 2.2, it can be found that the solution provided by the embodiment of the present application has great benefits whether on the Tianchou solver or on the open source Clp solver.

[0256] After implementing the technical solution of the embodiment of the present application, the Presolve time is reduced and the LP solution time is increased. This is because the default strategy deletes more rows and columns than the solution of the present application (Online Presolve), so the time spent on LP solution is reduced, but the deleted rows and columns require more Presolve operators to operate, which greatly increases the Presolve and corresponding Postsolve time. Although the LP solution time is extended, the end-to-end time is reduced at a greater rate. For example, in the case of multi-factory production scheduling engine-medium, the end-to-end time using the default strategy is 51.17s, while the end-to-end time using Online Presolve is 40.27s, a reduction of 10.9s. This shows that the solution provided by the embodiment of the present application effectively balances the time of the Presolve module and the balance of the LP solution time affected by the Presolve model, thereby improving end-to-end efficiency.

[0257] Application scenario 2: Bidirectional capacity simulation problem

[0258] Capacity simulation is another core problem in supply chain management. This example is based on a real-world industrial scenario. This type of problem primarily addresses the planning domain. When formulating demand plans, planning often requires a longer cycle to facilitate resource preparation. However, the plans needed to guide actual operations typically operate at a daily granularity. For example, procurement plans require decisions about when and how many components to purchase. Similarly, processing plans require decisions about when and how many boards to produce, in which factory and production line, and so on. This type of problem aims to establish a planning model to address these needs, thereby matching supply capacity with the demand output from the planning department.

[0259] Table 3.1

[0260] Table 3.1 shows the solution provided by the embodiment of this application, which, in conjunction with the Tianchou solver, serves the online effect of supply chain bidirectional capacity simulation in real industrial scenarios:

[0261] Bidirectional capacity simulation - small: When using the Presolve method based on expert experience for solving (i.e., the default strategy in Table 3.1), the average solution time for the entire data set is 20.80 seconds; while using the solution provided by the embodiment of the present application (i.e., Online Presolve in Table 3.1) for solving, the average solver time for the entire data set is reduced to 14.17 seconds, achieving an optimization of 47.27%.

[0262] Bidirectional Capacity Simulation - Medium (Testing Generalization): The neural network trained using the Bidirectional Capacity Simulation - Small dataset was deployed on Bidirectional Capacity Simulation - Medium to test generalization. Using the expert experience-based Presolve method, the average solution time for the production scheduling problem for the entire dataset was 51.73 seconds. Using the solution provided in this embodiment, the average solver time for the entire dataset was reduced to 37.24 seconds, achieving a 28.0% improvement.

[0263] To verify the universality of the method presented in this application, we also tested it on the open-source solver Clp. Table 3.2 shows the experimental results of the solution provided in this application, deployed on the open-source solver Clp, on a dataset of a bidirectional capacity simulation problem. This demonstrates similar results to those achieved on the Tianchou solver.

[0264] Table 3.2

[0265] By observing Tables 3.1 and 3.2, we can see that the solution proposed in the embodiments of this application reduces both the Presolve time and the LP solution time on both the Tianchou solver and the open-source Clp solver, indicating that the agent has learned a more effective preprocessing strategy in less time. The solution proposed in the embodiments of this application improves the Presolve efficiency per unit time on this dataset, achieving better preprocessing results in less time and improving end-to-end efficiency.

[0266] Application Scenario 3: Facility Location Problem with Capacity Constraints

[0267] The facility location problem with capacity constraints is a common optimization problem in industrial production that involves selecting the optimal locations for facilities while taking into account their ability to meet customer demand. This problem instance, generated using open-source code, aims to minimize the total cost of setting up and operating a facility, as well as the transportation cost of supplying goods from the facility to customers.

[0268] Table 4.1

[0269] Table 4.1 shows the solution proposed in the embodiment of this application, and its effect on the facility location problem with capacity constraints when used in conjunction with the Tianchou solver:

[0270] Facility location problem - small: When using the expert experience-based Presolve method (i.e., the default strategy in Table 4.1) for solving, the average solution time for the entire data set is 27.98 seconds; while using the solution provided by the application embodiment (i.e., Online Presolve in Table 4.1), the average solver time for the entire data set is reduced to 25.64 seconds, achieving an 8.3% optimization.

[0271] Facility Location Problem - Large (Testing Generalization): The neural network trained on the Facility Location Problem - Small dataset was deployed on the Facility Location Problem - Medium to test generalization. Using the expert experience-based Presolve method (the default strategy), the average solution time for the production scheduling problem for the entire dataset was 79.03 seconds. Using the method proposed in this embodiment, the average solver time for the entire dataset was reduced to 68.77 seconds, achieving a 13% improvement.

[0272] Table 4.2

[0273] Similarly, to verify the effectiveness of the method in the embodiment of this application, we tested it on the open source solver Clp. See Table 4.2, which shows the experimental results of the solution proposed in the embodiment of this application, deployed on the open source solver Clp, on a dataset of facility location problems with capacity constraints. Table 4.2 shows that the results are similar to those on the Tianchou solver.

[0274] Observing Tables 4.1 and 4.2, it can be found that whether on the Tianchou solver or the open source Clp solver, the solution provided by the embodiment of this application turns off the Presolve function on this dataset, indicating that the agent has learned that Presolve will not achieve a positive effect on this dataset. In other words, in this application scenario, turning off the preprocessing module is more conducive to improving the solving efficiency of the model. This may be because when generating the preprocessing unit sequence, the sequence generated in the first round is an empty sequence, that is, the agent has learned that it does not need to execute any preprocessing operator. This greatly saves the time taken by Presolve, thereby improving end-to-end efficiency.

[0275] Application Scenario 4: Ocean Freight Inventory Routing Problem

[0276] The Maritime Inventory Routing Problem (MIRP) plays an indispensable role in global bulk cargo transportation. The open-source website (MIRLLIB) contains a large number of complex maritime transportation planning problems. It provides a publicly available test case library for the deterministic single-product maritime inventory routing problem, which involves inventory tracking at each port.

[0277] Table 5.1

[0278] Table 5.1 shows the solution provided by the embodiment of this application, and its effect on the online application of the Tianchou solver in the shipping inventory routing problem:

[0279] When the Presolve method based on expert experience (i.e., the default strategy in Table 5.1) is used for solving, the average solution time for the entire data set is 115.79 seconds; while when the method provided in the embodiment of the present application is used for solving (Online Presolve in Table 5.1), the average solver time for the entire data set is reduced to 96.98 seconds, achieving an optimization of 16.3%.

[0280] Table 5.2

[0281] Tests were also conducted on the open-source solver Clp. See Table 5.2, which shows the experimental results of the solution proposed in this embodiment, deployed on the open-source solver Clp, on the ocean shipping inventory routing problem dataset. Observe that the results are similar to those achieved on the Tianchou solver.

[0282] By observing Tables 5.1 and 5.2, it can be found that whether on the Tianchou solver or on the open source Clp solver, the solution proposed in the embodiment of the present application turns off the Presolve function on this data set, indicating that the intelligent agent understands that Presolve will not achieve good results on this data set, thereby improving end-to-end efficiency.

[0283] Application Scenario 5: Multi-Product Network Flow Problem

[0284] The multi-commodity network flow problem (MNF) is a complex planning problem that involves determining the optimal flow of multiple commodities through a network of interconnected nodes and arcs. Each commodity has a specific origin, destination, and volume that needs to be transported through the network. The goal of the MNF is to minimize the total transportation cost of all commodities subject to various constraints, such as flow conservation, arc capacity limits, and other operational constraints. This problem has numerous practical applications, such as in transportation, communications, and supply chain management.

[0285] Table 6.1

[0286] Table 6.1 shows the solution proposed in the embodiment of this application, and its effect on the multi-commodity network flow problem when used in conjunction with the Tianchou solver:

[0287] Multi-commodity network flow problem - small: When the expert experience-based Presolve method (i.e., the default strategy in Table 6.1) is used for solving, the average solution time for the entire data set is 2.24 seconds; while using the solution proposed in the embodiment of the present application (Online Presolve in Table 6.1) for solving, the average solver time for the entire data set is reduced to 1.36 seconds, achieving an optimization of 39.45%.

[0288] Multi-Commodity Network Flow Problem - Large (Generalization Test): The neural network trained on the Multi-Commodity Network Flow Problem - Small dataset was deployed on the Multi-Commodity Network Flow Problem - Medium to test generalization. Using the expert experience-based Presolve method, the average solution time for the production scheduling problem for the entire dataset was 5.71 seconds. Using the solution proposed in this embodiment, the average solver time for the entire dataset was reduced to 3.28 seconds, achieving a 42.54% improvement.

[0289] Table 6.2

[0290] Tests were also conducted on the open-source solver Clp. Table 6.2 shows the experimental results of the solution proposed in this embodiment, deployed on the open-source solver Clp, on a multi-commodity network flow problem dataset. Observe that the results are similar to those achieved on the Tianchou solver.

[0291] By observing Tables 6.1 and 6.2, it can be found that whether on the Tianchou solver or on the open source Clp solver, the solution proposed in the embodiment of the present application uses very little Presolve time on this data set to achieve a Presolve effect that is almost consistent with the default rule, thereby improving the Presolve efficiency and ultimately improving the end-to-end solution efficiency.

[0292] Through the above five application scenario examples, it can be found that the embodiments of the present application are not limited to a certain application scenario such as production scheduling problems, but have a certain degree of universality and can achieve positive technical effects in a variety of actual application scenarios, such as reducing Presolve time, reducing end-to-end time, and improving solution efficiency. As long as the application scenario requires solving MP problems (such as LP problems), the solutions proposed in the embodiments of the present application can be applied.

[0293] It should be noted that the solutions provided in the embodiments of the present application include any one or more of the execution information generation method, electronic device, storage medium and chip system, or may also be other forms of software products, hardware products or virtual service products obtained based on the technical concept of the method described in the specification of this application.

[0294] In the description of the device in the embodiment of the present application, various modules for implementing the method process functions are constructed in the device. The division of modules is merely a division of logical functions. When implementing the embodiment of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0295] Specifically, in actual implementation, each functional module can be fully or partially integrated into one physical entity, or physically separated. Moreover, these modules can all be implemented in the form of software called through processing elements; or all can be implemented in the form of hardware; or some modules can be implemented in the form of software called through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated into a chip of an electronic device. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. During the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or by instructions in the form of software.

[0296] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0297] An embodiment of the present application further provides an electronic device.

[0298] FIG11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

[0299] The electronic device 1100 includes a memory 1110 for storing computer program instructions and a processor 1120 for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps of the embodiment of the present application.

[0300] Specifically, in one embodiment of the present application, the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device executes the method steps described in the embodiment of the present application.

[0301] Specifically, in one embodiment of the present application, the processor of the electronic device may be a SOC, which may include a central processing unit (CPU) and may further include other types of processors. Specifically, in one embodiment of the present application, the processor of the electronic device may be a PWM control chip.

[0302] Specifically, in one embodiment of the present application, the processor involved may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded neural network processor (NPU), and an image signal processor (ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.

[0303] Specifically, in one embodiment of the present application, the memory of the electronic device may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.

[0304] Specifically, in one embodiment of the present application, the processor and the memory may be combined into a processing device, or more commonly, they may be independent components, with the processor being configured to execute program code stored in the memory to implement the method described in the embodiment of the present application. In a specific implementation, the memory may also be integrated into the processor or independent of the processor.

[0305] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.

[0306] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0307] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this application.

[0308] Specifically, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the embodiment of the present application.

[0309] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method provided in the embodiment of the present application.

[0310] The embodiment description in this application is described with reference to the flow chart and / or block diagram according to the method, equipment (device) and computer program product of embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processor of computer or other programmable data processing equipment produces the device for realizing the function specified in one flow chart flow chart or multiple flow charts and / or one block or multiple blocks of block diagram.

[0311] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0312] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0313] It should also be noted that, in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.

[0314] In the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the element.

[0315] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0316] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.

[0317] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0318] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0319] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection of the claims.

Claims

1. The execution information generation method in the solver preprocessing stage is characterized by: The preprocessing includes executing N preprocessing units to simplify the target model, where N is an integer greater than 1, the target model is constructed based on the problem to be solved in the application scenario, and the solver is used to solve the simplified target model; The method comprises: Determine a transition probability matrix corresponding to the target model through machine learning; the elements in the transition probability matrix represent the probability of one unit among multiple units transferring to the next unit; the multiple units include the N preprocessing units; Based on the transition probability matrix, a preprocessing unit sequence is generated; the preprocessing unit sequence is used to define the execution order of at least one preprocessing unit.

2. The method according to claim 1, characterized in that The determining of the transition probability matrix corresponding to the target model includes: Constructing a first bipartite graph corresponding to the target model; According to the first bipartite graph, obtaining a first eigenvector; Inputting the first feature vector into a first neural network; A first transition probability matrix is ​​generated according to the output of the first neural network.

3. The method according to claim 1, characterized in that The plurality of units include 1 empty unit and the N pre-processing units; The step of generating a preprocessing unit sequence based on the transition probability matrix comprises: Selecting a first unit according to the N+1 probability values ​​corresponding to the empty unit in the transfer probability matrix; wherein the N+1 probability values ​​corresponding to the empty unit are probability values ​​of the empty unit being transferred to the 1 empty unit and the N preprocessing units respectively; When the first unit is an empty unit, an empty sequence is generated; When the first unit is a non-empty unit, the i+1th unit is selected according to the probability value of the N+1 elements corresponding to the i-th unit; wherein the probability value of the N+1 elements corresponding to the i-th unit is the probability value of the i-th unit being transferred to the 1 empty unit and the N preprocessing units, respectively, 1≤i≤N; When the i+1th unit is an empty unit, the sequence generation stops and the sequence consisting of the first i units is used as the preprocessing unit sequence.

4. The method according to claim 3, characterized in that The selecting the i+1th unit according to the probability values ​​of the N+1 elements corresponding to the i-th unit includes: Based on probability sampling, generate the i-th random probability value corresponding to the i-th unit; Divide [0, 1] into multiple intervals corresponding to the N+1 elements; The interval to which the i-th random probability value belongs is determined as a sampling interval, and the next unit pointed to by the element corresponding to the sampling interval is selected as the i+1-th unit.

5. The method according to any one of claims 1 to 4, characterized in that After generating the preprocessing unit sequence, the method further includes: When the currently generated preprocessing unit sequence is a non-empty sequence, the corresponding preprocessing units are executed in sequence according to the execution order defined by the preprocessing unit sequence to simplify the target model.

6. The method according to claim 5, characterized in that After simplifying the target model, the method further includes: Obtain a second bipartite graph corresponding to the simplified target model; According to the simplified second bipartite graph, graph embedding is performed through a graph neural network to obtain a second eigenvector; Inputting the second feature vector into the first neural network; Generate a second transition probability matrix according to the output of the first neural network; Based on the second transition probability matrix, a second preprocessing unit sequence is generated; the second preprocessing unit sequence is used to limit the execution order of the preprocessing units in the second round of model simplification.

7. The method according to claim 6, characterized in that The method comprises a training phase and an application phase; In the training phase, after obtaining the bipartite graph corresponding to the simplified target model, the method further includes: determining a first value according to a degree of simplification of the second bipartite graph compared to the first bipartite graph; Determining a value of a first reward function according to the first value; Back-propagating the value of the first reward function to the first neural network, and updating the parameters of the first neural network.

8. The method according to claim 7, characterized in that After generating the preprocessing unit sequence, the method further includes: When the preprocessing unit sequence is an empty sequence, the model simplification is stopped, and the simplified target model is solved by using the solver.

9. The method according to claim 8, characterized in that In the training phase, after using the solver to solve the simplified target model, the method further includes: determining a second value according to a solution efficiency of the solver for solving the simplified target model; Determining a value of a second reward function based on the second value; The value of the second reward function is back-propagated to the first neural network to update the parameters of the first neural network.

10. The method according to any one of claims 1 to 4 and 6 to 9, characterized in that: The first neural network includes an input layer, an output layer and at least two hidden layers.

11. The method according to claim 10, characterized in that The first neural network includes at least one of a multi-layer perceptron MLP, a fully connected neural network FCNN, a feed-forward neural network FNN, and a back-propagation BP neural network.

12. The method according to any one of claims 1 to 4 and 6 to 9, characterized in that: The machine learning includes reinforcement learning; The first neural network is deployed in the reinforcement learning agent.

13. The method according to claim 12, characterized in that During the training phase of the reinforcement learning, a deep reinforcement learning PPO algorithm is used for training the first neural network.

14. An electronic device, characterized in that: The electronic device comprises: One or more processors; a memory; at least one application; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, cause the electronic device to perform the method as described in any one of claims 1-13.

15. A storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 13.

16. A chip system, characterized in that: include: A communication interface for inputting and / or outputting data; A processor, configured to execute a computer executable program so that a device equipped with the chip system executes a method as described in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Training method of moving sequence determination model and method and device for determining moving sequence

    CN114580748A

  • Accelerated solution method and device for set coverage problem, electronic equipment and storage medium

    CN114817848A

  • Pre-solving configuration method and device

    CN116050522A

  • Deep reinforcement learning for production scheduling

    US20220027817A1

  • A computer-implemented method for processing a complex problem

    WO2011051927A1

Cited By

  • Intelligent scheduling method based on multi-dimensional scale pre-decision and dynamic fine tuning

    CN121032025A