A method, system and device for modeling complex system dynamics behavior

CN117195731BActive Publication Date: 2026-10-16JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311197599.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2026-10-16
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

而目前的符号回归方法存在输入特征数量少、训练成本高等缺陷,面对底层动力学机制未知、表达式过长或表现出高度嵌套结构等问题时方程恢复率较低

Benefits of technology

本发明所提供的一种复杂系统动力学行为建模方法、系统及设备,利用预训练Transformer模块中结合输入矩阵和形式先验的编码器进行编码得到隐向量,在解码器引入硬约束,并以自回归的形式将隐向量解码为方程骨架,即预训练Transformer模块中引入形式先验与约束条件提高恢复效率,剪枝搜索空间;最后将方程骨架作为初始种群,利用双适应度-分层演化的遗传编程对初始种群分别使用细粒度基函数库和粗粒度基函数库分层进化,演化出与目标方程形式最接近、误差最小的方程表达式;之后,利用训练好的符号回归模型对real-world场景数据集进行预测。本发明结合先验知识与约束,提高方程的恢复效率。此外,将训练好的符号回归模型应用到复杂系统的real-world场景数据集上,如行人动力学系统,以验证模型在复杂系统动力学行为建模方面的可用性、泛化性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195731B_ABST
    Figure CN117195731B_ABST
Patent Text Reader

Abstract

The application discloses a complex system dynamics behavior modeling method, system and device, and relates to the field of complex system modeling. The method comprises the following steps: generating a simulation data set by using a simulation algorithm; the simulation data set is a set of input matrices; training a constructed symbolic regression model by using the simulation data set; the symbolic regression model comprises a pre-trained Transformer module, a Monte Carlo tree search module and a genetic programming module; obtaining a real-world scene data set; and predicting the real-world scene data set by using the trained symbolic regression model. The application can improve the equation recovery efficiency, model availability and generalization of a white-box symbolic regression method in the field of complex system modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of complex system modeling, and in particular to a method, system, and device for modeling the dynamic behavior of complex systems. Background Technology

[0002] Complex systems abound in the real world, such as social systems, biological systems, nervous systems, and ecosystems. Modeling is a crucial step in gaining a deep understanding of these systems and enabling their analysis and regulation. However, establishing accurate mathematical models for complex systems is extremely difficult. These systems exhibit characteristics such as a large number of actors with diverse attributes, complex interactions between actors, numerous and uncertain factors influencing actor evolution, and unknown and spatiotemporally unique evolutionary environments. This places higher demands on complex system modeling: the model should possess greater adaptability and provide accurate and reliable predictions with limited prior knowledge. To model complex networks of multimodal, multi-relational, and heterogeneous actors, nonlinear embedded patterns and evolutionary behaviors are modeled as dynamic equations at nodes. The main body of these equations is represented symbolically, laying the groundwork for subsequent analysis of system self-organization and emergent behaviors using nonlinear methods.

[0003] Symbolic regression is a supervised learning method that uses feature variables and target variables to discover symbolic expressions of unknown forms. As a white-box model, it combines accuracy and interpretability, ensuring that the obtained model can explain the underlying structure and interaction relationships of the data in a way that humans can understand. It is widely used in feature selection, time series forecasting, system modeling, and other fields. Therefore, symbolic regression is used to learn the dynamic equations for modeling complex systems and to model the evolution and interaction behavior between subjects.

[0004] The main solutions to the symbolic regression problem can be categorized into three types: genetic programming, deep neural network-based models, and reinforcement learning-based models. However, current symbolic regression methods suffer from drawbacks such as a limited number of input features and high training costs. Furthermore, they exhibit low equation recovery rates when faced with problems such as unknown underlying dynamic mechanisms, excessively long expressions, or highly nested structures. Therefore, it is necessary to design new symbolic regression model architectures that can improve equation recovery efficiency and apply the algorithm to real-world datasets of complex systems, such as pedestrian dynamics systems, to verify the model's usability and generalization ability in modeling the dynamic behavior of complex systems. Summary of the Invention

