Model processing method and related equipment
By converting the simulation model into a graph model and aggregating it, the coarse-grained model is solved, and the problem of insufficient time and rationality of multi-grained model design in the existing technology is solved, and efficient simulation calculation is achieved.
Patent Information
- Application Number
- CN202310658358.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2024-12-06
AI Technical Summary
When establishing multi-grain simulation models, the existing technology requires manual design, which leads to a long modeling time and the rationality of the model cannot be guaranteed. The calculation of high-precision model is time-consuming and cannot meet the rapid simulation requirements of complex systems.
By converting the simulation model into a graph model and obtaining a coarse-grained model through node aggregation, the coarse-grained model is optimized based on performance differences and preset indicators, simplifying the calculation process and reducing calculation time.
The simplified coarse-grained model is similar to the original model in key indicators, which significantly reduces the time-consuming simulation calculation, improves simulation calculation efficiency, and shortens the construction time of the graph model.
Smart Images

Figure CN119089621A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model processing method and related equipment. Background Art
[0002] Simulation technology is an important technical means to analyze systems ranging from microscopic systems to social behaviors and cosmic systems. Among them, discrete event simulation is widely used in logistics, industrial manufacturing, medical care, aerospace and other fields. Taking smart logistics as an example, discrete event simulation can be used for layout planning of warehousing and logistics networks, verification and analysis of various plans and scheduling algorithms, what-if analysis in the operation stage, etc. It is the core technology for realizing the next generation of digital twins. In addition, the time consumption of simulation calculations is one of the core performances of industrial-grade discrete event simulation software. For some complex industrial systems, such as ports, warehouses, production lines, etc., it takes minutes or even hours to simulate the daily operations of such systems for one day. Especially in some specific scenarios, it is necessary to use simulations repeatedly and iteratively. For example, when using simulation models as evaluators of optimization algorithms, the computational efficiency of simulation models is particularly important.
[0003] At present, the commonly used simulation optimization method is multi-granularity simulation optimization. Specifically, for the same actual system, multiple simulation models with different granularity / precision are established. Generally, the higher the precision of the model, the more time-consuming the calculation. This solution achieves a certain degree of precision while realizing simulation acceleration by combining models of different precisions.
[0004] However, the above methods usually require manual design of multi-granularity models for specific application scenarios, which takes a long time to model and cannot guarantee the rationality of the established models. Summary of the invention
[0005] The present application provides a model processing method and related equipment for performing simulation through a simplified graphical model, which can improve the simulation calculation efficiency and reduce the time consumption of simulation calculation.
[0006] The first aspect of the embodiment of the present application provides a model processing method, which can be applied to discrete event simulation scenarios, such as: smart logistics, medical simulation, resource scheduling, warehouse scheduling and other scenarios. The method can be executed by a model processing device, or by a component of the model processing device (such as a processor, a chip, or a chip system, etc.). The method includes: obtaining a simulation model, the simulation model is used to simulate the processing flow of a physical system; converting the simulation model into a first graph model, the first graph model includes a connection relationship between multiple nodes and multiple nodes; aggregating at least two nodes in the first graph model to obtain a second graph model, and the number of nodes in the second graph model is less than the number of nodes in the first graph model.
[0007] In an embodiment of the present application, a more coarse-grained graph model is obtained by converting a simulation model into a graph model and aggregating the nodes in the graph model. On the one hand, the coarse-grained model can be subsequently optimized according to the performance difference of the two graph models and preset indicators. The coarse-grained model is similar to the simulation model in key indicators, and due to its simple structure, the simplified coarse-grained model can reduce the computational time and improve the efficiency of simulation calculations. On the other hand, the graph model has a shorter construction time and better general effect.
[0008] Optionally, in a possible implementation of the first aspect, the above steps also include: optimizing the parameters of the second graph model based on the first graph model, the second graph model and preset indicators, where the parameters are the parameters of each node in the graph model, and the preset indicators are used to determine the performance difference between the first graph model and the second graph model.
[0009] In this possible implementation, the fine-grained model (first graph model) is simplified to a coarse-grained model (second graph model), and the coarse-grained model is optimized according to the performance difference and the preset index. On the one hand, the coarse-grained model is similar to the simulation model in key indicators. On the other hand, the simplified coarse-grained model can reduce the computation time and improve the simulation computation efficiency compared to the simulation model.
[0010] Optionally, in a possible implementation of the first aspect, the first graph model includes activities, resources, resource mapping relationships, and activity connection relationships, multiple nodes correspond to multiple activities, and connection relationships correspond to activity connection relationships; wherein activities are used to represent steps performed by flow entities in simulation tasks; resources are used to represent resources used by activities; resource mapping relationships are used to represent associations between activities and resources, and activity connection relationships are used to indicate the order of execution of steps by flow entities. Furthermore, the first graph model may also include a generator, which is used to generate flow entities.
[0011] In this possible implementation, the simulation model can be converted into a graph model that conforms to the business logic, thereby improving the general construction method of the simulation model on the one hand, and facilitating the subsequent simplification of the first graph model on the other hand.
[0012] Optionally, in a possible implementation manner of the first aspect, the at least two nodes are adjacent nodes, and / or a connection relationship between the at least two nodes and other nodes remains unchanged before and after aggregation.
[0013] In this possible implementation, the first graph model is simplified through the aggregation rule exemplified above to obtain a second graph model with a coarser granularity, thereby improving the simulation calculation efficiency and reducing the time consumption of the simulation calculation.
[0014] Optionally, in a possible implementation of the first aspect, the above step: optimizing the parameters of the second graph model based on the first graph model, the second graph model and preset indicators includes: optimizing the parameters so that the performance difference between the first graph model and the performance difference between the second graph model is less than or equal to a preset threshold.
[0015] In this possible implementation, the coarse-grained model can be optimized according to the performance difference and the preset index. On the one hand, the coarse-grained model and the simulation model are similar in key indicators, and due to the simple structure, the simplified coarse-grained model can reduce the calculation time and improve the simulation calculation efficiency.
[0016] The second aspect of the embodiment of the present application provides a model processing device, which can be applied to discrete event simulation scenarios, such as: smart logistics, medical simulation, resource scheduling, warehouse scheduling and other scenarios. The model processing device includes: an acquisition unit, used to acquire a simulation model, the simulation model is used to simulate the processing flow of a physical system; a conversion unit, used to convert the simulation model into a first graph model, the first graph model includes a connection relationship between multiple nodes and multiple nodes; an aggregation unit, used to aggregate at least two nodes in the first graph model to obtain a second graph model, the number of nodes in the second graph model is less than the number of nodes in the first graph model.
[0017] Optionally, in a possible implementation of the second aspect, the above-mentioned model processing device also includes: an optimization unit, used to optimize the parameters of the second graph model based on the first graph model, the second graph model and preset indicators, the parameters are the parameters of each node in the graph model, and the preset indicators are used to determine the performance difference between the first graph model and the second graph model.
[0018] Optionally, in a possible implementation of the second aspect, the above-mentioned first graph model includes activities, resources, resource mapping relationships and activity connection relationships, multiple nodes correspond to multiple activities, and connection relationships correspond to activity connection relationships; wherein, activities are used to represent the steps performed by flow entities in simulation tasks; resources are used to represent the resources used by activities; resource mapping relationships are used to represent the association relationship between activities and resources, and activity connection relationships are used to indicate the sequential relationship between the flow entities executing each step.
[0019] Optionally, in a possible implementation manner of the second aspect, the at least two nodes are adjacent nodes, and / or a connection relationship between the at least two nodes and other nodes remains unchanged before and after aggregation.
[0020] Optionally, in a possible implementation manner of the second aspect, the above-mentioned optimization unit is specifically used to optimize parameters so that the performance difference between the first graph model and the performance difference between the second graph model is less than or equal to a preset threshold.
[0021] A third aspect of an embodiment of the present application provides a model processing device, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the model processing device implements the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0022] A fourth aspect of an embodiment of the present application provides a computer-readable medium on which a computer program or instruction is stored. When the computer program or instruction is executed on a computer, the computer executes the method in the aforementioned first aspect or any possible implementation of the first aspect.
[0023] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is executed on a computer, it enables the computer to execute the method in the aforementioned first aspect or any possible implementation manner of the first aspect.
[0024] A sixth aspect of an embodiment of the present application provides a chip system, which includes at least one processor for supporting a model processing device to implement the functions involved in the above-mentioned first aspect or any possible implementation method of the first aspect.
[0025] In a possible design, the chip system may also include a memory for storing program instructions and data necessary for the model processing device. The chip system may be composed of a chip, or may include a chip and other discrete devices. Optionally, the chip system also includes an interface circuit, which provides program instructions and / or data for at least one processor.
[0026] Among them, the technical effects brought about by the second, third, fourth, fifth, and sixth aspects or any possible implementation methods thereof can refer to the technical effects brought about by the first aspect or different possible implementation methods of the first aspect, and will not be repeated here.
[0027] It can be seen from the above technical solutions that the present application has the following advantages: by converting the simulation model into a graphical model, and by aggregating the nodes in the graphical model, a more coarse-grained graphical model is obtained. On the one hand, the coarse-grained model can be subsequently optimized according to the performance difference of the two graphical models and the preset indicators. The coarse-grained model is similar to the simulation model in key indicators, and due to the simple structure, the simplified coarse-grained model can reduce the calculation time and improve the simulation calculation efficiency. On the other hand, the construction time of the graphical model is short and the general effect is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1A A schematic diagram of the structure of the model processing system provided in the embodiment of the present application;
[0029] Figure 1BAnother structural schematic diagram of the model processing system provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a flow chart of a model processing method provided in an embodiment of the present application;
[0031] Figure 3 An example diagram of a first diagram model provided in an embodiment of the present application;
[0032] Figure 4 Another example diagram of the first diagram model provided in the embodiment of the present application;
[0033] Figure 5 An example diagram of an aggregated first graph model provided in an embodiment of the present application;
[0034] Figure 6 An example diagram of an optimized second graph model provided in an embodiment of the present application;
[0035] Figure 7 Another flowchart of the model processing method provided in the embodiment of the present application;
[0036] Figure 8 An example diagram of experimental results provided for the embodiments of the present application;
[0037] Fig. 9 Another example diagram of the experimental results provided in the embodiments of the present application;
[0038] Fig.10 A schematic diagram of the structure of a model processing device provided in an embodiment of the present application;
[0039] Fig.11 Another structural schematic diagram of the model processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The present application provides a model processing method and related equipment for performing simulation through a simplified graphical model, which can improve the simulation calculation efficiency and reduce the time consumption of simulation calculation.
[0041] To facilitate understanding, the relevant terms and concepts mainly involved in the embodiments of the present application are first introduced below.
[0042] 1. Discrete Event Simulation
[0043] Discrete event simulation refers to a method of predicting system changes based on the laws of event changes at discrete time points.
[0044] 2. Multi-fidelity Simulation accelerates simulation operations and combines simulation optimization algorithms by establishing multiple simulation models with different accuracies.
[0045] At present, the commonly used simulation optimization method is multi-granularity simulation optimization. Specifically, for the same actual system, multiple simulation models with different granularity / precision are established. Generally, the higher the precision of the model, the more time-consuming the calculation. This solution achieves a certain degree of precision while accelerating the simulation by combining models of different precisions. However, the above method usually requires manual design of multi-granularity models for specific application scenarios. On the one hand, the modeling time is long, and on the other hand, the rationality of the established model cannot be guaranteed.
[0046] In order to solve the above technical problems, an embodiment of the present application provides a model processing method, which converts a simulation model into a graph model, and obtains a more coarse-grained graph model by aggregating the nodes in the graph model. On the one hand, the coarse-grained model can be subsequently optimized according to the performance difference of the two graph models and the preset indicators. The coarse-grained model is similar to the simulation model in key indicators, and due to the simple structure, the simplified coarse-grained model can reduce the calculation time and improve the simulation calculation efficiency. On the other hand, the construction time of the graph model is short and the general effect is better.
[0047] Next, several application scenarios of this application are introduced.
[0048] Figure 1A A schematic diagram of a model processing system provided in an embodiment of the present application, wherein the model processing system includes a terminal device ( Figure 1A Only the terminal device is a mobile phone as an example) and a model processing device. It can be understood that, in addition to mobile phones, terminal devices can also be tablet computers (pads), portable game consoles, personal digital assistants (PDAs), laptops, ultra mobile personal computers (ULTRA MOBILE PERSONAL COMPUTER, UMPC), handheld computers, netbooks, vehicle-mounted media playback devices, wearable electronic devices, virtual reality (VR) terminal devices, augmented reality (AR), vehicles, vehicle-mounted terminals, aircraft terminals, intelligent robots and other terminal devices. The terminal device is the initiator of model processing. As the initiator of the model processing request, the request is usually initiated by the user through the terminal device.
[0049] The above-mentioned model processing device can be a cloud server, network server, application server, management server or other device or server with model processing function. The model processing device receives the model processing request (including simulation model) from the terminal device through the interactive interface, and then transforms, aggregates, optimizes and other operations on the simulation model through the memory for storing data and the processor link of model processing to obtain the optimized graph model. The memory in the model processing device can be a general term, including local storage and database for storing historical data. The database can be on the model processing device or on other network servers. Among them. Regarding the model processing process (for example: transformation, aggregation, optimization, etc.) Figure 2 The following is an explanation and will not be expanded here.
[0050] exist Figure 1A In the model processing system shown, the terminal device can receive instructions from the user. For example, the terminal device can obtain the simulation model input / selected by the user, and then initiate a request to the model processing device, so that the model processing device performs model processing (such as conversion, aggregation, optimization, etc.) on the simulation model obtained by the terminal device, thereby obtaining an optimized graphical model.
[0051] exist Figure 1A In the embodiment of the present application, the model processing device can execute the model processing method of the embodiment of the present application.
[0052] Figure 1B Another structural diagram of the model processing system provided in the embodiment of the present application is shown in FIG. Figure 1B In the terminal device ( Figure 1B In this paper, only the terminal device is a mobile phone as an example) directly as a model processing device. The terminal device can directly obtain the simulation model and directly process it (such as conversion, aggregation, optimization, etc.) by the hardware of the terminal device itself. The specific process is similar to Figure 1A Similarly, please refer to the above description and will not repeat them here.
[0053] Optionally, in Figure 1B In the model processing system shown, the terminal device can receive instructions from the user. For example, the terminal device can obtain the simulation model selected by the user in the terminal device, and then perform model processing (such as conversion, aggregation, optimization, etc.) to obtain an optimized graph model.
[0054] exist Figure 1B In the embodiment of the present application, the terminal device itself can execute the model processing method.
[0055] The following describes the model processing method provided in the embodiment of the present application. The method can be executed by a model processing device, or by a component of the model processing device (such as a processor, a chip, or a chip system, etc.). The model processing device can be a cloud device (such as the aforementioned Figure 1A The model processing device or server shown in FIG. 1 may also be a terminal device (eg Figure 1B Of course, the method can also be executed by a system consisting of a cloud device and a terminal device (as described above). Figure 1A shown).
[0056] The application scenarios to which the method provided in the embodiments of the present application is applicable are mainly discrete event simulation scenarios, such as: smart logistics, medical simulation, resource scheduling, warehouse scheduling and other scenarios.
[0057] See also Figure 2 , a flow chart of a model processing method provided in an embodiment of the present application, the method may include steps 201 to 204. Steps 201 to 204 are described in detail below.
[0058] Step 201, obtaining a simulation model.
[0059] In the embodiment of the present application, there are many ways for the model processing device to obtain the simulation model, which can be through user input, by receiving it from other devices, or by selecting it from a database, etc., and the specifics are not limited here.
[0060] Among them, the simulation model is used to simulate the processing flow of the physical system and is often used in simulation calculations in discrete time simulation scenarios.
[0061] Step 202, converting the simulation model into a first graphical model.
[0062] After the model processing device obtains the simulation model, it converts the simulation model into a first graph model. The first graph model includes a connection relationship between multiple nodes. Alternatively, it can be understood that the first graph model uses the relationship between multiple nodes to represent the processing flow of the simulation model.
[0063] The graph model in the embodiments of the present application may refer to a binary group, a quadruple group, a quintuple group, etc.
[0064] The above two-tuple includes: activity (Active, A) and activity connection relationship (Connect. C). The four-tuple includes: activity (A), resources (resources, R), resource mapping relationship (Resource mapping relationship, M), activity connection relationship (C). The five-tuple includes: generator (Generator, G), activity (A), resources (resources, R), resource mapping relationship (M), activity connection relationship (C). Multiple nodes correspond to multiple activities, and the connection relationship corresponds to the activity connection relationship.
[0065] Generators are used to generate flow entities. For example, containers and cargo in dock simulation. Activities are used to represent the steps performed by flow entities in simulation tasks. For example, the stages of production operations. Resources are used to represent the resources used by activities, generally referring to resource libraries. Resource mapping relationships are used to represent the association between activities and resources. Activity connection relationships are used to indicate the order in which flow entities perform each step.
[0066] For example, the structure of the first graph model is as follows: Figure 3 As shown, the flow entities generated by the generator respectively use resource 1 to perform activity 1, use resource 1 and resource 2 to perform activity 2, use resource 3 to perform activity 3, use resource 4 to perform activity 4, and use resource 4 and resource 5 to perform activity 5. It can be understood that the flow entity can be obtained as follows Figure 3 As shown (i.e. generated by a generator), it can also be determined according to preset rules or manual selection, which is not limited here.
[0067] Taking the dock simulation as an example, the flow entity is a container, the activity may be adding the first cargo to the container, and the resources may be the tools and personnel used to add the first cargo to the container.
[0068] Taking medical simulation as an example, the mobile entity is the injured person, and the activities may include at least one of the following: registration, prescription, surgery, medication collection, etc. Resources may be tools and personnel used to perform activities for the injured person.
[0069] In practical applications, discrete event simulation is mainly used to evaluate the efficiency of the system, such as the efficiency of terminal operations, and efficiency-related indicators such as the utilization rate of operating equipment. Corresponding to the time consumption of entity flow in the binary group (i.e. AC), resource utilization, etc. To ensure universality, it is necessary to define the attributes of the nodes and the process data recorded in the simulation operation.
[0070] In the embodiment of the present application, it is defined that each entity has three states in each activity: pending, active, and passive. Among them, pending can also be understood as waiting for processing and not occupying resources. Processing can be understood as occupying resources. Passive can be understood as waiting for the release of resources. In addition, the events that can trigger or be triggered by an activity include: request, start, completion, and leaving.
[0071] During the model calculation process, the number and residence time of entities in different states in each activity are dynamically recorded, and the commonly used indicators in applications are the statistical values of process data.
[0072] For example, Figure 4As shown, activity A uses resource 1, and activity B uses resource 2. Activity A and activity B include suspended state, in-process state, and completed state. Among them, there are 4 entities in suspended state, 5 entities in-process state, and 2 entities in completed state in activity A. There are 2 entities in suspended state, 4 entities in-process state, and 2 entities in completed state in activity B.
[0073] Step 203: Aggregate at least two nodes in the first graph model to obtain a second graph model.
[0074] After the model processing device obtains the first graph model, it can aggregate at least two nodes in the first graph model to obtain a second graph model, that is, the number of nodes in the second graph model is less than the number of nodes in the first graph model.
[0075] The second graph model can be understood as a simplified model of the first graph model. That is, the first graph model can be understood as a fine-grained model, and the second graph model can be understood as a coarse-grained model. Here, "coarse" and "fine" are relative concepts.
[0076] In the embodiment of the present application, the method of aggregating at least two nodes in the first graph model includes at least one of the following:
[0077] The first one aggregates at least one pair of adjacent nodes.
[0078] This situation can also be understood as that the above-mentioned at least two nodes are adjacent nodes, that is, at least one pair of adjacent nodes in the first graph model is aggregated to obtain the second graph model.
[0079] The second type is that the connection relationship between at least two nodes and other nodes remains unchanged before and after aggregation.
[0080] This situation can be understood as that the connection relationship between at least two nodes in the first graph model and other nodes remains unchanged before and after aggregation.
[0081] It is understandable that the above two situations are just examples. In practical applications, there may be other aggregation methods, which are not limited here.
[0082] For example, Figure 5 As an example of aggregation, the first graph model includes activity A, activity B, and activity C. The second graph model includes activity A and activity BC. Figure 5 In the example, adjacent activities B and C are aggregated to obtain activity BC. The connection relationship between the aggregated activity BC and the activities B and C before the aggregation remains unchanged.
[0083] Step 204: Optimize the parameters of the second graph model based on the first graph model, the second graph model and the preset index. This step is optional.
[0084] Optionally, after acquiring the second graph model, the model processing device may optimize parameters of the second model based on the first graph model, the second graph model, and a preset indicator, wherein the preset indicator is used to determine the performance difference between the first graph model and the second graph model.
[0085] Optionally, the model processing device optimizes the parameters of the second graph model so that a performance difference between the first graph model and the second graph model is less than or equal to a preset threshold.
[0086] It can be understood that the parameters of the second graph model can be optimized multiple times, and the stopping condition of the iteration can be that the performance difference is less than or equal to a preset threshold, or that the number of iterations reaches a number, or that the duration of the iteration reaches a preset duration, etc., which is not limited here.
[0087] Exemplarily, continuing the above example, the optimization process can be as follows Figure 6 After the model processing device obtains the first graph model and the second graph model, it can first configure parameters for the first graph model and the second graph model, and respectively execute the first graph model and the second graph model, and compare the performance of the first graph model and the second graph model to obtain a performance difference. The performance difference can be expressed as:
[0088] g(z)=E(F H (z H ))-E(F L (z L ));
[0089] Among them, g(z) represents the performance difference, F() represents the function of calculating the preset index, H represents the second graph model, L represents the first graph model, and z H represents the parameters of the second graph model, z L Represents the parameters of the first graph model.
[0090] After obtaining the performance difference, the optimal decision of the second model parameters is found through the search algorithm, and the decision variables are determined according to the optimal decision. Then, the configuration parameters of the second graph model are updated according to the decision variables until the stop condition is met. This search algorithm can be understood as a black box optimization algorithm, such as simulated annealing, taboo search, grid search, etc.
[0091] In an embodiment of the present application, a more coarse-grained graph model is obtained by converting a simulation model into a graph model and aggregating the nodes in the graph model. On the one hand, the coarse-grained model can be subsequently optimized according to the performance difference of the two graph models and the preset indicators. The coarse-grained model is similar to the simulation model in key indicators, and due to the simple structure, the simplified coarse-grained model can reduce the calculation time and improve the simulation calculation efficiency. On the other hand, the construction time of the graph model is short and the general effect is good. It can also be understood that the user first establishes a fine-grained model that conforms to the business logic, and then in a certain application scenario, the model acceleration is converted into a problem of model iteration compression, which is solved by a black box optimization algorithm framework. While achieving model acceleration, the similarity with the original fine-grained model in key indicators is guaranteed.
[0092] Another system structure diagram of the model processing method provided in the embodiment of the present application can be as follows: Figure 7 The schematic diagram of the system architecture includes: a graph model representation module, an aggregatable node pair search module, and an optimal aggregation parameter solution module.
[0093] Among them, the graphical model representation module converts the fine-grained simulation model established according to the actual system into a unified graphical model structure.
[0094] Aggregatable node pair search module: In the graph model, a pair of nodes that can be aggregated are searched based on the topological structure of the model and the properties of the nodes.
[0095] Optimal aggregation parameter solving module: Based on the key indicators given in advance in the application scenario, the optimal parameters after node aggregation are solved to minimize the indicator difference between the aggregated model and the original model.
[0096] The model processing method provided in the embodiment of the present application is to first construct a graph model through a graph model representation module, and then repeatedly iteratively execute an aggregatable node pair search module and an optimal aggregation parameter solution module, so that the nodes in the original fine-grained model are continuously aggregated, and finally a coarse-grained model is generated.
[0097] In order to more intuitively see the beneficial effects of the model processing method provided in the embodiment of the present application, the following uses a warehouse simulation scenario as an example to describe the performance results of the model processing method provided in the embodiment of the present application through two search methods.
[0098] In the warehouse simulation scenario, each warehouse has to carry out a large amount of work such as receiving, sorting, and shipping every day. This example simulates the warehouse's operation process through discrete event simulation, calculates the time it takes for the warehouse to complete the planned operations, and the resource utilization rate of each link, which can support various decision-making issues in warehouse operations.
[0099] Specifically, the design of this experiment is as follows:
[0100] Fine-grained model scale: A single warehouse contains 20 to 30 nodes, that is, there are 20 to 30 different operation links.
[0101] Statistical indicators: Average cycle time, which is the average time it takes to complete a task in the warehouse, reflects the warehouse's operating efficiency.
[0102] Search algorithms: Grid search, Tabu search.
[0103] For example, Figure 8 and Fig. 9 Experimental results on two warehouses are shown. Figure 8 and Fig. 9 The horizontal axis represents the number of aggregated nodes, and the vertical axis represents the average error of the coarse-grained model and the fine-grained model in statistical indicators. It can be seen that as the number of aggregated nodes increases, the indicator error also increases accordingly. Both sets of experimental data show that if 10% indicator error is used as an acceptable threshold, the node compression ratio is about 50%. If the coarse-grained model marked by the circle in the figure (i.e., the second graph model) is compared with the original fine-grained model (i.e., the first graph model), the operation time is only 36% and 39% of the original fine-grained model, respectively.
[0104] The above describes the model processing method in the embodiment of the present application. The following describes the model processing device in the embodiment of the present application. Fig.10 , an embodiment of the model processing device in the embodiment of the present application includes:
[0105] An acquisition unit 1001 is used to acquire a simulation model, where the simulation model is used to simulate a processing flow of a physical system;
[0106] A conversion unit 1002 is used to convert the simulation model into a first graph model, where the first graph model includes a plurality of nodes and connection relationships between the plurality of nodes;
[0107] The aggregation unit 1003 is used to aggregate at least two nodes in the first graph model to obtain a second graph model, and the number of nodes in the second graph model is less than the number of nodes in the first graph model.
[0108] Optionally, the model processing device also includes: an optimization unit 1004, which is used to optimize the parameters of the second graph model based on the first graph model, the second graph model and preset indicators, where the parameters are the parameters of each node in the graph model, and the preset indicators are used to determine the performance difference between the first graph model and the second graph model.
[0109] Optionally, the first graph model includes activities, resources, resource mapping relationships, and activity connection relationships; wherein activities are used to represent steps performed by flow entities in simulation tasks; resources are used to represent resources used by activities; resource mapping relationships are used to represent associations between activities and resources, and activity connection relationships are used to indicate the order of steps performed by flow entities. Multiple nodes correspond to multiple activities, and connection relationships correspond to activity connection relationships.
[0110] Optionally, at least two nodes are adjacent nodes, and / or the connection relationship between at least two nodes and other nodes remains unchanged before and after aggregation.
[0111] Optionally, the optimization unit 1004 is specifically configured to optimize parameters so that a performance difference between the first graph model and a performance difference between the second graph model is less than or equal to a preset threshold.
[0112] In this embodiment, the operations performed by each unit in the model processing device are the same as those in the above-mentioned FIG. Fig. 9 The description in the illustrated embodiment is similar and will not be repeated here.
[0113] In this embodiment, the simulation model is converted into a graph model by the conversion unit 1002, and the nodes in the graph model are aggregated by the aggregation unit 1003 to obtain a more coarse-grained graph model. Then the optimization unit 1004 can optimize the coarse-grained model according to the performance difference and the preset index. On the one hand, the coarse-grained model is similar to the simulation model in key indicators, and due to the simple structure, the simplified coarse-grained model can reduce the calculation time and improve the simulation calculation efficiency. On the other hand, the construction time of the graph model is short and the general effect is good. It can also be understood that the user first establishes a fine-grained model that conforms to the business logic, and then in a certain application scenario, the model acceleration is converted into a problem of model iteration compression, which is solved by a black box optimization algorithm framework. While achieving model acceleration, the similarity with the original fine-grained model in key indicators is guaranteed.
[0114] See also Fig.11 , a schematic diagram of the structure of another model processing device provided by the present application. The model processing device may include a processor 1101, a memory 1102 and a communication port 1103. The processor 1101, the memory 1102 and the communication port 1103 are interconnected via a line. The memory 1102 stores program instructions and data.
[0115] The memory 1102 stores the above-mentioned Figures 1 to Fig. 9 In the corresponding implementation manner shown, the steps executed by the model processing device correspond to program instructions and data.
[0116] Processor 1101, used to execute the above-mentioned FIG. 1 to Fig. 9The steps performed by the model processing device in any of the illustrated embodiments.
[0117] The communication port 1103 can be used to receive and send data, and to execute the above-mentioned FIG. 1 to FIG. Fig. 9 The steps related to obtaining, sending and receiving in any of the embodiments shown.
[0118] In one implementation, the model processing device may include a Fig.11 More or fewer components are merely illustrative in this application and are not limiting.
[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A model processing method, characterized in that: The method is applied in a discrete event simulation scenario, and the method comprises: Acquire a simulation model, wherein the simulation model is used to simulate a processing flow of a physical system; Converting the simulation model into a first graph model, wherein the first graph model includes a plurality of nodes and connection relationships between the plurality of nodes; At least two nodes in the first graph model are aggregated to obtain a second graph model, wherein the number of nodes in the second graph model is less than the number of nodes in the first graph model.
2. The method according to claim 1, characterized in that The method further comprises: Optimize parameters of the second graph model based on the first graph model, the second graph model and preset indicators, where the parameters are parameters of each node in the graph model, and the preset indicators are used to determine the performance difference between the first graph model and the second graph model.
3. The method according to claim 1 or 2, characterized in that: The first graph model includes: activities, resources, resource mapping relationships, and activity connection relationships, the multiple nodes correspond to multiple activities, and the connection relationships correspond to the activity connection relationships; Among them, the activity is used to represent the steps executed by the flow entity in the simulation task; the resources are used to represent the resources used by the activity; the resource mapping relationship is used to represent the association relationship between the activity and the resource, and the activity connection relationship is used to indicate the sequential relationship of the execution of each step by the flow entity.
4. The method according to any one of claims 1 to 3, characterized in that The at least two nodes are adjacent nodes, and / or the connection relationship between the at least two nodes and other nodes remains unchanged before and after aggregation.
5. The method according to claim 2, characterized in that: The optimizing the parameters of the second graph model based on the first graph model, the second graph model and a preset indicator includes: The parameters are optimized so that a performance difference between the first graph model and a performance difference between the second graph model is less than or equal to a preset threshold.
6. A model processing device, characterized in that: The model processing device is applied in a discrete event simulation scenario, and the model processing device comprises: An acquisition unit, used for acquiring a simulation model, wherein the simulation model is used for simulating a processing flow of a physical system; A conversion unit, configured to convert the simulation model into a first graph model, wherein the first graph model includes a plurality of nodes and connection relationships between the plurality of nodes; An aggregation unit is used to aggregate at least two nodes in the first graph model to obtain a second graph model, and the number of nodes in the second graph model is less than the number of nodes in the first graph model.
7. The model processing device according to claim 6, characterized in that: The model processing device also includes: An optimization unit is used to optimize the parameters of the second graph model based on the first graph model, the second graph model and preset indicators, where the parameters are the parameters of each node in the graph model, and the preset indicators are used to determine the performance difference between the first graph model and the second graph model.
8. The model processing device according to claim 6 or 7, characterized in that: The first graph model includes activities, resources, resource mapping relationships, and activity connection relationships, the multiple nodes correspond to multiple activities, and the connection relationships correspond to the activity connection relationships; Among them, the activity is used to represent the steps executed by the flow entity in the simulation task; the resources are used to represent the resources used by the activity; the resource mapping relationship is used to represent the association relationship between the activity and the resource, and the activity connection relationship is used to indicate the sequential relationship of the execution of each step by the flow entity.
9. The model processing device according to any one of claims 6 to 8, characterized in that: The at least two nodes are adjacent nodes, and / or the connection relationship between the at least two nodes and other nodes remains unchanged before and after aggregation.
10. The model processing device according to claim 7, characterized in that: The optimization unit is specifically used to optimize the parameters so that the performance difference between the first graph model and the performance difference between the second graph model is less than or equal to a preset threshold.
11. A model processing device, characterized in that: include: A processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the model processing device executes the method according to any one of claims 1 to 5.
12. A computer storage medium, characterized in that: The method comprises computer instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 5.
13. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
