Knowledge graph generation method and system for industrial control products
Patent Information
- Application Number
- CN202610943750.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,随着工控产品种类的极大丰富和技术细节的日益复杂,上述基于通用字段的方法在实践中暴露出显著局限性
本发明通过语义分析识别工控品之间的替代关系和冲突关系,并基于迭代凝练的重要语句构建知识图谱,整体上实现了工控产品知识表征的细粒度化和检索的语义智能化。具体而言,首先,通过从工控品知识文档中提取重要语句并进行迭代凝练,获得了能够表征产品特异性的专属检索语句,解决了现有技术中知识表征粒度粗糙、无法刻画产品特异性的问题,使得产品知识表征更加精准和完整。其次,通过计算工控品之间的替代权重和冲突权重,构建了包含语义关系知识的知识图谱,实现了对产品间深层技术关系的量化表征,解决了检索机制僵化、无法理解深层用户意图的问题,使得后期的检索过程能够基于语义相似性和对立性进行智能匹配。最后,由于知识图谱包含了替代关系和冲突关系,能够为用户提供准确的正样本和负样本参考,解决了后期检索结果混杂、加重用户筛选负担的问题,为工控产品选型的高效性和准确性提供数据基础。进一步地,本发明通过迭代执行重要语句凝练和关系指标计算步骤,并将多次获得的替代指标和冲突指标进行加权求和,这使得最终获得的替代权重和冲突权重能够更加全面和可靠地反映产品间在不同知识粒度下的整体关联情况,增强了所构建知识图谱的鲁棒性和实用性。
Smart Images