[0005] The purpose of this invention is to provide a method, system, and device for modeling the dynamic behavior of complex systems, which can improve the equation recovery efficiency, model availability, and generalization of white-box symbolic regression methods in the field of complex system modeling.

[0006] To achieve the above objectives, the present invention provides the following solution: A method for modeling the dynamic behavior of complex systems, comprising: A simulation dataset is generated using a simulation algorithm; the simulation dataset is a set of input matrices. A pre-constructed symbolic regression model is trained using a simulation dataset. The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module searches based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module uses the equation skeleton as the initial population and iteratively evolves iteratively using pre-set fine-grained and coarse-grained basis function libraries to obtain the optimal equation expression. Obtain the real-world scene dataset; We use a trained symbolic regression model to predict real-world scene datasets.

[0007] Optionally, the formal prior references include: a random truncation or mask of the subsequent traversal sequence of the equation expression and a random walk sequence of the equation from the root node to the leaf node, generated in the form of a tree.

[0008] Optionally, the formal prior can be categorized as: fully known, partially known, fully unknown, and partially incorrect.

[0009] Optionally, the encoder specifically includes: a local feature extraction module, a global feature extraction module, and a latent vector coding module; The local feature extraction module includes: two cascaded LBR layers, two SG layers, two fully connected layers, and a max pooling layer; the LBR layer includes: linear transformation of the Linear layer, normalization of the Batchenorm layer, and activation of the ReLU layer; The input matrix is ​​passed through two cascaded LBR layers to obtain the transformed matrix; the transformed matrix is ​​passed through an SG layer, and the farthest point sampling algorithm and neighborhood embedding method are used to obtain the feature difference; the feature difference is concatenated with the features of the corresponding sample points and then input into two fully connected layers to obtain the features; the features are passed through a max pooling layer to obtain local features; The global feature extraction module is used to transform the features of the input matrix using self-attention blocks to obtain the transformed features; then, the transformed features are linearly transformed to obtain the feature matrix, and an offset attention structure is used to obtain the global features. The latent vector encoding module is used to encode local and global features into latent vectors.

[0010] A system for modeling the dynamic behavior of complex systems, comprising: A simulation dataset generation module is used to generate a simulation dataset using simulation algorithms; the simulation dataset is a set of input matrices. A symbolic regression model training module is used to train a pre-constructed symbolic regression model using a simulation dataset. The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module searches based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module uses the equation skeleton as the initial population and iteratively evolves iteratively using pre-set fine-grained and coarse-grained basis function libraries to obtain the optimal equation expression. The scene dataset acquisition module is used to acquire real-world scene datasets; The prediction module is used to make predictions on a real-world scene dataset using a trained symbolic regression model.

[0011] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform a method for modeling the dynamic behavior of a complex system.

[0012] Optionally, the memory is a computer-readable storage medium.

[0013] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention provides a method, system, and device for modeling the dynamic behavior of complex systems. It utilizes a pre-trained Transformer module with an encoder that combines the input matrix and formal priors to encode latent vectors. Hard constraints are introduced in the decoder, and the latent vectors are decoded into an equation skeleton in an autoregressive manner. This means that the pre-trained Transformer module introduces formal priors and constraints to improve recovery efficiency and prunes the search space. Finally, the equation skeleton is used as the initial population, and a dual-fitness-hierarchical evolutionary genetic programming approach is used to evolve the initial population using both fine-grained and coarse-grained basis function libraries, resulting in an equation expression that is closest to the target equation form and has the smallest error. Then, a trained symbolic regression model is used to predict real-world scene datasets. This invention combines prior knowledge and constraints to improve the efficiency of equation recovery. Furthermore, the trained symbolic regression model is applied to real-world scene datasets of complex systems, such as pedestrian dynamics systems, to verify the model's usability and generalization ability in modeling the dynamic behavior of complex systems. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of a method for modeling the dynamic behavior of a complex system provided by the present invention; Figure 2 This is a schematic diagram illustrating the principle of a complex system dynamics behavior modeling method provided by the present invention; Figure 3 This is a schematic diagram illustrating the iteration of the genetic programming module. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] The purpose of this invention is to provide a method, system, and device for modeling the dynamic behavior of complex systems, which can improve the equation recovery efficiency, model availability, and generalization of white-box symbolic regression methods in the field of complex system modeling.

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] like Figure 1 and Figure 2 As shown, the present invention provides a method for modeling the dynamic behavior of complex systems, comprising: S101, Use a simulation algorithm to generate a simulation dataset; the simulation dataset is a set of input matrices.

