Training data generation method and system for automatic modeling of combinatorial optimization
By constructing a domain knowledge graph and extracting semantic features, the problem of insufficient diversity and authenticity of the combined optimization problem training data generation in the existing technology is solved, high-quality training data generation is achieved, and the performance of the automatic modeling system is improved.
Patent Information
- Application Number
- CN202411807081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-10
AI Technical Summary
The existing combination optimization problem training data generation method is difficult to accurately capture the structural characteristics of the problem, resulting in a lack of diversity and authenticity of the generated data, and it is difficult to deal with the reasonable allocation of objective function weights in multi-objective optimization problems, affecting the practicality of the data.
By obtaining the field knowledge of supply chain optimization, building triple relationships and domain ontology maps, extracting semantic features and converting them into structured optimization problem representations, performing model decomposition and standardization transformation, generating parameterized model examples, and performing structural and parameter perturbations. Generate training datasets in combination with semantic and structural similarity matrices.
The diversity and quality improvement of training data is achieved, the semantic consistency and practicality of the data are ensured, and the performance and scope of application of the automatic modeling system are improved.
Smart Images

Figure CN119294403B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data generation, and in particular to a training data generation method and system for combinatorial optimization automatic modeling. Background Art
[0002] With the rapid development of artificial intelligence technology, the modeling process of applying machine learning to combinatorial optimization problems has attracted more and more attention. Combinatorial optimization problems are widely present in many fields such as production scheduling, logistics distribution, resource allocation, etc., and their modeling process involves multiple links such as problem understanding, mathematical modeling, and solution strategy design. Traditional manual modeling methods are not only time-consuming and labor-intensive, but also easily limited by the experience and knowledge of modelers. Therefore, the development of an automatic modeling system for combinatorial optimization has important theoretical value and practical significance. However, the performance of the automatic modeling system depends largely on the support of high-quality training data, which makes the automatic generation of training data a key technical issue.
[0003] At present, the generation of training data for combinatorial optimization problems mainly adopts template-based methods and rule-based methods. Template-based methods use random sampling or heuristic algorithms to generate problem instances by pre-defining problem templates and parameter ranges. This type of method can quickly generate a large amount of data, but the generated data often lacks diversity and authenticity. Rule-based methods construct a problem generation rule base by summarizing expert experience, and generate new problem instances based on rule combinations and transformations. This method can ensure the rationality of generated data, but the construction and maintenance costs of the rule base are high, and it is difficult to cover new types of problems. In addition, some studies have tried to use generative models such as GAN to generate training data, but due to the discreteness and structural complexity of combinatorial optimization problems, existing methods are difficult to guarantee the quality and availability of generated data.
[0004] The existing training data generation methods have the following specific problems: first, they lack the ability to deeply analyze and extract the structural characteristics of the problem, and it is difficult to accurately capture the dependencies between variables and the combination patterns of constraints; second, the generated data lacks a consistency verification mechanism at the semantic level, and may have problems such as constraint conflicts or incomplete variable definitions; third, the correlation and sensitivity between parameters are not considered in the parameterization process, resulting in the generated problem instances that may not have practical solution value; fourth, the existing methods are difficult to deal with the reasonable allocation of objective function weights in multi-objective optimization problems, which affects the practicality of the generated data; fifth, the generated problem description texts often have problems such as poor logic and lack of professionalism, and it is difficult to accurately convey the core semantics of the problem; finally, there is a lack of a systematic evaluation and screening mechanism for the generated data, and it is impossible to guarantee the quality and representativeness of the training data set. These problems have seriously restricted the development and application of combinatorial optimization automatic modeling systems. Summary of the invention
[0005] The purpose of the invention is to provide a training data generation method and system for combinatorial optimization automatic modeling to solve the above-mentioned problems existing in the prior art.
[0006] The technical solution is a method for generating training data for combinatorial optimization automatic modeling, comprising the following steps:
[0007] S1. Acquire the domain knowledge of supply chain optimization, construct triple relationships, and obtain the domain ontology map; read the original supply chain optimization problem set, extract semantic features based on the original supply chain optimization problem set and the domain ontology map, and obtain the feature vector set; convert the feature vector set and the domain ontology map into a structured optimization problem representation set;
[0008] S2, decomposing the optimization problem representation set to obtain a model component set; performing standardized transformation on the model component set to generate a standardized mathematical model set; extracting model patterns based on the standardized mathematical model set and constructing a model template library;
[0009] S3, based on the standardized mathematical model set and the model template library, generate a parameterized model instance set; convert the parameterized model instance set into a structured description element set; apply language generation rules to the structured description element set to form a problem description set;
[0010] S4, performing structural transformation on the standardized mathematical model set to obtain a structural perturbation model set; performing parameter perturbation on the structural perturbation model set to obtain a parameter perturbation model set; matching the parameter perturbation model set with the problem description set to generate a perturbed model-description pair set;
[0011] S5. Based on the perturbed model-description pair set and the domain ontology graph, a semantic similarity matrix is calculated; based on the perturbed model-description pair set, a structural similarity matrix is constructed; and the semantic similarity matrix and the structural similarity matrix are combined to generate a training data set.
[0012] A training data generation system for automatic modeling of combinatorial optimization, including:
[0013] at least one processor; and,
[0014] a memory communicatively connected to at least one of the processors; wherein,
[0015] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the training data generation method for combinatorial optimization automatic modeling.
[0016] Beneficial effects: The present invention establishes a complete domain knowledge representation system, realizes the automatic generation of model instances and problem descriptions, enhances the diversity of training data, and ensures the quality of training data; at the same time, it not only improves the efficiency of training data generation, but also ensures the accuracy and practicality of the generated data through a multi-level verification and screening mechanism, thereby improving the performance and scope of application of the automatic modeling system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Flow chart of the method of the present invention.
[0018] Figure 2 This is a flow chart of step S1 of the present invention.
[0019] Figure 3 This is a flow chart of step S2 of the present invention.
[0020] Figure 4 This is a flow chart of step S3 of the present invention.
[0021] Figure 5 This is a flow chart of step S4 of the present invention.
[0022] Figure 6 This is a flow chart of step S5 of the present invention. DETAILED DESCRIPTION
[0023] like Figure 1 As shown, the present application proposes a training data generation method for combinatorial optimization automatic modeling, comprising the following steps:
[0024] S1. Acquire the domain knowledge of supply chain optimization, construct triple relationships, and obtain the domain ontology map; read the original supply chain optimization problem set, extract semantic features based on the original supply chain optimization problem set and the domain ontology map, and obtain the feature vector set; convert the feature vector set and the domain ontology map into a structured optimization problem representation set;
[0025] S2, decomposing the optimization problem representation set to obtain a model component set; performing standardized transformation on the model component set to generate a standardized mathematical model set; extracting model patterns based on the standardized mathematical model set and constructing a model template library;
[0026] S3, based on the standardized mathematical model set and the model template library, generate a parameterized model instance set; convert the parameterized model instance set into a structured description element set; apply language generation rules to the structured description element set to form a problem description set;
[0027] S4, performing structural transformation on the standardized mathematical model set to obtain a structural perturbation model set; performing parameter perturbation on the structural perturbation model set to obtain a parameter perturbation model set; matching the parameter perturbation model set with the problem description set to generate a perturbed model-description pair set;
[0028] S5. Based on the perturbed model-description pair set and the domain ontology graph, a semantic similarity matrix is calculated; based on the perturbed model-description pair set, a structural similarity matrix is constructed; and the semantic similarity matrix and the structural similarity matrix are combined to generate a training data set.
[0029] like Figure 2 As shown, according to one aspect of the present application, step S1 is further:
[0030] S11. Extract entity pairs and their relationships from pre-stored supply chain optimization domain knowledge, organize each entity pair and its relationship into a triple form of {entity, relationship, entity} to obtain a triple; classify and sort the triples based on the type of relationship to obtain sorted triples; use a graph data structure to connect the sorted triples to form a domain ontology graph;
[0031] S12. Read the original supply chain optimization problem set, input each problem text in the original supply chain optimization problem set into the pre-trained BERT model, extract the problem type feature vector, constraint description feature vector, variable description feature vector and objective function feature vector from the last layer of the BERT model; fuse and align the entity and relationship information in the domain ontology graph with the extracted problem type feature vector, constraint description feature vector, variable description feature vector and objective function feature vector to generate a fused feature vector set;
[0032] S13. Based on the domain ontology graph, the problem type feature vectors in the feature vector set are converted into a binary label matrix; the constraint description feature vectors in the feature vector set are converted into a constraint relationship adjacency matrix; the variable description feature vectors in the feature vector set are converted into a variable dependency matrix; the objective function feature vectors in the feature vector set are converted into an objective function structure matrix; the binary label matrix, the constraint relationship adjacency matrix, the variable dependency matrix and the objective function structure matrix are combined to form a structured optimization problem representation set. The domain ontology graph can assist in verifying the conversion process.
[0033] In one embodiment of the present application, the process of generating triples is specifically as follows: fusion confidence score C(t) = α1·LSTM(t) + α2·DEP(t) + α3·ATT(t); wherein LSTM(t) = sigmoid(W_h·h_t + b_h); LSTM(t) is a bidirectional LSTM extraction score; DEP(t) = softmax(W_d·d_t + b_d); DEP(t) is a dependency syntactic analysis score; ATT(t) = MultiHead(Q, K, V); ATT(t) is an attention relationship classification score; αk is a fusion weight coefficient satisfying Σαk=1, and k is a variable; W_h and W_d are weight matrices; b_h and b_d are bias vectors; h_t is a LSTM hidden layer state; d_t is a dependency feature vector; Q, K, and V are query, key, and value matrices of the attention mechanism; and t is a knowledge triple to be evaluated.
[0034] The process of generating the fused feature vector set is as follows: comprehensive feature vector F(x) = β1·BERT(x) + β2·KG(x) + β3·Cross(BERT(x), KG(x)); where BERT(x) = TransformerEncoder(W_e·E(x)); TransformerEncoder is the encoder structure function; BERT(x) is the BERT encoding feature; KG(x) = GraphAttn(N(x), R(x)); GraphAttn is the graph attention mechanism function; KG(x) is the knowledge graph feature; Cross(a, b) = σ(W_c·[a; b] + b_c); Cross(a, b) is the feature interaction term; β_k is the feature fusion coefficient, satisfying Σβ_k=1; W_e is the word embedding matrix; E(x) is the input text encoding; N(x) is the knowledge graph node representation; R(x) is the relationship representation; W_c is the interaction weight matrix; b_c is the bias vector; σ is the activation function; x is the input text.
[0035] The process of forming a structured optimization problem representation set is specifically as follows: structured representation matrix M(x) = γ1·Type(x) Θγ2·Cons(x) Θγ3·Var(x) Θγ4·Obj(x); where Type(x) = softmax(W_t·F(x)); Type(x) is the problem type matrix; Cons(x) = tanh(W_c·F(x)); Cons(x) is the constraint relationship matrix; Var(x) = sigmoid(W_v·F(x)); Var(x) is the variable dependency matrix; Obj(x) = ReLU(W_o·F(x)); Obj(x) is the objective function matrix; Θ is the tensor outer product operation; γk is the matrix weight coefficient; W_t, W_c, W_v, W_o are the transformation weight matrices; F(x) is the input feature vector.
[0036] This embodiment realizes the structured representation of knowledge in the field of supply chain optimization and the deep integration of semantic features through a multi-level knowledge extraction and feature fusion mechanism. Specifically, the triple relationship is first extracted by combining a bidirectional long short-term memory network and dependency syntax analysis to ensure the accuracy and completeness of knowledge extraction; then the TransE algorithm and spectral clustering method are used to vectorize and classify the relationship, and a domain ontology map of a multi-layer graph network structure is constructed to make the knowledge representation more systematic and hierarchical. In the feature extraction link, the adaptive extraction of multi-scale features is realized by combining the pre-trained BERT model with a hierarchical attention mechanism; at the same time, the knowledge distillation technology is introduced to transfer the graph knowledge to the feature space, enhancing the semantic information of the feature representation. Finally, through contrastive learning and dynamic weight fusion strategies, the extracted feature vector is converted into a structured optimization problem representation, ensuring the integrity of the knowledge representation and the richness of the feature representation. This embodiment improves the accuracy of the model's semantic understanding of the optimization problem, and lays a solid knowledge foundation for subsequent model generation.
[0037] According to one aspect of the present application, step S11 is further:
[0038] S111. Read the domain knowledge of supply chain optimization, use the bidirectional long short-term memory network to extract the subject-predicate-object structure of the sentence to obtain the candidate triple set A, use the dependency syntactic analysis to extract the dependency relationship between entities to obtain the candidate triple set B, and use the relational classification model based on the attention mechanism to extract the semantic relationship between entities to obtain the candidate triple set C.
[0039] S112, reading candidate triple set A, candidate triple set B and candidate triple set C, constructing a triple voting matrix for integration, and using a majority voting strategy to screen high-confidence triples to form an initial triple set.
[0040] S113, reading the initial triple set, calculating the vector representation of entities and relations based on the TransE algorithm to obtain a relation embedding vector set, clustering the relation embedding vector set using the spectral clustering method to obtain a relation category set, and grouping the initial triple set according to the relation category set to obtain a classified triple set.
[0041] S114. Read the set of classified triples, construct a multi-layer graph network structure, construct the connection relationship between entity nodes in the entity layer, construct the hierarchical relationship between relationship nodes in the relationship layer, construct the entity-relationship mapping relationship across layers, and store the constructed multi-layer network as a domain ontology graph.
[0042] In one embodiment of the present application, TransE algorithm: knowledge graph embedding L(h, r, t) = τ1·||h + r- t|| 2 +τ2·Σ(h', r, t')∈N max(0, γ+ ||h + r - t|| 2 - ||h' + r - t'|| 2 ); where: h, r, t are the vector representations of the head entity, relation, and tail entity respectively; N is the set of negative sampling triplets; γ is the boundary parameter; τ1, τ2 are weight coefficients; h', t' are negative sampling entities; ||·|| 2 is the L2 norm; max(0, x) is the ReLU function; (h, r, t) is the knowledge graph triplet.
[0043] This embodiment realizes high-quality triple extraction and graph construction of knowledge in the field of supply chain optimization through a multi-source fusion knowledge extraction mechanism. Specifically, three different knowledge extraction methods are combined: bidirectional long short-term memory network (BiLSTM), dependency syntactic analysis, and relational classification model based on attention mechanism. The BiLSTM network captures the contextual semantics of the sentence through bidirectional information flow and effectively extracts the subject-predicate-object structure; dependency syntactic analysis identifies the dependency relationship between entities from the perspective of grammatical structure; and the relational classification model of the attention mechanism focuses on the semantic association between entity pairs. By constructing a triple voting matrix for integration, a majority voting strategy is used to screen high-confidence triplets, which effectively reduces the error rate of knowledge extraction. This embodiment not only improves the accuracy and completeness of knowledge extraction, but also reduces the impact of noise data through complementary verification of different methods, providing a high-quality knowledge foundation for subsequent graph construction.
[0044] According to one aspect of the present application, step S12 is further:
[0045] S121. Read the original supply chain optimization problem set, use rule matching and word segmentation technology to pre-process each problem text, identify the problem type fragment, constraint description fragment, variable description fragment and objective function fragment, and generate a set of structured text fragments.
[0046] S122. Read a set of structured text fragments, input each text fragment into a pre-trained BERT model, extract the hidden layer state from each layer of BERT, perform adaptive weighted fusion on the features of different layers through a multi-layer perceptron, and generate a set of BERT feature matrices.
[0047] S123. Read the BERT feature matrix set, apply the hierarchical attention mechanism to each matrix, focus on the feature representation at the word level, syntactic level, and semantic level respectively, integrate the multi-layer features through the cross-layer feature aggregation network, and generate a multi-scale feature vector set.
[0048] S124. Read the domain ontology graph, encode the ontology graph using a graph neural network, obtain the structured representation of entity nodes and the semantic representation of relationship edges, transfer the graph knowledge to the BERT feature space through knowledge distillation, and generate a knowledge-enhanced feature set.
[0049] S125. Read the multi-scale feature vector set and the knowledge-enhanced feature set, construct a contrastive learning loss function to optimize feature alignment, use a dynamic weight fusion strategy to integrate the two feature representations, retain the original semantic information through residual connections, and generate the final feature vector set.
[0050] This embodiment realizes the multi-dimensional feature representation of the optimization problem through the feature fusion mechanism of deep semantic feature extraction and knowledge enhancement. The pre-trained BERT model is used as the basic encoder to extract feature vectors of four dimensions: problem type, constraint description, variable description and objective function. The multi-layer bidirectional Transformer structure of the BERT model can fully capture the contextual semantic information of the text, and the feature output of the last layer contains rich semantic representation. In the feature fusion link, the entity and relationship information of the knowledge graph is introduced, and the text features and knowledge features are aligned through the attention mechanism to realize the knowledge enhancement of the semantic features. This embodiment not only improves the semantic richness of the feature representation, but also makes the features better reflect the essential characteristics of the optimization problem through knowledge guidance, providing a reliable feature basis for subsequent structured representation conversion.
[0051] According to one aspect of the present application, step S13 is further:
[0052] S131, read the question type feature vector in the feature vector set, build a multi-label classifier, and learn the type mapping relationship; based on the type mapping relationship, perform label correlation analysis, process label overlap, and obtain a processed type mapping relationship; based on the processed type mapping relationship, verify type consistency through ontology reasoning, and generate a binary label matrix;
[0053] S132, reading the constraint feature vector and domain ontology graph in the feature vector set, constructing a constraint relationship extractor based on the graph attention network; based on the constraint relationship extractor, capturing the constraint interaction mode through edge feature encoding; based on the constraint interaction mode, using relationship prediction to evaluate the effectiveness of the constraint combination, and generating a constraint relationship feature set;
[0054] S133. Based on the constraint relationship feature set, a sparse matrix representation framework is constructed to extract implicit associations between constraints through tensor decomposition; based on the implicit associations, constraint independence is verified through symbolic calculations, and matrix completion is applied to process missing relationships to generate a constraint relationship adjacency matrix;
[0055] S134, read the variable feature vectors and domain ontology graph in the feature vector set, build a variable dependency analyzer, identify direct and indirect dependencies; based on the direct and indirect dependencies, determine the dependency direction through causal inference; based on the dependency direction, verify the rationality of the dependency through ontology constraints, and generate a variable dependency feature set;
[0056] S135. Based on the variable dependency feature set, a hierarchical dependency representation framework is constructed to learn the structural relationship between variables through graph convolutional networks; based on the structural relationship between variables, community detection is applied to identify strong dependency groups; based on the strong dependency groups, representation redundancy is reduced through matrix decomposition to generate variable dependency matrices;
[0057] S136, read the target function feature vector and domain ontology graph in the feature vector set, build a deep tree convolutional network, extract function structure features; based on the function structure features, identify equivalent structures through sub-expression matching; based on the equivalent structure, ensure structural rationality through semantic verification, and generate a target function feature set;
[0058] S137. Based on the target function feature set, a hierarchical structure coding framework is constructed to learn the structure combination pattern through a recursive neural network; based on the structure combination pattern, an attention mechanism is applied to capture key components; based on the key components, the representation space is compressed through sparse coding to generate the target function structure matrix;
[0059] S138. Based on the binary label matrix, constraint relationship adjacency matrix, variable dependency matrix and objective function structure matrix, a tensor fusion framework is constructed to integrate multidimensional structural information. Based on the multidimensional structural information, the completeness of the representation is ensured through consistency verification, and finally a structured optimization problem representation set is generated.
[0060] This embodiment achieves accurate conversion of feature vectors to structured representations through multi-dimensional matrix conversion and knowledge-assisted verification mechanisms. A set of systematic matrix conversion methods is constructed to convert problem type features into binary label matrices, constraint features into constraint relationship adjacency matrices, variable features into variable dependency matrices, and objective function features into objective function structure matrices. During the conversion process, a domain ontology graph is introduced for auxiliary verification, and the conversion results are checked and corrected through the relationship constraints and entity attributes in the graph. This embodiment not only ensures the accuracy of the conversion process, but also ensures that the conversion results meet the domain specifications through knowledge constraints, providing a structured problem representation basis for subsequent model decomposition and standardized conversion.
[0061] like Figure 3 As shown, according to one aspect of the present application, step S2 is further:
[0062] S21. Based on the structured optimization problem representation set, extract the objective function component from the binary label matrix; extract the constraint function component from the constraint relationship adjacency matrix; extract the variable definition component from the variable dependency matrix; integrate the objective function component, the constraint function component and the variable definition component to form a model component set;
[0063] S22, based on the model component set, performing minimization form conversion on the objective function component to obtain a first conversion component; performing less than or equal to form conversion on the constraint function component to obtain a second conversion component; performing interval standardization conversion on the variable definition component to obtain a third conversion component; integrating the first conversion component, the second conversion component and the third conversion component into a standardized mathematical model set;
[0064] S23. Based on a set of standardized mathematical models, extract structural features in the model and construct a feature tree; based on the feature tree, identify common structural patterns; parameterize the identified structural patterns and store them as a model template library.
[0065] In one embodiment of the present application, the component decomposition score S(c) = Δ1·Comp(c) + Δ2·Rel(c) + Δ3·Cov(c); where Comp(c) = ||M_c - U·V T || F ; Comp(c) is the component completeness score; Rel(c) = cosine(r_i, r_j); Rel(c) is the component relevance score; Cov(c) = |C| / |M|; Cov(c) is the coverage score; Δk is the weight coefficient; Mc is the component matrix; U and V are decomposition matrices; r_i, r_j are component relationship vectors; |C| is the number of extracted components; |M| is the total number of components; c is the component to be evaluated.
[0066] The specific method for identifying common structural patterns is as follows: construct pattern similarity P(g, h) = ε1·Tree(g, h) + ε2·Edit(g, h) + ε3·Iso(g, h); where Tree(g, h) = exp(-λ·TED(g, h)); Tree(g, h) is tree distance similarity; Edit(g, h) = 1 - |E(g, h)| / max(|g|, |h|); Edit(g, h) is edit distance similarity; Iso(g, h) = |M(g, h)| / min(|g|, |h|); Iso(g, h) is isomorphism similarity; εk is the weight coefficient; TED is the tree edit distance; E(g, h) is the set of edit operations; M(g, h) is the maximum matching subgraph; λ is the attenuation factor; g, h are the structural graphs to be compared.
[0067] This embodiment realizes the modular representation of optimization problems and the automatic extraction of structural patterns through a systematic model decomposition and standardized conversion mechanism. First, through specially designed parsers and analyzers, core components such as objective functions, constraints and variable definitions are accurately identified and extracted to ensure the integrity and accuracy of model decomposition. In the standardized conversion process, a method combining symbolic calculation and semantic equivalence testing is adopted to ensure the correctness of the conversion process. The relationship between components is verified by the component dependency analyzer, and the component coverage is ensured by the completeness test to generate an accurate component association network. In the model pattern extraction link, frequent subgraph mining and tree edit distance calculation methods are used to realize the automatic identification of variable combination patterns and constraint structure features. This embodiment not only improves the accuracy and reliability of model conversion, but also provides a standardized reference basis for subsequent model generation through the construction of a template library, thereby improving the efficiency and quality of model generation.
[0068] According to one aspect of the present application, step S21 is further:
[0069] S211. Read the binary label matrix in the structured optimization problem representation set, build an objective function parser to identify function type labels, extract mathematical expression templates through pattern matching, verify the structural integrity in combination with syntax tree analysis, and generate an objective function type feature set.
[0070] S212. Read the target function type feature set, design a component template matcher to map it to the standard function library, simplify the expression structure through symbolic calculation, combine semantic equivalence testing to ensure correct conversion, and generate the target function component set.
[0071] S213. Read the constraint relationship adjacency matrix in the structured optimization problem representation set, build a constraint graph analyzer to extract constraint types and relationships, identify standard constraint patterns through subgraph isomorphism, verify feasibility in combination with constraint propagation, and generate a constraint relationship feature set.
[0072] S214. Read the constraint relationship feature set, design a constraint decomposer to split the complex constraints into basic units, map them to the standard form through rule conversion, combine numerical verification to ensure equivalence, and generate a constraint function component set.
[0073] S215. Read the variable dependency matrix in the structured optimization problem representation set, build a variable relationship analyzer to identify variable types and domains, determine the scope of variables through dependency graph analysis, verify the rationality of the definition in combination with type inference, and generate a variable feature set.
[0074] S216. Read the variable feature set, design a variable normalizer to unify the variable representation format, organize the variable hierarchy through scope analysis, combine constraint checking to ensure definition completeness, and generate a variable definition component set.
[0075] S217, read the objective function component set, constraint function component set and variable definition component set, build a component dependency analyzer to verify the relationship between components, ensure component coverage through completeness verification, and generate a component association network.
[0076] S218. Read the component association network, design a component integrator to organize the component structure based on the dependency relationship, ensure component compatibility through consistency verification, optimize the component set by combining redundancy elimination, and finally generate a model component set.
[0077] This embodiment realizes the modular representation of the optimization problem through a systematic component decomposition and relationship preservation mechanism. A complete set of component extraction methods is constructed to extract the objective function component from the binary label matrix, the constraint function component from the constraint relationship adjacency matrix, and the variable definition component from the variable dependency matrix. During the extraction process, the logical association and dependency relationship between components are maintained by designing a special matrix decomposition algorithm. At the same time, a completeness verification mechanism is used to ensure that the extracted components cover all the key elements of the original problem, and consistency verification is used to ensure that the logical relationship between components conforms to the basic rules of the optimization problem. This embodiment not only realizes the modular representation of the optimization problem, but also ensures the integrity and consistency of the model structure through a relationship preservation mechanism, providing a reliable component foundation for subsequent standardized conversion.
[0078] According to one aspect of the present application, step S23 is further:
[0079] S231. Based on the standardized mathematical model set, a variable-constraint association graph is constructed; based on the variable-constraint association graph, a frequent subgraph mining algorithm is used to identify recurring variable combination patterns, and the equivalence of the subgraphs is verified through a graph isomorphism test to generate a variable combination feature set;
[0080] S232, based on a set of standardized mathematical models, perform syntax analysis on the constraint conditions and construct an abstract syntax tree of the constraint expression; based on the abstract syntax tree, use the tree edit distance to calculate the structural similarity between the constraints; based on the structural similarity, identify similar constraint groups through hierarchical clustering and generate a constraint structure feature set;
[0081] S233. Based on the standardized mathematical model set, symbolic calculation is performed on the target function to extract the algebraic structure of the mathematical expression; based on the algebraic structure, equivalent transformation relations are identified through isomorphic mapping; based on the equivalent transformation relations, group theory methods are used to summarize the invariant characteristics and generate the target function feature set;
[0082] S234, constructing a multi-level feature tree based on the variable combination feature set, the constraint structure feature set and the objective function feature set; based on the multi-level feature tree, extracting the shared structure using the maximum common subtree algorithm; based on the shared structure, describing the structural relationship using the attribute graph grammar to generate a feature tree forest;
[0083] S235. Based on the feature tree forest, a structural pattern recognizer based on graph neural network is constructed; based on the structural pattern recognizer, the dependency between nodes is captured through the message passing mechanism; based on the dependency between nodes, the tree-level features are aggregated using the attention mechanism to generate a set of structural patterns;
[0084] S236, constructing a symbolic template generator based on the structural pattern set; based on the symbolic template generator, replacing specific values in the structural pattern set with parameter variables to obtain a parameterized model; based on the parameterized model, determining parameter constraints through type deduction to obtain a model with parameter constraints; based on the model with parameter constraints, using normalization processing to unify parameter scales to generate a parameterized template set;
[0085] S237. Based on the parameterized template set, a template verification framework is constructed to verify the correctness of the template through instantiation testing to obtain the verified template; an index structure is constructed to support efficient retrieval and the verified templates are organized into a model template library.
[0086] This embodiment realizes the pattern abstraction and standardized representation of the optimization model through structural pattern recognition and parameterized template construction mechanism. First, the frequent subgraph mining algorithm is used to analyze the structural features in the standardized mathematical model set, and a feature tree is constructed to represent the hierarchical structure of the model. In the process of feature tree construction, a tree edit distance algorithm is introduced to identify common structural patterns by calculating the similarity between model structures. For the identified structural patterns, symbolic parameter replacement and variable template method are used for parameterization processing, while keeping the mathematical properties of the model unchanged. By designing a dynamic parameter binding mechanism, it is ensured that the constraint relationship between variables is maintained during the parameterization process. This embodiment not only improves the abstract level of model representation, but also improves the efficiency and standardization of model generation through template processing, and provides standardized template support for subsequent model instance generation.
[0087] like Figure 4 As shown, according to one aspect of the present application, step S3 is further:
[0088] S31, based on the standardized mathematical model set and the model template library, generating a value interval parameter for each variable, generating a coefficient parameter for the constraint matrix, and generating a weight parameter for the objective function; combining the value interval parameter, the coefficient parameter, and the weight parameter to form a parameterized model instance set;
[0089] S32. Based on the parameterized model instance set, extract the business scenario elements in the model and construct a scenario element set; based on the parameterized model instance set, extract the attribute information of the decision variables and construct a variable description set; based on the parameterized model instance set, extract the business rules of the constraint conditions and construct a constraint description set; integrate the scenario element set, the variable description set and the constraint description set into a structured description element set;
[0090] S33. Based on the structured description element set, apply the preconfigured scene description template to the scene element set to generate the scene text; apply the preconfigured variable description template to the variable description set to generate the variable description text; apply the preconfigured constraint description template to the constraint description set to generate the constraint text; combine the scene text, variable description text and constraint text to form a problem description set.
[0091] In one embodiment of the present application, the parameter generation algorithm is as follows: parameter generation probability P(θ) = η1·Dist(θ) +η2·Dep(θ) + η3·Feas(θ); wherein Dist(θ) = N(μ_θ, Σ_θ)·I(l_θ≤θ≤u_θ); Dist(θ) is the parameter distribution probability; Dep(θ) = sigmoid(W_d·G(θ) + b_d); Dep(θ) is the parameter dependence probability; Feas(θ) = exp(-ρ·V(θ)); Feas(θ) is the feasibility probability; ηk is the weight coefficient; μ_θ, Σ_θ are distribution parameters; l_θ, u_θ are parameter boundaries; G(θ) is the dependency graph feature; V(θ) is the constraint violation measure; W_d is the weight matrix; b_d is the bias vector; ρ is the penalty coefficient; θ is the parameter to be generated.
[0092] Description template generation algorithm: template matching score T(m, d) = ζ1·Sem(m, d) + ζ2·Struct(m, d)+ ζ3·Map(m, d); where Sem(m, d) = BERT_sim(E(m), E(d)); Sem(m, d) is semantic similarity; Struct(m, d) = GNN_sim(G(m), G(d)); Struct(m, d) is structural similarity; Map(m, d) = |A(m, d)| / |V(m)|; Map(m, d) is mapping coverage; ζk is weight coefficient; E(·) is text encoding; G(·) is graph structure representation; A(m, d) is variable mapping set; V(m) is variable set; m is model; d is description template.
[0093] This embodiment realizes the automatic generation of optimization model instances and the intelligent construction of problem descriptions through parametric modeling and structured description conversion mechanisms. First, through a scientific parameter generation method, reasonable parameter values are generated for variables, constraint matrices, and objective functions to ensure that the generated model instances have practical significance. In the description conversion link, the scene element extraction and multi-level description template application methods are used to convert the mathematical model into an easy-to-understand natural language description. Through the construction of business scenario elements, the extraction of variable attribute information, and the identification of constraint condition rules, a complete set of structured description elements is formed. This embodiment not only ensures the accuracy and readability of the generated text, but also improves the efficiency and quality of description generation through a templated description generation mechanism, providing a reliable foundation for the construction of subsequent model-description pairs.
[0094] According to one aspect of the present application, step S31 is further:
[0095] S311. Based on the standardized mathematical model set and model template library, construct a variable analyzer to identify variable characteristics and constraints; based on the variable characteristics and constraints, extract variable distribution characteristics through pre-stored historical data analysis; based on the variable distribution characteristics, perform rationality verification in combination with expert knowledge and generate a variable feature description set;
[0096] S312, based on the variable feature description set, construct an interval generator to determine the value range; based on the determined value range, evaluate the rationality of the interval through Monte Carlo sampling to obtain an evaluation result; based on the evaluation result, optimize the interval boundary through sensitivity analysis to generate a variable interval parameter set;
[0097] S313, read the constraint matrix in the standardized mathematical model set, build a constraint analyzer, identify the constraint type and strength; based on the constraint type and strength, estimate the reasonable coefficient range through numerical experiments; based on the reasonable coefficient range, perform stability analysis, determine parameter boundaries, and generate a constraint feature description set;
[0098] S314, based on the constraint feature description set, construct a coefficient generator to generate a coefficient matrix; based on the coefficient matrix, verify the rationality of the coefficients through a feasibility test method to obtain a verified coefficient matrix; based on the verified coefficient matrix, perform a disturbance analysis to evaluate the robustness of the coefficients and generate a constraint coefficient parameter set;
[0099] S315, reading the objective function in the standardized mathematical model set, constructing an objective function analyzer, identifying the function structure and components; based on the function structure and components, determining the component weight range through importance analysis; based on the component weight range, performing a balance analysis, verifying the weight distribution, and generating an objective function feature set;
[0100] S316, based on the objective function feature set, construct a weight generator to obtain weight parameters; based on the weight parameters, ensure the rationality of the weights through a target consistency test to obtain the weight parameters after the test; based on the weight parameters after the test, perform optimization performance evaluation, adjust the weight ratio, and generate the objective function weight parameter set;
[0101] S317. Based on the variable interval parameter set, the constraint coefficient parameter set and the objective function weight parameter set, a parameter correlation analyzer is constructed to evaluate the interaction between the parameters and obtain parameter evaluation results; based on the parameter evaluation results, key parameters are identified through global sensitivity analysis to generate a parameter association network;
[0102] S318. Based on the parameter association network, a parameterized instance generator is constructed to generate an instance model; based on the instance model, completeness verification is performed to ensure parameter coverage and obtain a verified instance model; based on the verified instance model, consistency verification is performed to ensure instance validity and finally generate a parameterized model instance set.
[0103] This embodiment realizes the automatic construction of optimization model instances through intelligent parameter generation and consistency verification mechanisms. A set of composite parameter generation strategies is constructed, and different generation methods are adopted for different types of parameters: for continuous parameters, a probability distribution model based on problem characteristics is used to generate parameter values that conform to the actual scenario; for discrete parameters, a combined sampling method is used to ensure the logical relationship between parameters; for interval parameters, the validity of parameters is ensured by the boundary constraint retention method. In the parameter generation process, a parameter dependency graph is introduced, and the constraint relationship between the generated parameters is ensured to be satisfied through graph structure analysis. At the same time, a multi-round consistency verification mechanism is adopted to ensure that the generated parameters meet the feasibility requirements of the model. This embodiment not only improves the quality of the model instance, but also ensures the practicality of the generated instance through the system verification mechanism, providing a reliable model foundation for the subsequent problem description generation.
[0104] According to one aspect of the present application, step S33 is further:
[0105] S331. Read the scene element set in the structured description element set, build a scene organization analyzer to identify scene subjects and relationships, build a scene logic framework through a context map, combine knowledge reasoning to supplement implicit information, and generate a scene semantic network.
[0106] S332. Read the scene semantic network, design a template matcher to select the most suitable scene description template, optimize the expression order through word order planning, combine the context association to ensure the description coherence, and generate a scene text draft.
[0107] S333. Read the draft of the scenario text, build a language polisher to optimize the expression and wording, ensure the standardization of the text through grammar checking, improve the clarity of expression combined with readability assessment, and generate the scenario description text.
[0108] S334. Read the variable description set in the structured description element set, build a variable relationship analyzer to extract variable features and dependencies, convert them into natural language expressions through concept mapping, combine them with the standardized expression method of domain terms, and generate a variable semantic feature set.
[0109] S335. Read the variable semantic feature set, design a template adaptor to select a description template according to the variable type, ensure the consistency of expression through context embedding, combine reference resolution to avoid expression ambiguity, and generate variable description text.
[0110] S336. Read the constraint description set in the structured description element set, build a constraint semantic analyzer to identify constraint types and relationships, build a constraint expression framework through logical reasoning, improve the constraint description in combination with semantic completion, and generate a constraint semantic feature set.
[0111] S337. Read the constraint semantic feature set, design a constraint description generator to convert constraint expressions based on templates, optimize expression complexity through language simplification, ensure description accuracy through consistency checks, and generate constraint description text.
[0112] S338, read the scenario description text, variable description text and constraint description text, build a text integrator to organize the text structure and order, ensure logical coherence through chapter planning, combine semantic verification to ensure description completeness, and finally generate a problem description set.
[0113] This embodiment realizes the generation of natural language description of optimization problems through multi-level description templates and semantic consistency maintenance mechanism. A hierarchical description template system is constructed, including scene templates, variable description templates, constraint description templates and target description templates. In the description generation process, a template selection strategy based on the attention mechanism is adopted to dynamically select the appropriate description template according to the model characteristics. By designing special semantic mapping rules, the one-to-one correspondence between mathematical expressions and natural language descriptions is ensured. At the same time, a context consistency verification mechanism is introduced to ensure the completeness and accuracy of the description by analyzing the semantic coherence of the generated description. This embodiment not only improves the readability of the problem description, but also ensures the precise correspondence between the description and the model through systematic template management and semantic verification, providing high-quality problem description for subsequent training data construction.
[0114] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:
[0115] S41. Based on the standardized mathematical model set, the variable relationship is reorganized by using a transformation matrix to obtain a reorganized variable relationship; based on the standardized mathematical model set, the constraint hierarchy is adjusted to obtain an adjusted constraint hierarchy; based on the standardized mathematical model set, the objective function structure is transformed to obtain a transformed objective function structure; the reorganized variable relationship, the adjusted constraint hierarchy and the transformed objective function structure are combined to form a structural perturbation model set;
[0116] S42, based on the structural perturbation model set, adding normal distribution perturbation to the continuous parameters to obtain a continuous parameter perturbation model; based on the structural perturbation model set, performing increase and decrease perturbation on the discrete parameters to obtain a discrete parameter perturbation model; based on the structural perturbation model set, performing boundary perturbation on the interval parameters to obtain an interval parameter perturbation model; combining the continuous parameter perturbation model, the discrete parameter perturbation model and the interval parameter perturbation model to form a parameter perturbation model set;
[0117] S43. Based on the problem description set and the parameter perturbation model set, add slack variables to the constraints in the model, tighten or relax the boundary conditions, and combine to generate composite constraints to obtain a processed model; pair the processed model with the corresponding problem description in the problem description set to form a perturbed model-description pair set.
[0118] In one embodiment of the present application, the structural perturbation algorithm: perturbation intensity D(s) = κ1·Var(s) + κ2·Cons(s) + κ3·Obj(s); where Var(s) = ||P·V(s) - V(s)|| F ; Var(s) is the variable disturbance term; Cons(s) = ||Q·C(s) - C(s)||_F; Cons(s) is the constraint disturbance term; Obj(s) = ||R·O(s) - O(s)|| F ; Obj(s) is the target disturbance term; κk is the weight coefficient; P, Q, R are the disturbance matrices; V(s), C(s), O(s) are the structure matrices; s is the structure to be disturbed.
[0119] Parameter perturbation algorithm: parameter perturbation Δθ = ψ1·Norm(θ) + ψ2·Disc(θ) + ψ3·Bound(θ); where Norm(θ) = σ_θ·Z(0,1)·S(θ); Norm(θ) is a continuous parameter perturbation; Disc(θ) = round(α·U(-1,1)); Disc(θ) is a discrete parameter perturbation; Bound(θ) = β·(u_θ - l_θ)·U(0,1); Bound(θ) is a boundary parameter perturbation; ψk is a weight coefficient; σ_θ is the standard deviation of the perturbation; Z(0,1) is a standard normal distribution; S(θ) is a sensitivity coefficient; α is a discrete step length; β is a boundary perturbation rate; U(·,·) is a uniform distribution; θ is the parameter to be perturbed.
[0120] This embodiment realizes the generation of diversified variants of the optimization model through multi-level structural perturbation and parameter perturbation mechanisms. In the structural perturbation link, the transformation matrix is used to reorganize the variable relationship, and the model variants with different structural characteristics are generated by adjusting the constraint hierarchy and transforming the objective function structure. The structural diversity of the generated model is guaranteed, and the solvability of the transformed model is ensured by structural validity verification. In the parameter perturbation link, perturbation strategies for different parameter types are adopted, such as applying normal distribution perturbation to continuous parameters, increasing and decreasing perturbation to discrete parameters, and boundary perturbation to interval parameters, ensuring that the generated model has different numerical characteristics while maintaining the original semantics. Finally, the diversity of the model is further enhanced by adding slack variables, adjusting boundary conditions, and generating composite constraints. This embodiment not only improves the richness of the training data, but also ensures the quality and validity of the generated data by maintaining the semantic consistency of the model-description pair.
[0121] According to one aspect of the present application, step S41 is further:
[0122] S411. Read a set of standardized mathematical models, construct a variable association graph for each model, calculate the degree centrality and betweenness centrality of variable nodes, identify key variable nodes based on centrality indicators, and generate a variable importance matrix set.
[0123] S412, read the variable importance matrix set, construct an orthogonal transformation matrix to rotate the variable space, apply singular value decomposition to extract the main variable combination, control the numerical stability of the transformation through the condition number, and generate a variable reorganization relationship set.
[0124] S413, reading a set of standardized mathematical models, dividing the constraints into levels using a hierarchical clustering algorithm, calculating the coupling degree between the constraints, constructing a constraint reordering strategy based on the coupling relationship, and generating a constraint hierarchy set.
[0125] S414, read the constraint hierarchy set, construct constraint relaxation variables, design a constraint adjustment method based on the trust region, maintain the feasibility of the problem through complementary relaxation conditions, and generate a constraint transformation matrix set.
[0126] S415, reading a standardized mathematical model set, performing Taylor expansion on the objective function, retaining first-order and second-order terms to construct a local quadratic approximation, determining curvature information through eigenvalue decomposition of the Hessian matrix, and generating an objective function decomposition set.
[0127] S416. Read the decomposition set of the objective function, construct a convex combination to generate a new objective function form, apply pseudo-matrix theory to maintain the basic properties of the objective function, verify the rationality of the transformation through the KKT condition, and generate the objective function transformation set.
[0128] S417, read the variable reorganization relationship set, the constraint transformation matrix set and the objective function transformation set, use the combinatorial optimization method to select the transformation combination, screen the effective transformation through feasibility test, apply the verified transformation to the original model, and generate the structural perturbation model set.
[0129] In one embodiment of the present application, hierarchical clustering algorithm: cluster distance D(C_i, C_j) = ξ1·Single(C_i, C_j) + ξ2·Complete(C_i, C_j) + ξ3·Average(C_i, C_j); where Single(C_i, C_j) = min_{x∈C_i, y∈C_j}d(x, y); Single(C_i, C_j) is the minimum distance; Complete(C_i, C_j) = max_{x∈C_i, y∈C_j}d(x, y); Complete(C_i, C_j) is the maximum distance; Average(C_i, C_j) = 1 / (|C_i|·|C_j|)·Σ_{x∈C_i, y∈C_j}d(x, y); Average(C_i, C_j) is the average distance; ξk is the weight coefficient; d(x, y) is the sample distance; C_i, C_j are the clusters to be merged.
[0130] This embodiment achieves structural diversification of the optimization model through structural perturbation and constraint retention mechanism. A set of systematic structural transformation methods is constructed, including variable relationship reorganization, constraint hierarchy adjustment and objective function structural transformation. In the process of variable relationship reorganization, by designing a special transformation matrix, the dependency relationship between variables is kept unchanged while achieving the diversification of variable combinations. The constraint hierarchy adjustment adopts a hierarchical decomposition and reorganization strategy to generate an equivalent but different form of constraint system by adjusting the organizational structure of the constraint conditions. The objective function structural transformation achieves the formal diversification of the objective function by introducing auxiliary variables and equivalent transformations. In particular, by designing a constraint retention verifier, it is ensured that the model after structural perturbation still meets the basic constraints of the original problem. This embodiment not only increases the diversity of training data, but also ensures the effectiveness of the perturbed model through the constraint retention mechanism, providing a structural basis for subsequent parameter perturbations.
[0131] According to one aspect of the present application, step S42 is further:
[0132] S421, read the structural perturbation model set, identify the type of parameters of each model, construct a parameter feature vector, use a clustering algorithm to classify the parameters into three categories: continuous, discrete and interval, and generate a parameter classification matrix set.
[0133] S422. Read the continuous parameters in the parameter classification matrix set, use kernel density estimation to analyze the parameter distribution characteristics, determine the normal distribution parameters through maximum likelihood estimation, evaluate the parameter sensitivity based on the Fisher information matrix, and generate a set of continuous parameter perturbation schemes.
[0134] S423, read the continuous parameters in the parameter classification matrix set, apply the adaptive Metropolis-Hastings algorithm to perform random walk, control the disturbance amplitude through the acceptance-rejection criterion, combine the Laplace mechanism to protect the parameter privacy, and generate a continuous parameter disturbance instance set.
[0135] S424. Read the discrete parameters in the parameter classification matrix set, construct a parameter dependency graph to capture the relationship between parameters, design an increase and decrease strategy based on combinatorial optimization, avoid invalid disturbances through taboo search, and generate a set of discrete parameter perturbation schemes.
[0136] S425. Read the discrete parameter perturbation scheme set, apply the integer programming model to constrain the parameter variation range, solve the feasible perturbation combination through the branch and bound algorithm, combine simulated annealing to control the perturbation diversity, and generate a discrete parameter perturbation instance set.
[0137] S426. Read the interval parameters in the parameter classification matrix set, build an interval arithmetic framework to analyze parameter dependence, use partial derivatives to estimate boundary sensitivity, generate perturbation schemes through interval splitting strategy, and generate a set of interval parameter perturbation schemes.
[0138] S427, read the interval parameter perturbation scheme set, apply affine arithmetic to calculate the impact of boundary changes, control the perturbation range through ellipsoid approximation, combine interval contraction to maintain the solvability of the problem, and generate an interval parameter perturbation instance set.
[0139] S428. Read the continuous parameter perturbation instance set, discrete parameter perturbation instance set and interval parameter perturbation instance set, design a parameter combination verification framework, screen effective combinations through feasibility tests, use stratified sampling to construct a diversified perturbation set, and finally generate a parameter perturbation model set.
[0140] In one embodiment of the present application, the adaptive Metropolis-Hastings algorithm: acceptance probability A(x, y) = min(1, π1·q(y) / q(x) + π2·h(x, y) + π3·g(y) / g(x)); where q(x) = exp(-U(x)); q(x) is the target distribution; h(x, y) = exp(-||Σ_t -1 / 2 (y-μ_t)|| 2 / 2); h(x, y) is the proposed distribution; g(x) = adaptive_scale·N(x|μ, Σ); g(x) is the adaptive kernel; πk is the weight coefficient; U(x) is the energy function; μ_t, Σ_t are adaptive parameters; adaptive_scale is the scale factor; x is the current state; y is the candidate state.
[0141] Branch and bound algorithm: Bound function B(S) = θ1·Lower(S) + θ2·Upper(S) + θ3·Est(S); where Lower(S) = max_{x∈S}L(x); Lower(S) is the lower bound estimate; Upper(S) = min_{x∈S}U(x); Upper(S) is the upper bound estimate; Est(S) = (Lower(S) + Upper(S)) / 2 + ε·Var(S); Est(S) is the expected estimate; θk is the weight coefficient; L(x) is the lower bound function; U(x) is the upper bound function; Var(S) is the variance of the solution space; ε is the adjustment parameter; S is the subset of the solution space.
[0142] This embodiment realizes the parameter diversification of the optimization model through multi-dimensional parameter perturbation and boundary adjustment mechanism. Differentiated perturbation strategies are designed for different types of parameters: random perturbations based on normal distribution are adopted for continuous parameters, and the rationality of the perturbation amplitude is ensured by adaptive standard deviation adjustment; the increase and decrease perturbation strategy is adopted for discrete parameters, and the logical association between parameters is maintained through combined changes; the boundary perturbation method is adopted for interval parameters, and the expansion of the parameter space is achieved by dynamically adjusting the upper and lower bounds. A parameter sensitivity analysis mechanism is introduced to dynamically adjust the perturbation intensity according to the degree of influence of the parameters on the model performance. At the same time, by designing a composite constraint generator, it is ensured that the parameter combination after perturbation meets the basic constraints of the problem. This embodiment not only enriches the parameter distribution of the training data, but also ensures the validity of the perturbation data through the boundary adjustment mechanism of the system.
[0143] like Figure 6 As shown, according to one aspect of the present application, step S5 is further:
[0144] S51. Based on the perturbed model-description pair set and the domain ontology graph, the semantic feature vector of the problem description is extracted; the cosine distance between the semantic feature vectors is calculated, the semantic association network between the problem descriptions is constructed, and the semantic similarity matrix is generated;
[0145] S52, based on the perturbed model-description pair set, extracting the model's variable dependency, constraint relationship and objective function structure, and calculating the structural distance between the models; based on the structural distance, constructing a structural association network between the models, and generating a structural similarity matrix;
[0146] S53, performing weighted fusion on the semantic similarity matrix and the structural similarity matrix to obtain fused model-description pairs; based on a preset similarity threshold, screening the fused model-description pairs to obtain screened model-description pairs; integrating the screened model-description pairs and their similarity information into a training data set.
[0147] In one embodiment of the present application, the semantic similarity algorithm is: semantic similarity S(x, y) = φ1·Cos(x, y) + φ2·Att(x, y) + φ3·Graph(x, y); where Cos(x, y) = BERT(x) T ·BERT(y) / (||BERT(x)||·||BERT(y)||); Cos(x, y) is cosine similarity; Att(x, y) = MultiHead(Q(x), K(y), V(y)); Att(x, y) is attention similarity; Graph(x, y) = GCN_sim(H(x), H(y)); Graph(x, y) is graph structure similarity; φk is the weight coefficient; BERT(·) is text encoding; Q(·), K(·), V(·) are attention parameters; H(·) is graph representation; x, y are texts to be compared.
[0148] Structural similarity algorithm: Structural similarity R(m,n) = ω1·Node(m,n) + ω2·Edge(m,n) +ω3·Path(m,n); where: Node(m,n) = Σ_i,j exp(-||v_i - v_j|| 2 / τ); Node(m,n) is the node similarity; Edge(m,n) = Σ_i,j MLP([e_i; e_j]); Edge(m,n) is the edge similarity; Path(m,n) = max_k(LCS(p_k m , p_k n )); Path(m,n) is the path similarity; ωk is the weight coefficient; v_i, v_j are node representations; e_i, e_j are edge representations; p_k is the path sequence; τ is the temperature parameter; LCS is the longest common subsequence; m, n are the model structures to be compared.
[0149] Similarity fusion algorithm: Fusion similarity F(a, b) = λ1·Sem(a, b)·W_s(t) + λ2·Struct(a, b)·W_t(t) + λ3·Cross(a, b)·W_c(t); where W_s(t) = softmax(μ_s·Conf_s(t)); W_s(t) is the semantic weight; W_t(t) = softmax(μ_t·Conf_t(t)); W_t(t) is the structural weight; W_c(t) =softmax(μ_c·Conf_c(t)); W_c(t) is the cross weight; λk is the basic weight coefficient; Conf_(t) is the confidence function; μ_ is the learning rate parameter; Sem(a, b) is the semantic similarity; Struct(a, b) is the structural similarity; Cross(a, b) is the cross similarity; t is the time step; a, b are the objects to be fused.
[0150] This embodiment realizes the automatic construction of high-quality training data sets through the dual evaluation mechanism of semantic similarity and structural similarity. First, the semantic feature extraction method based on ontology graph is used to construct a semantic association network by calculating the cosine distance between feature vectors, and the semantic similarity relationship between problem descriptions is accurately captured. In the structural similarity calculation link, by analyzing the variable dependency, constraint relationship and objective function structure of the model, a structural association network is constructed to accurately measure the structural distance between models. The semantic similarity and structural similarity are organically combined through the weighted fusion mechanism, and dynamic thresholds are set for screening to ensure the quality and diversity of the model-description pairs in the final training data set. This embodiment not only improves the reliability of the training data, but also provides reliable quality assurance for subsequent model training through quantitative evaluation of similarity.
[0151] According to one aspect of the present application, step S51 is further:
[0152] S511. Read the perturbed model-description pair set, use a deep language model to encode the problem description, capture context dependencies through a multi-head attention mechanism, combine position encoding to retain sequence information, and generate a problem description encoding set.
[0153] S512. Read the domain ontology graph, build a graph attention network to extract the semantic representation of entities and relationships, embed the learning ontology concepts into a distributed representation through knowledge graph, use random walks to expand the semantic context, and generate an ontology semantic vector set.
[0154] S513. Read the problem description encoding set and the ontology semantic vector set, design a cross-modal attention fusion layer, control the knowledge injection intensity through the gating mechanism, combine the residual connection to retain the original semantic information, and generate an enhanced semantic representation set.
[0155] S514, read the enhanced semantic representation set, build a multi-layer perceptron for feature transformation, maintain numerical stability through batch normalization, use dropout regularization to improve generalization ability, and generate a semantic feature vector set.
[0156] S515, read the semantic feature vector set, apply local sensitive hashing to perform fast neighbor search, build a k-nearest neighbor graph to capture the local semantic structure, learn the global semantic relationship through the graph convolution network, and generate a semantic association network.
[0157] S516, read the semantic association network, calculate the geodesic distance between nodes, combine the cosine similarity in the vector space, identify the semantic community structure through spectral clustering, and generate a multi-scale similarity set.
[0158] S517, read the multi-scale similarity set, design an adaptive fusion strategy to integrate similarity metrics of different scales, enhance the nonlinear expression ability through kernel function mapping, use matrix completion to process sparse data, and finally generate a semantic similarity matrix.
[0159] This embodiment achieves accurate characterization of the association relationship between problem descriptions through semantic similarity calculation and network construction mechanism. First, a pre-trained language model is used to extract the semantic feature vector of the problem description, and the key semantic information of the description text is captured by designing a special attention pooling layer. In the similarity calculation process, the two measurement methods of cosine distance and edit distance are combined, and the accuracy of similarity calculation is improved through a weighted fusion strategy. In particular, by constructing a semantic association network, the similarity relationship between problem descriptions is represented as a weighted graph structure, which is convenient for subsequent similarity propagation and clustering analysis. At the same time, a semantic consistency verification mechanism is introduced to ensure that the similarity calculation results meet the domain knowledge constraints. This embodiment not only improves the accuracy of problem description matching, but also provides richer semantic association information through network representation.
[0160] According to one aspect of the present application, step S52 is further:
[0161] S521. Read the perturbed model-description pair set, construct a variable dependency graph to capture the relationship between variables, apply the graph spectrum matching algorithm to identify isomorphic subgraphs, extract the topological features of the graph through spectral decomposition, and generate a variable dependency feature set.
[0162] S522, read the variable dependency feature set, design a graph kernel function to calculate the similarity between subgraphs, use the Weisfeiler-Lehman method to extract the local structural pattern of the graph, expand the structural context through random walks, and generate a variable relationship distance matrix.
[0163] S523. Read the perturbed model-description pair set, convert the constraints into a hypergraph representation, apply tensor decomposition to extract high-order relationships between constraints, evaluate the constraint structure similarity through hyperedge matching, and generate a constraint structure feature set.
[0164] S524, read the constraint structure feature set, build a constraint propagation network to simulate the mutual influence between constraints, measure the constraint complexity through information entropy, calculate the constraint organizational structure differences in combination with hierarchical decomposition, and generate a constraint relationship distance matrix.
[0165] S525, read the perturbed model-description pair set, perform symbolic calculation on the target function to obtain an expression tree, apply the tree edit distance algorithm to compare the structural differences, optimize the matching strategy through dynamic programming, and generate a target function feature set.
[0166] S526. Read the target function feature set, design a tree structure encoder based on a recursive neural network, aggregate subtree features through an attention mechanism, calculate the structural similarity in combination with a tree kernel function, and generate a target function distance matrix.
[0167] S527, read the variable relationship distance matrix, constraint relationship distance matrix and objective function distance matrix, build a multi-view fusion framework, learn the optimal fusion weights through collaborative training, and generate a comprehensive distance matrix.
[0168] S528. Read the comprehensive distance matrix, apply manifold learning to construct local preservation embedding, discover structural communities through spectral clustering, combine the PageRank algorithm to evaluate node importance, and finally generate a structural similarity matrix.
[0169] In one embodiment of the present application, the graph matching algorithm: matching score M(G1, G2) = Ξ1·Node_sim(G1, G2) + Ξ2·Edge_sim(G1, G2) + Ξ3·Struct_sim(G1, G2); wherein Node_sim(G1, G2) =Σ_{i, j}X_{ij}·sim(v_i, v_j); Node_sim(G1, G2) is the node similarity; Edge_sim(G1, G2) =Σ_{i, j, k, l}X_{ij}X_{kl}·sim(e_{ik}, e_{jl}); Edge_sim(G1, G2) is the edge similarity; Struct_sim(G1, G2) = trace(X T ·S·X); Struct_sim(G1, G2) is the structural similarity; Ξk is the weight coefficient; X is the matching matrix; sim(·, ·) is the similarity function; vi, e_{ij} are the node and edge features; S is the structural similarity matrix; G1, G2 are the graphs to be matched.
[0170] Tree edit distance algorithm: edit distance TED(T1, T2) = υ1·Del_cost(T1, T2) + υ2·Ins_cost(T1, T2) + υ3·Sub_cost(T1, T2); where Del_cost(T1, T2) = Σ_i w_d(v_i); Del_cost(T1, T2) is the deletion cost; Ins_cost(T1, T2) = Σ_j w_i(v_j); Ins_cost(T1, T2) is the insertion cost; Sub_cost(T1, T2) = Σ_{i, j} w_s(v_i, v_j)·M_{ij}; Sub_cost(T1, T2) is the replacement cost; υk is the weight coefficient; w_d, w_i, w_s are the cost function; vi_i, v_j are tree nodes; M_{ij} is the node mapping matrix; T1, T2 are the trees to be compared.
[0171] This embodiment achieves accurate measurement of structural associations between optimized models through structural similarity calculation and model comparison mechanism. A complete set of structural feature extraction methods is constructed, and feature vectors are constructed from three dimensions: variable dependency, constraint relationship, and objective function structure. In the feature extraction process, a graph neural network is used to encode the model structure, and the local and global features between structures are captured through a message passing mechanism. The structural similarity calculation adopts a multi-level comparison strategy, and a comprehensive evaluation of the model structure similarity is achieved through precise matching at the component level and pattern matching of the overall structure. At the same time, a structural equivalence verification mechanism is introduced to ensure that the similarity calculation results reflect the essential characteristics of the model. This embodiment not only improves the accuracy of model matching, but also provides more comprehensive model association information through multi-dimensional structural analysis.
[0172] According to one aspect of the present application, step S53 is further:
[0173] S531, read the semantic similarity matrix and the structural similarity matrix, construct a correlation evaluation index, use the Pearson coefficient to calculate the local correlation of the two matrices, use the Spearman coefficient to calculate their global sorting consistency, and generate a correlation index set.
[0174] S532, read the correlation index set, use the adaptive weighting algorithm to initialize the weight vector, construct the weight optimization objective function based on the entropy method, solve the optimal weight through the alternating direction multiplier method, and generate a fusion weight vector.
[0175] S533, read the semantic similarity matrix, structural similarity matrix and fusion weight vector, apply tensor decomposition to extract common features of the matrices, capture high-order correlations through Tucker decomposition, combine the weight vector to reconstruct features, and generate a fusion similarity matrix.
[0176] S534, read the fusion similarity matrix, use the kernel density estimation method to analyze the similarity distribution, combine the maximum inter-class variance method to determine the initial threshold, evaluate the stability of the threshold through the bootstrap method, and generate a multi-scale threshold set.
[0177] S535, read the fusion similarity matrix and the multi-scale threshold set, build a hierarchical screening strategy, perform model-description pair screening under different thresholds, evaluate the screening results through consistency testing, and generate a set of candidate data pairs.
[0178] S536. Read the candidate data pair set, design a consistency verification method based on graph matching, verify the correspondence between the model structure and the problem description, ensure the transitivity of the matching through transitive closure, and generate a verified data pair set.
[0179] S537. Read the verified data pair set, build a data enhancement strategy, expand the sample space through synonymous replacement and structural transformation, apply stratified sampling to maintain a balanced data distribution, and finally generate a training data set.
[0180] In one embodiment of the present application, the relevance evaluation index is constructed specifically as follows: evaluation score Q(d) = π1·Valid(d) + π2·Div(d) + π3·Rep(d); wherein Valid(d) = exp(-ν·Σ_i C_i(d)); Valid(d) is the validity score; Div(d) = 1 - max_j(sim(d, d_j)); Div(d) is the diversity score; Rep(d) = min(1, |M(d)| / |T(d)|); Rep(d) is the representative score; πk is the weight coefficient; C_i(d) is the constraint violation measure; sim(·, ·) is the similarity function; M(d) is the matching pattern set; T(d) is the target pattern set; ν is the penalty coefficient; d is the data to be evaluated.
[0181] The data enhancement strategy is constructed as follows: enhanced sample A(x) = ρ1·Trans(x) + ρ2·Mix(x) + ρ3·Aug(x); where Trans(x) = G(E(x) + Δ); Trans(x) is the transformation enhancement term; Mix(x) = α·x +(1-α)·x'; Mix(x) is the mixed enhancement term; Aug(x) = M(x, θ); Aug(x) is the model enhancement term; ρk is the weight coefficient; E(·), G(·) are the encoder and decoder; Δ is random noise; α is the mixing coefficient; x' is the reference sample; M(·, θ) is the enhanced model; θ is the model parameter; x is the original sample.
[0182] The model-description screening is specifically as follows: screening probability P(s) = χ1·Quality(s) + χ2·Balance(s) + χ3·Cover(s); where Quality(s) = sigmoid(W_q·Q(s)); Quality(s) is the quality score; Balance(s) = 1 - |F(s) - μ_F| / σ_F; Balance(s) is the balance score; Cover(s) = exp(-γ·D(s,S)); Cover(s) is the coverage score; χk is the weight coefficient; W_q is the quality weight matrix; Q(s) is the quality feature; F(s) is the feature distribution; μ_F, σ_F are distribution parameters; D(s, S) is the minimum distance; γ is the attenuation coefficient; s is the candidate sample; S is the selected sample set.
[0183] This embodiment realizes the automatic screening of high-quality training data through similarity fusion and screening mechanism. An adaptive similarity fusion strategy is constructed, and a weighted combination is performed according to the reliability of different similarity indicators through a dynamic weight adjustment mechanism. In the threshold setting process, a dynamic threshold determination method based on cluster analysis is adopted to adaptively adjust the screening criteria. In particular, by designing a multi-level screening pipeline, a step-by-step screening process from coarse screening to fine screening is realized, which effectively improves the screening efficiency. At the same time, a data diversity maintenance mechanism is introduced to ensure that the screened data set covers different areas of the problem space. This embodiment not only improves the quality of training data, but also ensures the representativeness and diversity of the data set through the system screening mechanism.
[0184] According to one aspect of the present application, a method for generating training data for combinatorial optimization automatic modeling comprises the following steps:
[0185] Step 1: Construction of seed database: First, obtain the initial data (corresponding to the optimization problem in supply chain planning) by collecting from actual scenarios and the Internet. Then use the embedding model, such as text-embedding-large, to obtain the embedding of each piece of data. Use kmeans for clustering and the silhouette coefficient to search for the most appropriate number of clusters. Sample a portion of the data in each class. Rewrite the sampled data into a preset specific format to form the initial seed database. This ensures the diversity of the initial data.
[0186] Step 2, modeling sampling and perturbation: Sampling modeling from the above seed database, and structural perturbation of the modeling. Including: coefficient perturbation (perturbing the coefficient of the constraint by 0% to 50% in the direction of relaxation), constraint perturbation (adding new constraints and ensuring that they hold; deleting constraints and ensuring that there is a solution after deletion), decision variable perturbation (adding new decision variables; deleting original decision variables and ensuring that the problem has a solution). This ensures that the generated new modeling must have a solution, and as the data is generated and iterated, more and more difficult problems will be generated, meeting the complexity of the generated data.
[0187] Step 3: Inspire the large language model to generate new questions: Combine the mathematical modeling obtained in step 2 with the specific scenarios collected in supply chain planning, and use attribute-guided prompt word engineering to inspire the large language model to generate new questions and corresponding detailed modeling and solution codes.
[0188] Step 4: Verification and data screening: Run the code corresponding to the modeling after the disturbance to obtain the corresponding solution; at the same time, run the code generated by the large language model to obtain the predicted solution. Compare the two solutions. If the solutions are consistent, the generated data is considered correct. Otherwise, filter out the data.
[0189] This embodiment uses mathematical models to reversely generate problem statements, control complexity and diversity, decouple the two subtasks of building a mathematical model and constructing an actual scenario for the mathematical model, and use rules to implement the subtask of building a mathematical model, which is more prone to errors, and let the large language model be responsible for the text creation task that it is better at. By regularly perturbing the model, a new solvable model is generated to ensure the diversity and complexity of the modeling structure. The solvability ensures that the subsequent data inspection is guaranteed; by running the solution code generated by the large language model and comparing the result with the actual answer of the model, if they are consistent, the data is considered to be generated normally, which realizes automatic detection of data and effectively improves the quality of data.
[0190] According to one aspect of the present application, a training data generation system for combinatorial optimization automatic modeling includes:
[0191] at least one processor; and,
[0192] a memory communicatively connected to at least one of the processors; wherein,
[0193] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the training data generation method for combinatorial optimization automatic modeling described in any of the above embodiments.
[0194] The present invention realizes the generation of high-quality training data for combinatorial optimization automatic modeling through systematic knowledge extraction, model conversion, data generation and quality assessment mechanisms. First, through multi-level knowledge extraction and feature fusion, a complete domain knowledge representation system is established; second, through model decomposition and standardized conversion, modular representation and structural pattern extraction of the optimization model are realized; third, through parameterized modeling and structured description conversion, the automatic generation of model instances and problem descriptions is realized; through the dual perturbation mechanism, the diversity of training data is enhanced; finally, through the dual measurement of semantics and structure, the quality of training data is guaranteed. Not only the efficiency and quality of training data generation are improved, but also the accuracy and practicality of generated data are ensured through multi-level verification and screening mechanisms. Especially when dealing with complex supply chain optimization problems, the present invention can automatically generate a large amount of high-quality training data, provide reliable data support for the training of combinatorial optimization automatic modeling systems, and improve the performance and scope of application of automatic modeling systems.
[0195] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A training data generation method for combinatorial optimization automatic modeling, characterized in that: The steps include: S1. Acquire the domain knowledge of supply chain optimization, construct triple relationships, and obtain the domain ontology map; read the original supply chain optimization problem set, extract semantic features based on the original supply chain optimization problem set and the domain ontology map, and obtain the feature vector set; Convert the feature vector set and domain ontology graph into a structured optimization problem representation set; S2, decomposing the optimization problem representation set to obtain a model component set; performing standardized transformation on the model component set to generate a standardized mathematical model set; extracting model patterns based on the standardized mathematical model set and constructing a model template library; S3, based on the standardized mathematical model set and the model template library, generate a parameterized model instance set; convert the parameterized model instance set into a structured description element set; apply language generation rules to the structured description element set to form a problem description set; S4, performing structural transformation on the standardized mathematical model set to obtain a structural perturbation model set; Perform parameter perturbation on the structural perturbation model set to obtain a parameter perturbation model set; match the parameter perturbation model set with the problem description set to generate a perturbed model-description pair set; S5. Based on the perturbed model-description pair set and the domain ontology map, a semantic similarity matrix is calculated; based on the perturbed model-description pair set, a structural similarity matrix is constructed; and a training data set is generated by combining the semantic similarity matrix and the structural similarity matrix; Step S3 is further as follows: S31, based on the standardized mathematical model set and the model template library, generating a value interval parameter for each variable, generating a coefficient parameter for the constraint matrix, and generating a weight parameter for the objective function; The value interval parameter, the coefficient parameter and the weight parameter are combined to form a parameterized model instance set; S32. Based on the parameterized model instance set, extract the business scenario elements in the model and construct a scenario element set; Based on the parameterized model instance set, the attribute information of the decision variables is extracted and the variable description set is constructed; Based on the parameterized model instance set, the business rules of the constraint conditions are extracted and the constraint description set is constructed; Integrate the scene element set, variable description set and constraint description set into a structured description element set; S33, based on the structured description element set, applying a preconfigured scene description template to the scene element set to generate a scene text; Applying a preconfigured variable description template to a variable description set to generate a variable description text; applying a preconfigured constraint description template to a constraint description set to generate a constraint text; combining the scenario text, the variable description text, and the constraint text to form a problem description set; Step S31 is further as follows: S311. Build a variable analyzer based on a standardized mathematical model set and model template library to identify variable characteristics and constraints; Based on variable characteristics and constraints, variable distribution characteristics are extracted through pre-stored historical data analysis; Based on the variable distribution characteristics, reasonableness verification is performed in combination with expert knowledge to generate a variable feature description set; S312, based on the variable feature description set, construct an interval generator to determine the value range; based on the determined value range, evaluate the rationality of the interval through Monte Carlo sampling to obtain an evaluation result; based on the evaluation result, optimize the interval boundary through sensitivity analysis to generate a variable interval parameter set; S313, read the constraint matrix in the standardized mathematical model set, build a constraint analyzer, identify the constraint type and strength; based on the constraint type and strength, estimate the reasonable coefficient range through numerical experiments; based on the reasonable coefficient range, perform stability analysis, determine parameter boundaries, and generate a constraint feature description set; S314, constructing a coefficient generator based on the constraint feature description set to generate a coefficient matrix; Based on the coefficient matrix, the rationality of the coefficients is verified by the feasibility test method to obtain the verified coefficient matrix; based on the verified coefficient matrix, perturbation analysis is performed to evaluate the robustness of the coefficients and generate a set of constraint coefficient parameters; S315, reading the objective function in the standardized mathematical model set, building an objective function analyzer, and identifying the function structure and components; Based on the function structure and components, the component weight range is determined through importance analysis; Based on the component weight range, balance analysis is performed to verify weight allocation and generate the objective function feature set; S316, constructing a weight generator based on the objective function feature set to obtain weight parameters; Based on the weight parameters, the rationality of the weights is ensured through target consistency test, and the weight parameters after the test are obtained; Based on the tested weight parameters, optimize the performance evaluation, adjust the weight ratio, and generate the objective function weight parameter set; S317. Based on the variable interval parameter set, the constraint coefficient parameter set and the objective function weight parameter set, a parameter correlation analyzer is constructed to evaluate the interaction between the parameters and obtain parameter evaluation results; based on the parameter evaluation results, key parameters are identified through global sensitivity analysis to generate a parameter association network; S318, constructing a parameterized instance generator based on the parameter association network to generate an instance model; Based on the instance model, completeness verification is performed to ensure parameter coverage and obtain the verified instance model; based on the verified instance model, consistency verification is performed to ensure instance validity and finally generate a parameterized model instance set.
2. The training data generation method for combinatorial optimization automatic modeling according to claim 1 is characterized in that: Step S1 is further as follows: S11. Extract entity pairs and their relationships from pre-stored supply chain optimization domain knowledge, organize each entity pair and its relationship into a triple form, and obtain a triple; classify and sort the triples based on the type of relationship to obtain sorted triples; Use graph data structure to connect the sorted triples to form a domain ontology graph; S12. Read the original supply chain optimization problem set, input each problem text in the original supply chain optimization problem set into the pre-trained BERT model, extract the problem type feature vector, constraint description feature vector, variable description feature vector and objective function feature vector from the last layer of the BERT model; fuse and align the entity and relationship information in the domain ontology graph with the extracted problem type feature vector, constraint description feature vector, variable description feature vector and objective function feature vector to generate a fused feature vector set; S13. Based on the domain ontology graph, the problem type feature vectors in the feature vector set are converted into a binary label matrix; the constraint description feature vectors in the feature vector set are converted into a constraint relationship adjacency matrix; the variable description feature vectors in the feature vector set are converted into a variable dependency matrix; the objective function feature vectors in the feature vector set are converted into an objective function structure matrix; the binary label matrix, the constraint relationship adjacency matrix, the variable dependency matrix and the objective function structure matrix are combined to form a structured optimization problem representation set.
3. The training data generation method for combinatorial optimization automatic modeling according to claim 2 is characterized in that: Step S2 is further as follows: S21. Based on the structured optimization problem representation set, extract the objective function component from the binary label matrix; extract the constraint function component from the constraint relationship adjacency matrix; extract the variable definition component from the variable dependency matrix; integrate the objective function component, the constraint function component and the variable definition component to form a model component set; S22, based on the model component set, performing minimization form conversion on the objective function component to obtain a first conversion component; performing less than or equal to form conversion on the constraint function component to obtain a second conversion component; performing interval standardization conversion on the variable definition component to obtain a third conversion component; integrating the first conversion component, the second conversion component and the third conversion component into a standardized mathematical model set; S23, based on a set of standardized mathematical models, extracting structural features in the model and constructing a feature tree; Based on the feature tree, common structural patterns are identified; the identified structural patterns are parameterized and stored as a model template library.
4. The training data generation method for combinatorial optimization automatic modeling according to claim 3 is characterized in that: Step S4 is further as follows: S41. Based on the standardized mathematical model set, the variable relationship is reorganized by using a transformation matrix to obtain a reorganized variable relationship; based on the standardized mathematical model set, the constraint hierarchy is adjusted to obtain an adjusted constraint hierarchy; based on the standardized mathematical model set, the objective function structure is transformed to obtain a transformed objective function structure; the reorganized variable relationship, the adjusted constraint hierarchy and the transformed objective function structure are combined to form a structural perturbation model set; S42, based on the structural perturbation model set, adding a normal distribution perturbation to the continuous parameter to obtain a continuous parameter perturbation model; Based on the structural perturbation model set, the discrete parameters are increased or decreased to obtain the discrete parameter perturbation model; Based on the structural perturbation model set, the interval parameters are subjected to boundary perturbation to obtain the interval parameter perturbation model; Combining the continuous parameter perturbation model, the discrete parameter perturbation model and the interval parameter perturbation model to form a parameter perturbation model set; S43. Based on the problem description set and the parameter perturbation model set, add slack variables to the constraints in the model, tighten or relax the boundary conditions, and combine to generate composite constraints to obtain a processed model; pair the processed model with the corresponding problem description in the problem description set to form a perturbed model-description pair set.
5. The training data generation method for combinatorial optimization automatic modeling according to claim 4 is characterized in that: Step S5 is further as follows: S51. Based on the perturbed model-description pair set and the domain ontology graph, the semantic feature vector of the problem description is extracted; the cosine distance between the semantic feature vectors is calculated, the semantic association network between the problem descriptions is constructed, and the semantic similarity matrix is generated; S52, based on the perturbed model-description pair set, extracting the model's variable dependency, constraint relationship and objective function structure, and calculating the structural distance between the models; based on the structural distance, constructing a structural association network between the models, and generating a structural similarity matrix; S53, performing weighted fusion on the semantic similarity matrix and the structural similarity matrix to obtain a fusion model-description pair; Based on a preset similarity threshold, the fusion model-description pairs are screened to obtain screened model-description pairs; the screened model-description pairs and their similarity information are integrated into a training data set.
6. The training data generation method for combinatorial optimization automatic modeling according to claim 5 is characterized in that: Step S13 is further as follows: S131, read the question type feature vector in the feature vector set, build a multi-label classifier, and learn the type mapping relationship; based on the type mapping relationship, perform label correlation analysis, process label overlap, and obtain a processed type mapping relationship; based on the processed type mapping relationship, verify type consistency through ontology reasoning, and generate a binary label matrix; S132, reading the constraint feature vector and the domain ontology graph in the feature vector set, and constructing a constraint relationship extractor based on the graph attention network; Based on the constraint relation extractor, the constraint interaction pattern is captured through edge feature encoding; based on the constraint interaction pattern, the validity of constraint combination is evaluated by relation prediction, and the constraint relation feature set is generated; S133. Based on the constraint relationship feature set, a sparse matrix representation framework is constructed to extract implicit associations between constraints through tensor decomposition; Based on implicit association, the constraint independence is verified by symbolic calculation, and matrix completion is applied to handle missing relations to generate the constraint relation adjacency matrix; S134, read the variable feature vectors and domain ontology graph in the feature vector set, build a variable dependency analyzer, identify direct and indirect dependencies; based on the direct and indirect dependencies, determine the dependency direction through causal inference; based on the dependency direction, verify the rationality of the dependency through ontology constraints, and generate a variable dependency feature set; S135. Based on the variable dependency feature set, a hierarchical dependency representation framework is constructed to learn the structural relationship between variables through graph convolutional networks; Based on the structural relationship between variables, community detection is applied to identify strongly dependent groups; Based on the strong dependency groups, the representation redundancy is reduced by matrix decomposition to generate the variable dependency matrix; S136, read the target function feature vector and domain ontology graph in the feature vector set, build a deep tree convolutional network, extract function structure features; based on the function structure features, identify equivalent structures through sub-expression matching; based on the equivalent structure, ensure structural rationality through semantic verification, and generate a target function feature set; S137. Based on the target function feature set, a hierarchical structure encoding framework is constructed to learn the structure combination pattern through a recursive neural network; based on the structure combination pattern, an attention mechanism is applied to capture key components; Based on the key components, the representation space is compressed by sparse coding to generate the target function structure matrix; S138. Based on the binary label matrix, constraint relationship adjacency matrix, variable dependency matrix and objective function structure matrix, a tensor fusion framework is constructed to integrate multi-dimensional structural information. Based on multi-dimensional structural information, the completeness of representation is ensured through consistency check, and finally a set of structured optimization problem representations is generated.
7. The training data generation method for combinatorial optimization automatic modeling according to claim 5 is characterized in that: Step S23 is further as follows: S231. Based on the standardized mathematical model set, a variable-constraint association graph is constructed; based on the variable-constraint association graph, a frequent subgraph mining algorithm is used to identify recurring variable combination patterns, and the equivalence of the subgraphs is verified through a graph isomorphism test to generate a variable combination feature set; S232, based on the standardized mathematical model set, perform syntax analysis on the constraint conditions and construct an abstract syntax tree of the constraint expression; Based on the abstract syntax tree, the tree edit distance is used to calculate the structural similarity between constraints; Based on structural similarity, similar constraint groups are identified through hierarchical clustering to generate constraint structure feature sets; S233, based on a set of standardized mathematical models, symbolically calculating the target function and extracting the algebraic structure of the mathematical expression; Based on algebraic structure, identify equivalent transformation relations through isomorphic mapping; Based on the equivalent transformation relationship, the group theory method is used to summarize the invariant characteristics and generate the target function feature set; S234, constructing a multi-level feature tree based on the variable combination feature set, the constraint structure feature set and the objective function feature set; Based on the multi-level feature tree, the maximum common subtree algorithm is used to extract the shared structure; based on the shared structure, the structural relationship is described by the attribute graph grammar to generate a feature tree forest; S235. Based on the feature tree forest, a structural pattern recognizer based on graph neural network is constructed; Based on the structural pattern recognizer, the dependencies between nodes are captured through the message passing mechanism; Based on the dependencies between nodes, the attention mechanism is used to aggregate tree-level features and generate a set of structural patterns. S236. Constructing a symbol template generator based on the structure pattern set; Based on the symbolic template generator, the specific values in the structure pattern set are replaced with parameter variables to obtain a parameterized model; based on the parameterized model, the parameter constraints are determined by type deduction to obtain a model with parameter constraints; based on the model with parameter constraints, the parameter scale is unified by normalization processing to generate a parameterized template set; S237. Based on the parameterized template set, a template verification framework is constructed, and the correctness of the template is verified through instantiation testing to obtain a verified template; Build an index structure to support efficient retrieval and organize verified templates into a model template library.
8. A training data generation system for automatic modeling of combinatorial optimization, characterized in that: include: at least one processor; as well as, a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the training data generation method for combinatorial optimization automatic modeling as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Knowledge graph construction method and device based on document relationship extraction
CN115269857A
Coding method and device, computer equipment and storage medium
CN116301899A