Flow direction control simulation method and apparatus, electronic device, and storage medium
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-08-13
Smart Images

Figure CN2026074832_13082026_PF_FP_ABST
Abstract
Description
A flow control simulation method, apparatus, electronic device, and storage medium
[0001] This application claims priority to Chinese Patent Application No. 202510138329.2, filed on February 7, 2025, entitled "A Flow Control Simulation Method, Apparatus, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of automated simulation technology, and in particular to a flow control simulation method, apparatus, electronic device and storage medium. Background Technology
[0003] To improve production automation, some large factories have deployed conveyor systems in their production workshops. These systems transport various materials to their designated locations, such as workbenches and sorting stations. To ensure the proper functioning of these systems, the flow control process for transporting materials needs to be validated before deployment. However, validating the conveyor system after its initial deployment in the workshop is time-consuming due to the complexity of the on-site conditions and the need to cover a comprehensive range of scenarios. This results in high validation costs and low efficiency.
[0004] Therefore, a simulation method is needed to verify the flow control process of materials transported in a conveyor system. Summary of the Invention
[0005] The purpose of this application is to provide a flow control simulation method, apparatus, electronic device, and storage medium to verify the flow control process of materials transported in a conveyor line system. The specific technical solution is as follows:
[0006] In a first aspect of this application, a flow direction control simulation method is provided, the method comprising:
[0007] In response to dragging the first conveyor line model on the display interface, if the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model.
[0008] In response to the operation of placing a sensor model on a third conveyor model, the sensor model is placed at an installable location on the third conveyor model, wherein the third conveyor model is either the first conveyor model or the second conveyor model.
[0009] In response to the connection operation between the sensor model and the conveyor interface, the connection between the sensor model and the conveyor interface is rendered, and the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection is established.
[0010] In response to the simulation instructions, flow direction control simulation is performed based on the material flow direction relationship between the conveyor line models displayed on the display interface.
[0011] In one possible implementation, the first conveyor line model and the second conveyor line model are connected in the following manner:
[0012] In response to releasing the dragged first conveyor model, a second conveyor model is determined from other conveyor models other than the first conveyor model displayed on the display interface, based on the positional relationship between the conveyor model and the first conveyor model.
[0013] The first conveyor line model is controlled to be attached to the second conveyor line model.
[0014] In one possible implementation, determining the second conveyor line model from other conveyor line models displayed on the display interface, based on the positional relationship between the conveyor line model and the first conveyor line model, includes:
[0015] From the other conveyor line models displayed on the display interface besides the first conveyor line model, determine the conveyor line model that meets the following conditions and use it as the second conveyor line model:
[0016] The distance between the model and the first conveyor line is less than a first distance threshold.
[0017] The material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
[0018] In one possible implementation, in response to the operation of placing a sensor model on a third conveyor line model, placing the sensor model at an installable location on the third conveyor line model includes:
[0019] The sensor model is displayed along the dragging trajectory of the sensor model on the display interface;
[0020] In response to releasing the dragged sensor model, a third conveyor line model is determined from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model;
[0021] The sensor model is controlled to attach to the installable position of the third conveyor line model.
[0022] In one possible implementation, after controlling the sensor model to adhere to the installable position of the third conveyor line model, the method further includes:
[0023] In response to dragging the sensor model along the third conveyor line model, the position of the sensor model on the third conveyor line model is adjusted.
[0024] In one possible implementation, the flow direction control simulation, based on the material flow direction relationship between the conveyor line models displayed on the display interface, in response to a simulation instruction, includes:
[0025] In response to simulation instructions, control the simulated material to move along the conveyor line model displayed on the display interface;
[0026] In response to the simulated material moving into the detection range of the sensor model, the identification features of the simulated material are obtained from the properties of the simulated material;
[0027] Based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface, the flow direction of the simulated material is controlled.
[0028] In one possible implementation, the flow control strategy includes a material identification sub-strategy and a diversion and allocation sub-strategy;
[0029] The flow control of the simulated material based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface includes:
[0030] Determine whether the identification feature matches the material identification sub-strategy;
[0031] If a match is found, based on the diversion and allocation sub-strategy and the material flow relationship between the conveyor line models displayed on the display interface, the target conveyor line interface is selected from the conveyor line interface corresponding to the third conveyor line model.
[0032] The simulated material is controlled to move towards the fourth conveyor line model, wherein the fourth conveyor line model is the conveyor line model other than the third conveyor line model corresponding to the target conveyor line interface.
[0033] In a second aspect of this application, a flow direction control simulation apparatus is provided, the apparatus comprising:
[0034] The first response module is used to respond to dragging the first conveyor line model on the display interface. If the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model.
[0035] The second response module is used to respond to the operation of placing a sensor model on the third conveyor model, wherein the sensor model is placed at an installable position on the third conveyor model, and the third conveyor model is either the first conveyor model or the second conveyor model.
[0036] The third response module is used to respond to the connection operation between the sensor model and the conveyor interface, render the connection between the sensor model and the first conveyor interface, and establish the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection.
[0037] The fourth response module is used to respond to simulation instructions and perform flow direction control simulation based on the material flow direction relationship between the conveyor line models displayed on the display interface.
[0038] In one possible implementation, the first conveyor line model and the second conveyor line model are connected as follows: in response to releasing the dragged first conveyor line model, based on the positional relationship between the conveyor line model and the first conveyor line model, a second conveyor line model is determined from other conveyor line models besides the first conveyor line model displayed on the display interface; the first conveyor line model is controlled to be attached to the second conveyor line model.
[0039] In one possible implementation, determining the second conveyor line model from other conveyor line models displayed on the display interface, based on the positional relationship between the conveyor line model and the first conveyor line model, includes: determining a conveyor line model from other conveyor line models displayed on the display interface that meets the following conditions as the second conveyor line model: the distance between it and the first conveyor line model is less than a first distance threshold; and the material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
[0040] In one possible implementation, the second response module is specifically configured to: display the sensor model along the drag trajectory of the sensor model on the display interface; in response to releasing the dragged sensor model, determine a third conveyor line model from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model; and control the sensor model to be attracted to the installable position of the third conveyor line model.
[0041] In one possible implementation, the second response module is further configured to: after controlling the sensor model to be attached to the installable position of the third conveyor model, adjust the position of the sensor model on the third conveyor model in response to dragging the sensor model along the third conveyor model.
[0042] In one possible implementation, the fourth response module is specifically configured to: control the simulated material to move along the conveyor line model displayed on the display interface in response to a simulation instruction; obtain the identification features of the simulated material from its attributes in response to the simulated material moving into the detection range of the sensor model; and perform flow direction control on the simulated material based on the identification features, the flow direction control strategy configured in the attributes of the sensor model, and the material flow direction relationship between the conveyor line models displayed on the display interface.
[0043] In one possible implementation, the flow control strategy includes a material identification sub-strategy and a diversion allocation sub-strategy; the fourth response module is specifically used to: determine whether the identification feature matches the material identification sub-strategy; if they match, based on the diversion allocation sub-strategy and the material flow relationship between the conveyor line models displayed on the display interface, select a target conveyor line interface from the conveyor line interface corresponding to the third conveyor line model; control the simulated material to move to the fourth conveyor line model, wherein the fourth conveyor line model is: a conveyor line model other than the third conveyor line model corresponding to the target conveyor line interface.
[0044] In a third aspect of this application, an electronic device is provided, comprising:
[0045] Memory, used to store computer programs;
[0046] When a processor executes a program stored in memory, it implements the flow control simulation method described in any of the first aspects above.
[0047] In a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the flow control simulation method described in any of the first aspects above.
[0048] In a fifth aspect of the embodiments of this application, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to execute the flow control simulation method described in any of the first aspects above.
[0049] Beneficial effects of the embodiments in this application:
[0050] In the technical solution provided in this application embodiment, the simulation structure of the conveyor line system is displayed on the display interface. In response to user operations such as dragging the conveyor line model and sensor model, and connecting the sensor model and the conveyor line model, the conveyor line interface is generated and displayed, the connection line between the sensor and the conveyor line interface is rendered and displayed, and the material flow relationship between the conveyor line models corresponding to the conveyor line interface is established. Then, when a simulation instruction is received, the flow direction simulation is performed based on the material flow direction relationship in the simulated conveyor line system displayed on the display interface, so as to realize the simulation verification of the flow direction control process of the conveyor line system for conveying materials.
[0051] Furthermore, the aforementioned visualization simulation method is highly user-friendly, requiring no writing of underlying logic code and only simple interaction on the display interface, thus reducing the skill requirements for simulation verification testers.
[0052] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0054] Figure 1 is a flowchart illustrating a flow control simulation method provided in an embodiment of this application;
[0055] Figure 2 is a schematic diagram of a display interface of a conveyor line model provided in an embodiment of this application;
[0056] Figure 3 is a schematic diagram of a conveyor line interface provided in an embodiment of this application;
[0057] Figure 4 is a schematic diagram of a scenario where the sensor model is placed according to an embodiment of this application;
[0058] Figure 5 is a schematic diagram of the connection between the sensor model and the conveyor line interface provided in an embodiment of this application;
[0059] Figure 6 is a flowchart illustrating a connection method between the first conveyor line model and the second conveyor line model provided in an embodiment of this application;
[0060] Figure 7 is a schematic diagram of the distance between conveyor line models provided in the embodiments of this application;
[0061] Figure 8 is a schematic diagram of the positional relationship of the adsorption-after conveyor line model provided in the embodiment of this application;
[0062] Figure 9 is a schematic diagram of an example of the adsorption process of the conveyor line model provided in the embodiment of this application;
[0063] Figure 10 is a detailed flowchart of step S102 provided in an embodiment of this application;
[0064] Figure 11 is a schematic diagram of the distance between the conveyor line model and the sensor model provided in an embodiment of this application;
[0065] Figure 12 is a detailed flowchart of step S104 provided in an embodiment of this application;
[0066] Figure 13 is a detailed flowchart of step S1203 provided in an embodiment of this application;
[0067] Figure 14 is a schematic diagram of one composition of the material identification sub-strategy provided in an embodiment of this application;
[0068] Figure 15 is a schematic diagram of a conveyor system in an embodiment of this application, in which the conveyor interfaces are assigned numbers and displayed on the display interface.
[0069] Figure 16 is a schematic diagram of a flow direction control simulation device provided in an embodiment of this application;
[0070] Figure 17 is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0071] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0072] To improve production automation, some large factories have deployed conveyor systems in their production workshops. These systems transport various materials to their designated locations, such as workbenches and sorting stations. These materials can be raw materials or finished products. To ensure the proper functioning of the conveyor system, the flow control process for transporting materials needs to be validated before it is put into operation. However, if the conveyor system is deployed in the workshop and then validated using a physical conveyor system, the complex on-site conditions, the need to cover a comprehensive range of scenarios, the requirement to locate specific materials, and the need to arrange these materials on-site according to validation requirements all contribute to the lengthy validation process, resulting in high validation costs and low efficiency.
[0073] Therefore, a simulation method is needed to verify the flow control process of materials transported in a conveyor system.
[0074] This application provides a flow direction control simulation method, as shown in Figure 1. The method includes the following steps S101-S104.
[0075] For ease of description, the following text will use electronic devices as the subject of the description. Electronic devices can be computers, servers, etc.
[0076] Step S101: In response to dragging the first conveyor line model on the display interface, if the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model.
[0077] The display interface can showcase various simulation models, such as conveyor line models and sensor models. The interface displays the conveyor line models, including their placement and the direction of material flow. As shown in Figure 2, this figure illustrates the placement and material flow of five conveyor line models. For example, the topmost conveyor line model 1 is placed horizontally, conveying materials from left to right, while the second conveyor line model 3, arranged from left to right below, is placed vertically, conveying materials from top to bottom.
[0078] The connection between the first and second conveyor line models means that the first and second conveyor line models intersect, and there is a passable direction between them. That is, materials can be transported from the first conveyor line model to the second conveyor line model, or vice versa. As shown in Figure 2, the horizontally placed conveyor line model 1 intersects with the vertically placed conveyor line model 3. Materials can be transported from conveyor line model 1 to conveyor line model 3, meaning there is a passable direction between them, i.e., conveyor line model 1 and conveyor line model 3 are connected.
[0079] The conveyor interface is an interface model with attribute information. The attribute information of the conveyor interface can include information such as the material flow direction and positional relationship between the first conveyor model and the second conveyor model.
[0080] The electronic device can contain a model entity library to record various types of simulation models. The toolbar of the display interface can display these simulation models. Users can drag a conveyor line model (the first conveyor line model) from the displayed models and release it when connected to other conveyor line models on the display interface. This user can be a tester verifying the flow control process of the conveyor line system. The model entity library can be a 3D entity library, and the conveyor line model displayed on the interface can be a 3D entity of the conveyor line model. For ease of explanation, Figure 2 uses a planar diagram.
[0081] The electronic device can use the conveyor line model connected to the first conveyor line model as the second conveyor line model, generate a conveyor line interface between the first and second conveyor line models, and display the generated conveyor line interface in the form of a rectangular block at the connection position between the first and second conveyor line models on the display interface.
[0082] For example, as shown in Figure 3, when the user drags the conveyor line model 3 to connect with the conveyor line model 1 and then releases it, the electronic device generates a conveyor line interface between the conveyor line model 1 and the conveyor line model 3, and displays the conveyor line interface in the form of a rectangular block at the connection position between the conveyor line model 1 and the conveyor line model 3.
[0083] In step S102, in response to the operation of placing the sensor model on the third conveyor model, the sensor model is placed at an installable position on the third conveyor model.
[0084] The third conveyor line model is either the first conveyor line model or the second conveyor line model.
[0085] Users can drag and drop the sensor model onto the third conveyor line model on the display interface to place the sensor model at the appropriate position. Specifically, users can drag a new sensor model from the toolbar or drag an existing sensor model displayed on the interface.
[0086] The installable position of the conveyor line model can be its edge. When the electronic device detects the user placing the sensor model on the third conveyor line model, if the two supports of the sensor model are not against the edge of the third conveyor line model, the electronic device can adjust the position of the sensor model so that the two supports are against the edge of the third conveyor line model. As shown by the arrow in Figure 4, the user places the sensor model on conveyor line model 1, but one of the two supports is outside conveyor line model 1, and the other is in the middle of conveyor line model 1, neither of which is against the edge of conveyor line model 1. The electronic device can adjust the position of the sensor model, and after adjustment, the two supports of the sensor model are against the edge of conveyor line model 1, as shown by the arrow in Figure 4.
[0087] Step S103: In response to the connection operation between the sensor model and the conveyor interface, render the connection between the sensor model and the conveyor interface, and establish the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection.
[0088] The two conveyor line models corresponding to the conveyor line interface are: two conveyor line models generated by connecting the models to create the conveyor line interface.
[0089] Users can connect sensor models and conveyor interfaces displayed on the screen. Upon detecting this connection, the electronic device renders the connection between the sensor model and the conveyor interface, displaying it on the screen. The electronic device also establishes the material flow relationship between the two conveyor models corresponding to the connected conveyor interfaces.
[0090] As shown in Figure 5, the user drags the cursor on the display interface to connect the sensor model to conveyor interface 1. The electronic device renders the connection based on the user's connection operation, thus displaying the connection between the sensor model and conveyor interface 1 on the display interface. The electronic device also establishes the material flow relationship between conveyor model 1 and conveyor model 3 corresponding to conveyor interface 1, that is, from conveyor model 1 to conveyor model 3.
[0091] Step S104: In response to the simulation instruction, flow direction control simulation is performed based on the material flow direction relationship between the conveyor line models displayed on the display interface.
[0092] The simulation instructions mentioned above can be instructions sent by the user to the electronic device to perform simulation verification, or they can be instructions generated according to preset routines to perform simulation verification. The simulation instructions may include information such as the properties of the simulated material and the initial position of the simulated material entering the conveyor system.
[0093] After receiving the simulation instruction, the electronic device can use the simulation conveyor system built in steps S101-S103 above to control the flow direction of the simulated material in the simulation conveyor system based on the material flow relationship between the conveyor models displayed on the display interface.
[0094] In the technical solution provided in this application embodiment, the simulation structure of the conveyor line system is displayed visually on the display interface. In response to user operations such as dragging the conveyor line model and sensor model, and connecting the sensor model and the conveyor line model, the system generates and displays the conveyor line interface, renders and displays the connection line between the sensor and the conveyor line interface, and establishes the material flow direction relationship between the conveyor line models corresponding to the conveyor line interface. Then, when a simulation instruction is received, the electronic device can perform flow direction simulation based on the material flow direction relationship in the simulated conveyor line system displayed on the display interface, thereby realizing the simulation verification of the flow direction control process for the conveyor line system.
[0095] Furthermore, the aforementioned visualization simulation method is highly user-friendly, requiring no writing of underlying logic code and only simple interaction on the display interface, thus reducing the skill requirements for simulation verification testers.
[0096] If the user releases the dragged first conveyor line model and it is not connected to any of the conveyor line models displayed on the screen, the electronic device can determine the second conveyor line model and adjust the position of the first conveyor line model to connect it with the second conveyor line model. In this regard, this application embodiment also provides a method for connecting the first and second conveyor line models, as shown in Figure 6. The first and second conveyor line models can be connected according to the method provided in steps S601-S602.
[0097] In step S601, in response to releasing the dragged first conveyor model, based on the positional relationship between the conveyor model and the first conveyor model, a second conveyor model is determined from other conveyor models other than the first conveyor model displayed on the display interface.
[0098] The positional relationship between the conveyor line model and the first conveyor line model can include: the relationship between the placement orientation of the conveyor line model and the placement orientation of the first conveyor line model, and the distance between the two models. The placement orientation of the conveyor line model refers to its orientation on the display interface; specifically, it can be represented by the direction in which the conveyor line model can transport materials.
[0099] If two conveyor line models do not intersect, the distance between them is the distance between their nearest boundary lines. As shown in Figure 7, the distance between the nearest boundary lines of conveyor line model 3 and conveyor line model 1 is d1, which is the distance between conveyor line model 3 and conveyor line model 1.
[0100] If two conveyor line models intersect, the distance between them can be considered as 0. As shown in Figure 7, when conveyor line model 2 intersects with conveyor line model 1, the electronic device can directly consider the distance between conveyor line model 2 and conveyor line model 1 as 0.
[0101] The electronic device can also calculate the angle between the placement direction of the conveyor line model and the placement direction of the first conveyor line model, as the relationship between their placement directions. When the angle between the two conveyor line models is less than a preset angle, they can be considered to be placed parallel; when the angle between the two conveyor line models is greater than the preset angle, they can be considered to be placed non-parallel. The preset angle can be 5 degrees, 10 degrees, etc., and can be set according to the actual situation.
[0102] When the electronic device detects that the user has released the dragged first conveyor model, it can calculate the positional relationship between other conveyor models displayed on the screen and the first conveyor model, and determine the second conveyor model based on the aforementioned positional relationship with the first conveyor model. How the second conveyor model is determined will be explained later and will not be discussed here.
[0103] Step S602: Control the first conveyor line model to be adsorbed and connected to the second conveyor line model.
[0104] After determining the second conveyor model, the electronic device can adjust the position of the first conveyor model and control the first conveyor model to attach to the second conveyor model, as shown in Figure 8. The second conveyor model is conveyor model 1. For conveyor model 3 in Figure 7, which is d1 away from conveyor model 1, the electronic device controls conveyor model 3 to move upward until it intersects with conveyor model 1. That is, the electronic device controls conveyor model 3 to attach to conveyor model 1, resulting in the scene shown in Figure 8.
[0105] In this way, when the user places the conveyor line model on the display interface, there is no need to precisely place the first conveyor line model at the position connected to the second conveyor line model. When the user drags the first conveyor line model close to the second conveyor line model, the electronic device can attach the first conveyor line model to the second conveyor line model, which reduces the complexity of the simulation method and improves the ease of use of the above simulation method.
[0106] The following explains how to determine the second conveyor line model based on its positional relationship with the first conveyor line model.
[0107] In one possible implementation, this application provides a method for determining a second conveyor line model as follows: from other conveyor line models displayed on the display interface besides the first conveyor line model, a conveyor line model that meets the following conditions is determined as the second conveyor line model: the distance between it and the first conveyor line model is less than a first distance threshold; the material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
[0108] The first distance threshold is a preset distance value, which can be set according to actual needs, and there are no restrictions on it.
[0109] The electronic device can acquire the position information of the first conveyor line model and other conveyor line models other than the first conveyor line model displayed on the display interface, thereby calculating the distance between the other conveyor line models other than the first conveyor line model displayed on the display interface and the first conveyor model, as well as the angle between the placement direction of the other conveyor line models other than the first conveyor line model displayed on the display interface and the placement direction of the first conveyor line model.
[0110] The electronic device can determine whether the material conveying direction from the other conveyor model to the first conveyor model is a passable direction after adsorption based on the angle between the placement direction of the first conveyor model and the placement direction of the other conveyor model. Specifically, when the angle between the placement direction of the first conveyor model and the placement direction of the other conveyor model is less than a preset angle, the two conveyor models can be considered to be placed parallel, and the material conveying directions of the two conveyor models do not constitute a passable direction. When the angle between the placement direction of the first conveyor model and the placement direction of the other conveyor model is greater than a preset angle, the two conveyor models can be considered to be not placed parallel, and the material conveying directions of the two conveyor models after adsorption can constitute a passable direction.
[0111] Furthermore, based on the calculated distance and the determination of the passable direction, the electronic device can determine, from other conveyor line models displayed on the display interface, a second conveyor line model that is less than the first distance threshold in distance from the first conveyor line model and whose material conveying direction from its own material conveying direction to the material conveying direction of the first conveyor line model can form a passable direction.
[0112] It is important to note that the second conveyor model determined by the electronic device must simultaneously satisfy two conditions: minimum distance and the material conveying direction from its own material conveying direction to the material conveying direction of the first conveyor model forming a passable direction. If only the distance is less than the first distance threshold, as shown in Figure 7, the distance between conveyor model 2 and conveyor model 3 is d2, and the distance between conveyor model 1 and conveyor model 3 is d1. Both d1 and d2 are less than the first distance threshold, but conveyor model 2 and conveyor model 3 cannot form a passable direction, the electronic device will determine that conveyor model 1, which can form a passable direction with conveyor model 3, is the second conveyor model.
[0113] In one possible implementation, this application embodiment also provides a method for determining the second conveyor line model as follows: from other conveyor line models displayed on the display interface besides the first conveyor line model, a conveyor line model that meets the following conditions is determined as the second conveyor line model: it intersects with the first conveyor line model; the material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
[0114] After acquiring the position information of the first conveyor line model and other conveyor line models displayed on the interface besides the first conveyor line model, the electronic device can determine whether there are any conveyor line models intersecting with the first conveyor line model based on the aforementioned position information. Specifically, the electronic device can determine whether the conveyor line models overlap with the first conveyor line model based on the aforementioned position information; if there is an overlap, it indicates that the two conveyor line models intersect.
[0115] If there exists a conveyor model that intersects with the first conveyor model, the electronic device can calculate the angle between the material conveying direction of the conveyor model that intersects with the first conveyor model and the material conveying direction of the first conveyor model.
[0116] The electronic device can further determine, based on the aforementioned included angle, whether the material conveying direction from the material conveying direction of the first conveyor model to the material conveying direction of the first conveyor model after adsorption is a passable direction. Specifically, the method of determining the passable direction based on the included angle in the previous embodiment can be referred to, and will not be repeated here.
[0117] Furthermore, based on the judgment of the intersection of the above-mentioned conveyor line models and the judgment of the passable direction, the electronic device can determine from the other conveyor line models displayed on the display interface that intersect with the first conveyor line model and that can form a passable direction from its own material conveying direction to the material conveying direction of the first conveyor line model, and use it as the second conveyor line model.
[0118] Furthermore, there can be multiple second conveyor line models. As shown in Figure 9, in the scene on the left, conveyor line model 1 and conveyor line model 4 are placed parallel to each other. The user releases the dragged conveyor line model 3, i.e., the first conveyor line model, at the position shown in the figure. The distance between conveyor line model 3 and conveyor line model 1 is d3, and the distance between conveyor line model 3 and conveyor line model 4 is 0. Both d3 and 0 are less than the first distance threshold, and conveyor line model 3 can form a passable direction with both conveyor line model 1 and conveyor line model 4. The electronic device can identify conveyor line model 1 and conveyor line model 4 as the second conveyor line models, and subsequently, the conveyor line model can be simultaneously attached to both conveyor line model 1 and conveyor line model 4, as shown in the scene on the right in Figure 9.
[0119] In one possible implementation, when determining multiple second conveyor line models, the two methods described above can be combined. Specifically, the method of determining the second conveyor line model based on calculated distances and the determination of permissible directions; and the method of determining the second conveyor line model based on the determination of conveyor line intersections and the determination of permissible directions.
[0120] The electronic device can first determine whether there is a conveyor line model that intersects with the first conveyor line model, and then determine the second conveyor line model according to the two determination methods mentioned above. For conveyor line models that intersect with the first conveyor line model, the second conveyor line model is determined based on the judgment of the intersection of the conveyor lines and the judgment of the passable direction; for conveyor line models that do not intersect with the first conveyor line model, the second conveyor line model is determined based on the calculated distance and the judgment of the passable direction.
[0121] As shown in Figure 9, the electronic device determines that the conveyor line model 4 intersects with the conveyor line model 3, and determines that the conveyor line model 4 and the conveyor line model 3 form a passable direction based on the included angle between them. Thus, the electronic device can determine that the conveyor line model 4 is one of the second conveyor line models.
[0122] For other conveyor line models besides conveyor line model 3 and conveyor line model 4 displayed on the display interface, such as conveyor line model 1, the electronic device can calculate that the distance d3 between conveyor line model 1 and conveyor line model 3 is less than the first preset threshold, and the included angle between conveyor line model 1 and conveyor line model 3 determines that conveyor line model 1 and conveyor line model 3 form a passable direction. Thus, the electronic device can also determine that conveyor line model 1 is one of the second conveyor line models.
[0123] Thus, the electronic equipment can determine the two second conveyor line models, conveyor line model 1 and conveyor line model 4.
[0124] In this way, the electronic device can more accurately determine the second conveyor model that the first conveyor model needs to adsorb, without the need for repeated adjustments by the user, further reducing the complexity of the simulation method and further improving the ease of use of the above simulation method.
[0125] If the sensor model does not intersect with any of the conveyor line models displayed on the screen when the user releases the dragged sensor model, the electronic device can determine the third conveyor line model and adjust the position of the sensor model so that the sensor model is attached to the installable position of the third conveyor line model. In this regard, the embodiments of this application provide the following implementation method for step S102, as shown in Figure 10, which includes the following steps S1001-S1003.
[0126] Step S1001: Display the sensor model along the dragging trajectory of the sensor model on the display interface.
[0127] The electronic device can detect the dragging trajectory of the sensor model when the user drags it on the display interface. When the user drags the sensor model to any position, the electronic device can display the sensor model at that position.
[0128] In step S1002, in response to releasing the dragged sensor model, a third conveyor line model is determined from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model.
[0129] In one possible implementation, the preset positional relationship could be: the conveyor line model intersects with the sensor model.
[0130] After the electronic device detects that the user has released the dragged sensor model, it can obtain the position information of the sensor model and each conveyor line model displayed on the screen. The electronic device can determine whether each conveyor line model overlaps with the sensor model based on the obtained position information. If there is a conveyor line model that overlaps with the sensor model, the electronic device can determine that the conveyor line model intersects with the sensor model, that is, it satisfies the preset position relationship, and thus the electronic device can determine that the conveyor line model is the third conveyor line model.
[0131] In one possible implementation, the preset positional relationship could be: the distance between the conveyor line model and the sensor model is less than a second distance threshold. The second distance threshold is a preset distance value, which can be set according to actual needs and is not limited thereto.
[0132] If the sensor model intersects with the conveyor line model, the distance between the sensor model and the conveyor line model can be considered as 0, and the electronic device can directly use the conveyor line model that intersects with the sensor as the third conveyor line model.
[0133] If the sensor model and the conveyor line model do not intersect, the distance between them is the distance between their nearest boundary points. As shown in Figure 11, the distance between the nearest boundary points of the sensor model and conveyor line model 1 is d4, therefore the distance between the sensor model and conveyor line model 1 is d4.
[0134] After the electronic device detects that the user has released the dragged sensor model, it acquires the position information of each conveyor line model and the sensor model displayed on the screen, and calculates the distance between each conveyor line model and the sensor model based on the acquired position information. The electronic device then determines the conveyor line model with the smallest distance to the sensor model as the third conveyor line model.
[0135] Step S1003: Control the sensor model to be adsorbed to the installable position of the third conveyor line model.
[0136] After determining the third conveyor line model, the electronic device can adjust the position of the sensor model and control the sensor model to attach to the installable position of the third conveyor line model. As shown in Figure 11, the third conveyor line model is conveyor line model 1. For the sensor model with a distance of d4 from conveyor line model 1, the electronic device can control the sensor model to move downwards until the two supports are connected to the edge of conveyor line model 1.
[0137] In this way, when the user places the sensor model on the display interface, there is no need to precisely place the sensor model in the installable position of the third conveyor line model. When the user drags the sensor model close to the third conveyor line model, the electronic device can attach the sensor model to the third conveyor line model, which further reduces the complexity of the simulation method and further improves the ease of use of the above simulation method.
[0138] After the sensor model is attached to the installable position of the third conveyor model as described above, the user can also drag and adjust the position of the sensor on the third conveyor model. The electronic device responds to the user's operation of adjusting the sensor position as follows: in response to dragging the sensor model along the third conveyor model, the position of the sensor model on the third conveyor model is adjusted.
[0139] After the electronic device detects the user's dragging operation of the sensor model, it adjusts the position of the sensor model on the third conveyor line model along the dragging trajectory, and keeps the two supports of the sensor model attached to the installable position of the third conveyor line model.
[0140] This prevents the sensor model from moving out of its installation position on the third conveyor line model due to vibration during user operation, allowing users to more easily adjust the sensor model to the desired position.
[0141] The aforementioned operations of dragging the first conveyor line model and sensor model on the display interface can be performed multiple times and can be interspersed. Users can add multiple conveyor line models and multiple sensor models on the display interface as needed to construct a simulated conveyor line system, and there is no limitation on this. After completing the construction of the simulated conveyor line system according to the above embodiment, as shown in Figure 12, the electronic device can perform control flow simulation in the following manner, that is, the above step S104 can include the following steps S1201-S1203.
[0142] Step S1201: In response to the simulation instruction, control the simulated material to move along the conveyor line model displayed on the display interface.
[0143] After receiving the simulation instruction, the electronic device places the simulation material at the specified initial position based on the properties of the simulation material and the initial position of the simulation material entering the conveyor system, and then controls the simulation material to move along the conveyor model displayed on the display interface.
[0144] Step S1202: In response to the simulated material moving into the detection range of the sensor model, the identification features of the simulated material are obtained from the properties of the simulated material.
[0145] The aforementioned identification features may include characteristics such as the color, type, and size of the simulated material.
[0146] The electronic device can compare the position of the simulated material with the detection range of each sensor model in real time to determine whether the simulated material has moved into the detection range of the sensor model. If the electronic device determines that the simulated material has moved into the detection range of a certain sensor model, it obtains the identification features of the simulated material from its properties.
[0147] The identification features of the simulated materials can be stored in a designated server. Electronic devices can request the attribute information of the simulated materials from the designated server to obtain the identification features. Alternatively, the identification features of the simulated materials can be carried in the simulation instructions, allowing the electronic devices to directly parse the identification features from the simulation instructions.
[0148] Step S1203: Based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface, flow control is performed on the simulated material.
[0149] The flow control strategy can be a strategy that determines which conveyor line interface the simulated material flows to based on identified features. The electronic device can combine the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the screen to determine which conveyor line interface the simulated material should be delivered to, and control the simulated material to move to that conveyor line interface, thereby achieving flow control.
[0150] For example, when an electronic device detects that simulated material has moved into the detection range of a sensor model, the electronic device can acquire the identification features of the simulated material. Based on the identification features and the flow control strategy, it can determine the conveyor interface of the simulated material's flow direction. When the simulated material moves to the determined conveyor interface, it can control the simulated material to move from the current conveyor model to another conveyor model connected to that conveyor interface, thus achieving flow control.
[0151] In this way, upon receiving a simulation instruction, the electronic device can perform flow direction simulation based on the material flow relationship in the simulated conveyor system displayed on the interface, the identification characteristics of the simulated material, and the flow control strategy configured in the sensor model attributes. The simulated material indicated by the simulation instruction can be determined according to the user's actual simulation needs; that is, the user can issue a simulation instruction for the material they want to simulate and verify, and the electronic device can then perform simulation and verification for that material. When the simulation instruction carries the attributes of the simulated material, the user can customize the number and type of the simulated material attributes carried in the simulation instruction. For example, the user can customize the simulation instruction to carry one attribute or a combination of multiple attributes of the simulated material. Alternatively, the user can modify the attributes carried in a previously sent simulation instruction and resend the simulation instruction to perform simulation and verification of simulated materials with different attributes. Since the attributes of the simulated material can be modified, that is, the identification characteristics can be modified, more verification scenarios can be covered simply by modifying the attribute information of the simulated material, thus improving the verification efficiency of the simulation and verification of the flow direction control process of the conveyor system.
[0152] In one possible implementation, the flow control strategy may include a material identification sub-strategy and a diversion allocation sub-strategy.
[0153] The above step S1203 can also be implemented in the following way, as shown in Figure 13. The above step S1203 includes the following steps S1301-S1303.
[0154] Step S1301: Determine whether the identification features match the material identification sub-strategy.
[0155] The electronic device can determine whether a simulated material needs to be diverted based on its identification characteristics, according to the material identification sub-strategy shown in Figure 14. Figure 14 shows two condition groups included in a material identification sub-strategy. The upper condition group targets information such as the entity attributes, color, entity label, and name of the simulated material; the lower condition group targets information such as the entity type, entity label, and name of the simulated material.
[0156] The electronic device can sequentially determine whether the identification features of the simulated material match the condition groups included in the material identification sub-strategy. For example, for the condition group above Figure 14, the electronic device determines whether the entity attributes, color, entity label, name, and other information of the simulated material match the condition group. If they match, the subsequent step S1302 is executed. If they do not match, the next condition group is checked. If all condition groups are determined to be mismatched, the simulated material is controlled to continue transporting on the original conveyor line.
[0157] Step S1302: Based on the diversion and allocation sub-strategy and the material flow relationship between the conveyor models displayed on the display interface, select the target conveyor interface from the conveyor interface corresponding to the third conveyor model.
[0158] The traffic allocation sub-strategies can include: random availability allocation strategy, cyclic availability allocation strategy, specified route allocation strategy, and custom logic allocation strategy. To facilitate allocation, the electronic device can number the connections between the sensor model and the interface and display them on the display interface. Figure 15 shows a schematic diagram of the conveyor system after assigning numbers to the conveyor interfaces and displaying them on the display interface. The electronic device assigns unique numbers 1, 2, and 4 to each connection and displays them on the display interface. For the third conveyor model itself, to facilitate differentiation, the electronic device can also generate a conveyor interface at the traffic allocation location and generate a connection from the sensor model to that conveyor interface, then assign a unique number to that connection. For example, the rightmost rectangle in Figure 15 represents the connection between the conveyor interface and the sensor model, which is numbered 3.
[0159] For simulated materials whose identification features match the material identification sub-strategy as determined in step S1301 above, the electronic device further selects a target conveyor line interface from the conveyor line interface corresponding to the third conveyor line model based on the diversion and allocation sub-strategy and the material flow relationship between the conveyor line models displayed on the display interface. For example, the target conveyor line interface can be selected from conveyor line interfaces 1, 2, and 4 shown in Figure 15.
[0160] Step S1303: Control the simulated material to move towards the fourth conveyor line model.
[0161] The fourth conveyor model is the conveyor model other than the third conveyor model that corresponds to the target conveyor interface.
[0162] After determining the fourth conveyor line model, the electronic device can control the simulated material to move towards the fourth conveyor line model. For example, as shown in Figure 15, the target conveyor line interface is conveyor line interface 1, and the corresponding conveyor line models include conveyor line model 1 and conveyor line model 3. If conveyor line model 1 is the third conveyor line model, then conveyor line model 3 is the fourth conveyor line model. The electronic device controls the simulated material to move towards conveyor line model 3.
[0163] In this way, flow control is achieved through two sub-strategies: material identification and diversion. This decouples material identification and diversion, increases the flexibility of the flow control strategy, and provides a more flexible flow control strategy.
[0164] Corresponding to the above-described flow direction control simulation method, this application also provides a flow direction control simulation device, as shown in Figure 16. The device includes:
[0165] The first response module 1601 is used to respond to dragging the first conveyor line model on the display interface. If the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model.
[0166] The second response module 1602 is used to respond to the operation of placing a sensor model on the third conveyor model, placing the sensor model at an installable position on the third conveyor model, wherein the third conveyor model is either the first conveyor model or the second conveyor model.
[0167] The third response module 1603 is used to respond to the connection operation between the sensor model and the conveyor interface, render the connection between the sensor model and the first conveyor interface, and establish the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection.
[0168] The fourth response module 1604 is used to respond to simulation instructions and perform flow control simulation based on the material flow relationship between the conveyor line models displayed on the display interface.
[0169] In the technical solution provided in this application embodiment, the simulated structure of the conveyor line system is visually displayed through a display interface. Responding to user operations such as dragging conveyor line models, sensor models, and connecting lines, the system generates and displays conveyor line interfaces, renders and displays the connection lines between sensors and conveyor line interfaces, and establishes the material flow direction relationship between the conveyor line models corresponding to the conveyor line interfaces. Furthermore, upon receiving a simulation instruction, the electronic device can perform flow direction simulation based on the material flow direction relationship displayed in the simulated conveyor line system, thereby realizing the simulation verification of the flow direction control process for the conveyor line system's material transport.
[0170] Furthermore, the aforementioned visualization simulation method is highly user-friendly, requiring no writing of underlying logic code and only simple interaction on the display interface, thus reducing the skill requirements for simulation verification testers.
[0171] In one possible implementation, the first conveyor model and the second conveyor model can be connected in the following manner: in response to releasing the dragged first conveyor model, based on the positional relationship between the conveyor model and the first conveyor model, the second conveyor model is determined from other conveyor models other than the first conveyor model displayed on the display interface; the first conveyor model is controlled to be attached to the second conveyor model.
[0172] In one possible implementation, based on the positional relationship between the conveyor line model and the first conveyor line model, determining the second conveyor line model from other conveyor line models displayed on the display interface may include: determining a conveyor line model from other conveyor line models displayed on the display interface that meets the following conditions as the second conveyor line model: the distance between it and the first conveyor line model is less than a first distance threshold; and the material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
[0173] In one possible implementation, the second response module 1602 can be specifically used to: display the sensor model along the drag trajectory of the sensor model on the display interface; in response to releasing the dragged sensor model, determine a third conveyor line model from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model; and control the sensor model to be attracted to the installable position of the third conveyor line model.
[0174] In one possible implementation, the second response module 1602 can also be used to: after controlling the sensor model to be attached to the installable position of the third conveyor model, adjust the position of the sensor model on the third conveyor model in response to dragging the sensor model along the third conveyor model.
[0175] In one possible implementation, the fourth response module 1604 can be specifically used to: control the simulated material to move along the conveyor line model displayed on the display interface in response to a simulation instruction; obtain the identification features of the simulated material from the properties of the simulated material in response to the simulated material moving into the detection range of the sensor model; and perform flow direction control on the simulated material according to the identification features, the flow direction control strategy configured in the properties of the sensor model, and the material flow direction relationship between the conveyor line models displayed on the display interface.
[0176] In one possible implementation, the flow control strategy may include a material identification sub-strategy and a diversion allocation sub-strategy; the fourth response module 1604 may be used to: determine whether the identification features match the material identification sub-strategy; if they match, based on the diversion allocation sub-strategy and the material flow relationship between the conveyor models displayed on the display interface, select a target conveyor interface from the conveyor interface corresponding to the third conveyor model; control the simulated material to move to the fourth conveyor model, wherein the fourth conveyor model is: the conveyor model other than the third conveyor model corresponding to the target conveyor interface.
[0177] This application also provides an electronic device, as shown in FIG17, including:
[0178] Memory 1701 is used to store computer programs;
[0179] The processor 1702 is used to execute the program stored in the memory 1701 to implement any of the above-mentioned flow control simulation methods.
[0180] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 1702, the communication interface, and the memory 1701 communicating with each other via the communication bus.
[0181] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0182] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0183] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0184] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0185] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described flow control simulation methods.
[0186] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the flow control simulation methods described above.
[0187] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.
[0188] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0189] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0190] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A flow direction control simulation method, characterized in that, The method includes: In response to dragging the first conveyor line model on the display interface, if the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model. In response to the operation of placing a sensor model on a third conveyor model, the sensor model is placed at an installable location on the third conveyor model, wherein the third conveyor model is either the first conveyor model or the second conveyor model. In response to the connection operation between the sensor model and the conveyor interface, the connection between the sensor model and the conveyor interface is rendered, and the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection is established. In response to the simulation instructions, flow direction control simulation is performed based on the material flow direction relationship between the conveyor line models displayed on the display interface.
2. The method according to claim 1, characterized in that, Connect the first conveyor model and the second conveyor model in the following manner: In response to releasing the dragged first conveyor model, a second conveyor model is determined from other conveyor models other than the first conveyor model displayed on the display interface, based on the positional relationship between the conveyor model and the first conveyor model. The first conveyor line model is controlled to be attached to the second conveyor line model.
3. The method according to claim 2, characterized in that, The step of determining the second conveyor line model from other conveyor line models besides the first conveyor line model displayed on the display interface based on the positional relationship between the conveyor line model and the first conveyor line model includes: From the other conveyor line models displayed on the display interface besides the first conveyor line model, determine the conveyor line model that meets the following conditions and use it as the second conveyor line model: The distance between the model and the first conveyor line is less than a first distance threshold. The material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
4. The method according to claim 1, characterized in that, The operation of placing a sensor model on a third conveyor line model, in response to the operation of placing the sensor model at an installable location on the third conveyor line model, includes: The sensor model is displayed along the dragging trajectory of the sensor model on the display interface; In response to releasing the dragged sensor model, a third conveyor line model is determined from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model; The sensor model is controlled to attach to the installable position of the third conveyor line model.
5. The method according to claim 4, characterized in that, After controlling the sensor model to adhere to the installable position of the third conveyor line model, the method further includes: In response to dragging the sensor model along the third conveyor line model, the position of the sensor model on the third conveyor line model is adjusted.
6. The method according to any one of claims 1-5, characterized in that, The process of responding to simulation instructions and performing flow direction control simulation based on the material flow direction relationship between the conveyor line models displayed on the display interface includes: In response to simulation instructions, control the simulated material to move along the conveyor line model displayed on the display interface; In response to the simulated material moving into the detection range of the sensor model, the identification features of the simulated material are obtained from the properties of the simulated material; Based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface, the flow direction of the simulated material is controlled.
7. The method according to claim 6, characterized in that, The flow control strategy includes a material identification sub-strategy and a diversion and allocation sub-strategy; The flow control of the simulated material based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface includes: Determine whether the identification feature matches the material identification sub-strategy; If a match is found, based on the diversion and allocation sub-strategy and the material flow relationship between the conveyor line models displayed on the display interface, the target conveyor line interface is selected from the conveyor line interface corresponding to the third conveyor line model. The simulated material is controlled to move towards the fourth conveyor line model, wherein the fourth conveyor line model is the conveyor line model other than the third conveyor line model corresponding to the target conveyor line interface.
8. A flow direction control simulation device, characterized in that, The device includes: The first response module is used to respond to dragging the first conveyor line model on the display interface. If the first conveyor line model is connected to the second conveyor line model displayed on the display interface, a conveyor line interface is generated between the first conveyor line model and the second conveyor line model, and the generated conveyor line interface is displayed at the connection position between the first conveyor line model and the second conveyor line model. The second response module is used to respond to the operation of placing a sensor model on the third conveyor model, wherein the sensor model is placed at an installable position on the third conveyor model, and the third conveyor model is either the first conveyor model or the second conveyor model. The third response module is used to respond to the connection operation between the sensor model and the conveyor interface, render the connection between the sensor model and the first conveyor interface, and establish the material flow relationship between the two conveyor models corresponding to the conveyor interface connected by the connection. The fourth response module is used to respond to simulation instructions and perform flow direction control simulation based on the material flow direction relationship between the conveyor line models displayed on the display interface.
9. The apparatus according to claim 8, characterized in that, Connect the first conveyor model and the second conveyor model in the following manner: In response to releasing the dragged first conveyor model, a second conveyor model is determined from other conveyor models other than the first conveyor model displayed on the display interface, based on the positional relationship between the conveyor model and the first conveyor model. The first conveyor line model is controlled to be attached to the second conveyor line model.
10. The apparatus according to claim 9, characterized in that, The step of determining the second conveyor line model from other conveyor line models besides the first conveyor line model displayed on the display interface based on the positional relationship between the conveyor line model and the first conveyor line model includes: From the other conveyor line models displayed on the display interface besides the first conveyor line model, determine the conveyor line model that meets the following conditions and use it as the second conveyor line model: The distance between the model and the first conveyor line is less than a first distance threshold. The material conveying direction from the other conveyor line model to the material conveying direction of the first conveyor line model is a passable direction.
11. The apparatus according to claim 8, characterized in that, The second response module is specifically used for: The sensor model is displayed along the dragging trajectory of the sensor model on the display interface; In response to releasing the dragged sensor model, a third conveyor line model is determined from the conveyor line models displayed on the display interface that satisfy a preset positional relationship with the sensor model; The sensor model is controlled to attach to the installable position of the third conveyor line model.
12. The apparatus according to claim 11, characterized in that, The second response module is also used for: After the sensor model is controlled to attach to the installable position of the third conveyor model, the position of the sensor model on the third conveyor model is adjusted in response to dragging the sensor model along the third conveyor model.
13. The apparatus according to any one of claims 8-12, characterized in that, The fourth response module is specifically used for: In response to simulation instructions, control the simulated material to move along the conveyor line model displayed on the display interface; In response to the simulated material moving into the detection range of the sensor model, the identification features of the simulated material are obtained from the properties of the simulated material; Based on the identified features, the flow control strategy configured in the attributes of the sensor model, and the material flow relationship between the conveyor line models displayed on the display interface, the flow direction of the simulated material is controlled.
14. The apparatus according to claim 13, characterized in that, The flow control strategy includes a material identification sub-strategy and a diversion and allocation sub-strategy; The fourth response module is specifically used for: Determine whether the identification feature matches the material identification sub-strategy; If a match is found, based on the diversion and allocation sub-strategy and the material flow relationship between the conveyor line models displayed on the display interface, the target conveyor line interface is selected from the conveyor line interface corresponding to the third conveyor line model. The simulated material is controlled to move towards the fourth conveyor line model, wherein the fourth conveyor line model is the conveyor line model other than the third conveyor line model corresponding to the target conveyor line interface.
15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-7.