[0020] The steps for the simulation algorithm to generate the simulation dataset are as follows: Step 1: The algorithm starts with an empty node. At this time, the number of empty nodes e=1. When the number of intermediate nodes (i.e. operators) to be created n>1, the position k of an intermediate node and the number of its child nodes a are randomly sampled according to the probability distribution L(e, n) derived by mathematical induction, and k empty nodes are selected as leaf nodes.

[0021] Step 2: Randomly select the number 'a' of leaf nodes for the operator. If a=1, it means a unary operator has been sampled at the current position, so let the number of empty nodes be 'ek'; if a=2, it means a binary operator has been sampled, so let the number of empty nodes be e-k+1, and create an empty child node for the current operator node.

[0022] Step 3: Update the total number of intermediate nodes n by decreasing it by one until there are no intermediate nodes to be created, i.e., n is 0. Then stop, forming a binary tree form of an equation expression.

[0023] Step 4: For each equation, randomly assign values ​​to each feature dimension (vector X) according to a normal or uniform distribution, and calculate the corresponding function value (y value) of the equation. Step 5: Repeat steps 1 to 4 above, and obtain the results after multiple samplings. Figure 1 The input matrix D is shown in the figure.

[0024] The simulation training dataset is generated using the method described above, with a matrix as the model input. Each row represents a sample, and each column represents a feature (or dimension). Here, the features simply refer to each dimension of the variable X without any specific meaning. For example, in the equation y = x1 + x2, the vector X = [x1, x2]. Each vector X is randomly assigned a value, and the corresponding function value is calculated. The resulting matrix is... Figure 2 The input matrix D is called a feature because in a real-world scenario, x1 and x2 may represent different attributes / features.

[0025] S102, a symbolic regression model is trained using a simulation dataset. The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module is used to search based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module is used to iteratively evolve the equation expression by using the equation skeleton as the initial population and performing layered evolution with pre-set fine-grained and coarse-grained basis function libraries to obtain the optimal equation expression.

[0026] The pre-trained Transformer module generates an equation skeleton from the input matrix in an autoregressive manner, such as... , where c is a constant placeholder.

[0027] The Monte Carlo tree search module runs in parallel with the pre-trained Transformer module, using the same input matrix as input, to search for basis function libraries with larger lengths and depths, such as... wait.

[0028] The genetic programming module uses a large number of equation skeletons generated by the pre-trained Transformer module as the initial population. It iteratively evolves the equations in layers using a pre-set fine-grained basis function library L={+, -, ×, ÷, sin, cos, arcsin, pow, exp, log} and a basis function library searched by the Monte Carlo tree search module, and finally obtains the optimal equation expression y.

[0029] The formal a priori references include: a random truncation or mask of the subsequent traversal sequence of the equation expression and a random walk sequence of the equation from the root node to the leaf node, generated in the form of a tree.

[0030] In this process, a random truncation or masked sequence of subsequent traversals (with parentheses omitted) of the equation expression is encoded and concatenated with the original input matrix D, serving as prior knowledge of the equation. For example, the equation... The corresponding subsequent traversal sequence is Randomly mask the sequence as follows: ",in" " is a placeholder.

[0031] The equation generates random walk sequences from the root node to the leaf node in the form of a tree. These sequences are encoded and concatenated with the original input matrix D, serving as prior knowledge for the equation. For example, the equation... Represent it as a balanced binary tree, and randomly generate a walk sequence such as " ".

[0032] During training, one of the two methods mentioned above is selected as the formal prior for the equation, and the encoded input is fed into the Encoder network. The formal prior is categorized into four types: fully known, partially known, fully unknown, and partially incorrect, to improve the model's robustness and generalization ability. During the testing phase, the formal prior may be selectively provided or not.

