Knowledge graph construction method and device, electronic equipment and storage medium
By constructing a knowledge graph through hierarchical classification and fuzzy matching algorithms in the ship system, the problem of low efficiency in manual data association is solved, realizing automated and efficient data association and improving project development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
- Filing Date
- 2022-09-27
- Publication Date
- 2026-04-14
AI Technical Summary
The existing technology of manually linking the interface and backend data is labor-intensive and inefficient in ship systems.
Based on the ship application scenario, feature data is acquired and classified into system-level, equipment-level, and data source-level categories. A knowledge graph is constructed using a fuzzy matching algorithm, and feature tags and equipment models are used for automated data association.
It simplifies and eliminates the need for coding in ship application scenarios and real-world data, thereby improving project development efficiency.
Smart Images

Figure CN115510241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a knowledge graph construction method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of artificial intelligence and knowledge graph technologies, in addition to general knowledge graph application providers such as Google and Baidu, more and more industry users are beginning to consider building knowledge graphs for their respective professional fields. For example, the shipbuilding industry has a complex array of systems, each containing data with different sources, definitions, and functions. For some data volumes with specific meanings, it is often necessary to manually link the interface and backend data for each measurement point in terms of platform display, alarm prediction, and algorithm processing, which is labor-intensive and inefficient. Summary of the Invention
[0003] This invention provides a knowledge graph construction method, apparatus, electronic device, and storage medium to solve the problem of high workload and low efficiency in the prior art, which involves manually linking the interface and backend data.
[0004] In a first aspect, the present invention provides a knowledge graph construction method, the method comprising:
[0005] Ship feature data is acquired based on ship application scenarios and classified according to a preset classification, which includes system level, device level and data source level.
[0006] The measurement points contained in each data source at the data source level are distinguished and stored in the form of feature labels to generate a ship data dictionary;
[0007] A preset equipment model is created, and the ship data dictionary is associated with the preset equipment model using a fuzzy matching algorithm to construct the knowledge graph.
[0008] In one embodiment of the present invention, the step of distinguishing and storing the measurement points contained in each data source in the data source level in the form of feature labels to generate a ship data dictionary includes:
[0009] Based on the ship characteristic data, establish the corresponding ship architecture diagram at the system level;
[0010] Generate a node tree diagram corresponding to the equipment level based on the ship architecture diagram;
[0011] The node tree diagram is associated with the parameter relationship table corresponding to the data source level to establish the ship data dictionary.
[0012] In one embodiment of the present invention, the parameter relationship table includes one or more of the following attribute combinations:
[0013] The Device attribute indicates the device;
[0014] The Order attribute represents the sequence number;
[0015] The Name attribute represents the measurement point;
[0016] The Relate attribute indicates the relationship between the measurement points;
[0017] The Desc attribute represents necessary textual description information;
[0018] The IsAlarm property indicates whether to add an alarm message;
[0019] The AlarmRule attribute represents the alarm rule information.
[0020] In one embodiment of the present invention, the step of creating a preset equipment model and associating the ship data dictionary with the preset equipment model using a fuzzy matching algorithm to construct the knowledge graph includes:
[0021] The preset device model is constructed using preset software, and the preset device model is saved to a model database;
[0022] The parameter relationship table in the ship data dictionary is saved to the tag database, and the tag database is associated with the preset equipment model to generate a standard field library with a list of measurement points. The standard field library is used to realize the automatic retrieval and matching of all measurement points in the list of measurement points.
[0023] The preset device models associated with the tag database are displayed on the page.
[0024] In one embodiment of the present invention, the method further includes:
[0025] For specific measuring points of different types of equipment, the specific measuring points are saved to the tag database by manual input.
[0026] Based on the tag database, a specific device model for this type of device is formed and saved to the model database.
[0027] In one embodiment of the present invention, after generating the standard field library, the method further includes:
[0028] Acquire measurement point information and generate a combined system measurement point list from the model database using a fuzzy matching algorithm;
[0029] A similarity algorithm is used to calculate the optimal matching measurement point in the system's measurement point list to achieve dynamic association between model measurement points and list measurement points and real-time dynamic display of measurement point information.
[0030] In one embodiment of the present invention, the Device attribute is any one of a diesel engine, generator, oil pump, and auxiliary equipment, and the Name attribute is any one of temperature, speed, current, voltage, power, and rotational speed.
[0031] Secondly, the present invention also provides a knowledge graph construction apparatus, the apparatus comprising:
[0032] The classification module is used to acquire ship feature data based on ship application scenarios and classify the ship feature data according to a preset classification, which includes system level, device level and data source level.
[0033] The tag module is used to distinguish and store the measurement points contained in each data source in the data source level in the form of feature tags to generate a ship data dictionary;
[0034] The matching module is used to create a preset equipment model and to associate the ship data dictionary with the preset equipment model through a fuzzy matching algorithm to construct the knowledge graph.
[0035] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the knowledge graph construction method as described in any of the first aspects.
[0036] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge graph construction method as described in any of the first aspects.
[0037] The knowledge graph construction method, apparatus, electronic device, and storage medium provided by this invention acquire ship feature data based on ship application scenarios, classify the ship feature data according to different system levels, device levels, and data source levels, distinguish and store the measurement points contained in each data source in the form of feature tags, thereby establishing a ship digital tag dictionary. The ship digital tag dictionary is associated with a preset device model through a fuzzy matching algorithm. Batch operations can be performed on selected measurement points through different device models, simplifying and eliminating the need for coding when associating ship application scenarios with real data, and improving project development efficiency. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0039] Figure 1 This is a flowchart illustrating the knowledge graph construction method provided by the present invention;
[0040] Figure 2 This is a schematic diagram illustrating the establishment of a ship data dictionary provided in an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram illustrating the generation of a standard field library provided in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram illustrating the formation of a specific device model provided in an embodiment of the present invention;
[0043] Figure 5 This is a schematic diagram of the matching process provided in an embodiment of the present invention;
[0044] Figure 6 This is a schematic diagram of fuzzy tag matching provided in an embodiment of the present invention;
[0045] Figure 7 This is a schematic diagram of the knowledge graph construction device provided by the present invention;
[0046] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0048] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.
[0049] The technical terms involved in this invention are described below:
[0050] A knowledge graph is essentially a knowledge base called a semantic network, which is a knowledge base with a directed graph structure. In simpler terms, a knowledge graph is a data structure composed of entities, relations, and attributes to facilitate the collection, organization, and extraction of domain-specific knowledge. A knowledge graph is composed of a knowledge framework and entity data. Entity data must meet the conditions specified by the framework. The framework is the schema, while the entity data is the data stored in a relational database. A simpler way to understand this is that, based on data fields and business requirements, folders are created, along with the relationships between these folders. Then, data from the original database is categorized and placed into these folders.
[0051] To address the issues of high workload and low efficiency associated with manually linking interface and backend data in existing technologies, this invention provides a knowledge graph construction method, apparatus, electronic device, and storage medium. By acquiring ship feature data based on ship application scenarios, the invention categorizes this data into different levels (system, device, and data source). Measurement points within each data source are distinguished and stored using feature tags, thereby establishing a ship digital tag dictionary. A fuzzy matching algorithm is then used to link this dictionary with preset device models. Batch operations on selected measurement points can be performed using different device models, simplifying and eliminating the need for coding when linking ship application scenarios with real data, thus improving project development efficiency.
[0052] The following is combined Figures 1-8 This invention describes a knowledge graph construction method, apparatus, electronic device, and storage medium.
[0053] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the knowledge graph construction method provided by the present invention. A knowledge graph construction method, the method comprising:
[0054] Step 110: Obtain ship feature data based on the ship application scenario, and classify the ship feature data according to a preset classification. The preset classification includes system level, device level, and data source level.
[0055] Step 120: Differentiate and store the measurement points contained in each data source at the data source level in the form of feature labels to generate a ship data dictionary.
[0056] Step 130: Create a preset equipment model, and use a fuzzy matching algorithm to associate the ship data dictionary with the preset equipment model to construct the knowledge graph.
[0057] The above steps are described below through examples.
[0058] For example, in step 110 above, the ship application scenarios are mainly concentrated in inland lakes, inland rivers, islands, and near-shore ports, and the ship types used are mainly passenger ships, small cruise ships, government vessels, and port service vessels. For the entire ship system, the system level includes, for example, cabins, engine rooms, and superstructures, and the equipment level includes, for example, different types of diesel engines, generators, oil pumps, and auxiliary equipment. The data source is, for example, the measurement points output by sensors (such as temperature, speed, current, voltage, power, and rotational speed) or other reference data.
[0059] For example, if the ship's characteristic data is the engine room, then it can be classified at the system level; if the ship's characteristic data is the main engine, then the main engine can be classified at the equipment level; if the ship's characteristic data is the rotational speed, then the rotational speed can be classified at the data source level.
[0060] Please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating the process of establishing a ship data dictionary according to an embodiment of the present invention. In step 120 above, the step of distinguishing and storing the measurement points contained in each data source at the data source level in the form of feature labels to generate a ship data dictionary includes:
[0061] Step 121: Establish a system-level corresponding ship architecture diagram based on ship characteristic data.
[0062] Step 122: Generate a node tree diagram corresponding to the equipment level based on the ship architecture diagram.
[0063] Step 123: Associate the node tree diagram with the parameter relationship table corresponding to the data source level to generate a ship data dictionary.
[0064] For example, a node tree diagram is generated in the engine room of the ship's architecture diagram, corresponding to the central control room, main engine, auxiliary engines, and auxiliary equipment. The main engine in the node tree diagram is associated with the current, power, and speed of diesel engine #1 in the parameter relationship table, thereby establishing a ship data dictionary.
[0065] For example, the parameter relationship table includes one or more of the following attribute combinations:
[0066] The Device attribute represents a device, such as a diesel engine, generator, or oil pump.
[0067] The Order attribute represents the sequence number, such as: No. 1, 1#, left, right, main, auxiliary, etc.
[0068] The Name attribute indicates the measurement point, such as temperature, speed, voltage, current, power, rotational speed, etc.
[0069] The Relate attribute indicates the relationship between measurement points, for example: power = voltage * current.
[0070] The Desc property represents the necessary textual description information.
[0071] The IsAlarm property indicates whether to add an alarm message.
[0072] The AlarmRule attribute represents alarm rule information, such as whether the value exceeds the upper or lower limit.
[0073] It should be noted that the correlation between the measuring points in the above-mentioned ship system is used to describe and judge the data relationship between the measuring points. It is implemented by inputting calculation scripts to provide dynamic configuration and planning for the system, including basic proportional coefficients, addition, subtraction, multiplication and division operations, cumulative time statistics, and data threshold judgment.
[0074] The entire ship system can be categorized by compartments and equipment, such as the central control room within the engine room. Further categorization by specific equipment includes diesel engines, generators, fuel pumps, and auxiliary equipment. Each individual piece of equipment is instantiated as a data acquisition object. Taking the main engine as an example, quantifiable parameters include: diesel engine speed, power output, cylinder temperature, current, and voltage. For most diesel engines, a unified parameter relationship table can be extracted, along with specific parameters corresponding to specific models. This classification of the ship system allows for the division of this complex system into concrete parameter relationship tables, providing a foundation for subsequent system and equipment modeling, data visualization, and analysis.
[0075] Please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the generation of a standard field library provided in an embodiment of the present invention. In step 130 above, the step of creating a preset equipment model and associating the ship data dictionary with the preset equipment model using a fuzzy matching algorithm to construct the knowledge graph includes:
[0076] Step 131: Create a preset device model using preset software and save the preset device model to the model database.
[0077] For example, when creating a preset equipment model (e.g., a 2D or 3D model), a general equipment model and a specific equipment model corresponding to a particular model can be created separately. All created general equipment models and specific equipment models are entered into the model database for use in project configuration.
[0078] For example, OBJ model files exported from 3D modeling tools such as 3D Maxs can be used to create general 2D / 3D preset device models, making it more convenient, faster, and more realistic to build and reproduce 2D or 3D scene effects. By supporting vector graphics, the model can be scaled up, reduced, and rotated. Detailed descriptions can be added to the model using the Canvas drawing tool, and interactive functions can be completed via mouse or touch.
[0079] Step 132: Save the parameter relationship table in the ship data dictionary to the tag database, and associate the tag database with the preset equipment model to generate a standard field library with a list of measurement points. The standard field library can realize the automatic retrieval and matching of all measurement points in the list of measurement points.
[0080] For example, for the parameter relationship table extracted from the equipment, a unique ID is added using the snowflake algorithm and entered into the tag database. Batch import is used to maintain a one-to-one correspondence between model information and system measurement point information. For multiple different models of the same equipment, such as diesel engine equipment with 300 to 600 measurement points (different models of diesel engine equipment, such as #1 diesel engine, #2 diesel engine), a standard field database is extracted and learned by extracting the same fields from the measurement points. After the standard field database is established, a template ID is assigned to each standardized measurement point according to the equipment serial number + measurement point serial number, and tags are automatically identified and added according to the ship scene system classification.
[0081] It should be noted that when creating 2D / 3D equipment models, "standard measurement points" with universal labels can be pre-set in the equipment model to save the equipment model to the model database.
[0082] Therefore, for specific measurement points of different equipment models, specific equipment models can be manually entered into the model database, thereby generating specific equipment models corresponding to specific equipment models for subsequent use.
[0083] Step 133: Display the preset device model associated with the tag database on the page.
[0084] When configuring and using the model, the model can automatically identify and match all measurement points in the measurement point list through the standard field library, thereby obtaining the query information for each corresponding measurement point and realizing the automatic association of real data.
[0085] Please refer to Figure 4 , Figure 4This is a schematic diagram illustrating the formation of a specific device model according to an embodiment of the present invention. Exemplarily, for specific measuring points present in different types of devices, information on these specific measuring points can be manually entered and saved to a tag database. Based on the tag database, a specific device model for that type of device is formed and saved to a model database. The specific steps include:
[0086] First, a 2D / 3D equipment model is created according to project requirements. Then, the platform generates all the corresponding tag information for this equipment model, including basic measurement point template information. The model can automatically associate measurement points with these tags and display them on the interface.
[0087] Then, real project measurement point information is entered into the system. This information includes basic measurement point information and information specific to a particular model. The system's measurement point list searches and matches the basic measurement point information. Measurement points are automatically associated with specific models through tags, generating optimal recommendations. For measurement points not included in the basic measurement point information, the Canvas drawing function is triggered to add measurement points not found in the model database, creating specific equipment models corresponding to specific equipment models. This achieves the specialization function and the addition of measurement point tags.
[0088] Based on the base model, specific tags are added to export a specific device model corresponding to a specific device model. It should be noted that the exported specific device model is not presented as a "complete" model file. Due to optimized data storage and model extensibility, the specific device model will be stored and accessed through an internal association between the base model (.mod) and specific tags (.cor).
[0089] Finally, during system storage, specialized models are implemented through internal associations. During project use and delivery, export settings can be used to form a complete model file (.mod). This method can improve the loading speed of the subsequent system startup process and improve the rendering effect.
[0090] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the matching process provided in an embodiment of the present invention. Exemplarily, after generating the standard field library, the knowledge graph construction method of the present invention further includes:
[0091] Step 501: Obtain measurement point information and generate a combined system measurement point list from the model database using a fuzzy matching algorithm.
[0092] Step 502: Use a similarity algorithm to calculate the most matching measurement point in the system's measurement point list, realize the dynamic association between the model measurement points and the list measurement points, and thus realize the real-time dynamic display of measurement point information.
[0093] Fuzzy search query: For each "label" string in the model, the Levenshtein similarity algorithm (edit distance) is used for comparison. The most matching measure point in the measure point list is calculated, realizing the dynamic association between the model measure points and the list measure points, thereby enabling real-time dynamic display of measure point information (values, notes, etc.). Levenshtein distance refers to the minimum number of edit operations required to transform one string into another (permitted edit operations include replacing one character with another, inserting a character, and deleting a character). Figure 5 The process of matching the speed measurement points in the diesel engine model with the "speed measurement points" in the measurement point list is demonstrated.
[0094] The system sorts and combines the categorized measurement points, uses the SimHash algorithm to calculate the similarity between all label information and each model label information, and provides the optimal matching model for configuration display. SimHash itself is a locality-sensitive hashing algorithm, and the hash signature it generates can, to some extent, characterize the similarity of the original content.
[0095] For example, the steps for performing fuzzy tag search and matching are as follows:
[0096] First, enter the equipment information (such as No. 1 machine, No. 1#, or left machine) in the configuration information interface, and obtain the required 2D / 3D models from the model database to generate a combined system measurement point list (such as the diesel engine speed of No. 1 machine, the diesel engine speed of No. 1#, or the diesel engine speed of the left machine).
[0097] Then, the combined system measurement point list is compared with the entered project measurement point list using the Levenshtein similarity algorithm (edit distance) to achieve a one-to-one correspondence between the model library measurement points and the project measurement points.
[0098] Share and merge the association information of two measurement point tables: a) Obtain the association relationship of measurement points from the template measurement point table, such as: power = voltage * current, and "write" the association relationship into the project measurement point table information; b) Extract information such as alarm, maximum and minimum values from the project measurement point table.
[0099] Finally, export the merged measurement point table (including range, alarm information, correlation, etc.).
[0100] For example, the principle of the similarity algorithm Levenshtein is as follows:
[0101] Suppose we can use d[i, j] steps (this value can be stored in a two-dimensional array) to represent the minimum number of steps required to convert string s[1…i] into string t[1…j]. In the most basic case, when i equals 0, that is, when string s is empty, then d[0, j] means adding j characters to convert s into t. When j equals 0, that is, when string t is empty, then d[i, 0] means subtracting i characters to convert s into t.
[0102] Then, considering the general case and adding a bit of dynamic programming, to transform s[1...i] into t[1...j] with the minimum number of addition, deletion, or replacement operations, we must first ensure that the transformation from s[1...i] to t[1...j] requires only one more operation or no operation at all. The "before" can be divided into three cases:
[0103] 1) It is possible to convert s[1…i] to t[1…j-1] in k operations;
[0104] 2) It is possible to convert s[1...i-1] to t[1...j] within k operations;
[0105] 3) s[1…i-1] can be converted to t[1…j-1] in k steps.
[0106] For the first case, we need to add s[1...i] to t[j] at the end to complete the matching, which requires a total of k+1 operations.
[0107] For the second case, s[i] needs to be removed at the end before performing these k operations, so a total of k+1 operations are required.
[0108] For the third case, s[i] needs to be replaced with t[j] at the end to satisfy s[1...i]==t[1...j], which requires a total of k+1 operations. However, if s[i] is exactly equal to t[j] in the third case, then the process can be completed in k operations.
[0109] Finally, to ensure that the number of operations is always minimized, we can choose the one with the least consumption from the three cases above as the minimum number of operations required to convert s[1...i] into t[1...j].
[0110] The steps for implementing the above algorithm are as follows:
[0111] 1) Set n to the length of string s, ("GUMBO");
[0112] Set m to the length of string t, ("GAMBOL");
[0113] If n equals 0, return m and exit;
[0114] If m equals 0, return n and exit;
[0115] Construct two vectors v0[m+1] and v1[m+1], and concatenate all elements between 0 and m.
[0116] 2) Initialize v0 to 0...m.
[0117] 3) Check each character in s(i from 1 to n).
[0118] 4) Check each character in t(j from 1 to m).
[0119] 5) If s[i] equals t[j], then the edit cost is 0;
[0120] If s[i] is not equal to t[j], then the edit cost is 1.
[0121] 6) Set cell v1[j] to one of the following minimum values:
[0122] a. Adjacent to the unit above +1: v1[j-1]+1;
[0123] b. Adjacent to the left of this unit +1: v0[j]+1;
[0124] c. The unit's diagonal top and left side +cost: v0[j-1]+cost.
[0125] 7) After completing iteration (3,4,5,6), v1[m] is the value of the edit distance.
[0126] Please refer to Figure 6 , Figure 6 This is a schematic diagram of fuzzy tag matching provided in an embodiment of the present invention. Fuzzy tag matching is the reverse process of the entire process, relative to the previous work.
[0127] Once the model database has sufficient model examples, the system measurement point list can be directly imported. For example, the system measurement point list might include pressure, speed, and temperature of diesel engine #1, ..., pressure, speed, and temperature of diesel engine #2, etc. The SimHash algorithm is used to verify and match the applicable model for each measurement point. For specialized equipment, an initial screening can be performed to provide a reference for data processing.
[0128] The entire system is a process of iterative optimization through both forward and reverse directions:
[0129] Forward process: Using known real-world measurement point information from the system, model information is constructed, and attribute information of the measurement points is added. The obtained model and associated information can be directly used for display and secondary data processing, enabling data analysis and other operations.
[0130] Reverse process: After the project measurement point table is entered into the system, the platform analyzes and matches the measurement point names to find the devices in the model database to which they belong, and calls all the tag information, measurement point association information, and logical algorithm processing flow that have been entered into the model, thereby realizing page display, data analysis and other tasks.
[0131] For example, taking a certain maritime vessel project as an example: First, create a diesel engine model using 3DMAX and import it into the database; Second, enter the diesel engine template point table; Third, enter the maritime vessel project measurement point table; Fourth, the system searches and matches the template point table with the project measurement point table to complete the measurement point association; Fifth, generate the associated system model; Sixth, pull the model and display the system configuration; Seventh, select the diesel engine model in the display interface, and the association information will automatically pop up.
[0132] In summary, this invention, based on the establishment of a ship data dictionary and through the input of measurement points and the creation of a tag database, constructs a data tagging system and a data association scheme based on tag similarity, which can be applied to the data association and integration of multiple ship systems. Furthermore, by using a fuzzy matching algorithm to associate ship data with 2D / 3D visualization models, batch operations on the overall measurement points can be performed through different model selections, simplifying and eliminating the need for coding in associating ship scenes with real data, thus improving project development efficiency.
[0133] The knowledge graph construction apparatus provided by the present invention is described below. The knowledge graph construction apparatus described below and the knowledge graph construction method described above can be referred to in correspondence.
[0134] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the knowledge graph construction device provided by the present invention. A knowledge graph construction device 700 includes a classification module 710, a tagging module 720, and a matching module 730.
[0135] For example, the classification module 710 is used to acquire ship feature data based on ship application scenarios and classify the ship feature data according to a preset classification, which includes system level, device level and data source level.
[0136] For example, the tag module 720 is used to distinguish and store the measurement points contained in each data source in the data source level in the form of feature tags to generate a ship data dictionary.
[0137] For example, the matching module 730 is used to create a preset equipment model and associate the ship data dictionary with the preset equipment model through a fuzzy matching algorithm to construct the knowledge graph.
[0138] For example, the tag module 720 is further configured to:
[0139] Based on the ship characteristic data, establish the corresponding ship architecture diagram at the system level;
[0140] Generate a node tree diagram corresponding to the equipment level based on the ship architecture diagram;
[0141] The node tree diagram is associated with the parameter relationship table corresponding to the data source level to establish the ship data dictionary.
[0142] For example, the parameter relationship table includes one or more of the following attribute combinations:
[0143] The Device attribute indicates the device;
[0144] The Order attribute represents the sequence number;
[0145] The Name attribute represents the measurement point;
[0146] The Relate attribute indicates the relationship between the measurement points;
[0147] The Desc attribute represents necessary textual description information;
[0148] The IsAlarm property indicates whether to add an alarm message;
[0149] The AlarmRule attribute represents the alarm rule information.
[0150] For example, the matching module 730,
[0151] The preset device model is constructed using preset software, and the preset device model is saved to a model database;
[0152] The parameter relationship table in the ship data dictionary is saved to the tag database, and the tag database is associated with the preset equipment model to generate a standard field library with a list of measurement points. The standard field library is used to realize the automatic retrieval and matching of all measurement points in the list of measurement points.
[0153] The preset device models associated with the tag database are displayed on the page.
[0154] For example, the knowledge graph construction apparatus 700 is further configured to:
[0155] For specific measuring points of different types of equipment, the specific measuring points are saved to the tag database by manual input.
[0156] Based on the tag database, a specific device model for this type of device is formed and saved to the model database.
[0157] For example, the knowledge graph construction apparatus 700 is further configured to:
[0158] Acquire measurement point information and generate a combined system measurement point list from the model database using a fuzzy matching algorithm;
[0159] A similarity algorithm is used to calculate the optimal matching measurement point in the system's measurement point list to achieve dynamic association between model measurement points and list measurement points and real-time dynamic display of measurement point information.
[0160] It should be noted that the knowledge graph construction apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0161] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a knowledge graph construction method, which includes:
[0162] Ship feature data is acquired based on ship application scenarios and classified according to a preset classification, which includes system level, device level and data source level.
[0163] The measurement points contained in each data source in the data source level are distinguished and stored in the form of feature labels to generate a ship data dictionary;
[0164] A preset equipment model is created, and the ship data dictionary is associated with the preset equipment model using a fuzzy matching algorithm to construct the knowledge graph.
[0165] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0166] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to execute the knowledge graph construction method provided by the above methods.
[0167] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the knowledge graph construction methods provided above.
[0168] The present invention provides an electronic device, a computer program product, and a processor-readable storage medium, wherein the computer program stored thereon enables the processor to implement all the method steps implemented in the above method embodiments and achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.
[0169] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a knowledge graph, characterized in that, The method includes: Ship feature data is acquired based on ship application scenarios and classified according to a preset classification, which includes system level, device level and data source level. The measurement points contained in each data source at the data source level are distinguished and stored in the form of feature labels to generate a ship data dictionary, including: establishing a ship architecture diagram corresponding to the system level based on the ship feature data; generating a node tree diagram corresponding to the equipment level based on the ship architecture diagram; and associating the node tree diagram with the parameter relationship table corresponding to the data source level to establish the ship data dictionary; Creating a preset equipment model and constructing the knowledge graph by associating the ship data dictionary with the preset equipment model using a fuzzy matching algorithm includes: constructing the preset equipment model using preset software and saving the preset equipment model to a model database; saving the parameter relationship table in the ship data dictionary to a tag database and associating the tag database with the preset equipment model to generate a standard field library with a list of measurement points.
2. The knowledge graph construction method according to claim 1, characterized in that, The parameter relationship table includes one or more of the following attribute combinations: The Device attribute indicates the device; The Order attribute represents the sequence number; The Name attribute represents the measurement point; The Relate attribute indicates the relationship between the measurement points; The Desc attribute represents necessary textual description information; The IsAlarm property indicates whether to add an alarm message; The AlarmRule attribute represents the alarm rule information.
3. The knowledge graph construction method according to claim 1, characterized in that, The step of creating a preset equipment model and associating the ship data dictionary with the preset equipment model using a fuzzy matching algorithm to construct the knowledge graph includes: the standard field library is used to realize the automatic retrieval and matching of all measuring points in the measuring point list; The preset device models associated with the tag database are displayed on the page.
4. The knowledge graph construction method according to claim 3, characterized in that, The method further includes: For specific measuring points of different types of equipment, the specific measuring points are saved to the tag database by manual input. Based on the tag database, a specific device model for this type of device is formed and saved to the model database.
5. The knowledge graph construction method according to claim 3, characterized in that, After generating the standard field library, the method further includes: Acquire measurement point information and generate a combined system measurement point list from the model database using a fuzzy matching algorithm; A similarity algorithm is used to calculate the optimal matching measurement point in the system's measurement point list to achieve dynamic association between model measurement points and list measurement points and real-time dynamic display of measurement point information.
6. The knowledge graph construction method according to claim 2, characterized in that, The Device attribute can be any of a diesel engine, generator, oil pump, or auxiliary equipment, and the Name attribute can be any of temperature, speed, current, voltage, power, or rotational speed.
7. A knowledge graph construction device, characterized in that, The device includes: The classification module is used to acquire ship feature data based on ship application scenarios and classify the ship feature data according to a preset classification, which includes system level, device level and data source level. The tagging module is used to distinguish and store the measurement points contained in each data source in the data source level in the form of feature tags to generate a ship data dictionary, including: establishing a ship architecture diagram corresponding to the system level based on the ship feature data; generating a node tree diagram corresponding to the equipment level according to the ship architecture diagram; and associating the node tree diagram with the parameter relationship table corresponding to the data source level to establish the ship data dictionary; The matching module is used to create a preset equipment model and associate the ship data dictionary with the preset equipment model through a fuzzy matching algorithm to construct the knowledge graph. The module includes: constructing the preset equipment model through preset software and saving the preset equipment model to a model database; saving the parameter relationship table in the ship data dictionary to a tag database and associating the tag database with the preset equipment model to generate a standard field library with a list of measurement points.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the knowledge graph construction method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the knowledge graph construction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Ship activity knowledge graph construction method
CN114647736A
Knowledge graph construction method, system, equipment and medium
CN115098691A