Figure CN123014110A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a method and system for generating knowledge graphs for industrial control products. Background Technology
[0002] Currently, the selection of industrial control products generally adopts a structured database retrieval method based on predefined common fields (such as product categories and basic functions). Users filter products by matching these fields.
[0003] However, with the vast increase in the variety and technical complexity of industrial control products, the aforementioned methods based on general fields have revealed significant limitations in practice. First, the knowledge representation is coarse-grained and cannot characterize product specificity: predefined general fields can only describe the commonalities of a certain type of product, failing to capture and store the unique technical characteristics, differentiated advantages, or specific adaptation conditions of specific models. Second, the retrieval mechanism is rigid and cannot understand deep user intent: existing retrieval is essentially a precise or fuzzy match of keywords, lacking semantic understanding of the user's true intent, returning a large number of imprecise results. Finally, the search results are mixed, increasing the user's filtering burden: due to the above two defects, the returned result set usually contains two types of inefficient information: one is a large number of products that are similar in general fields but have vastly different core characteristics and are therefore not truly substitutable; the other is products that may be mixed in with those that have potential conflicts or mismatches with the user's existing system or needs in terms of technical details. This forces users to spend a lot of time and expertise to manually compare, identify, and perform secondary filtering on lengthy result lists, and may even need to adjust keywords multiple times for repeated searches, resulting in overall low selection efficiency.
[0004] Therefore, existing methods for storing and retrieving industrial control product information based on general fields suffer from insufficient representation capabilities and a lack of semantic understanding, resulting in low retrieval accuracy and poor result validity when dealing with complex and professional selection needs, ultimately leading to low user screening efficiency. Summary of the Invention
[0005] To address the above problems, this invention provides a method and system for generating knowledge graphs for industrial control products.
[0006] The knowledge graph generation method and system for industrial control products of the present invention adopts the following technical solution: One embodiment of the present invention provides a method for generating knowledge graphs for industrial control products, the method comprising the following steps: S1: The most important statements in the knowledge document of each industrial control product are recorded as important statements; any industrial control product is recorded as the target industrial control product; S2: Based on the important statements of the target industrial control product, obtain all alternative industrial control products and all conflicting industrial control products; condense the important statements of the target industrial control product, including: among all the important statements of the target industrial control product, only retain a few important statements that have the minimum semantic similarity with the important statements of all alternative industrial control products and the maximum semantic similarity with the important statements of all conflicting industrial control products; S3: The semantic similarity between all important statements retained by the target industrial control product and all important statements of each alternative industrial control product, and the semantic opposition between all important statements of each conflicting industrial control product, are respectively denoted as the substitution index between the target industrial control product and each alternative industrial control product and the conflict index between the target industrial control product and each conflicting industrial control product. S4: Repeat S2~S3 several times, and sum the weighted values of all substitution indicators of the target industrial control product with the same alternative industrial control product, and sum the weighted values of all conflict indicators with the same conflicting industrial control product. These values are used as the substitution weight and conflict weight of the target industrial control product, respectively. The important statements retained by the target industrial control product are used as the exclusive search statements of the target industrial control product. The substitution weights and conflict weights among all industrial control products constitute a knowledge graph of the exclusive search statements of all industrial control products.
[0007] Preferably, the most important statements in the knowledge document of each industrial control product are recorded as important statements, and the specific steps include the following: For any statement in the knowledge document of any industrial control product, denoted as the target statement, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of each statement in the knowledge document of that industrial control product. Among the cosine similarities between the target statement and all statements in the knowledge document of that industrial control product, the average of the several cosine similarities with the largest values is used to obtain the important indicators within the document of the target statement. For any statement in the knowledge document of any industrial control product other than this type of industrial control product, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of the statement; among the cosine similarities between the target statement and all statements in the knowledge documents of all industrial control products other than this type of industrial control product, take the average of the several cosine similarities with the largest values to obtain the important indicators outside the document of the target statement. Based on the important in-document and important out-of-document indicators of all statements in the knowledge document of any industrial control product, important statements are selected from all statements.
[0008] Preferably, the specific steps for selecting important statements from all statements in the knowledge document of any industrial control product, based on both in-document and out-of-document important indicators, are as follows: The importance of the target statement is calculated, and the importance is positively correlated with important indicators within the document and negatively correlated with important indicators outside the document. In the knowledge document of any industrial control product, first, all statements with important indicators greater than a first preset threshold are obtained. Then, among all statements with important indicators greater than the first preset threshold, the most important statements are selected and recorded as important statements.
[0009] Preferably, the specific steps for obtaining all alternative industrial control products and all conflicting industrial control products of the target industrial control product are as follows: Any industrial control product other than the target industrial control product is designated as the reference industrial control product; By performing semantic similarity and semantic opposition detection on any important statement in the target industrial control product and any important statement in the reference industrial control product, the semantic opposition degree and semantic similarity degree of all important statements between the target industrial control product and the reference industrial control product are obtained. For all other industrial control products besides the target industrial control product, obtain the several other industrial control products with the greatest semantic opposition to the target industrial control product, and denot them as conflicting industrial control products; obtain the several other industrial control products with the greatest semantic similarity to the target industrial control product, and denot them as alternative industrial control products.
[0010] Preferably, the method for obtaining the semantic opposition degree of all important statements and the semantic similarity degree of all important statements is as follows: For any reference industrial control product other than the target industrial control product, including conflicting industrial control products or alternative industrial control products, any important statement in the target industrial control product is denoted as the first statement. From all important statements of the reference industrial control product, statements that are opposed to the first statement are obtained. The ratio of the number of opposing statements to the number of all important statements of the reference industrial control product is denoted as the opposition coefficient of the first statement. When the maximum value of the opposition coefficient of all important statements in the target industrial control product is greater than 0, the semantic opposition of all important statements is equal to the maximum value of the opposition coefficient. When the maximum value of the opposition coefficient is equal to 0, the semantic similarity of all important statements is equal to the mean cosine similarity of the embedding vectors between all important statements of the target industrial control product and all important statements of the reference industrial control product.
[0011] Preferably, the specific steps for obtaining the statement that contradicts the first statement from all important statements of the reference industrial control product are as follows: Refer to any important statement in the industrial control product and denote it as the second statement; when the cosine similarity between the embedding vector of the first statement and the embedding vector of the second statement is greater than a second preset threshold, the second statement is denoteed as a related statement of the first statement; For all important statements in the reference industrial control product, filter out all related statements of the first statement, and use a neural network model to determine whether each related statement is contradictory to the first statement. Related statements that are contradictory are recorded as statements that are contradictory to the first statement.
[0012] Preferably, the specific steps for condensing the key statements of the target industrial control product are as follows: Any important statement of the target industrial control product is denoted as the first statement; calculate the cosine similarity between the embedding vectors of the first statement and the important statements of all the alternative industrial control products, and the mean of the several cosine similarities with the largest values is denoted as the first similarity of the first statement; calculate the cosine similarity between the embedding vectors of the first statement and the important statements of all the conflicting industrial control products, and the mean of the several cosine similarities with the largest values is denoted as the second similarity of the first statement. Obtain the retention index of the first statement, which is negatively correlated with the first similarity and positively correlated with the second similarity; among all important statements of the target industrial control product, only the several important statements with the largest index are retained, and the remaining important statements are deleted.
[0013] Preferably, the specific steps for obtaining the substitution weight and conflict weight of the target industrial control product are as follows: Let K be the total number of executions of S2~S3; let f(k) be the substitution index corresponding to the target industrial control product and the same substitute industrial control product when S2~S3 is executed for the kth time. When the target industrial control product and the substitute industrial control product do not obtain a substitution index, let the substitution index f(k) = 0; perform a weighted summation on f(1), f(2), f(3), ..., f(k), ..., f(K) to obtain the substitution weight, where the weight of f(k) is positively correlated with k when performing the weighted summation. When executing S2~S3 for the kth time, the conflict index corresponding to the target industrial control product and the same conflicting industrial control product is denoted as y(k). When the target industrial control product and the conflicting product do not obtain a conflict index, the conflict index y(k) = 0. The conflict weights are obtained by weighted summation of y(1), y(2), y(3), ..., y(k), ..., y(K). The weight of y(k) during the weighted summation is positively correlated with k.
[0014] Preferably, the nodes in the knowledge graph are each industrial control product, and the exclusive search statement is used as the attribute of the node; If there is a substitution weight between any two nodes, the maximum value of the substitution weight between the nodes is recorded as the edge weight, and the edge is assigned an attribute label: substitution relationship; if there is a conflict weight between any two nodes, the maximum value of the conflict weight between the nodes is also recorded as the edge weight, and the edge is assigned an attribute label: conflict relationship. When a user searches using the knowledge graph, the process includes: matching the user-input text with specific search queries for all industrial control products to obtain several search results; for any search result, retrieving the industrial control products with the largest edge weights in the knowledge graph that are connected to the search result and belong to a substitution relationship, and recording them as substitution references; retrieving the industrial control products with the largest edge weights in the knowledge graph that are connected to the search result and belong to a conflict relationship, and recording them as conflict references; and displaying the substitution references and conflict references of all search results to the user.
[0015] Another embodiment of the present invention provides a knowledge graph generation system for industrial control products. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor runs the computer program, it implements all the steps of the knowledge graph generation method for industrial control products described above. The system also includes an input module and a display module. The input module includes several input boxes for inputting the user's search text, the number of retrieved results, the number of alternative references, and the number of conflicting references generated. The display module has a display for displaying all search results and all alternative references and conflicting references of the search results.
[0016] The beneficial effects of the technical solution of the present invention are: This invention identifies substitution and conflict relationships between industrial control products (ICS) through semantic analysis and constructs a knowledge graph based on iteratively refined key statements. This achieves fine-grained knowledge representation and semantically intelligent retrieval of ICS products. Specifically, firstly, by extracting key statements from ICS knowledge documents and iteratively refining them, specific retrieval statements characterizing product specificity are obtained. This solves the problem of coarse-grained knowledge representation and inability to depict product specificity in existing technologies, making product knowledge representation more accurate and complete. Secondly, by calculating substitution and conflict weights between ICS products, a knowledge graph containing semantic relationship knowledge is constructed. This achieves a quantitative representation of deep technical relationships between products, solving the problem of rigid retrieval mechanisms and inability to understand deep user intent. This enables subsequent retrieval processes to intelligently match based on semantic similarity and opposition. Finally, because the knowledge graph contains substitution and conflict relationships, it provides users with accurate positive and negative sample references, solving the problem of mixed search results and increased user filtering burden, providing a data foundation for efficient and accurate ICS product selection. Furthermore, this invention iteratively executes the steps of important statement condensation and relation index calculation, and performs a weighted summation of the multiple obtained substitution and conflict indices. This enables the final substitution weights and conflict weights to more comprehensively and reliably reflect the overall association between products at different knowledge granularities, thereby enhancing the robustness and practicality of the constructed knowledge graph. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the steps of a knowledge graph generation method for industrial control products provided in an embodiment of the present invention. Detailed Implementation
[0018] The following description, in conjunction with the accompanying drawings, details the specific solution of the knowledge graph generation method and system for industrial control products provided by this invention.
[0019] Please see Figure 1 The document illustrates a flowchart of the steps in a knowledge graph generation method for industrial control products provided by an embodiment of the present invention. This embodiment extracts a unique knowledge identifier (i.e., a unique retrieval statement) for each industrial control product and constructs a knowledge graph that supports semantic understanding and intelligent recommendation based on the deep substitutability and conflict relationships between products, thereby achieving efficient retrieval of industrial control products.
[0020] This embodiment includes the following steps: S101. The most important statements in the knowledge document of each industrial control product are recorded as important statements.
[0021] Key statements refer to a few statements extracted from the knowledge documents (including manuals, datasheets, etc.) of a particular industrial control product that best represent the product's unique characteristics. These statements do not describe the general attributes of all products, but rather the product's specific information in terms of functionality, performance, application scenarios, and compatibility.
[0022] S102. By performing semantic similarity and semantic opposition detection on important statements of the target industrial control product and different industrial control products, obtain all alternative industrial control products and all conflicting industrial control products of the target industrial control product; condense the important statements of the target industrial control product, including: among all the important statements of the target industrial control product, retain only a few important statements that have the minimum semantic similarity with the important statements of all alternative industrial control products and the maximum semantic similarity with the important statements of all conflicting industrial control products.
[0023] This step will be described using any industrial control product as the target industrial control product as an example.
[0024] The term "alternative industrial control product" refers to an industrial control product B whose key statements are semantically highly similar to those of a target industrial control product A. This indicates overlap or comparability in their core functions, applicable scenarios, or the technical problems they solve, and B can be considered a potential alternative to A. For example, two servo motors from different brands are considered substitutes if their accuracy, torque curves, and communication protocols are highly similar.
[0025] The term "conflicting industrial control product" refers to an industrial control product C whose important statements are semantically contradictory or significantly incompatible with those of a target industrial control product A. This indicates potential conflicts in their technical characteristics, operating conditions, or system compatibility, making them difficult to use collaboratively in the same system or scenario. For example, a sensor requiring 24V DC power supply would conflict with a controller that only supports 220V AC power supply.
[0026] Furthermore, this step involves refining the key statements of the target industrial control product, extracting truly highly distinctive and specific search statements. The core process involves knowledge condensation of the key statements of the target industrial control product: the set of key statements is reduced and retained, and the retained key statements must simultaneously meet the following two conditions: Condition one is used to highlight uniqueness: the retained key statements maintain a low semantic similarity to the key statements of the most readily replaceable industrial control products (ICPs). This means that the retained key statements are the most distinctive parts of the target ICP among its replacement ICPs. It filters out common and redundant descriptions between the target ICP and its replacements, thereby strengthening the unique identification of the target ICP.
[0027] Condition two is used to expand the discriminative power: the retained important statements maintain the maximum semantic similarity with the important statements of all conflicting products. This means that the retained statements need to still have some strong semantic connection with those products that are incompatible with the target industrial control product. For example, the statement "only applicable to three-phase 380V power grid" of the target industrial control product, although different from the alternative industrial control product, may have a strong semantic connection with another conflicting industrial control product "only applicable to single-phase 220V" in terms of voltage system.
[0028] Condition two strengthens the unique identification of the target industrial control product by using alternative industrial control products as a reference, while ensuring that the unique identification (i.e., the retained important statements) has a certain degree of extensibility. This ensures that the retained important statements not only differ from those of the alternative industrial control products (eliminating redundant knowledge between the alternative and target industrial control products), but also have the ability to identify conflicting industrial control products. For example, when a user performs a semantic search, they can retrieve not only alternative industrial control products but also conflicting industrial control products.
[0029] The purpose of the above refinement is that, through the aforementioned dual filtering, the key statements ultimately retained (i.e., the key statements of the target industrial control product initially obtained) serve as both a unique identifier for the target industrial control product (distinguishing it from substitute industrial control products) and an embedded detection code for identifying potential conflicts (associated with conflicting industrial control products). This allows the initially obtained exclusive search statements not only to be used for precise retrieval of the target industrial control product itself, but also to simultaneously activate the judgment of substitution and conflict relationships during the search.
[0030] S103. The semantic similarity between all important statements retained by the target industrial control product and all important statements of each alternative industrial control product, and the semantic opposition between all important statements of each conflicting industrial control product, are respectively denoted as the substitution index between the target industrial control product and each alternative industrial control product, and the conflict index between the target industrial control product and each conflicting industrial control product.
[0031] Based on all the important statements retained in the refined target industrial control product (i.e., the initially obtained exclusive search statements), the overall semantic similarity / semantic opposition between the target industrial control product and each alternative / conflicting industrial control product is calculated and quantified into substitution index and conflict index, respectively. The higher the index value, the stronger the substitutability or conflict probability between the two at this refined knowledge level.
[0032] Specifically, the larger the substitution index, the greater the similarity between the important statement and the substitute industrial control product after deletion and condensation. Greater similarity means that when users perform semantic searches, the target industrial control product with obvious substitution relationship and the substitute industrial control product are easily retrieved, which helps to provide users with more selection references.
[0033] The higher the conflict index, the more important the statements, even after being reduced and refined, still have a high degree of semantic opposition to the conflicting industrial control products. A high degree of semantic opposition means that when users perform semantic searches, target industrial control products with obvious conflicting relationships and conflicting industrial control products are also easy to retrieve, which helps to provide users with selection references that belong to negative samples.
[0034] S104. Reacquire all alternative industrial control products and all conflicting industrial control products, and condense the important statements of the target industrial control product. Take the weighted sum of all substitution indicators of the target industrial control product with the same alternative industrial control product, and take the weighted sum of all conflict indicators with the same conflicting industrial control product, and use them as the substitution weight and conflict weight of the target industrial control product, respectively. The important statements retained by the target industrial control product are used as the exclusive search statements of the target industrial control product. The substitution weights and conflict weights among all industrial control products constitute the knowledge graph of the exclusive search statements of all industrial control products.
[0035] The above process involved deleting and retaining (i.e., condensing) all important statements in the target industrial control product, and using these retained important statements (i.e., the initially obtained exclusive search statements) as a reference, conflict indicators and substitution indicators were obtained. However, the following problems exist: When too many specific search terms are initially obtained, it hinders subsequent storage and user retrieval. Conversely, when too few specific search terms are initially obtained, the conflict or substitution relationships between the target industrial control product and other industrial control products become inaccurate. This is because: Because the process of refining the above-mentioned statements to initially obtain specific search terms requires consideration of two conditions, some important statements may exist. These important statements cannot satisfy both conditions and only meet one of them (e.g., they have low semantic similarity with alternative industrial control products and low semantic similarity with conflicting industrial control products, or they have high semantic similarity with both conflicting and alternative industrial control products). As a result, these important statements cannot be retained (i.e., they are deleted). The substitution or conflict relationships shown or contained in these important statements are also deleted, making the obtained conflict and substitution indicators unreliable and unable to completely and accurately describe the conflict or substitution relationships between the target industrial control product and other industrial control products.
[0036] Based on this, this step repeats S102~S103 several times. Each repetition is equivalent to obtaining alternative and conflicting control statements based on the previously retained important statements, and then refining the retained important statements based on the newly obtained alternative and conflicting control statements, and obtaining conflict indicators and alternative indicators again. In this process, each refinement ensures that most of the important statements are retained. Through multiple refinements (i.e., multiple repetitions), the number of retained important statements is gradually reduced.
[0037] On the one hand, in the aforementioned iterative process, multiple condensations are equivalent to dividing all the important statements of the target industrial control product into multiple knowledge levels, so that each knowledge level extracts some conflict or substitution relationships (that is, each repetition obtains conflict indicators and substitution indicators between the target industrial control product and other industrial control products), thus covering as many conflict or substitution relationships between the target industrial control product and other industrial control products as possible. The other industrial control products mentioned refer to the substitution and conflict industrial control products obtained for the target industrial control product at multiple knowledge levels during this process. The target industrial control product obtains one or more substitution indicators and conflict indicators corresponding to the same substitution or conflict industrial control product. Furthermore, in this embodiment, the target industrial control product is weighted and summed for all substitution indicators with the same substitution industrial control product, and weighted and summed for all conflict indicators with the same conflict industrial control product, which are used as the substitution weight and conflict weight of the target industrial control product, respectively. Compared with the substitution and conflict indicators obtained in step S103, these substitution and conflict weights can more accurately and completely represent the conflict or substitution relationships between the target industrial control product and other industrial control products.
[0038] On the other hand, regarding the aforementioned iterative process, in the initial iteration, conflicting or substitutive relationships may be established based on broader features; in subsequent iterations, as important statements are refined, the evaluation and quantification of conflicting or substitutive relationships will increasingly be based on the product's most core and essential differentiating features. The iterative process helps to discover and solidify strong relationships that are stable across multiple knowledge levels, while weakening weak relationships arising solely from similar secondary features, thereby enhancing the robustness and reliability of the discovered product relationships.
[0039] In summary, this embodiment iterates multiple times to obtain the substitution weights or conflict weights between the target industrial control product and its substitute or conflicting industrial control products. These weights describe the substitution and conflict relationships between the target industrial control product and other industrial control products. This approach considers not only the breadth of substitution and conflict relationships (i.e., covering more substitution and conflict relationships between industrial control products through multiple knowledge levels) but also the depth of substitution and conflict relationships (i.e., extracting weak relationships arising from shallow-level feature similarity while also considering strong relationships that are stable across multiple knowledge levels).
[0040] After the above iterative process is completed, the key statements retained by the target industrial control product are used as the exclusive search statements for the target industrial control product. The substitution weights and conflict weights of the target industrial control product compared to different alternative industrial control products and different conflicting industrial control products are also obtained.
[0041] The above processing is performed on all industrial control products to obtain unique search statements for each product, as well as substitution and conflict weights between different products. These unique search statements, substitution and conflict weights constitute a knowledge graph. This knowledge graph is then stored (the storage method for knowledge graphs is well-known). During subsequent searches, users can select a "semantic search" mode, which no longer uses general fields for retrieval but instead performs searches based on the knowledge graph.
[0042] The knowledge graph contains proprietary search terms that provide a data foundation for semantic retrieval. The substitution and conflict relationships between different industrial control products contained in the knowledge graph provide auxiliary references for semantic retrieval results. When dealing with complex and professional selection needs, it helps to further improve the accuracy of retrieval and the efficiency of industrial control product selection.
[0043] As an example, the knowledge graph is composed of the unique search terms for all industrial control products, as well as the substitution and conflict weights between different industrial control products. The methods used include: Treat any industrial control product as a node (representing an entity), and use the unique search statement for that industrial control product as an attribute of the node. For any node E1 and node E2, if there is a substitution weight between E1 and E2, record the maximum value of the substitution weight between E1 and E2 as the edge weight between E1 and E2, and assign an attribute label to this edge: substitution relationship.
[0044] It should be noted that there may be one substitution weight between E1 and E2, or there may be two substitution weights. For example, when E1 or E2 is the target industrial control product mentioned above, E2 or E1 is its substitute industrial control product, and when E2 or E1 is the target industrial control product mentioned above, E1 or E2 is its substitute industrial control product. In this case, there are two substitution weights between E1 and E2.
[0045] If there is no substitution weight between E1 and E2, then there is no edge between E1 and E2 that represents a substitution relationship.
[0046] If there is a conflict weight between E1 and E2, the maximum value of the conflict weight between E1 and E2 is also recorded as the edge weight of the edge between E1 and E2, and this edge is assigned an attribute label: conflict relationship. If there is no conflict weight between E1 and E2, then there is no edge between E1 and E2 representing a conflict relationship.
[0047] As an example, knowledge graph-based retrieval includes the following methods: The system uses the text entered by the user to perform a search and match on the specific search query for all industrial control products. The number of industrial control products retrieved (e.g., 2) is recorded as the search results.
[0048] In this knowledge graph, we determine whether there is a conflicting or substitutive relationship between any two nodes corresponding to search results. If so, we mark whether the two search results have a conflicting relationship, a substitutive relationship, or both. Having both relationships indicates that some knowledge information between the search results is substitutable, while other knowledge information is conflicting or contradictory. In some examples, the situation where both relationships exist can be considered a conflicting relationship.
[0049] Furthermore, auxiliary reference results are generated based on the search results, specifically including: For any given search result, among the other industrial control products in the knowledge graph (i.e., among all industrial control products other than those searched), obtain the multiple industrial control products with the largest edge weights (e.g., two) that are connected to the search result and belong to a substitution relationship, and denote them as substitution references for each search result. Also obtain the multiple industrial control products with the largest edge weights (e.g., two) that are connected to the search result and belong to a conflict relationship, and denote them as conflict references for each search result.
[0050] Alternative and conflicting references for all search results are also displayed to the user.
[0051] Users can manually set the number of search results and the number of alternative or conflicting references generated to achieve flexibility and autonomy in the search process and ensure a good interactive experience.
[0052] At this point, the user has retrieved several search results, as well as several alternative and conflicting references. The user then selects industrial control products from all the search results and all the alternative and conflicting references. The specific industrial control product selection process is subjectively conducted by the user and will not be elaborated upon in this embodiment.
[0053] This example provides users with semantic search services based on the unique knowledge entries specific to industrial control products, while generating auxiliary reference results. This not only improves the accuracy of the search, but also provides users with accurate positive samples (other recommended industrial control products) and negative samples (industrial control products that should be avoided or require attention) for selection decisions, which helps improve the efficiency of user screening during the selection process.
[0054] Note that the semantic search service provided in this example retrieves only a portion of industrial control products from a large pool for user reference, which is more efficient than existing methods that retrieve products using general fields. However, this embodiment does not aim to provide users with accurate and immediately usable selection results in one go; users still need to perform further filtering and judgment based on the search results and auxiliary reference results.
[0055] As an example, the method of searching and matching all industrial control products using user-input text with specific search queries includes: We use a sentence embedding model (such as Sentence-BERT) to convert the user-input text and the unique search statement for each industrial control product into a vector, denoted as the embedding vector. In this example, the embedding vector has a dimension of 768.
[0056] Calculate the cosine similarity between the embedding vector of the exclusive search statement for all industrial control products and the embedding vector of the user's input text. Select the industrial control products that match the exclusive search statement with the highest cosine similarity (e.g., 2) as the search results.
[0057] As an example, the most important statements in the knowledge document for each industrial control product are marked as important statements, including the following methods: The knowledge document for each industrial control product is divided into several sentences, and each sentence is converted into an embedding vector using a sentence embedding model (such as Sentence-BERT).
[0058] For any statement in the knowledge document of any industrial control product, denoted as the target statement, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of each statement in the knowledge document of that industrial control product. Among the cosine similarities between the target statement and all statements in the knowledge document of that industrial control product (excluding the target statement), calculate the average of the n1 cosine similarities with the highest cosine similarity. This average is denoted as the document-level importance index of the target statement.
[0059] The purpose of considering only the n1 cosine similarities with the largest cosine similarity, rather than considering all cosine similarities, is to avoid the individual cosine similarities with larger values being overwhelmed by a large number of smaller cosine similarities.
[0060] For any statement in the knowledge document of any industrial control product other than this type of industrial control product, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of the target statement; among the cosine similarities between the target statement and all statements in the knowledge documents of all industrial control products other than this type of industrial control product, calculate the average of the n2 cosine similarities with the highest cosine similarity, and record this average as the important index outside the document of the target statement.
[0061] The importance of the target statement is calculated, and this importance is positively correlated with the importance index within the document and negatively correlated with the importance index outside the document. A higher importance index (i.e., a higher importance index within the document and a lower importance index outside the document) indicates that the semantic information contained in the target statement is more important within its own knowledge document (corresponding to a higher importance index within the document), and is not commonly found in other knowledge documents, or in other knowledge documents generally do not contain this semantic information (corresponding to a lower importance index outside the document). This indicates that the target statement is more important among all the knowledge documents of the controlled product.
[0062] Thus, for any statement in the knowledge document of any industrial control product, it is assigned an importance level.
[0063] In the knowledge document of any industrial control product, first, all statements with important indicators greater than a first preset threshold are obtained. Then, among all statements with important indicators greater than the first preset threshold, the N statements with the highest importance are obtained and recorded as important statements.
[0064] The purpose of introducing the screening condition that the important indicators within the document are greater than the first preset threshold is to initially screen out potentially important statements in the knowledge document and avoid the influence of statements that are unrelated to the overall content of the knowledge document (with low important indicators within the document).
[0065] As an example, N is set to 45% (rounded up) of the number of all statements in the document whose important metrics are greater than the first preset threshold. The preferred value range for the first preset threshold is 0 to 0.5; this example uses a first preset threshold of 0.1 as an example.
[0066] As an example, n1 and n2 are described using 20% of the corresponding number of cosine similarities obtained above (rounded up).
[0067] In other examples, n1 is set as follows: For the cosine similarity between the target statement and all statements (excluding the target statement) in the knowledge document of this type of industrial control product, the Otsu threshold segmentation algorithm is used to divide these cosine similarities into two categories. The number of cosine similarities contained in the category with the largest average cosine similarity is taken as n1.
[0068] While this example can automatically calculate n1 (i.e. automatically identify cosine similarity with relatively large values), the computation is large and cannot be flexibly controlled manually.
[0069] In other examples, n2 is set in the same way.
[0070] Specifically, in all examples, when n1 or n2 is greater than 10, n1 or n2 is set to 10 to avoid n1 or n2 taking too large a value.
[0071] It should be noted that in some practical situations, individual statements in a knowledge document may be unrelated to the overall content of the document (i.e., although the important indicators within the document are relatively minor), they may still contain important information. In this embodiment, these statements are not considered important statements because they are unrelated to the overall content of the knowledge document and represent isolated, fragmented pieces of important knowledge information. They are not key points for users to search when selecting industrial control products in this embodiment and are therefore not considered.
[0072] As an example, the formula for calculating importance is: P=(q1+1.01) / (q0+1.01), where P represents importance, q1 represents the importance index within the document, and q0 represents the importance index outside the document. The theoretical minimum value of q1 and q0 is -1. The purpose of adding 1.01 to both the numerator and denominator is to avoid the denominator being 0, while ensuring that the numerator is greater than 0, thereby ensuring that the importance P is positively correlated with the importance index q0 outside the document. In other examples, 1.01 can be replaced with other values greater than 1. This embodiment does not impose any limitations.
[0073] In other examples, considering that the statements in knowledge documents contain nouns, numbers, and characters from specialized fields, some general sentence embedding models (such as Sentence-BERT) may not be able to accurately extract and represent the semantics of the statements, leading to incomplete extraction of the aforementioned important statements. Therefore, in some examples, the value of N can be set larger, for example, N can be set to 65% (rounded up) of the number of all statements in the document whose important indicators are greater than a first preset threshold. This ensures that important statements are extracted completely and reduces omissions, but this increases the subsequent computational load. Other examples can utilize a large amount of industrial control domain text (such as manuals, technical manuals, and fault cases) to fine-tune the above sentence embedding model, enabling it to achieve high accuracy in the industrial control domain. Fine-tuning of the model is a well-known technique and will not be elaborated upon in this embodiment.
[0074] As an optional example, the knowledge document for each industrial control product can be divided into several statements, including the following methods: The plain text data contained in the knowledge document is segmented into sentences according to punctuation marks (such as periods) to obtain all sentences. This example provides a more refined level of knowledge granularity.
[0075] As another alternative example, the knowledge document for each industrial control product can be divided into several statements, including the following methods: Considering that knowledge documents may contain data in formats such as charts and PDFs, directly segmenting according to punctuation marks may not be accurate. In this case, the information in the knowledge documents is manually organized. For example, charts are organized into complete text data, and the text in the PDF is manually verified after OCR recognition (such as modifying the text format, correcting erroneous descriptions, and deleting irrelevant information). Finally, all plain text data is manually segmented into sentences.
[0076] As a preferred example, the plain text data contained in the knowledge document can be segmented according to punctuation marks (e.g., periods) to obtain all sub-statements. Each group of multiple adjacent sub-statements (e.g., four) is considered a complete statement, ensuring that adjacent complete statements share at least one overlapping sub-statement; for example, the last sub-statement of the first statement and the first sub-statement of the second statement must be identical. This allows the knowledge document for each industrial control product to be divided into multiple complete statements with overlapping parts. This example ensures that each statement has sufficient contextual information.
[0077] As a preferred example, by performing semantic similarity and semantic opposition detection on important statements of the target industrial control product and different industrial control products, all alternative industrial control products and all conflicting industrial control products of the target industrial control product are obtained. The methods include: Any industrial control product other than the target industrial control product is designated as the reference industrial control product. Any important statement in the target industrial control product is designated as the first statement, and any important statement in the reference industrial control product is designated as the second statement. When the cosine similarity between the embedding vector of the first statement and the embedding vector of the second statement is less than or equal to the second preset threshold, it indicates that there is no obvious semantic information related to the first statement and the second statement. When it is greater than the second preset threshold, it indicates that there is obvious semantic information related to the first statement and the second statement. In this case, the second statement is designated as the related statement of the first statement.
[0078] It should be noted that the conflicting control item should have related statements with the target control item. The preferred value range for the second preset threshold is 0.4 to 0.8; this example uses a second preset threshold of 0.53 as an example.
[0079] For all important statements in the reference industrial control product, filter out the related statements of the first statement, and determine whether each related statement is contradictory to the first statement (semantic contradiction). The ratio of the number of related statements that contradict the first statement to the total number of important statements in the reference industrial control product (i.e., the number of important statements obtained in step S101) is recorded as the contradiction coefficient of the first statement. In particular, when the number of related statements of the first statement is equal to 0, the contradiction coefficient of the first statement is directly set to 0.
[0080] The larger the opposition coefficient, the more obvious the conflict and opposition between the first statement and the reference industrial control product as a whole.
[0081] For all important statements in the target industrial control product, the maximum value of the opposition coefficient of all important statements is denoted as the semantic opposition degree between all important statements in the target industrial control product and all important statements in the reference industrial control product. The greater the semantic opposition degree, the more obvious the conflict and opposition between all important statements in the target industrial control product and the reference industrial control product as a whole.
[0082] When the maximum value of the opposition coefficient of all important statements in the target industrial control product is equal to 0, it means that there are no related statements or no opposing related statements in all important statements of the target industrial control product. At this time: The cosine similarity between each important statement of the target industrial control product and each important statement of the reference industrial control product is obtained. The cosine similarity between each pair of important statements of the target industrial control product (all currently retained statements) and all important statements of the reference industrial control product (i.e., all important statements obtained in step S101) is calculated. The mean of all cosine similarities is recorded as the semantic similarity between all important statements of the target industrial control product and all important statements of the reference industrial control product. A higher semantic similarity indicates that all important statements of the target industrial control product and the reference industrial control product as a whole have related and similar semantic information.
[0083] It should be noted that if the maximum value of the opposition coefficient of all important statements in the target industrial control product is greater than 0, then the target industrial control product and the reference industrial control product do not have the aforementioned semantic similarity. If the maximum value of the opposition coefficient of all important statements in the target industrial control product is equal to 0, then the target industrial control product and the reference industrial control product do not have the aforementioned semantic opposition; this ensures that the target industrial control product and the reference industrial control product either only have semantic similarity or only have semantic opposition.
[0084] For all other industrial control products besides the target industrial control product, obtain the x1 other industrial control products with the greatest semantic opposition to the target industrial control product, and denote them as conflicting industrial control products. Obtain the x2 other industrial control products with the greatest semantic similarity to the target industrial control product, and denote them as alternative industrial control products.
[0085] As an example, the preferred value range of x1 is 50% to 100% of the number of other industrial control products that have semantic opposition to the target industrial control product. In this embodiment, 70% is used as an example (x1 is rounded up); the preferred value range of x2 is 50% to 100% of the number of other industrial control products that have semantic similarity to the target industrial control product. In this embodiment, 70% is used as an example (x2 is rounded up).
[0086] As an example, methods for determining whether each related statement contradicts the first statement include: Construct a semantic opposition detection model. Input the first statement and each related statement into the semantic opposition detection model. The semantic opposition detection model classifies the first statement and related statements to obtain semantic opposition categories or semantic non-opposition categories. The semantic opposition category indicates that the related statement is opposed to the first statement.
[0087] As an example, the semantic opposition detection model uses DistilBERT, a lightweight model that can perform text classification.
[0088] As an example, the training (or fine-tuning) method for a semantic opposition detection model is as follows: We collected (or manually set) a large number of semantically contradictory statements and a large number of statements without semantically contradictory relationships from a large amount of industrial control field texts (such as manuals, technical manuals, and fault cases). Each pair of statements with semantically contradictory relationships was treated as a positive sample, and each pair of statements without semantically contradictory relationships was treated as a negative sample. Positive samples were assigned a class label 1, representing the semantically contradictory category, and negative samples were assigned a class label 0, representing the semantically non-contradictory category. We trained a semantic contradiction detection model using the dataset consisting of all negative and positive samples. During training, we used the cross-entropy loss function, the Adam optimizer, and set the learning rate to 0.003, the batch size to 6, and the maximum number of training iterations to 10.5 Other training parameters may be used in other embodiments, and this embodiment does not impose specific limitations. In addition, the training process is well known, and this embodiment will not describe it in detail.
[0089] It's important to note that semantic opposition occurs when two statements contain the same attribute, but the parameter values for the same attribute differ or their ranges do not overlap. For example, the statements "Only applicable to three-phase 380V power grids" and "Only applicable to single-phase 220V" both contain the attributes of voltage system and rated voltage, and their parameter settings differ for some or all of these attributes; therefore, these two statements are semantically opposed. Conversely, if no common attributes exist, or if the parameter settings for all common attributes are actually the same or their value ranges overlap, then there is no semantic opposition. For another example, the statements "Supports PROFINET communication" and "Supports Modbus TCP only" both contain the attribute of communication protocol, but the parameters for this attribute (i.e., PROFINET and Modbus TCP) differ; therefore, these two statements are semantically opposed.
[0090] It should be noted that the two statements to be input into the semantic opposition detection model need to be concatenated into a complete sentence using a concatenation character before being directly input into the model. For example, after deleting the newline characters in each statement, the newline characters are used as concatenation characters to join the two statements together. When the output of the trained semantic opposition detection model is less than or equal to 0.5, it means that the two input statements belong to the semantically non-opposing category; when it is greater than 0.5, they belong to the semantically opposing category.
[0091] In other examples, considering the difficulty of training semantic opposition detection models and the powerful logical reasoning capabilities of existing large models, an alternative method is provided to determine whether each related statement opposes the first statement: Input the first statement and each related statement into a general large model (such as DeepSeekV3), and let it directly output whether it belongs to the semantically incompatible category or the semantically incompatible category.
[0092] As an example, the main content of the prompt words in this general large model includes: "Task Definition: Given two statements describing the technology of an industrial control product (referred to as statement a and statement b), determine whether these two statements are semantically contradictory."
[0093] Judgment criteria: Semantic Inconsistency: Two statements are considered semantically inconsistent if and only if they simultaneously meet both of the following conditions: Condition 1 (Shared Attribute): The two statements describe the same technical attribute or feature (e.g., power supply voltage, communication protocol, operating temperature range, protection level). Condition 2 (Parameter Conflict): For this same attribute, the parameters, values, or value ranges specified by the two statements are completely different and have no overlap, or are functionally mutually exclusive. Semantic Inconsistency: Two statements are considered semantically inconsistent if they do not meet either of the above conditions for semantic inconsistency. Specifically, this includes: The two statements describe completely different attributes and are not comparable. The two statements describe the same attribute, but the parameters, values, or value ranges are the same, compatible, or have overlapping parts.
[0094] Output requirements: The output must be one and only one of the following two categories of labels: semantically opposing category or semantically non-opposing category.
[0095] Example: Example 1 (Semantic Discrepancy): Statement a: This product is only suitable for three-phase 380V AC power grids. Statement b: This device only supports single-phase 220V AC power supply. Judgment: Semantic discrepancy category. Reason: The attributes are the same (supply voltage), but the parameters conflict (380V three-phase conflicts with 220V single-phase), making them incompatible.
[0096] Example 2 (Semantic Discrepancy): Statement a: The controller supports PROFINET industrial Ethernet communication. Statement b: This module only supports Modbus TCP communication protocol. Judgment: Semantic discrepancy category. Reason: The attributes are the same (communication protocol), but the specified protocols are different, so they usually cannot communicate directly.
[0097] Example 3 (Semantic Inconsistency): Statement a: The rated speed of the motor is 3000 rpm. Statement b: The sensor uses an M12 interface. Judgment: Semantically inconsistent category. Reason: They describe completely different attributes, and there are no comparable attributes.
[0098] Example 4 (Semantic Inconsistency): Statement a: Operating temperature range is -20°C to 60°C. Statement b: Can operate stably in environments ranging from -10°C to 70°C. Judgment: Semantically inconsistent category. Reason: The attributes are the same (operating temperature range), but the value ranges overlap, therefore there is no conflict.
[0099] As a preferred example, the methods for condensing the key statements of the target industrial control product include: For any important statement in the target industrial control product, denoted as the first statement, calculate the cosine similarity between the embedding vectors of the first statement and the important statements of all alternative industrial control products. The mean of the n3 cosine similarities with the largest cosine similarity values is denoted as the first similarity of the first statement. Calculate the cosine similarity between the first statement and the important statements of all conflicting industrial control products, and the mean of the n4 cosine similarities with the largest cosine similarity values is denoted as the second similarity of the first statement.
[0100] The setting methods for n3 and n4 are the same as those for n1 and n2, and will not be repeated in this example.
[0101] Obtain the retention index of the first statement, wherein the retention index is negatively correlated with the first similarity and positively correlated with the second similarity.
[0102] At this point, each important statement in the target industrial control product corresponds to a retention index. The N1 important statements with the highest retention index are selected and retained, while the other important statements are deleted. The preferred value range for N1 is 70% to 99% of the total number of important statements in the target industrial control product. This example uses 80% of the total number of important statements as an example (N1 is rounded down).
[0103] The N1 important statements with the highest retention index represent the important statements that have the lowest semantic similarity to the important statements of all alternative industrial control products and the highest semantic similarity to the important statements of all conflicting industrial control products.
[0104] As an example, the formula for obtaining the retention index of the first statement is: H = w1 × (1 - h1) + w2 × h2, where h1 represents the first similarity and h2 represents the second similarity. w1 and w2 represent preset attention weights. In this example, w1 = 0.72 and w2 = 0.28. The fact that w1 is greater than w2 indicates that the first condition mentioned above is preferred, avoiding situations where statements with high semantic similarity to conflicting industrial control products are retained but not closely related to the product's specific functions.
[0105] As an example, when S102~S103 is executed repeatedly, if the number of repetitions is greater than 5, w1=w2=0.5 is set to ensure that the first condition is prioritized in the initial condensation process, while the second condition is taken into account in the subsequent condensation process. This ensures that the final condensation result can include both product-specific functional information and functional information that tends to expand the search for conflicting industrial control products.
[0106] As an example, the method for obtaining the substitution index of the target industrial control product and each alternative industrial control product, as well as the conflict index of the target industrial control product and each conflicting industrial control product, is as follows: In the above examples, taking the target industrial control product and the reference industrial control product as examples, the semantic opposition or semantic similarity between the target industrial control product and the reference industrial control product was obtained. Each alternative industrial control product was considered as the reference industrial control product described above, and the semantic similarity between the target industrial control product and each alternative industrial control product was obtained according to the above method, and recorded as the substitution index between the target industrial control product and each alternative industrial control product. Each conflicting industrial control product was considered as the reference industrial control product described above, and the semantic opposition between the target industrial control product and each conflicting industrial control product was obtained according to the above method, and recorded as the conflict index between the target industrial control product and each conflicting industrial control product.
[0107] As a preferred example, when S102~S103 is executed repeatedly, a portion of the important statements of the target industrial control product can be deleted each time it is repeated. When the number of important statements retained in the target industrial control product is less than or equal to the preset remaining number, the repetition stops.
[0108] As an example, the default remaining quantity is 4.
[0109] In other examples, the preset remaining quantity can be set to 10% of the total number of important statements in the target industrial control product; specifically, repetition stops when the number of important statements retained in the target industrial control product is less than or equal to 4. Also specifically, if the number of important statements before refinement is exactly less than or equal to 4, then the important statements remain unchanged after refinement.
[0110] As a preferred example, the method for obtaining the substitution weight and conflict weight of the target industrial control product is as follows: After the repetition stops, the total number of executions of S102~S103 is denoted as K. During the multiple executions of S102~S103 (including the first execution of S102~S103), for any substitute industrial control product obtained in this process, the target industrial control product and the substitute industrial control product (i.e., the same substitute industrial control product) obtain multiple substitution indicators (one or more substitution indicators). When S102~S103 is executed for the kth time, the substitution indicator corresponding to the target industrial control product and the substitute industrial control product is denoted as f(k). Specifically, when the target industrial control product and the substitute industrial control product do not obtain substitution indicators, the substitution indicator f(k) = 0. The substitution weights are obtained by weighted summation of f(1), f(2), f(3), ..., f(k), ..., f(K). f(1) represents the substitution index corresponding to the target industrial control product and the substitute industrial control product when S102~S103 is executed for the first time, and f(2) represents the substitution index corresponding to the target industrial control product and the substitute industrial control product when S102~S103 is executed for the second time.
[0111] In the weighted summation, the weight of f(k) is positively correlated with k.
[0112] Similarly, for any conflicting control item obtained in this process, the target control item and the conflicting control item obtain multiple conflict indicators. When executing S102~S103 for the kth time, the conflict indicator corresponding to the target control item and the conflicting control item is denoted as y(k). Specifically, when the target control item and the conflicting control item do not obtain conflict indicators, the conflict indicator y(k) = 0. The conflict weights are obtained by weighted summation of y(1), y(2), y(3), ..., y(k), ..., y(K). y(1) represents the conflict indicator corresponding to the target control item and the conflicting control item when executing S102~S103 for the first time, and y(2) represents the conflict indicator corresponding to the target control item and the conflicting control item when executing S102~S103 for the second time.
[0113] In the weighted summation, the weight of y(k) is positively correlated with k.
[0114] The fact that the weights of f(k) and y(k) are positively correlated with k indicates that as important statements are condensed more frequently (i.e., the larger k is), the evaluation and quantification of conflicting or substitutive relationships will increasingly be based on the product's core and essential differentiating features. At this point, more attention will be paid to the magnitudes of f(k) and y(k) with larger k, thus consolidating and highlighting strong relationships stable across multiple knowledge granularities. For f(k) and y(k) with smaller k, this example weakens weak relationships arising from similar secondary features.
[0115] In summary, this example uses the weighted summation described above to obtain substitution and conflict weights, thereby quantifying conflict or substitution relationships. It not only considers conflict or substitution relationships at different knowledge granularities or levels, making the description of the relationship (conflict or substitution relationship) between the target industrial control product and other industrial control products more comprehensive and complete, but also differentiates and represents the strength of the relationship based on the knowledge granularity or level (i.e., the size of k) covered or involved in these relationships (i.e., weighted summation based on k). This allows for a more comprehensive measurement of the overall correlation between the target industrial control product and other industrial control products at different knowledge levels, ensuring the reliability of the conflict or substitution relationships between the target industrial control product and other industrial control products.
[0116] As an example, the weights of f(k) and y(k) are obtained as follows: Let g(k) = ln(k+1), where g(k) represents the nonlinear transformation result of the logarithmic value k, used to avoid g(k) being too large when k is large, where g(k) is greater than 0; ln() represents the logarithmic function with the natural constant as the base.
[0117] Normalize g(1), g(2), ..., g(k), ..., g(K), and denote the normalized result of g(k) as the weights of f(k) and y(k). The normalization method in this example is: sum g(1), g(2), ..., g(K), and the ratio of g(k) to the summation result is taken as the normalized result of g(k).
[0118] This invention provides a knowledge graph generation system for industrial control products. The system includes a knowledge graph generation module, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor runs the computer program, it implements all the steps of all the above embodiments.
[0119] The system also includes an input module and a display module. The input module contains several input boxes for inputting the user's search text, the number of search results retrieved (recall count), and the number of alternative and conflicting references generated. The display module's monitor displays all search results, their alternative and conflicting references, and whether substitution or conflict relationships exist between search results or between search results and their alternative or conflicting references.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for generating knowledge graphs for industrial control products, characterized in that, The method includes the following steps: S1: The most important statements in the knowledge document of each industrial control product are recorded as important statements; any industrial control product is recorded as the target industrial control product; S2: Based on the important statements of the target industrial control product, obtain all alternative industrial control products and all conflicting industrial control products; condense the important statements of the target industrial control product, including: among all the important statements of the target industrial control product, only retain a few important statements that have the minimum semantic similarity with the important statements of all alternative industrial control products and the maximum semantic similarity with the important statements of all conflicting industrial control products; S3: The semantic similarity between all important statements retained by the target industrial control product and all important statements of each alternative industrial control product, and the semantic opposition between all important statements of each conflicting industrial control product, are respectively denoted as the substitution index between the target industrial control product and each alternative industrial control product and the conflict index between the target industrial control product and each conflicting industrial control product. S4: Repeat S2~S3 several times, and sum the weighted values of all substitution indicators between the target industrial control product and the same alternative industrial control product, and sum the weighted values of all conflict indicators between the target industrial control product and the same conflicting industrial control product. These values are used as the substitution weight and conflict weight of the target industrial control product, respectively. The important statements retained by the target industrial control product are used as the exclusive search statements of the target industrial control product. The substitution weights and conflict weights among all industrial control products constitute a knowledge graph of the exclusive search statements of all industrial control products.
2. The knowledge graph generation method for industrial control products according to claim 1, characterized in that, The most important statements in the knowledge document for each type of industrial control product are recorded as important statements, and the specific steps involved are as follows: For any statement in the knowledge document of any industrial control product, denoted as the target statement, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of each statement in the knowledge document of that industrial control product. Among the cosine similarities between the target statement and all statements in the knowledge document of that industrial control product, the average of the several cosine similarities with the largest values is used to obtain the important indicators within the document of the target statement. For any statement in the knowledge document of any industrial control product other than this type of industrial control product, calculate the cosine similarity between the embedding vector of the target statement and the embedding vector of the statement. The average of the cosine similarities between the target statement and all statements in the knowledge documents of all industrial control products other than this type of industrial control product is used to obtain the important indicators outside the document for the target statement. Based on the important in-document and important out-of-document indicators of all statements in the knowledge document of any industrial control product, important statements are selected from all statements.
3. The knowledge graph generation method for industrial control products according to claim 2, characterized in that, The process of selecting important statements from all statements in the knowledge document of any industrial control product, based on both in-document and out-of-document important indicators, includes the following specific steps: The importance of the target statement is calculated, and the importance is positively correlated with important indicators within the document and negatively correlated with important indicators outside the document. In the knowledge document of any industrial control product, first, all statements with important indicators greater than a first preset threshold are obtained. Then, among all statements with important indicators greater than the first preset threshold, the most important statements are selected and recorded as important statements.
4. The knowledge graph generation method for industrial control products according to claim 1, characterized in that, The specific steps for obtaining all alternative industrial control products and all conflicting industrial control products of the target industrial control product are as follows: Any industrial control product other than the target industrial control product is designated as the reference industrial control product; By performing semantic similarity and semantic opposition detection on any important statement in the target industrial control product and any important statement in the reference industrial control product, the semantic opposition degree and semantic similarity degree of all important statements between the target industrial control product and the reference industrial control product are obtained. For all other industrial control products besides the target industrial control product, obtain the several other industrial control products with the greatest semantic opposition to the target industrial control product, and denot them as conflicting industrial control products; obtain the several other industrial control products with the greatest semantic similarity to the target industrial control product, and denot them as alternative industrial control products.
5. The knowledge graph generation method for industrial control products according to claim 1 or 4, characterized in that, The methods for obtaining the semantic opposition and semantic similarity of all important statements are as follows: For any reference industrial control product other than the target industrial control product, including conflicting industrial control products or alternative industrial control products, any important statement in the target industrial control product is denoted as the first statement. From all important statements of the reference industrial control product, statements that are opposed to the first statement are obtained. The ratio of the number of opposing statements to the number of all important statements of the reference industrial control product is denoted as the opposition coefficient of the first statement. When the maximum value of the opposition coefficient of all important statements in the target industrial control product is greater than 0, the semantic opposition of all important statements is equal to the maximum value of the opposition coefficient. When the maximum value of the opposition coefficient is equal to 0, the semantic similarity of all important statements is equal to the mean cosine similarity of the embedding vectors between all important statements of the target industrial control product and all important statements of the reference industrial control product.
6. The knowledge graph generation method for industrial control products according to claim 5, characterized in that, The specific steps for obtaining the statement that corresponds to the first statement from all important statements of the reference industrial control unit are as follows: Refer to any important statement in the industrial control product and denote it as the second statement; when the cosine similarity between the embedding vector of the first statement and the embedding vector of the second statement is greater than a second preset threshold, the second statement is denoteed as a related statement of the first statement; For all important statements in the reference industrial control product, filter out all related statements of the first statement, and use a neural network model to determine whether each related statement is contradictory to the first statement. Related statements that are contradictory are recorded as statements that are contradictory to the first statement.
7. The knowledge graph generation method for industrial control products according to claim 1, characterized in that, The specific steps involved in condensing the key statements of the target industrial control product are as follows: Any important statement of the target industrial control product is denoted as the first statement; calculate the cosine similarity between the embedding vectors of the first statement and the important statements of all the alternative industrial control products, and the mean of the several cosine similarities with the largest values is denoted as the first similarity of the first statement; calculate the cosine similarity between the embedding vectors of the first statement and the important statements of all the conflicting industrial control products, and the mean of the several cosine similarities with the largest values is denoted as the second similarity of the first statement. Obtain the retention index of the first statement, which is negatively correlated with the first similarity and positively correlated with the second similarity; among all important statements of the target industrial control product, only the several important statements with the largest index are retained, and the remaining important statements are deleted.
8. The knowledge graph generation method for industrial control products according to claim 1, characterized in that, The specific steps for obtaining the substitution weight and conflict weight of the target industrial control product are as follows: Let K be the total number of executions of S2~S3; let f(k) be the substitution index corresponding to the target industrial control product and the same substitute industrial control product when S2~S3 is executed for the kth time. When the target industrial control product and the substitute industrial control product do not obtain a substitution index, let the substitution index f(k) = 0; perform a weighted summation on f(1), f(2), f(3), ..., f(k), ..., f(K) to obtain the substitution weight, where the weight of f(k) is positively correlated with k when performing the weighted summation. When executing S2~S3 for the kth time, the conflict index corresponding to the target industrial control product and the same conflicting industrial control product is denoted as y(k). When the target industrial control product and the conflicting product do not obtain a conflict index, the conflict index y(k) = 0. The conflict weights are obtained by weighted summation of y(1), y(2), y(3), ..., y(k), ..., y(K). The weight of y(k) during the weighted summation is positively correlated with k.
9. The knowledge graph generation method for industrial control products according to claim 1, characterized in that, The nodes in the knowledge graph represent each industrial control product, and the specific search statement serves as the attribute of each node. If there is a substitution weight between any two nodes, the maximum value of the substitution weight between the nodes is recorded as the edge weight, and the edge is assigned an attribute label: substitution relationship; If there is a conflict weight between any two nodes, the maximum value of the conflict weight between the nodes is also recorded as the edge weight, and the edge is assigned an attribute label: conflict relationship; When a user searches using the knowledge graph, the process includes: matching the user-input text with specific search queries for all industrial control products to obtain several search results; for any search result, retrieving the industrial control products with the largest edge weights in the knowledge graph that are connected to the search result and belong to a substitution relationship, and recording them as substitution references; retrieving the industrial control products with the largest edge weights in the knowledge graph that are connected to the search result and belong to a conflict relationship, and recording them as conflict references; and displaying the substitution references and conflict references of all search results to the user.
10. A knowledge graph generation system for industrial control products, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor runs the computer program, it implements all the steps of the knowledge graph generation method for industrial control products according to any one of claims 1 to 9; the system further includes an input module and a display module. The input module contains several input boxes, which are used to input the user's search text, as well as the number of recalls, alternative references and conflicting references generated for the search results; the display in the display module is used to display all search results and all alternative references and conflicting references of the search results.