[0033] The encoder specifically includes: a local feature extraction module, a global feature extraction module, and a latent vector coding module; The local feature extraction module includes: two cascaded LBR layers, two SG layers, two fully connected layers, and a max pooling layer; the LBR layer includes: linear transformation of the Linear layer, normalization of the Batchenorm layer, and activation of the ReLU layer.

[0034] The input matrix is ​​passed through two cascaded LBR layers to obtain the transformed matrix; the transformed matrix is ​​passed through an SG layer, and the farthest point sampling algorithm and neighborhood embedding method are used to obtain the feature difference; the feature difference is concatenated with the features of the corresponding sample points and then input into two fully connected layers to obtain the features; the features are passed through a max pooling layer to obtain local features.

[0035] In order to extract the local features of points, the local feature extraction module first introduces Input Embedding / Neighbor Embedding.

[0036] The local feature extraction module process is as follows: (1) with Figure 2 The original input matrix D is used as the input. After passing through two cascaded LBR layers (i.e., two linear transformations, batch normalization, and ReLU activation), the transformed matrix is ​​obtained. .

[0037] (2) The SG layer receives a set of N sample points P output by the LBR layer, i.e. As input, each point has a feature F. First, the point set P is downsampled to its nearest feature using the farthest point sampling algorithm. For each point ,make As the k nearest neighbors of point p, for each neighbor of p, calculate the difference between its features and those of p, i.e., the formula... ,in, Let p be the input feature of point p, which is a row in the input matrix D.

[0038] (3) The feature difference Connecting the features of p and inputting them into two fully connected layers yields... That is, the formula , where RP(x, k) means repeating the vector x k times to form a matrix.

[0039] (4) Finally, the local features output are calculated using max pooling. That is, the formula , where MP represents max pooling.

[0040] The core of the above operation is to connect the features of the sampling point with the difference between the sampling point and the features of the neighboring points. The difference is similar to the Laplacian coordinate and represents the information of the local area. The sampling point represents the center point of the local area. Connecting them makes it easier for the network to aggregate local information in the future.

[0041] The global feature extraction module is used to transform the features of the input matrix using self-attention blocks to obtain the transformed features; then, the transformed features are linearly transformed to obtain the feature matrix, and an offset attention structure is used to obtain the global features.

[0042] The process of the global feature extraction module is as follows: (1) First, calculate the features of the original input features after the self-attention block transformation, i.e. Where Q, K, and V are the features of the original input matrix. The characteristic matrix obtained through linear transformation.

[0043] (2) Replace the original Transformer's Self-Attention structure with Offset-Attention, that is, replace the original output features: .

[0044] Replace with: .

[0045] in For the output global features, LBR refers to a block that includes Linear, BatchNorm and a ReLU layer.

[0046] Offset attention (OA) essentially uses the Laplacian matrix. Instead of the adjacency matrix, where Let E be the angle matrix and E be the adjacency matrix. The offset (difference) between the self-attention features and the input features is calculated by element-wise subtraction.

[0047] The latent vector encoding module encodes local and global features into latent vectors Z. The latent vector decoding module decodes Z into a tree structure of understandable expressions in an autoregressive manner. After decoding, the constants in the equation expression exist as placeholders, such as... This is called the "skeleton" of the equation.

