Discrete event simulation method and device and computer equipment
Through the discrete event simulation method of dynamic update of data flow graph and node state, the problem of difficulty in expressing discreteness and timing in traditional simulation mode is solved, and an efficient and easy-to-use simulation configuration is achieved, which is suitable for complex production environments.
Patent Information
- Application Number
- CN202411165147.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-15
AI Technical Summary
The traditional continuous event simulation model is difficult to effectively express the discreteness and timing in the production process, and the existing discrete event simulation software is complex to use and has a high threshold, making it difficult to achieve efficient simulation and visual configuration.
Provide a discrete event simulation method, which dynamically adjusts the simulation process according to the node status through data flow diagram display and update. Users do not need to deeply program or use complex modeling software to directly configure and monitor production line task processes to improve simulation efficiency and accuracy. .
It realizes efficient simulation and visual configuration of complex production line tasks, reduces learning and operation difficulty, improves simulation efficiency and accuracy, and is suitable for production environments with high variability.
Smart Images

Figure CN118965481A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial production technology, and in particular to a discrete event simulation method, device and computer equipment. Background Art
[0002] In the field of industrial production technology, the application of production line task simulation software aims to optimize production processes, reduce costs and improve efficiency. Currently, there are two main modes: continuous event simulation and discrete event simulation. Continuous event simulation simulates the production process in a real-time and continuous manner, which is suitable for a continuous and stable production environment; while discrete event simulation uses a discrete event-triggered method, which is suitable for complex and changing environments with clear event triggers during the production process.
[0003] At present, traditional engineering simulation software mainly adopts the continuous event simulation mode, which processes the production process continuously during the simulation process, and usually describes the dynamic evolution of the system with differential equations. This simulation mode is suitable for production systems with continuity and stability, but it does not perform well for production line simulations with large variability or event triggering requirements, because it cannot fully express the discreteness and timing between events. There are a few discrete simulation software that require users to configure and run simulations by writing code or using complex modeling tools, but these software are usually powerful, but have a steep learning curve and a high threshold for use. Summary of the invention
[0004] Based on this, the purpose of this application is to provide a discrete event simulation method, apparatus and computer equipment that improves simulation efficiency and visual configuration, so as to solve the technical problems mentioned in the above background technology.
[0005] In a first aspect, the present application provides a discrete event simulation method, comprising:
[0006] Displaying a data flow graph; the data flow graph includes multiple nodes at different levels;
[0007] In response to a simulation trigger for the data flow graph, determining a current node when executing the data flow graph and an associated node corresponding to the current node;
[0008] A new data flow graph is determined according to the node states corresponding to the current node and the associated node, and the simulation process of the new data flow graph is continued.
[0009] In one embodiment, before displaying the data flow graph, it also includes: obtaining production line tasks, and determining the nodes to be configured according to the production line tasks; the nodes to be configured include at least data source nodes, execution nodes, sorting nodes, cache nodes and end nodes; generating a data flow graph according to the node characteristics of the nodes to be configured; the data source node and the end node in the data flow graph are the starting point and the end point respectively, the execution node is associated with execution nodes or cache nodes at different levels, and the next level of the sorting node is associated with multiple execution nodes.
[0010] In one embodiment, a new data flow graph is determined based on the node states corresponding to the current node and the associated node, including: updating the simulation process of executing the data flow graph based on the node states corresponding to the current node and the associated node; and obtaining a new data flow graph based on the update process of the data flow graph.
[0011] In one embodiment, the node status includes an idle state and a blocked state; the associated nodes include the next-level node and the cache node of the current node; the simulation process of executing the data flow graph is updated according to the node status corresponding to the current node and the associated nodes, including: when the production line task is executed to the current node, if the node status of the next-level node is a blocked state, the execution of the production line task at the current node is stopped; until the node status of the next-level node is changed to an idle state, and the production line task flow is transferred to the next-level node for execution.
[0012] In one embodiment, it further includes: if the node state of the current node or the next-level node is a blocked state, caching the production line task through the cache node.
[0013] In one embodiment, a new data flow graph is obtained according to the updating process of the data flow graph, including: if the node state of the current node is a blocked state, adding a target cache node or a parallel target execution node to the current node in the data flow graph.
[0014] In one embodiment, the simulation process of the new data flow graph is continued, including: when the target cache node corresponding to the current node is in a blocked state, tracing back to the starting point of the new data flow graph to the relevant candidate nodes, and changing the node states of the candidate nodes to a blocked state; or, allocating the production line task to the current node and the corresponding target execution node for joint execution.
[0015] In one embodiment, the above method also includes: during the simulation process of executing the data flow graph, monitoring the state time proportion of each node; determining a new data flow graph based on the state time proportion, and presenting the state time proportion in a differentiated manner.
[0016] In one embodiment, executing the simulation process of the data flow graph includes: determining the configuration parameters corresponding to the current node; the configuration parameters include at least equipment type, priority, cutting speed and type; executing the simulation process of the data flow graph according to the configuration parameters under the working state.
[0017] In a second aspect, the present application also provides a discrete event simulation device, including:
[0018] A data display and trigger module, used to display a data flow graph; the data flow graph includes multiple nodes at different levels; in response to a simulation trigger for the data flow graph, determine a current node when executing the data flow graph and an associated node corresponding to the current node;
[0019] The data flow graph updating module is used to determine a new data flow graph according to the node states corresponding to the current node and the associated node, and continue to execute the simulation process of the new data flow graph.
[0020] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above discrete event simulation method when executing the computer program.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above discrete event simulation method are implemented.
[0022] The above-mentioned discrete event simulation method, device, computer equipment and readable storage medium, when responding to a simulation trigger for a data flow graph, determine the current node and the associated node corresponding to the current node when executing the data flow graph, and then determine a new data flow graph according to the node states corresponding to the current node and the associated node, and continue to execute the simulation process of the new data flow graph. Compared with traditional continuous event simulation methods and some discrete event simulation methods with higher thresholds, users of this application do not need in-depth programming or complex modeling software, and can directly understand the data changes at each stage in the production line task process in real time according to the node states corresponding to the current node and the associated node, thereby improving simulation efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 An application environment diagram of a discrete event simulation method in one embodiment;
[0024] Figure 2 A schematic diagram of a discrete event simulation method in one embodiment;
[0025] Figure 3A schematic diagram of a discrete event simulation work interface in one embodiment;
[0026] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] The discrete event simulation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, it can be realized through the interaction between the terminal 102 and the server 104. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 is used to display the data flow graph and respond to the simulation trigger for the data flow graph. The server 104 is used to determine the current node and the associated node corresponding to the current node when executing the data flow graph; according to the node states corresponding to the current node and the associated node, a new data flow graph is determined, and the simulation process of the new data flow graph is continued, so that the terminal 102 displays the simulation results. Among them, the terminal 102 can be, but is not limited to, various personal computers, smart phones, tablet computers, drone equipment, smart vehicle-mounted equipment, and portable wearable devices. Server 104 is implemented by an independent server or a server cluster composed of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0029] Among them, discrete events usually correspond to a steady-state model, and there is no need to study the process of state variables changing from one state to another. And most of the variables in discrete events are random, such as the "arrival" and "service" times of entities are random variables. In addition, in the system simulation of discrete events, the advancement of time is uncertain, which determines the state conditions of the system and the possibility of events occurring.
[0030] In one embodiment, Figure 2 As shown, a discrete event simulation method is provided, and the method is applied to a computer device as an example for explanation. The computer device includes Figure 1 The terminal and server in the embodiment include the following steps:
[0031] Step 202, display the data flow diagram.
[0032] The data flow graph includes multiple nodes at different levels; the data flow graph is obtained in advance through the user's configuration based on different production line tasks.
[0033] Specifically, a simulation software is integrated into the computer device, and a user interface is displayed to enable the simulation software to simulate the configured data flow graph. Figure 3 As shown, Figure 3 This is the working interface diagram of discrete event simulation. The working interface diagram includes the simulation control area, node resource library, process building area, parameter configuration window and status display area. The simulation control area controls the simulation process through pause, start, reset, single-step operation and other modes; the node resource library includes but is not limited to data source nodes, execution nodes, sorting nodes, cache nodes, end nodes, merger nodes, transmitter nodes, etc. There are specific associations and constraints between different nodes; the process building area is used to build a data flow diagram by configuring different nodes, for example, users create and configure various nodes in a two-dimensional grid scene; the parameter configuration window is used to set parameters for different configured nodes; the status display area is used to display the node status of all nodes in the real-time simulation process through different chart types.
[0034] In one embodiment, before displaying the data flow graph, it also includes: obtaining production line tasks, and determining the nodes to be configured according to the production line tasks; and generating the data flow graph according to the node characteristics of the nodes to be configured.
[0035] Among them, the nodes to be configured include data source nodes, execution nodes, sorting nodes, cache nodes and end nodes; the constraint configuration between the nodes in the data flow graph is usually to use the data source node and the end node as the starting point and end point respectively, the execution node is associated with execution nodes or cache nodes at different levels, and the next level of the sorting node is associated with multiple execution nodes.
[0036] Specifically, the configuration of the data flow graph is to simulate the entire process of the production line tasks in the real factory through nodes and lines. Therefore, users can directly drag the nodes to be configured in the node resource library to the process building area, and connect the nodes to be configured to each other through lines. For example, the steel plate entering the production line needs to go through many processing processes and procedures. It needs to be processed by the cutting machine first, so add an execution node to the scene and set the sorting node to the cutting machine node; after passing the cutting machine node, it needs to be sorted. At this time, you need to add a sorting node until the steel plate is processed. Since the node characteristics of different nodes to be configured constrain the configuration of the nodes, it is necessary to generate a data flow graph based on these constraints. For example, for the steel plate after passing the sorting node, the next level usually needs to associate multiple execution nodes to ensure the subsequent process of the steel plate.
[0037] In this embodiment, discrete event simulation effects can be quickly achieved through intuitive two-dimensional grid scenes and simple drag operations, and through nodes and connections, making the creation and configuration of each node more efficient, and users do not need in-depth programming or complex modeling software, saving time and energy in the configuration process and simplifying the operation process.
[0038] In one embodiment, the user can configure parameters for each node in the data flow diagram through the parameter configuration window to customize the behavior and function of the node, helping the user to simulate different situations of production line tasks in the production process.
[0039] Step 204, in response to a simulation trigger for the data flow graph, determining a current node and an associated node corresponding to the current node when executing the data flow graph.
[0040] Specifically, refer to Figure 3 As shown, the user selects different operation modes in the simulation control area, such as start, single-step operation, etc., so that the computer device takes the data source node as the starting point, and performs simulation execution according to the configuration parameters, node associations and data flow directions of each node in the data flow diagram until the data flows to the end point of the data flow diagram. In the process of simulation execution, the node characteristics of any current node in the execution process and the associated nodes corresponding to the current node can be determined.
[0041] In one embodiment, executing the simulation process of the data flow graph includes: determining the configuration parameters corresponding to the current node; and executing the simulation process of the data flow graph according to the configuration parameters in the working state.
[0042] Among them, the configuration parameters include at least the equipment type, priority, cutting speed and type; the node status includes the working status; the working status indicates that the current node has incoming materials being processed, for example, the cutting machine is cutting steel plates. It is easy to understand that different nodes are configured with different parameters, and the time that the material stays on the node is different, for example, the cutting speed of different types of cutting machines is different.
[0043] Specifically, if the current node is a data source node, the corresponding configuration parameter is usually the number of production line tasks set, that is, the number of incoming materials in a production line, such as the number of steel plates mentioned above. If the current node is an execution node, the configuration parameters include different equipment types selected from the pre-stored database, such as truss sorting, manual sorting, cutting machines, conveyor belts and other equipment types that may be used in the production line, etc.; it also includes, for example, when an incoming material can go to different execution nodes of the next level, the path is selected according to the parameter configuration of this priority to distinguish the situation where an execution node is connected to many lower-level execution nodes; it also includes different parameters that can be configured for different equipment, such as manual sorting, the sorting speed of manual sorting for different part sizes can be configured, and for example, the cutting machine can select a finer cutting machine classification again, including oxygen cutting and plasma cutting, and the corresponding cutting speed, etc. If the current node is a cache node, the configuration parameters include the upper limit of the cache value, etc. Among them, the cache node represents the situation that can be cached in the actual production line, for example, it is a cache material frame, so we need to add a cache node in our virtual production line.
[0044] In this embodiment, more configuration options are provided through the user interface, and users can flexibly select different node attributes, axial settings, etc. according to their needs, so as to customize the actions of the model more flexibly. This flexibility improves the simulation fidelity of the subsequent data flow graph and increases the diversity of configuration parameters.
[0045] In one embodiment, the configuration information such as the number of production line tasks can be imported from an external data file or manually set by the user. When an external data file is imported, the path to read the file needs to be configured. The file format is pre-set and the file needs to contain some specific information to facilitate quick reading of relevant configuration information.
[0046] In one embodiment, each node may be configured with a different node name.
[0047] Step 206, determining a new data flow graph according to the node states corresponding to the current node and the associated node, and continuing to execute the simulation process of the new data flow graph.
[0048] Among them, the node status includes idle state and blocked state; the idle state indicates that the current node has no incoming materials to process, and the proportion of this idle time is recorded at this time; the blocked state indicates that the current node cache has reached the upper limit.
[0049] In one embodiment, a new data flow graph is determined based on the node states corresponding to the current node and the associated nodes, including: updating the simulation process of executing the data flow graph based on the node states corresponding to the current node and the associated nodes; and obtaining a new data flow graph based on the update process of the data flow graph.
[0050] Specifically, since the execution process of the actual production line tasks will lead to different node states, different discrete events will be triggered at different time points. At this time, it is necessary to determine the current node and the associated node corresponding to the current node, as well as the node states corresponding to the current node and the associated node in the simulation process. Then, according to these node states, the simulation execution process of other nodes is adjusted in real time and dynamically. If the nodes in the existing data flow graph alone cannot meet temporary discrete events or new production line tasks, the user needs to update the existing data flow graph according to the situation during the update process of the data flow graph, so that the computer equipment continues to execute the simulation process of the new data flow graph.
[0051] In the above discrete event simulation method, when responding to the simulation trigger for the data flow graph, the current node and the associated node corresponding to the current node when executing the data flow graph are determined, and then the new data flow graph is determined according to the node states corresponding to the current node and the associated node, and the simulation process of the new data flow graph is continued. Compared with the traditional continuous event simulation method and some discrete event simulation methods with higher thresholds, users of this application do not need in-depth programming or complex modeling software. They can directly understand the data changes at each stage in the production line task process in real time based on the node states corresponding to the current node and the associated node, thereby improving the simulation efficiency and accuracy.
[0052] Since the present application provides graphical interface configuration and real-time data visualization functions, supplemented by flexible node parameter configuration, the discrete event simulation software has the characteristics of easy operation, intuitive data feedback and user-friendliness. Therefore, the present application has broader application prospects in industrial production optimization and process simulation.
[0053] In one embodiment, the simulation process of executing the data flow graph is updated according to the node states corresponding to the current node and the associated nodes, including: when the production line task is executed to the current node, if the node state of the next-level node is a blocked state, the execution of the production line task at the current node is stopped; until the node state of the next-level node is changed to an idle state, and the production line task flow is transferred to the next-level node for execution.
[0054] The associated nodes include the next level nodes of the current node and the cache nodes.
[0055] Specifically, the computer device determines that when the production line task is executed to the current node, if the node state of the next-level node is in a blocked state, then the task will not be executed downward, and the execution of the production line task at the current node will be stopped; and if the current node cache has reached the upper limit, then the current node will also become blocked until the node state of the next-level node changes to an idle state, and the computer device will transfer the production line task flow to the next-level node for execution until the production line task flows to the end node of the data flow graph.
[0056] In one embodiment, the method further includes: if the node state of the current node or the next-level node is a blocked state, caching the production line task through the cache node. If the current node or the next-level node has a corresponding cache node configured, the computer device will cache the production line task when the node state is a blocked state.
[0057] In the above embodiment, the data changes at each stage in the production line task process can be understood in real time directly based on the node status corresponding to the current node and the associated node, which improves the simulation efficiency and accuracy, and further enhances the user's understanding and analysis capabilities of the simulation process.
[0058] In one embodiment, a new data flow graph is obtained according to the updating process of the data flow graph, including: if the node state of the current node is a blocked state, adding a target cache node or a parallel target execution node to the current node in the data flow graph.
[0059] Specifically, for example, when a sorting node is sorting, another steel plate needs to be sorted but is occupied. At this time, the node state of the current node becomes blocked. Therefore, the current node needs to connect to a target cache node, and this target cache node may be configured with a cache limit. If the simulation shows that the execution node corresponding to one of the devices has a high proportion of blocked time, then we should consider increasing the number of devices to process simultaneously, so as to increase production capacity, so as to add parallel target execution nodes to the current node, and then process the incoming materials at the same time.
[0060] In this embodiment, a graphical interface is used to allow users to directly observe the operation of model nodes. This visualization effect allows users to add different nodes more accurately, improves configuration accuracy and user experience, and can also more accurately simulate the production conditions in the actual production line in real time, and further calculate the production capacity and optimize the production line based on the production capacity.
[0061] In one embodiment, the simulation process of the new data flow graph is continued, including: when the target cache node corresponding to the current node is in a blocked state, tracing back to the starting point of the new data flow graph to the relevant candidate nodes, and changing the node states of the candidate nodes to a blocked state; or, allocating the production line task to the current node and the corresponding target execution node for joint execution.
[0062] Specifically, if the pre-configured parameters of the current node can only process 2 incoming materials at the same time, when the third incoming material arrives, and the target cache node corresponding to the current node is in a blocked state, this will cause the process to be blocked, and the blockage will extend upwards one level at a time, that is, the computer device will trace the relevant candidate nodes to the starting point of the new data flow graph, and change the node status of the candidate nodes to a blocked state until the data source node cannot receive materials. Or if the current node is blocked for a long time, then consider adding another device as a target execution node so that the current node and the corresponding target execution node can share the task together.
[0063] In the above embodiments, by performing data analysis and real-time feedback on the current node, it is helpful for users to quickly understand the simulation results and make adjustments. For example, when the target cache node is blocked, the system can automatically trace back and change the node status of the relevant candidate nodes, so that the entire data flow graph can better adapt to the current operation of the system and improve the stability and reliability of the system. Assigning production line tasks to the current node and the corresponding target execution node for joint execution can effectively avoid the situation where the entire task cannot be executed smoothly due to the blockage of a single node, thereby improving the execution efficiency and fluency of the task, thereby improving the resource utilization of the system.
[0064] In one embodiment, the above method also includes: during the simulation process of executing the data flow graph, monitoring the state time proportion of each node; determining a new data flow graph based on the state time proportion, and presenting the state time proportion in a differentiated manner.
[0065] Specifically, during the operation of the production line task, the simulation software will reflect the current status table of all nodes in the simulation in real time, and provide real-time feedback on the node's blocking time percentage, idle time percentage, and working time percentage, and use different colors and other differentiated methods to display the information. Figure 3 The bar chart shown in the figure shows that the computer device can adjust the simulation strategy according to the different state time proportions, including but not limited to adding a target cache node or a parallel target execution node to the current node in the above-mentioned data flow diagram.
[0066] In this embodiment, by realizing real-time data visualization functions, such as integrating real-time data display methods such as bar charts and line charts, the state changes of each stage in the simulation process can be reflected, helping users to intuitively understand the production process, and can adjust and optimize according to actual operating conditions, thereby improving overall execution efficiency and performance.
[0067] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0068] Based on the same inventive concept, the embodiment of the present application also provides a discrete event simulation device for implementing the discrete event simulation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more discrete event simulation device embodiments provided below can refer to the limitations of the discrete event simulation method above, and will not be repeated here.
[0069] In one embodiment, a discrete event simulation device is provided, comprising: a data display and triggering module and a data flow graph updating module, wherein:
[0070] A data display and trigger module is used to display a data flow graph; the data flow graph includes multiple nodes at different levels; in response to a simulation trigger for the data flow graph, the current node when executing the data flow graph and the associated nodes corresponding to the current node are determined.
[0071] The data flow graph updating module is used to determine a new data flow graph according to the node states corresponding to the current node and the associated nodes, and continue to execute the simulation process of the new data flow graph.
[0072] Each module in the above discrete event simulation can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0073] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store node status. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a discrete event simulation method is implemented.
[0074] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0075] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0076] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0077] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0078] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0079] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0080] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A discrete event simulation method, characterized in that: The method comprises: Displaying a data flow graph; the data flow graph includes multiple nodes at different levels; In response to a simulation trigger for the data flow graph, determining a current node when executing the data flow graph and an associated node corresponding to the current node; A new data flow graph is determined according to the node states corresponding to the current node and the associated node, and the simulation process of the new data flow graph is continued.
2. The method according to claim 1, characterized in that Before presenting the data flow diagram, the method further includes: Acquire production line tasks, and determine nodes to be configured according to the production line tasks; the nodes to be configured include at least data source nodes, execution nodes, sorting nodes, cache nodes and end nodes; A data flow graph is generated according to the node characteristics of the node to be configured; the data source node and the end node in the data flow graph are the starting point and the end point respectively, the execution node is associated with execution nodes or cache nodes at different levels, and the next level of the sorting node is associated with multiple execution nodes.
3. The method according to claim 1, characterized in that The determining of a new data flow graph according to the node states corresponding to the current node and the associated node respectively includes: According to the node states corresponding to the current node and the associated node, the simulation process of executing the data flow graph is updated; A new data flow graph is obtained according to the updating process of the data flow graph.
4. The method according to claim 3, characterized in that The node status includes an idle state and a blocked state; the associated nodes include a next-level node and a cache node of the current node; The updating of the simulation process of executing the data flow graph according to the node states corresponding to the current node and the associated node respectively includes: When the production line task is executed to the current node, if the node state of the next-level node is a blocked state, the execution of the production line task at the current node is stopped; Until the node state of the next-level node changes to an idle state, and the production line task flow is transferred to the next-level node for execution; The method further includes: if the node state of the current node or the next-level node is a blocked state, caching the production line task through the cache node.
5. The method according to claim 3, characterized in that: The step of obtaining a new data flow graph according to the updating process of the data flow graph comprises: If the node state of the current node is a blocked state, adding a target cache node or a parallel target execution node to the current node in the data flow graph; The simulation process of continuing to execute the new data flow graph includes: When the target cache node corresponding to the current node is in a blocked state, trace back to the starting point of the new data flow graph to the relevant candidate nodes, and change the node states of the candidate nodes to a blocked state; Alternatively, the production line task is assigned to the current node and the corresponding target execution node for joint execution.
6. The method according to claim 1, characterized in that The method further comprises: During the simulation of the data flow graph, monitoring the state time proportion of each node; A new data flow graph is determined according to the state time proportion, and the state time proportion is presented in a differentiated manner.
7. The method according to any one of claims 1 to 6, characterized in that: The node state includes a working state; and the simulation process of executing the data flow graph includes: Determine the configuration parameters corresponding to the current node; the configuration parameters at least include device type, priority, cutting speed and type; The simulation process of the data flow graph is executed according to the configuration parameters under the working state.
8. A discrete event simulation device, characterized in that: The device comprises: A data display and trigger module, used to display a data flow graph; the data flow graph includes multiple nodes at different levels; in response to a simulation trigger for the data flow graph, determine a current node when executing the data flow graph and an associated node corresponding to the current node; The data flow graph updating module is used to determine a new data flow graph according to the node states corresponding to the current node and the associated node, and continue to execute the simulation process of the new data flow graph.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
