Knowledge graph-based simulation model logic association method and system, and medium
By using a knowledge graph-based approach, the logical relationships between simulation models are automatically identified, solving the problems of high workload and low accuracy in manually setting logical relationships, and achieving efficient and accurate logical relationships between simulation models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU CORE CONTROL INTELLIGENT TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
In rapid simulation methods, the logical relationships between models need to be set manually, which is labor-intensive and prone to omissions or errors. Existing methods cannot capture complex logical relationships, resulting in low accuracy and low efficiency.
A knowledge graph-based approach is adopted. By constructing an independent graph database and combining bounding box position relationship calculation and feature working point analysis, the logical relationships between simulation models are automatically identified. The knowledge graph is used to remove redundant relationships and improve matching efficiency.
This reduces the workload of manually setting logical relationships between models, improves the accuracy and efficiency of logical connections between simulation models, and ensures the reliability of simulation results.
Smart Images

Figure CN122154497A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation software technology, and more specifically, to a method, system, and medium for logical association of simulation models based on knowledge graphs. Background Technology
[0002] In the fields of industrial automation and intelligent manufacturing, simulation software is an important tool for production line design, process planning, and equipment debugging. Common simulation software includes Siemens' PDPS and Plant Simulation, as well as domestic software such as Chip Factory. When designers use these software to build simulation scenarios, they need to place multiple equipment models and set the logical relationships between the models to simulate the actual operation process of the production line.
[0003] In traditional simulation software workflows, if PLC programming is used, the logical relationships between models can be automatically controlled by the PLC program, and the designer only needs to write the PLC code. However, in rapid simulation methods, the overall process does not involve PLC programming, and the logical relationships between models need to be manually set one by one. This includes triggering relationships, sequence, and conditional judgments between devices. When the scene contains a large number of devices, the workload of manually setting logical relationships is enormous, and omissions or errors are prone to occur, affecting the accuracy of the simulation results.
[0004] Existing solutions primarily rely on rule matching or simple distance calculations to determine the relationships between models. For example, calculating the Euclidean distance between two models and determining a relationship when the distance is less than a threshold; or performing string matching based on model names. These methods have the following problems: first, they are one-dimensional, only considering spatial location or name, and cannot capture complex logical relationships; second, they have low accuracy, easily leading to false positives or false negatives; and third, they require a large amount of manual annotation work, resulting in low efficiency. Summary of the Invention
[0005] The purpose of this application is to provide a method, system, and medium for logical association of simulation models based on knowledge graphs. By establishing commonly used logical relationships in industry through knowledge graphs, the efficiency of relationship matching can be improved and the workload of manually setting logical relationships between models can be reduced.
[0006] This application also provides a method for logical association of simulation models based on knowledge graphs, including:
[0007] Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store the knowledge graphs for different business scenarios;
[0008] The initial logical connections between simulation models are obtained by using two parallel methods: bounding box position relationship calculation and feature working point analysis.
[0009] Calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result;
[0010] Extract the simulation I / O parameters and toolhead parameters of the simulation model, calculate the characteristic working points of the model based on the parameters, and determine whether there is a logical relationship between the models by analyzing the relationship between the characteristic working points of each model, and obtain the logical relationship results.
[0011] Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final simulation model logical association results are output.
[0012] Optionally, in the knowledge graph-based simulation model logical association method described in the embodiments of this application, the knowledge graph construction step includes:
[0013] Collect scenario data from different business domains. The scenario data includes the simulation model attributes corresponding to the business scenario, the historical correlation between models, and the business process specifications.
[0014] Based on the classification of business scenarios, an independent graph database is built for each type of business scenario;
[0015] In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges;
[0016] The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values;
[0017] The edge's attribute information includes association type, association strength, and association priority.
[0018] Optionally, in the knowledge graph-based simulation model logical association method described in the embodiments of this application, the bounding box position relationship calculation method includes:
[0019] Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model;
[0020] Based on the model's type label, the models are classified, and models with the same type label use the same bounding box calculation method;
[0021] The size of the model is dynamically adjusted, and the bounding box is scaled according to the actual size parameters of the model.
[0022] Calculate the bounding box positional relationships between any two models, including intersection, containment, and disjoint relationships;
[0023] Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation.
[0024] Determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
[0025] Optionally, in the knowledge graph-based simulation model logical association method described in the embodiments of this application, the method for determining the bounding box positional relationship includes:
[0026] Extract the bounding box parameters of model A and model B. The bounding box parameters include the three-dimensional coordinates of the center point of the bounding box and the dimensions in the X / Y / Z axis directions.
[0027] Calculate the value intervals [minA_x, maxA_x], [minA_y, maxA_y], and [minA_z, maxA_z] of the bounding box of model A on the X, Y, and Z axes, and the value intervals [minB_x, maxB_x], [minB_y, maxB_y], and [minB_z, maxB_z] of the bounding box of model B on the X, Y, and Z axes.
[0028] Determine whether the value ranges of two bounding boxes overlap on all three coordinate axes;
[0029] If they all overlap, they are determined to be intersecting;
[0030] If all the value ranges of one bounding box are contained within the corresponding value ranges of another bounding box, then it is determined to be an inclusion relationship;
[0031] If the value intervals on the three coordinate axes do not overlap, then they are determined to be disjoint.
[0032] Optionally, in the knowledge graph-based simulation model logical association method described in the embodiments of this application, the feature working point analysis specifically includes:
[0033] Extract the simulation I / O parameters of the model, which include the type, quantity, interface location and connection rules of input I / O and output I / O;
[0034] Extract the tool head parameters of the model, which include tool head type, installation position coordinates, working direction vector, and working range;
[0035] Based on simulation IO parameters and tool head parameters, the characteristic working points of the model are calculated. The characteristic working points include working points and working lines. The working points record the three-dimensional coordinates in the local coordinate system of the model and the world coordinate system of the scene. The working lines record the starting point coordinates, the ending point coordinates and the direction vector.
[0036] Calculate the spatial relationship between feature working points of each pair of models, and determine whether there is a logical relationship between the two models based on the preset point association rules in the knowledge graph.
[0037] Optionally, in the knowledge graph-based simulation model logical association method described in the embodiments of this application, the method for determining the spatial relationship of the feature working points includes:
[0038] Obtain the feature operating point set {PA1, PA2, ..., PAn} for model A and the feature operating point set {PB1, PB2, ..., PBm} for model B respectively;
[0039] Query the knowledge graph and, based on the type labels of the two models, filter the appropriate feature working point judgment rules;
[0040] Perform pairwise matching on points in two sets: calculate the Euclidean distance between points, and if the distance is less than a preset threshold, they are considered to be overlapping;
[0041] Calculate the perpendicular distance from a point to a line. If the distance is less than a preset threshold, the point is determined to be on the line.
[0042] The angle between the direction vectors of the lines is calculated. If the angle is less than a preset angle threshold, they are considered parallel. If the angle is equal to 90°, they are considered perpendicular.
[0043] Secondly, embodiments of this application provide a knowledge graph-based simulation model logical association system. The system includes a memory and a processor. The memory includes a program for a knowledge graph-based simulation model logical association method. When the program is executed by the processor, it implements the following steps:
[0044] Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store the knowledge graphs for different business scenarios;
[0045] The initial logical connections between simulation models are obtained by using two parallel methods: bounding box position relationship calculation and feature working point analysis.
[0046] Calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result;
[0047] Extract the simulation I / O parameters and toolhead parameters of the simulation model, calculate the characteristic working points of the model based on the parameters, and determine whether there is a logical relationship between the models by analyzing the relationship between the characteristic working points of each model, and obtain the logical relationship results.
[0048] Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final simulation model logical association results are output.
[0049] Optionally, in the knowledge graph-based simulation model logical association system described in this application embodiment, the knowledge graph construction steps include:
[0050] Collect scenario data from different business domains. The scenario data includes the simulation model attributes corresponding to the business scenario, the historical correlation between models, and the business process specifications.
[0051] Based on the classification of business scenarios, an independent graph database is built for each type of business scenario;
[0052] In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges;
[0053] The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values;
[0054] The edge's attribute information includes association type, association strength, and association priority.
[0055] Optionally, in the knowledge graph-based simulation model logical association system described in this application embodiment, the bounding box position relationship calculation method includes:
[0056] Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model;
[0057] Based on the model's type label, the models are classified, and models with the same type label use the same bounding box calculation method;
[0058] The size of the model is dynamically adjusted, and the bounding box is scaled according to the actual size parameters of the model.
[0059] Calculate the bounding box positional relationships between any two models, including intersection, containment, and disjoint relationships;
[0060] Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation.
[0061] Determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
[0062] Thirdly, embodiments of this application also provide a computer-readable storage medium, which includes a knowledge graph-based simulation model logical association method program. When the knowledge graph-based simulation model logical association method program is executed by a processor, it implements the steps of the knowledge graph-based simulation model logical association method as described in any of the preceding claims.
[0063] As can be seen from the above, the present application provides a method, system, and medium for logical association of simulation models based on knowledge graphs. This involves constructing corresponding knowledge graphs according to different business scenarios to obtain initial logical associations between simulation models; calculating the bounding boxes of each simulation model, obtaining the type label of each model, dynamically adjusting the size of the bounding boxes according to the actual size parameters of the models, dynamically calling the bounding box position relationship calculation logic, and determining whether there is a physical spatial association between pairs of models; calculating the feature working points of the models based on parameters, and determining whether there is a logical association between models by analyzing the feature working point relationships between pairs of models, thus obtaining the logical association result; and establishing commonly used logical relationships in industry through knowledge graphs to help improve relationship matching efficiency and reduce the workload of manually setting logical relationships between models. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 A flowchart illustrating the knowledge graph-based simulation model logical association method provided in this application embodiment;
[0066] Figure 2 A flowchart illustrating the knowledge graph construction method for the knowledge graph-based simulation model logical association method provided in this application embodiment;
[0067] Figure 3 A flowchart illustrating the bounding box position relationship calculation of the knowledge graph-based simulation model logical association method provided in this application embodiment. Detailed Implementation
[0068] 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. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0069] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0070] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a knowledge graph-based simulation model logical association method according to some embodiments of this application. This knowledge graph-based simulation model logical association method is used in a terminal device and includes the following steps:
[0071] S101: Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store knowledge graphs for different business scenarios;
[0072] S102 uses two parallel methods, bounding box position relationship calculation and feature working point analysis, to obtain the initial logical association between simulation models;
[0073] S103, calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result;
[0074] S104: Extract the simulation IO parameters and toolhead parameters of the simulation model, calculate the characteristic working points of the model based on the parameters, and determine whether there is a logical relationship between the models by analyzing the relationship between the characteristic working points of each pair of models, and obtain the logical relationship results.
[0075] S105: Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final simulation model logical association results are output.
[0076] It should be noted that, based on a knowledge graph and combined with two parallel association recognition methods (bounding box position relationship calculation and feature working point analysis), the automatic recognition of logical associations in the simulation model is ultimately achieved through result synthesis and redundancy removal. Specifically, the construction and storage methods of the knowledge graph are limited to ensure that knowledge graphs for different business scenarios are independently manageable; the parallel execution of the two association recognition methods is clearly defined to improve the efficiency of association recognition; and the core operations of each recognition method are refined to cover both physical spatial associations and logical associations, thereby optimizing the results and ensuring the accuracy and rationality of the association results.
[0077] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a knowledge graph construction method for a simulation model logical association method based on knowledge graphs, as described in some embodiments of this application. According to embodiments of the present invention, the knowledge graph construction steps include:
[0078] S201, collect scenario data from different business domains. Scenario data includes simulation model attributes corresponding to business scenarios, historical relationships between models, and business process specifications.
[0079] S202, classify according to business scenario type and build an independent graph database for each type of business scenario;
[0080] S203: In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges.
[0081] The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values;
[0082] The edge's attribute information includes association type, association strength, and association priority.
[0083] It should be noted that knowledge graphs can clearly define the scope of data collection for different scenarios, ensuring that the data sources of knowledge graphs align with actual business needs; they limit the independent construction of graph databases, avoiding knowledge confusion across different business scenarios and improving management and expansion convenience; and they clarify the core attributes of nodes and edges in the knowledge graph. Node attributes provide data support for the two subsequent association recognition methods, while edge attributes provide a basis for judgment in subsequent result synthesis and redundancy removal, ensuring that knowledge graphs can effectively assist models in association recognition.
[0084] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating the bounding box position relationship calculation process of a knowledge graph-based simulation model logical association method in some embodiments of this application. According to embodiments of the present invention, the bounding box position relationship calculation method includes:
[0085] S301, Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model;
[0086] S302: Classify models according to their type labels. Models with the same type label use the same bounding box calculation method. Dynamically adjust the size of the models and scale the bounding boxes according to the actual size parameters of the models.
[0087] S303, calculate the bounding box positional relationships between pairs of models, including intersection, containment, and disjoint relationships;
[0088] S304. Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation.
[0089] S305, determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
[0090] It should be noted that bounding boxes are used to quickly identify physical spatial relationships between models, improving the efficiency of relationship identification. The bounding box calculation algorithm is clearly defined and adapted to models with different contours (AABB is suitable for regular models, and OBB is suitable for irregular models). Type label classification ensures a unified standard for bounding box calculations of models of the same type, improving computational consistency. Dynamic adjustment aims to avoid deviations between the bounding box and the actual model contour, ensuring the accuracy of positional relationship judgments. Knowledge graphs are used to skip model pairs with no potential relationships, reducing invalid calculations and improving efficiency. Combined with the positional relationship rules of the knowledge graph, bounding box positional relationships are transformed into directly usable physical spatial relationships, avoiding misjudgments caused by simple positional judgments.
[0091] According to an embodiment of the present invention, the method for determining the positional relationship of bounding boxes includes:
[0092] Extract the bounding box parameters of model A and model B. The bounding box parameters include the three-dimensional coordinates of the center point of the bounding box and the dimensions in the X / Y / Z axis directions.
[0093] Calculate the value intervals [minA_x, maxA_x], [minA_y, maxA_y], and [minA_z, maxA_z] of the bounding box of model A on the X, Y, and Z axes, and the value intervals [minB_x, maxB_x], [minB_y, maxB_y], and [minB_z, maxB_z] of the bounding box of model B on the X, Y, and Z axes.
[0094] Determine whether the value ranges of two bounding boxes overlap on all three coordinate axes;
[0095] If they all overlap, they are determined to be intersecting;
[0096] If all the value ranges of one bounding box are contained within the corresponding value ranges of another bounding box, then it is determined to be an inclusion relationship;
[0097] If the value intervals on the three coordinate axes do not overlap, then they are determined to be disjoint.
[0098] According to an embodiment of the present invention, the feature working point analysis specifically includes:
[0099] Extract the simulation I / O parameters of the model. The simulation I / O parameters include the type, quantity, interface location and connection rules of input I / O and output I / O.
[0100] Extract the tool head parameters of the model. The tool head parameters include tool head type, installation position coordinates, working direction vector, and working range.
[0101] Based on simulation IO parameters and tool head parameters, the characteristic working points of the model are calculated. The characteristic working points include working points and working lines. The working points record the three-dimensional coordinates in the local coordinate system of the model and the world coordinate system of the scene. The working lines record the starting point coordinates, the ending point coordinates and the direction vector.
[0102] Calculate the spatial relationship between feature working points of each pair of models, and determine whether there is a logical relationship between the two models based on the preset point association rules in the knowledge graph.
[0103] According to an embodiment of the present invention, the method for determining the spatial relationship of characteristic working points includes:
[0104] Obtain the feature operating point set {PA1, PA2, ..., PAn} for model A and the feature operating point set {PB1, PB2, ..., PBm} for model B respectively;
[0105] Query the knowledge graph and, based on the type labels of the two models, filter the appropriate feature working point judgment rules;
[0106] Perform pairwise matching on points in two sets: calculate the Euclidean distance between points, and if the distance is less than a preset threshold, they are considered to be overlapping;
[0107] Calculate the perpendicular distance from a point to a line. If the distance is less than a preset threshold, the point is determined to be on the line.
[0108] The angle between the direction vectors of the lines is calculated. If the angle is less than a preset angle threshold, they are considered parallel. If the angle is equal to 90°, they are considered perpendicular.
[0109] According to an embodiment of the present invention, the logical result analysis step specifically includes:
[0110] Merge the association set obtained from bounding box position relationship calculation and the association set obtained from feature working point analysis, and delete duplicate model association pairs;
[0111] The query uses the pre-defined association priority rules in the knowledge graph. The association priority obtained from feature working point analysis is higher than the association priority obtained from bounding box position relationship calculation. The priority of strong binding associations in business scenarios is higher than ordinary associations.
[0112] Based on the preset upper limit of the number of associations for each model in the knowledge graph, the merged association set is filtered to retain high-priority associations and delete low-priority redundant associations that exceed the upper limit.
[0113] The reasonableness of the filtered set of associations is verified, and associations that do not conform to business logic and physical laws are removed. The final logical association result is then output.
[0114] Secondly, embodiments of this application provide a knowledge graph-based simulation model logical association system. This system includes a memory and a processor. The memory includes a program for a knowledge graph-based simulation model logical association method. When the program is executed by the processor, it implements the following steps:
[0115] Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store knowledge graphs for different business scenarios;
[0116] The initial logical connections between simulation models are obtained by using two parallel methods: bounding box position relationship calculation and feature working point analysis.
[0117] Calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result;
[0118] Extract the simulation I / O parameters and toolhead parameters of the simulation model, calculate the characteristic working points of the model based on the parameters, and determine whether there is a logical relationship between the models by analyzing the relationship between the characteristic working points of each model, and obtain the logical relationship results.
[0119] Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final logical association results of the simulation model are output.
[0120] According to an embodiment of the present invention, the steps for constructing a knowledge graph include:
[0121] Collect scenario data from different business domains. Scenario data includes simulation model attributes corresponding to business scenarios, historical relationships between models, and business process specifications.
[0122] Based on the classification of business scenarios, an independent graph database is built for each type of business scenario;
[0123] In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges;
[0124] The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values;
[0125] The edge's attribute information includes association type, association strength, and association priority.
[0126] According to an embodiment of the present invention, the method for calculating the positional relationship of bounding boxes includes:
[0127] Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model;
[0128] Based on the model's type label, the models are classified, and models with the same type label use the same bounding box calculation method;
[0129] The size of the model is dynamically adjusted, and the bounding box is scaled according to the actual size parameters of the model.
[0130] Calculate the bounding box positional relationships between any two models, including intersection, containment, and disjoint relationships;
[0131] Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation.
[0132] Determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
[0133] A third aspect of the present invention provides a computer-readable storage medium including a knowledge graph-based simulation model logical association method program. When the knowledge graph-based simulation model logical association method program is executed by a processor, it implements the steps of the knowledge graph-based simulation model logical association method as described in any of the above claims.
[0134] This invention discloses a method, system, and medium for logical association of simulation models based on knowledge graphs. It obtains initial logical associations between simulation models by constructing corresponding knowledge graphs according to different business scenarios; calculates the bounding boxes of each simulation model, obtains the type label of each model, dynamically adjusts the size of the bounding boxes according to the actual size parameters of the models, dynamically calls the bounding box position relationship calculation logic, and determines whether there is a physical spatial relationship between pairs of models; calculates the feature working points of the models based on parameters, and determines whether there is a logical association between models by analyzing the relationship between the feature working points of pairs of models, thus obtaining the logical association result; and establishes commonly used logical relationships in industry through knowledge graphs, helping to improve relationship matching efficiency and reducing the workload of manually setting logical relationships between models.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0136] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0137] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0138] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0139] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. A method for logical association in simulation models based on knowledge graphs, characterized in that, include: Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store the knowledge graphs for different business scenarios; The initial logical connections between simulation models are obtained by using two parallel methods: bounding box position relationship calculation and feature working point analysis. Calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result; Extract the simulation I / O parameters and toolhead parameters of the simulation model. Based on the characteristic working points of the simulation motion calculation model, analyze the relationship between the characteristic working points of each model to determine whether there is a logical association between the models and obtain the logical association results. Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final simulation model logical association results are output.
2. The knowledge graph-based simulation model logical association method according to claim 1, characterized in that, The steps for constructing the knowledge graph include: Collect scenario data from different business domains. The scenario data includes the simulation model attributes corresponding to the business scenario, the historical correlation between models, and the business process specifications. Based on the classification of business scenarios, an independent graph database is built for each type of business scenario; In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges; The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values; The edge's attribute information includes association type, association strength, and association priority.
3. The knowledge graph-based simulation model logical association method according to claim 2, characterized in that, The method for calculating the bounding box positional relationship includes: Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model; Based on the model's type label, the models are classified, and models with the same type label use the same bounding box calculation method; The size of the model is dynamically adjusted, and the bounding box is scaled according to the actual size parameters of the model. Calculate the bounding box positional relationships between any two models, including intersection, containment, and disjoint relationships; Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation. Determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
4. The knowledge graph-based simulation model logical association method according to claim 3, characterized in that, The method for determining the positional relationship of the bounding boxes includes: Extract the bounding box parameters of model A and model B. The bounding box parameters include the three-dimensional coordinates of the center point of the bounding box and the dimensions in the X / Y / Z axis directions. Calculate the value intervals [minA_x, maxA_x], [minA_y, maxA_y], and [minA_z, maxA_z] of the bounding box of model A on the X, Y, and Z axes, and the value intervals [minB_x, maxB_x], [minB_y, maxB_y], and [minB_z, maxB_z] of the bounding box of model B on the X, Y, and Z axes. Determine whether the value ranges of two bounding boxes overlap on all three coordinate axes; If they all overlap, they are determined to be intersecting; If all the value ranges of one bounding box are contained within the corresponding value ranges of another bounding box, then it is determined to be an inclusion relationship; If the value intervals on the three coordinate axes do not overlap, then they are determined to be disjoint.
5. The knowledge graph-based simulation model logical association method according to claim 4, characterized in that, The specific features of the working point analysis include: Extract the simulation I / O parameters of the model, which include the type, quantity, interface location and connection rules of input I / O and output I / O; Extract the tool head parameters of the model, which include tool head type, installation position coordinates, working direction vector, and working range; By calculating the simulated motion of the model mechanism where the tool head is located, plus the tool head parameters, the working point characteristics of the model can be obtained. In the industrial field, such characteristics can ultimately describe the point, line, and surface. Based on simulation IO parameters and tool head parameters, the characteristic working points of the model are calculated. The characteristic working points include working points and working lines. The working points record the three-dimensional coordinates in the local coordinate system of the model and the world coordinate system of the scene. The working lines record the starting point coordinates, the ending point coordinates and the direction vector. Calculate the spatial relationship between feature working points of each pair of models, and determine whether there is a logical relationship between the two models based on the preset point association rules in the knowledge graph.
6. The knowledge graph-based simulation model logical association method according to claim 5, characterized in that, The method for determining the spatial relationship of the feature working points includes: Obtain the feature operating point set {PA1, PA2, ..., PAn} for model A and the feature operating point set {PB1, PB2, ..., PBm} for model B respectively; Query the knowledge graph and, based on the type labels of the two models, filter the appropriate feature working point judgment rules; Perform pairwise matching on points in two sets: calculate the Euclidean distance between points, and if the distance is less than a preset threshold, they are considered to be overlapping; Calculate the perpendicular distance from a point to a line. If the distance is less than a preset threshold, the point is determined to be on the line. The angle between the direction vectors of the lines is calculated. If the angle is less than a preset angle threshold, they are considered parallel. If the angle is equal to 90°, they are considered perpendicular.
7. A knowledge graph-based simulation model logical association system, characterized in that, The system includes a memory and a processor. The memory contains a program for a knowledge graph-based simulation model logical association method. When the program for the knowledge graph-based simulation model logical association method is executed by the processor, it performs the following steps: Construct corresponding knowledge graphs according to different business scenarios, and use independent graph databases to store the knowledge graphs for different business scenarios; The initial logical connections between simulation models are obtained by using two parallel methods: bounding box position relationship calculation and feature working point analysis. Calculate the bounding box of each simulation model, obtain the type label of each model, dynamically adjust the size of the bounding box according to the actual size parameters of the model, dynamically call the bounding box position relationship calculation logic, determine whether there is a physical space association between pairs of models, and obtain the physical space association result; Extract the simulation I / O parameters and toolhead parameters of the simulation model, calculate the characteristic working points of the model based on the parameters, and determine whether there is a logical relationship between the models by analyzing the relationship between the characteristic working points of each model, and obtain the logical relationship results. Based on the physical space association results and logical association results, duplicate associations are removed. According to the preset association priority and upper limit of the number of associations in the knowledge graph, redundant associations are removed, and the final simulation model logical association results are output.
8. The knowledge graph-based simulation model logical association system according to claim 7, characterized in that, The steps for constructing the knowledge graph include: Collect scenario data from different business domains. The scenario data includes the simulation model attributes corresponding to the business scenario, the historical correlation between models, and the business process specifications. Based on the classification of business scenarios, an independent graph database is built for each type of business scenario; In each graph database, a knowledge graph is constructed using simulation models as nodes and the relationships between models as edges; The attribute information of the model nodes includes model type label, bounding box initial parameters, simulation I / O parameters, toolhead parameters, and feature working point reference values; The edge's attribute information includes association type, association strength, and association priority.
9. The knowledge graph-based simulation model logical association system according to claim 8, characterized in that, The method for calculating the bounding box positional relationship includes: Obtain all models in the scene to be analyzed, and calculate the corresponding bounding box for each model; Based on the model's type label, the models are classified, and models with the same type label use the same bounding box calculation method; The size of the model is dynamically adjusted, and the bounding box is scaled according to the actual size parameters of the model. Calculate the bounding box positional relationships between any two models, including intersection, containment, and disjoint relationships; Determine whether bounding box position relationship calculation is needed based on the labels of the two models. If the labels indicate that the two model types cannot be related, skip the calculation. Determine whether two models have a physical spatial relationship based on the positional relationship of their bounding boxes.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a knowledge graph-based simulation model logical association method program. When the knowledge graph-based simulation model logical association method program is executed by a processor, it implements the steps of the knowledge graph-based simulation model logical association method as described in any one of claims 1 to 6.