[0048] During the equation skeleton generation process, explicit constraints / hard constraints are applied to the model, such as... Figure 2 As shown, this includes, but is not limited to, restrictions on expression length, that trigonometric functions cannot be nested (e.g., sin(cos(x)), that trigonometric functions and their inverse functions cannot appear consecutively (e.g., arcsin(sin(x)), and that trigonometric functions, logarithmic functions, exponential functions, etc., cannot form composite functions (e.g., sin(log(x)), etc.).

[0049] The Monte Carlo tree module is used to search for basis functions with higher reward values ​​for genetic programming. This process runs in parallel with the pre-training module, both aimed at guiding and enhancing the evolutionary process of genetic programming. The Monte Carlo tree module search process is as follows: (1) Initially, start with an empty node and randomly select from the base function library. We select a base function, perform a certain number of iterative searches, and calculate the loss of the current expression tree.

[0050] (2) Using the original input matrix D as input, perform the search process, compare the loss between the current tree expression value and the true value, and store the discovered trees (equations) or subtrees (equation substructures) with high reward values ​​into the priority queue data structure, sort them by reward value, and gradually increase the length threshold of the trees that can be used as basis functions as the search progresses.

[0051] (3) Stop running when the error is less than the threshold or the maximum number of iterations is reached.

[0052] The final result is a coarse-grained basis function library, such as .

[0053] Genetic programming is an evolutionary algorithm used for symbolic regression tasks. It consists of individuals, a population, evolutionary operators, basis functions, and fitness functions. Genetic programming can randomly replace, add, or remove operators, constants, and variables in an equation or its skeleton according to probability. For example, for the equation y=x... 2 +c can be evolved to obtain the equation y=x 2 +sin(x)+c, where sin() is randomly selected from a predefined base function library. The pre-training module is designed to provide a good initial population for genetic programming.

[0054] The final equation evolution was completed using a dual-fitness-hierarchical evolutionary genetic programming approach.

[0055] The initially specified base function library This is called the fine-grained basis function library, while the larger set of subtrees obtained from the Monte Carlo tree search is called the coarse-grained basis function library. The optimal equation skeleton obtained from the pre-trained module is used as the initial population.

[0056] like Figure 3 As shown, the evolutionary process is as follows: (1) When evolution begins, the initial population is replicated and two different base function libraries, coarse and fine, are used to evolve in parallel, performing processes such as crossover, mutation, and evaluation.

[0057] (2) Every m generations, the fitness is replaced with a function that measures the complexity of the equation to avoid excessive complexity. The two populations after screening are merged, the population is replicated again, and iterative evolution is performed again.

[0058] (3) Stop iterating until the fitness (equivalent to the loss function, the smaller the better) is less than the threshold or the maximum number of iterations is reached, and obtain the equation expression with the minimum loss and the closest form.

[0059] Model training is complete.

[0060] S103, Obtain the real-world scene dataset. Obtain the pedestrian dynamics dataset (not in image format) from an open-source website, and record the two-dimensional position coordinates of 736 testers in the corridor at a frequency of 25 frames per second, totaling 10 txt files. Each file saves the tester ID, time, x-coordinate, and y-coordinate, and the number of testers and time ranges contained in each file are different.

[0061] S104 uses a trained symbolic regression model to predict real-world scene datasets.

[0062] Corresponding to the methods provided in the above embodiments, the present invention also provides a complex system dynamic behavior modeling system, comprising: The simulation dataset generation module is used to generate a simulation dataset using simulation algorithms; the simulation dataset is a set of input matrices.

[0063] A symbolic regression model training module is used to train a pre-constructed symbolic regression model using a simulation dataset. The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module searches based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module uses the equation skeleton as the initial population and iteratively evolves iteratively using pre-set fine-grained and coarse-grained basis function libraries to obtain the optimal equation expression.

[0064] The scene dataset acquisition module is used to acquire real-world scene datasets.

[0065] The prediction module is used to make predictions on a real-world scene dataset using a trained symbolic regression model.

[0066] In order to execute the methods corresponding to the above embodiments and achieve the corresponding functions and technical effects, the present invention also provides an electronic device, characterized in that it includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the aforementioned method for modeling the dynamic behavior of a complex system.

[0067] The memory is a computer-readable storage medium.

[0068] Based on the above description, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned computer storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0069] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0070] This specification uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for modeling the dynamic behavior of complex systems, characterized in that, include: Use simulation algorithms to generate simulation datasets; The simulation dataset is a set of input matrices; The constructed symbolic regression model was trained using a simulation dataset; The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module is used to search based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module is used to iteratively evolve the equation skeleton as the initial population, using a pre-set fine-grained basis function library and a coarse-grained basis function library in a hierarchical manner to obtain the optimal equation expression. Obtain a real-world scene dataset of the pedestrian dynamics system; the real-world scene dataset is a pedestrian dynamics dataset. Using a trained symbolic regression model to predict dynamic behavior on a real-world scene dataset; The encoder specifically includes: a local feature extraction module, a global feature extraction module, and a latent vector coding module; The local feature extraction module includes: two cascaded LBR layers, two SG layers, two fully connected layers, and a max pooling layer; the LBR layer includes: linear transformation of the Linear layer, normalization of the Batchenorm layer, and activation of the ReLU layer; The input matrix is ​​passed through two cascaded LBR layers to obtain the transformed matrix; the transformed matrix is ​​passed through an SG layer, and the farthest point sampling algorithm and neighborhood embedding method are used to obtain the feature difference; the feature difference is concatenated with the features of the corresponding sample points and then input into two fully connected layers to obtain the features; the features are passed through a max pooling layer to obtain local features; The global feature extraction module is used to transform the features of the input matrix using self-attention blocks to obtain the transformed features; then, the transformed features are linearly transformed to obtain the feature matrix, and an offset attention structure is used to obtain the global features. The latent vector encoding module is used to encode local and global features into latent vectors.

2. The method for modeling the dynamic behavior of a complex system according to claim 1, characterized in that, The formal a priori references include: a random truncation or mask of the subsequent traversal sequence of the equation expression and a random walk sequence of the equation from the root node to the leaf node, generated in the form of a tree.

3. The method for modeling the dynamic behavior of a complex system according to claim 1, characterized in that, The formal priors are categorized as: fully known, partially known, fully unknown, and partially incorrect.

4. A system for modeling the dynamic behavior of complex systems, characterized in that, include: The simulation dataset generation module is used to generate simulation datasets using simulation algorithms. The simulation dataset is a set of input matrices; The symbolic regression model training module is used to train the constructed symbolic regression model using the simulation dataset. The symbolic regression model includes a pre-trained Transformer module, a Monte Carlo tree search module, and a genetic programming module. The pre-trained Transformer module includes an encoder and a decoder. The encoder takes an input matrix and formal prior as input and latent vectors as output. The decoder introduces hard constraints and decodes the latent vectors into an equation skeleton in an autoregressive manner. The Monte Carlo tree search module is used to search based on the input matrix to obtain a coarse-grained basis function library. The genetic programming module is used to iteratively evolve the equation skeleton as the initial population, using a pre-set fine-grained basis function library and a coarse-grained basis function library in a hierarchical manner to obtain the optimal equation expression. The scene dataset acquisition module is used to acquire the real-world scene dataset of the pedestrian dynamics system; the real-world scene dataset is a pedestrian dynamics dataset. The prediction module is used to predict the dynamic behavior of real-world scene datasets using a trained symbolic regression model; The encoder specifically includes: a local feature extraction module, a global feature extraction module, and a latent vector coding module; The local feature extraction module includes: two cascaded LBR layers, two SG layers, two fully connected layers, and a max pooling layer; the LBR layer includes: linear transformation of the Linear layer, normalization of the Batchenorm layer, and activation of the ReLU layer; The input matrix is ​​passed through two cascaded LBR layers to obtain the transformed matrix; the transformed matrix is ​​passed through an SG layer, and the farthest point sampling algorithm and neighborhood embedding method are used to obtain the feature difference; the feature difference is concatenated with the features of the corresponding sample points and then input into two fully connected layers to obtain the features; the features are passed through a max pooling layer to obtain local features; The global feature extraction module is used to transform the features of the input matrix using self-attention blocks to obtain the transformed features; then, the transformed features are linearly transformed to obtain the feature matrix, and an offset attention structure is used to obtain the global features. The latent vector encoding module is used to encode local and global features into latent vectors.

5. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program and the processor runs the computer program to enable the electronic device to perform a method for modeling the dynamic behavior of a complex system according to any one of claims 1 to 3.

6. An electronic device according to claim 5, characterized in that, The memory is a computer-readable storage medium.