Smart home quality safety determination method based on affair knowledge graph

Through the method based on the knowledge graph of matters, a map of the quality and safety issues of smart homes is constructed, which solves the risk control and cause analysis of quality and safety issues in smart home products, and realizes accurate assessment and visual analysis of the quality and safety issues of smart homes, improving the Product safety and production efficiency.

CN119089065AInactive Publication Date: 2024-12-06CHINA UNIV OF MINING & TECH (BEIJING) +1

Patent Information

Application Number
CN202411132839.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the use of smart home products, quality and safety issues frequently occur due to functional safety or quality defects, resulting in threats to the safety of consumers' lives, health and property. It is difficult for existing technology to effectively control the risk of smart home quality and safety and analyze the causes.

Method used

Using a method based on factual knowledge graph, data collection, preprocessing, event type identification, event relationship extraction, event factor extraction and event generalization of smart home quality and safety issues through the framework of data layer, map construction layer and display application layer , construct abstract matter maps and factual knowledge maps to realize accurate assessment and visual analysis of smart home quality and safety issues.

Benefits of technology

It improves the accuracy of smart home quality and safety risk control and production operation efficiency, provides knowledge assistance for smart home product design, production, manufacturing, and maintenance, reduces product use risks and improves product safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089065A_ABST
    Figure CN119089065A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a smart home quality safety determination method based on a affair knowledge graph, and the method comprises the steps: building a frame, which is used for building a frame comprising a data layer, a graph construction layer, and a display application layer; wherein the data layer part is used for crawling related data from a corresponding website for the analysis requirement of the quality safety problem of the smart home, and completing data preprocessing work by using a natural language processing tool; the graph construction layer part is used for respectively completing event type identification, event relation extraction, event element extraction and event generalization work according to the construction process of the affair knowledge graph based on the data of the data layer; and the display application layer part is used for putting the event element extraction knowledge and the event generalization result into a graph database for storage and visualization, and analyzing an abstract affair graph evolution path and an affair knowledge graph application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application proposes a data processing method, particularly a method for determining the quality and safety of smart homes based on a knowledge graph. Background Art

[0002] Consumer product safety is related to the safety of people's lives and property. The Chinese government attaches great importance to this. A series of national documents have made clear requirements for the improvement of consumer product standards and quality levels. In recent years, smart products have developed rapidly. According to a report released by CSHIA, China will become the world's largest smart home market. However, since smart home products are not yet mature, they may cause quality and safety problems during use due to quality and safety risks such as their own functional safety or defects, thereby causing varying degrees of damage to consumers' lives, health and property safety.

[0003] In recent years, knowledge graphs have been developing continuously. Many research institutions at home and abroad have established some large-scale general knowledge graphs [1], YAGO [2, 3], Freebase [4], Baidu Zhixin, Sogou Zhilifang, etc. As a leading technology of knowledge engineering, knowledge graphs meet the current needs of product manufacturing for efficient knowledge acquisition and auxiliary production and manufacturing decision-making [5, 6]. Therefore, they have been widely studied in the field of product manufacturing [16, 18, 22]. The event graph was first proposed by Professor Liu Ting [7] at the 2017 China Computer Conference. It uses big data technology and efficient and easy-to-read graph form to mine and present predicate event phrases and their internal and external relationships [8]. Compared with knowledge graphs, event graphs can not only help people quickly grasp the direction of event changes, but also help to explore the development laws of events [9]. The event knowledge graph continues to improve on the basis of the event graph, combining the static knowledge of the knowledge graph with the event logic knowledge of the event graph to form a two-layer structure graph, which can provide a logical reasoning framework based on multi-modal knowledge association [9, 10].

[0004] There are studies on the construction of event graphs and knowledge graphs in many fields. Generally speaking, they are mainly concentrated in the fields of finance[9] and public opinion[11,12], emergencies

[13] , safety accidents

[14] , and intelligent manufacturing

[15] . In the field of product manufacturing, the application of knowledge graphs and event graphs is mainly to support decision-making in different application scenarios. In the equipment failure operation and maintenance scenario, the main research is on the integration and application of prior knowledge data. Wu Chuang et al.[6], Guo Heng et al.

[16] , and Liu Gen et al.

[17] all integrated fault maintenance data for specific product systems to build knowledge graphs to assist in product operation and maintenance. There are also studies focusing on building knowledge graphs to predict and infer faults. Xiao Falun

[18] , Zhou Bin et al.

[19] , and Deng Jianfeng et al.

[15] targeted specific equipment failure data, mined causal association data, built knowledge graphs to achieve fault diagnosis and early warning to assist in actual equipment operation and maintenance. In the manufacturing quality control scenario, Gao Long et al. studied the technical system and path of data intelligent quality management, and selected a certain unit's aviation products to carry out applications such as quality problem cause classification, quality reason map construction, and reason knowledge push, as well as prototype system construction

[20] . In the data integration part of product manufacturing system, the main research is to build a knowledge graph to realize the integration of existing knowledge data in the manufacturing process to provide knowledge services. Song Dengqiang et al. proposed a knowledge graph dynamic generation and update method based on processing beat data flow to construct a dynamic knowledge graph in the field of shipbuilding

[21] ; Xiong Ao et al. proposed a knowledge modeling and analysis method for nuclear power equipment health management based on knowledge graph, and extracted knowledge from the actual maintenance work order data of nuclear power enterprises to provide decision-making and knowledge support for maintenance personnel and management personnel

[22] . In the product design and development part, Jian Chengfeng et al. built a STEP knowledge graph with semantic associations between product structure geometric knowledge and non-geometric knowledge

[23] in response to the demand for semantic knowledge mining of design intent.

[0005] On the whole, there is still little research on the cause-and-effect graph in the field of product manufacturing, which mainly focuses on the use of cause-and-effect graphs to diagnose and analyze equipment failures and the cause-and-effect analysis of quality problems. There is less mining of prior knowledge and causal information in the field of product manufacturing. However, at the same time, prior knowledge and causal information in the field of product manufacturing provide important support for reliable explanation of tasks in the fields of product design, production and manufacturing, so constructing a cause-and-effect graph in the field of product manufacturing and analyzing the logic behind it will become a research focus. There is a large amount of prior knowledge and causal knowledge in smart home quality and safety incidents, which can trace the causes and analyze the risks of quality and safety issues. The embodiment of this application is aimed at the risk control of smart home quality and safety issues, and constructs a cause-and-effect knowledge graph with knowledge-driven quality and safety issue event association and evolution as the entry point. On the one hand, the logical evolution knowledge of the cause-and-effect layer can assist the smart home quality and safety risk control, and on the other hand, the event instance knowledge of the knowledge layer can assist the fine-grained knowledge query of smart home quality and safety issues, thereby improving production and operation efficiency.

[0006] To facilitate public understanding, reference documents [1] to

[18] related to the background technology of this application are listed below, and the entire text of these reference documents is cited here:

[0007] [1]BIZER C, LEHMANN J, KOBILAROV G, et al.DBpedia-Acrystallization point for the Web ofData[J].JOURNAL OF WEB SEMANTICS, 2009, 7(3):154-165.

[0008] [2]FABIAN SUCHANEK GMK G.Yago:A Core of Semantic Knowledge UnifyingWordNet and Wikipedia[J].16th international conference on World Wide Web, 2007.

[0009] [3]HOFFART J, SUCHANEK FM, BERBERICH K, et al. YAGO2: Aspatially and temporally enhanced knowledge base from Wikipedia[J]. Artificial Intelligence, 2013, 194:28-61.

[0010] [4]BOLLACKER K, EVANS C, PARITOSH P, et al. Freebase: acollaboratively created graph database for structuring human knowledge: ACM, 2008.

[0011] [5] Tao Jiaqi, Li Xinyu, Zheng Pai, et al. Application research status and frontiers of knowledge graph in manufacturing field [J]. Computer Integrated Manufacturing Systems: 1-32.

[0012] [6] Wu Chuang, Zhang Liang, Tang Xilang, et al. Construction and application of knowledge graph for aircraft engine lubrication system faults[J]. Journal of Beijing University of Aeronautics and Astronautics: 1-14.

[0013] [7]Li, Z., Zhao, S., Ding, X., Liu, T. (2017).EEG:Knowledge Base for EventEvolutionary Principles and Patterns.In:Cheng, Science, vol 774. Springer, Singapore. https: / / doi.org / 10.1007 / 978-981-10-6805-8_4

[0014] [8] Deng Jun, Peng Jun, Sun Shaodan, Ju Hailong. Knowledge discovery of travel notes based on event graph: a case study of health tourism[J]. Modern Intelligence, 2022, 07(42): 105-113.

[0015] [9] Liu Zhenghao, Zeng Xi, Zhang Zhijian. Research on the construction and analysis of knowledge graph of financial emergencies for emergency management[J]. Journal of Information Resources Management, 2022, 12(3):137-151.

[0016]

[10] Zhang Shiying, Li Yang. Emergency intelligence support path and empirical research integrating knowledge graph and network public opinion analysis: taking hazardous chemicals accidents as an example [J]. Journal of Information Resources Management, 2023, 13(04): 60-71.

[0017]

[11] Xu Hailing. Research on the evolution path of multi-dimensional characteristics of network public opinion based on the event graph[J]. Information Science, 2022, 40(07): 48-54.

[0018]

[12] Shan Xiaohong, Pang Shihong, Liu Xiaoyan, et al. Research on prediction method of online public opinion events based on event graph [J]. Intelligence Theory and Practice, 2020, 43(10): 165-170, 156.

[0019]

[13] Liu Yashu, Luan Yu, Zhou Honglei, et al. Research on the dynamic evolution of major emergencies based on event graphs[J]. Library and Information Work, 2022, 66(10):143-151.

[0020]

[14] Lin Chuan, Xu Qifeng, Huang Yifan. Preventive control method of power safety accidents based on event graph[J]. China Safety Science and Technology, 2021, 17(10):39-45.

[0021]

[15] Deng Jianfeng, Wang Tao, Cheng Lianglun. Research on the construction of knowledge graph of logic for robot fault diagnosis[J / OL]. Computer Engineering and Applications: 1-10[2022-11-10].http: / / kns.cnki.net / kcms / detail / 11.2127.TP.20220629.1249.016.html[Z].

[0022]

[16] Guo Heng, Li Rong, Zhang Haizhu, et al. Construction of knowledge graph for high-speed train maintainability design based on multi-domain integration[J]. China Mechanical Engineering, 2022.

[0023]

[17] Liu Gen, Hong Ge, Leng Bohan, et al. Integrated modeling of automobile operation and maintenance expert system based on knowledge graph [J]. Industrial Engineering and Management, 2022, 27(05): 19-27.

[0024]

[18] Xiao Falong, Wu Yuezhong, Shen Xuehao, et al. Intelligent diagnosis of substation equipment faults based on deep learning and knowledge graph [J]. Electric Power Construction, 2022, 43(03): 66-74.

[0025]

[19] Zhou Bin, Hua Bao, Lu Yuqian, et al. Causal knowledge modeling method for root cause analysis of equipment inspection failures[J]. Computer Integrated Manufacturing Systems: 1-22.

[0026]

[20] Gao Long, Wei Qingyan, Tao Jian, et al. Research on aviation data intelligence technology enabled by event graph[J]. Progress in Aeronautical Engineering, 2022: 1-13.

[0027]

[21] Song Dengqiang, Zhou Bin, Shen Xingwang, et al. Dynamic knowledge graph modeling method for ship segment manufacturing process[J]. Journal of Shanghai Jiaotong University, 2021, 55(05): 544-556.

[0028]

[22] Xiong Ao, Gao Chang, Zhao Minghui, et al. Knowledge modeling and analysis of nuclear power equipment health management based on knowledge graph [J]. Science and Technology for Development, 2021, 17(04): 640-649.

[0029]

[23] Jian Chengfeng, Lin Chong, Zhang Lijun, et al. Research on key technologies of STEP knowledge graph for design intent[J]. Small and Micro Computer Systems, 2020, 41(03): 648-655. Summary of the invention

[0030] This application provides a data processing method that can more accurately evaluate the quality and safety of smart homes based on a knowledge graph.

[0031] In order to achieve the above-mentioned purpose, the embodiment of the present application proposes a method for determining the quality and safety of a smart home based on a knowledge graph, including:

[0032] The steps of establishing a framework are used to establish a framework including a data layer, a graph construction layer and a display application layer; wherein: the data layer is used to crawl relevant data from the corresponding website to meet the needs of smart home quality and safety problem analysis, and use natural language processing tools to complete data preprocessing; the graph construction layer is based on the data in the data layer and follows the construction process of the knowledge graph to complete event type identification, event relationship extraction, event element extraction, and event generalization; the display application layer stores event element extraction knowledge and event generalization results in a graph database for storage and visualization, and analyzes the evolution path of the abstract graph and the application value of the knowledge graph.

[0033] Wherein, the step of establishing a framework includes:

[0034] Step 1: Data collection and preprocessing steps:

[0035] Access to domestic and foreign data,

[0036] Foreign data include: U.S. CPSC recall information on Chinese consumer products, which comes from the China Technical Trade Measures website and Shenzhen Institute of Standards and Technology; EU RAPEX recall information on Chinese consumer products, which comes from the China Technical Trade website and Shenzhen Institute of Standards and Technology; Canadian Ministry of Health recall information on Chinese consumer products, which comes from the China Technical Trade website;

[0037] Domestic data include: recall information of domestic consumer products in China from the State Administration for Market Regulation and provincial and municipal market supervision administrations, which comes from the China Product Safety and Recall Information Network; consumer complaints about products purchased on various e-commerce platforms, which comes from the Black Cat Complaint Platform;

[0038] Preprocess the aforementioned domestic and foreign data, including sentence segmentation, word segmentation, and part-of-speech tagging;

[0039] Step 2, event ontology construction step: refine the event concept around the three dimensions of people-product-environment. The relationship part is the semantic relationship between node events and the relationship between concepts. The concept layer includes the node events divided, including human factor node events, product layer node events, system-level hazards and system-level accidents; each node event contains the subdivided concept levels involved. The human factor node events correspond to consumer behavior, which refers to the behavior of consumers directly participating in the product life cycle; the product layer node events mainly include product components, product safety constraints and product layer unsafe control behaviors. Product layer unsafe control behaviors refer to product safety problems caused by problems in the design, production and manufacturing processes. The quality insecurity or the risk source due to the characteristics of the product itself; the system-level hazard corresponds to the accident hazard link, which refers to the dangerous event that directly causes the accident at the system level; the system-level accident corresponds to the product safety accident, which refers to the final accident result of the product quality and safety problem event; environmental factors refer to the surrounding environmental factors during the product's life cycle, because environmental factors exist when other node events occur, so they are not divided as separate node events; the semantic relationship in the relationship layer refers to the causal relationship, conditional relationship, sequential relationship and parallel relationship between each node event, and the conceptual relationship refers to the relationship between each subdivided concept level under the concept of each node event;

[0040] Step 3: Knowledge graph construction steps, including:

[0041] Step 31, event type identification sub-step, specifically includes:

[0042] (2) Event trigger word identification and screening: Use the LTP tool to perform dependency syntactic analysis, extract and screen the subject-predicate relationship SBV, verb-object relationship VOB, prepositioned object FOB and core relationship HED in the event corpus, and extract the core verbs representing the event type; the extraction rules involving core verbs are as follows: A1. If a verb in a sentence is the core word of both the SBV subject-predicate relationship and the VOB verb-object relationship, it is taken as the core verb of the sentence; A2. If there is no verb that meets rule 1, the core word in any combination of the HED core relationship and the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence is taken as the core verb; A3. If neither of the above two rules is met, the core word in the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence is taken as the core verb; A4. If none of the above three rules are met, the sentence is not an event sentence and core verb extraction is not performed;

[0043] (2) Event type recognition model: The classic model TextCNN in text classification tasks is used to combine the trigger word position feature to perform text type classification tasks. When performing event type recognition, the event trigger word position is embedded and represented, and then concatenated with the text semantic vector to perform event type recognition and trigger word position embedding process.

[0044] Step 32: Event relationship extraction sub-step:

[0045] According to the above steps, the quality and safety problem events are divided into node events based on the event body, and the two node events constitute a candidate node event pair. Event relationship extraction is to extract the relationship between the candidate node events; wherein the relationship between the smart home product quality and safety problem events includes: causal relationship, conditional relationship, sequential relationship and parallel relationship, among which causal relationship and conditional relationship are the main ones, and sentences with clear relationship prompt words account for the majority of the four types of relationships. Therefore, the embodiment of the present application distinguishes between explicit relationship and implicit relationship in the extraction of causal relationship and conditional relationship, and uniformly adopts implicit relationship extraction method for sequential relationship and parallel relationship for extraction;

[0046] The summary of event relationship prompt words mainly comes from semantic dictionary HowNet and related literature. At the same time, combined with the data characteristics of this research field, event relationship extraction prompt words for template extraction are screened and corresponding template matching is constructed. After obtaining the event relationship pairs after template matching, the accuracy of event pair relationship discrimination by template matching is statistically analyzed;

[0047] In event implicit relation extraction, the event implicit relation extraction task is regarded as a classification task, and the TextCNN model is used to extract the semantic features of event sentence pairs;

[0048] Step 33, event element extraction sub-step:

[0049] Smart home quality and safety event elements refer to the description of key node events during the occurrence of quality and safety events, including the entity of the event, its attributes, and the specific form of event changes; the event elements involved in the quality and safety event ontology include:

[0050] Product name, used to indicate the product name described in the product quality and safety issue incident;

[0051] Product parts, used to represent the product parts described in the product quality and safety incident;

[0052] Product safety items are used to indicate the safety items that a product needs to meet the standard requirements;

[0053] Safety standards, which are used to indicate the safety standards that a product needs to meet;

[0054] Product-level unsafe control behavior is used to indicate the unsafe control behavior of the product in the system control loop, which is a product factor that may cause system risk;

[0055] Accident-risk link is used to indicate a dangerous state of a system that will lead to an accident under certain most unfavorable conditions;

[0056] Environmental factors are used to indicate the external environment conditions in which the product is used;

[0057] Consumer behavior, which refers to the behavior of consumers in quality and safety incidents;

[0058] Product safety incidents are used to refer to incidents involving product quality and safety issues;

[0059] In the corresponding node event, the relevant event elements are extracted and composed to fully describe the event. Most of the above event elements can be directly combined to complete the semantic representation. However, the word "non-compliant" is often used as a semantic connector between the two event elements "product safety items" and "safety standards" to represent the event. Therefore, after obtaining these two event elements, the embodiment of the present application automatically adds the word "non-compliant" to represent the event.

[0060] Event extraction is information extraction, which can be considered as a sequence labeling task. The embodiment of this application adopts the BMOES labeling system, introduces a large language model to label the initial sample, and assists in the labeling process of event elements through a prompt-based fine-tuning method. First, a relevant prompt question-and-answer template for the large language model is constructed to guide the large language model to understand the semantic meaning of event elements; secondly, appropriate labeling examples are constructed to assist the large language model in learning; after obtaining the labeling results of the large language model, manual review and proofreading are performed in combination with domain knowledge;

[0061] Step 34, event generalization sub-step:

[0062] In order to further obtain the characteristics and evolutionary relationship of domain events in the field of quality and safety problem events, each node event is generalized to summarize the evolutionary characteristics of the quality and safety problem event field. The embodiment of the present application uses event comprehensive similarity calculation to generalize node events, and the comprehensive similarity calculation considers both the event description sentence similarity and the event element similarity. The event description sentence similarity uses the cosine distance similarity to calculate the semantic similarity of the event description sentence. The event description sentence is vectorized by Bert coding, and the cosine distance is used to calculate the event description sentence similarity. The formula is shown in (5), where V1k and V2k represent the representation vectors of events E1 and E2, respectively.

[0063]

[0064] The event element similarity is measured by the Jaccard coefficient between all event elements of two event sentences. The Jaccard coefficient refers to the ratio of the number of elements in the intersection of two sets X and Y to the number of elements in the union of X and Y. The formula for calculating the event element Jaccard coefficient is shown in (6), where X refers to the event element of node event E1, and Y refers to the event element of node event E2.

[0065]

[0066] After obtaining the event description similarity results and event element similarity results, the event comprehensive similarity is calculated. The calculation formula is as follows: event pairs whose event comprehensive similarity results are higher than the threshold of 0.5 are generalized as node events.

[0067] Sim(E1,E2)=0.6*Sim sem (E1,E2)+0.4*Sim ent (E1,E2) (7)

[0068] After the similarity fusion of events, the generalized abstract event nodes need to be named, mainly based on the common parts of the original event node descriptions, and combined with domain knowledge, the abstract event nodes are named. Finally, the abstract nodes corresponding to the event types of each node are obtained, including: product-level events, system-level hazards, human-level events, and system-level accidents.

[0069] Step 33, event transition probability calculation sub-step:

[0070] Based on the generalized event nodes, the causal relationship between events is mainly used to calculate the transition probability between causal events. The formula is shown in (8), where count(e i , e j ) represents event e i Occurs and event e j The frequency of occurrence, ∑ k count(e i , e k ) means in e i The number of all possible events that may occur if the event occurs

[0071]

[0072] Wherein, the method further comprises:

[0073] Step 4: Knowledge graph display steps, including:

[0074] Step 41: Abstract Principle Diagram Display Sub-step

[0075] Gephi is used as a visualization tool for abstract event graphs. The generalization results of causal events are stored in csv files and imported into Gephi for visualization. In the abstract event graphs, different colors indicate different types of node events. Green represents product-level events, purple represents system-level dangerous node events, blue represents human-level events, and orange represents system-level accident node events. Through the abstract event graph, we can clearly see the node events with large in-degree and out-degree in smart home quality and safety problem events. The evolutionary paths represented by these events are often the evolutionary paths that need to be focused on. The node sizes are displayed according to the in-degree and out-degree sizes of the nodes, and the transfer probability size is displayed as the weight of the edge. The larger the weight of the edge, the thicker the edge, so as to perform evolutionary path analysis. The analysis results help smart home manufacturers to grasp the development context and internal connections of quality and safety problem events.

[0076] Step 42: Display of knowledge graph

[0077] Neo4j is a high-performance graph database that stores structured data in graphs. Based on the visualization platform that comes with the neo4j graph database itself, the graph can be visualized well, and the data stored in the database can be visualized well. At the same time, neo4j provides a user-friendly web interface for addition, modification, query and other related operations. The training annotation data and the extracted data are imported into the neo4j database, and a total of 6652 triples are imported. With the help of cypher language, the obtained triples are imported into neo4j in csv format to realize the storage and visualization of the smart home quality and safety problem graph.

[0078] The beneficial effects of the above technical scheme of the present application are as follows: the above technical scheme involves the field of smart home quality and safety, constructs a knowledge graph of smart home quality and safety issues, provides knowledge assistance for the fields of smart home product design, manufacturing and maintenance, extracts events in the field of smart home quality and safety from top to bottom, and based on the smart home quality and safety issue event ontology, completes event type identification, event relationship and event element extraction in sequence according to the graph construction process, and generalizes the event to construct an abstract graph, and performs event evolution logic analysis on smart home quality and safety issue events; finally, the causal event chain and event knowledge extraction results are stored in a graph database to realize the visualization of the knowledge graph, so as to assist in the optimization and improvement of existing smart home products, improve product quality, reduce product use risks and improve product safety. The embodiment of the present application is oriented to the field of smart home quality and safety issues, crawls smart home quality and safety issue events, analyzes the data characteristics of the field of smart home quality and safety issues, conducts research on the construction of quality and safety issue event ontology, event type identification, event and event relationship extraction, event generalization and event transition probability calculation, and realizes event visualization in the form of a graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A schematic diagram of the architecture of an embodiment of the present application;

[0080] Figure 2 A schematic diagram of an event ontology in the field of quality and safety issues in an embodiment of the present application;

[0081] Figure 3 A schematic diagram of trigger word position embedding representation according to an embodiment of the present application;

[0082] Figure 4 A schematic diagram showing an abstract concept map of an embodiment of the present application;

[0083] Figure 5 A schematic diagram of the knowledge graph of an embodiment of the present application. DETAILED DESCRIPTION

[0084] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0085] The present application provides a method for determining the quality and safety of a smart home based on a knowledge graph, including:

[0086] Establish as Figure 1 The architecture shown in the figure is divided into the data layer, the graph construction layer and the display application layer. Figure 1As shown in the figure, the data layer part, aimed at the needs of smart home quality and safety problem analysis, crawls relevant data from the corresponding website, and uses natural language processing tools to complete data preprocessing; the graph construction layer part, based on the data of the data layer, completes event type identification, event relationship extraction, event element extraction, and event generalization in accordance with the construction process of the knowledge graph; the application layer part puts the event element extraction knowledge and event generalization results into the graph database for storage and visualization, and analyzes the evolution path of the abstract graph and the application value of the knowledge graph.

[0087] Step 1: Data collection and preprocessing steps:

[0088] Data collection and preprocessing Consumer product safety is related to the safety of people's lives and property. The Chinese government attaches great importance to this. A series of national documents have made clear requirements for the improvement of consumer product standards and quality levels. In recent years, smart products have developed rapidly. According to a report released by CSHIA, China will become the world's largest smart home market. However, since smart home products are not yet mature, they may cause quality and safety problems during use due to quality and safety risks such as their own functional safety or defects, thereby causing varying degrees of damage to consumers' lives, health and property safety.

[0089] In recent years, knowledge graphs have been developing continuously. Many research institutions at home and abroad have established some large-scale general knowledge graphs [1], YAGO [2, 3], Freebase [4], Baidu Zhixin, Sogou Zhilifang, etc. As a leading technology of knowledge engineering, knowledge graphs meet the current needs of product manufacturing for efficient knowledge acquisition and auxiliary production and manufacturing decision-making [5, 6]. Therefore, they have been widely studied in the field of product manufacturing [16, 18, 22]. The event graph was first proposed by Professor Liu Ting [7] at the 2017 China Computer Conference. It uses big data technology and efficient and easy-to-read graph form to mine and present predicate event phrases and their internal and external relationships [8]. Compared with knowledge graphs, event graphs can not only help people quickly grasp the direction of event changes, but also help to explore the development laws of events [9]. The event knowledge graph continues to improve on the basis of the event graph, combining the static knowledge of the knowledge graph with the event logic knowledge of the event graph to form a two-layer structure graph, which can provide a logical reasoning framework based on multi-modal knowledge association [9, 10].

[0090] There are studies on the construction of event graphs and knowledge graphs in many fields. Generally speaking, they are mainly concentrated in the fields of finance[9] and public opinion[11,12], emergencies

[13] , safety accidents

[14] , and intelligent manufacturing

[15] . In the field of product manufacturing, the application of knowledge graphs and event graphs is mainly to support decision-making in different application scenarios. In the equipment failure operation and maintenance scenario, the main research is on the integration and application of prior knowledge data. Wu Chuang et al.[6], Guo Heng et al.

[16] , and Liu Gen et al.

[17] all integrated fault maintenance data for specific product systems to build knowledge graphs to assist in product operation and maintenance. There are also studies focusing on building knowledge graphs to predict and infer faults. Xiao Falun

[18] , Zhou Bin et al.

[19] , and Deng Jianfeng et al.

[15] targeted specific equipment failure data, mined causal association data, built knowledge graphs to achieve fault diagnosis and early warning to assist in actual equipment operation and maintenance. In the manufacturing quality control scenario, Gao Long et al. studied the technical system and path of data intelligent quality management, and selected a certain unit's aviation products to carry out applications such as quality problem cause classification, quality reason map construction, and reason knowledge push, as well as prototype system construction

[20] . In the data integration part of product manufacturing system, the main research is to build a knowledge graph to realize the integration of existing knowledge data in the manufacturing process to provide knowledge services. Song Dengqiang et al. proposed a knowledge graph dynamic generation and update method based on processing beat data flow to construct a dynamic knowledge graph in the field of shipbuilding

[21] ; Xiong Ao et al. proposed a knowledge modeling and analysis method for nuclear power equipment health management based on knowledge graph, and extracted knowledge from the actual maintenance work order data of nuclear power enterprises to provide decision-making and knowledge support for maintenance personnel and management personnel

[22] . In the product design and development part, Jian Chengfeng et al. built a STEP knowledge graph with semantic associations between product structure geometric knowledge and non-geometric knowledge

[23] in response to the demand for semantic knowledge mining of design intent.

[0091] On the whole, there is still little research on the cause-and-effect graph in the field of product manufacturing, which mainly focuses on the use of cause-and-effect graphs to diagnose and analyze equipment failures and the cause-and-effect analysis of quality problems. There is less mining of prior knowledge and causal information in the field of product manufacturing. However, at the same time, prior knowledge and causal information in the field of product manufacturing provide important support for reliable explanation of tasks in the fields of product design, production and manufacturing, so constructing a cause-and-effect graph in the field of product manufacturing and analyzing the logic behind it will become a research focus. There is a large amount of prior knowledge and causal knowledge in smart home quality and safety incidents, which can trace the causes and analyze the risks of quality and safety issues. The embodiment of this application is aimed at the risk control of smart home quality and safety issues, and constructs a cause-and-effect knowledge graph with knowledge-driven quality and safety issue event association and evolution as the entry point. On the one hand, the logical evolution knowledge of the cause-and-effect layer can assist the smart home quality and safety risk control, and on the other hand, the event instance knowledge of the knowledge layer can assist the fine-grained knowledge query of smart home quality and safety issues, thereby improving production and operation efficiency.

[0092] According to the source channels as shown in Table 1, foreign data comes from recall reports of Chinese products by relevant organizations, and domestic data comes from the recall announcements of defective products in my country by the State Administration for Market Regulation, as well as consumer complaint data on platforms such as Black Cat Complaints. Crawler tools such as Octopus and Houyi Collector were used to crawl consumer product quality and safety incidents from the above-mentioned related websites. Secondly, mainly based on the research object smart home products, the quality and safety incidents of products, related components, and similar products were used as the basis for crawling. A total of 10,767 event case data from 2008 to 2023 were crawled, and the crawled data were screened to obtain 2,030 strongly related data.

[0093] Table 1 Data source type

[0094]

[0095] Before event type recognition, event relationship extraction, and event element extraction are performed on event sentences, data preprocessing is performed on the sentence corpus, mainly including sentence segmentation, word segmentation, and part-of-speech tagging. Currently, mainstream natural language processing tools include Stanford Core NLP, hanlp, jieba, and LTP. The embodiment of this application uses the LTP tool that can perform both dependency syntactic analysis and semantic role tagging to perform data preprocessing on event sentences.

[0096] Step 2: Event ontology construction steps:

[0097] Event ontology is a knowledge representation model with events as the core. It can clearly describe events, event elements, and various relationships between events. It is the logical framework for constructing event graphs[8]. By analyzing the data characteristics in this field, the ontology of quality and safety issue events is constructed from two parts: concepts and relationships. Figure 2As shown in the figure, the event concept is refined around the three dimensions of people-product-environment, and the relationship part is mainly the semantic relationship between node events and the relationship between concepts. The concept layer includes the divided node events, including human factor layer node events, product layer node events, system-level hazards and system-level accidents. Each node event contains the subdivided concept levels involved. The human factor layer node events mainly correspond to consumer behaviors, which refer to the behaviors of consumers directly participating in the product life cycle; the product layer node events mainly include product components, product safety constraints and product layer unsafe control behaviors. Product layer unsafe control behaviors refer to the quality insecurity of products caused by problems in the design, production, manufacturing and other processes, or the risk sources existing due to the characteristics of the products themselves; system-level hazards correspond to accident hazard links, which refer to the dangerous events that most directly lead to accidents described at the system level; system-level accidents correspond to product safety accidents, which refer to the final accident results of product quality and safety incidents; environmental factors refer to the surrounding environmental factors during the product's life cycle. Because environmental factors are factors that exist when other node events occur, they are not divided as separate node events; the semantic relationship in the relationship layer refers to the causal relationship, conditional relationship, sequential relationship and parallel relationship between each node event, and the conceptual relationship refers to the relationship between each subdivided concept level under the concept of each node event.

[0098] Step 3: Knowledge graph construction steps, including:

[0099] Step 31, event type identification sub-step:

[0100] (1) Event trigger word identification and screening

[0101] Event trigger words are usually the core verbs in event sentences. The event type represented by the event can be identified by identifying the event trigger words. The embodiment of the present application first uses the LTP tool to perform dependency syntactic analysis, extracts and screens the subject-predicate relationship SBV, the verb-object relationship VOB, the prepositioned object FOB and the core relationship HED in the event corpus. The four syntactic relationship explanations are shown in Table 2, and the core verbs representing the event type are extracted. The extraction rules of core verbs are designed as follows: 1. If a verb in a sentence is the core word of both the SBV subject-predicate relationship and the VOB verb-object relationship, it will be used as the core verb of the sentence; 2. If there is no verb that meets rule 1, the core word in any combination of the HED core relationship and the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence will be used as the core verb; 3. If neither of the above two rules is satisfied, the core word in the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence will be used as the core verb; 4. If none of the above three rules are satisfied, the sentence is not an event sentence, and core verb extraction is not performed. According to the above rules, some trigger words are obtained by manual screening and matching. It is found that in the data of this field, the core verbs of different types of events are not clearly distinguished and do not have strong domain characteristics. Therefore, the core verbs and the dependent words that depend on the core verbs are used as the trigger words of the event sentence, which has a more obvious distinction than the core verbs.

[0102] Table 2 Dependency syntactic relations

[0103]

[0104] (2) Event type recognition model

[0105] If we only rely on the core words obtained by dependency syntactic analysis and rule recognition to distinguish different event types, it will increase the manual workload and inaccurate recognition. Therefore, we use a method that combines the classic model TextCNN in text classification tasks with the trigger word position feature to perform text type classification tasks. When performing event type recognition, the event trigger word position is embedded and represented, and then concatenated with the text semantic vector for event type recognition. The trigger word position embedding process is as follows: Figure 3 shown.

[0106] A total of 3755 data were annotated, and the parameter setting values ​​are shown in Table 3, the overall results of the algorithm are shown in Table 4, and the results of each classification are shown in Table 5. It can be seen from the overall result Table 4 that only the core verb is used as the event trigger word, and its position feature is embedded in the TextCNN model for training. The R value and F1 value are slightly improved compared with using only the TextCNN model, but the core verb and the dependent word are used as event trigger words at the same time, and their position features are embedded in the TextCNN model for training. The three values ​​are greatly improved compared with the other two methods; and it can be seen from the result Table 5 of each classification that the method of embedding the position features of the core verb and the dependent word into the TextCNN model at the same time has a more uniform classification effect on each type, while the other two methods are significantly lower than the other classifications in the classification of human factor layer event categories; Therefore, the embodiment of the present application selects the method of embedding the position features of the core verb and the dependent word into the TextCNN model as the method of event type recognition to complete the event type recognition task.

[0107] Table 3 Parameter settings

[0108]

[0109] Table 4 Overall results of the model

[0110] Model P R F1 Bert-TextCNN 0.876 0.857 0.864 Trigger word (core verb) position feature-Bert-TextCNN 0.873 0.860 0.865 Trigger word (core verb + dependent word) position feature - Bert-TextCNN 0.891 0.876 0.882

[0111] Table 5 Classification results of each model

[0112]

[0113] Step 32: Event relationship extraction sub-step:

[0114] Event relations refer to the logical evolution relations between events. The identification and extraction of event relations helps to better grasp the logical evolution between events, assist related decisions, and take precautions in advance. In the above study, quality and safety issue events have been divided into node events based on event ontology. Two node events constitute candidate node event pairs. Event relation extraction is to extract the relations between candidate node events. According to the data characteristics, the relations between smart home product quality and safety issue events mainly include causal relations, conditional relations, sequential relations, and parallel relations, among which causal relations and conditional relations are the main ones, and sentences with clear relationship prompt words account for the majority of the four types of relations. Therefore, the embodiments of the present application distinguish between explicit relations and implicit relations in the extraction of causal relations and conditional relations, and uniformly adopt implicit relation extraction methods for sequential relations and parallel relations.

[0115] The summary of event relationship prompt words mainly comes from two sources: semantic dictionary HowNet and related literature. At the same time, combined with the data characteristics of this research field, event relationship extraction prompt words used for template extraction are screened, and corresponding template matching is constructed. After obtaining the event relationship pairs after template matching, the accuracy of event pair relationship discrimination by template matching is statistically analyzed. The statistical results are shown in Table 6. Among the 780 candidate event pairs in the embodiment of the present application, 365 event pairs are obtained through event relationship matching template matching, and 415 event pairs are not matched through event relationship matching templates.

[0116] Table 6 Explicit event relationship extraction results

[0117] causation Conditional Relationship Number of matching event pairs (pairs) 560 120 Number of valid event pairs (pairs) 320 45 Accuracy (%) 57 38

[0118] In the event implicit relationship extraction, the event implicit relationship extraction task is regarded as a classification task, and the TextCNN model is used to extract the semantic features of event sentence pairs. There are 1712 implicit relationship annotation data in total. The parameter settings are shown in Table 7. The experimental results are shown in Table 8, and the results of each classification are shown in Table 9. The model has a good effect in extracting causal and parallel relationships, but the extraction effect is poor in the conditional and sequential relationship part. The reason is that the amount of conditional and sequential relationship data is small, while the amount of causal and parallel relationship data is large, resulting in large differences in the effects between different categories.

[0119] Table 7 Model parameter settings

[0120] Model dropout Lr Epoch Batch TEXT_LEN Bert-TextCNN 0.8 2e-5 200 100 80

[0121] Table 8 Overall results of the algorithm

[0122] Model P R F1 Bert-TextCNN 0.723 0.624 0.639

[0123] Table 9 Classification results of each model

[0124]

[0125] Step 33, event element extraction sub-step:

[0126] The smart home quality and safety problem event elements mainly refer to the description of key node events in the process of quality and safety problem events. They have the characteristics of dynamic changes and mainly include the entity of the event and its attributes and the specific form of event changes. The embodiment of the present application defines the quality and safety problem event ontology in the aforementioned chapter. The event elements involved in the ontology are explained in more detail here, as shown in Table 10.

[0127] Table 10 Event element definition

[0128]

[0129] In the corresponding node event, the relevant event elements are extracted and composed to fully describe the event. Most of the above event elements can be directly combined to complete the semantic representation. However, the word "non-compliant" is often used as a semantic connector between the two event elements "product safety items" and "safety standards" to represent the event. Therefore, after obtaining these two event elements, the embodiment of the present application automatically adds the word "non-compliant" to represent the event.

[0130] Event extraction is information extraction, which can be considered as a sequence labeling task. The embodiment of the present application adopts the BMOES labeling system, introduces a large language model to label the initial sample, and assists in the labeling process of event elements through a prompt-based fine-tuning method. First, a relevant prompt question-answer template for the large language model is constructed to guide the large language model to understand the semantic meaning of the event elements; secondly, an appropriate labeling example is constructed to assist the large language model in learning; after obtaining the labeling results of the large language model, manual review and proofreading are performed in combination with domain knowledge, and a total of 2195 entity labels are obtained. For the extraction of event elements, the classic model Bert-Bilstm-CRF in the knowledge extraction task is selected as the basic model

[24]

[25] . On this basis, the Multi-Head Attention layer and the Span layer are introduced. The Multi-Head Attention layer is used to strengthen the model's attention to different positions in the input sequence. Adding the Multi-Head Attention layer after Bilstm helps the model to focus more on specific parts of the input sequence and improve its perception of important information; the Span layer is used to process span-level information, which is used to capture the span information of the entity and improve the model's ability to understand the scope of the entity.

[0131] The parameter settings of each model are shown in Table 11. The final experimental results are shown in Table 12. From the overall results of the algorithm, it can be seen that the models with the Span layer and the Multi-Head-Attention layer have been improved to a certain extent compared with the basic model. Among them, the model with the Multi-Head-Attention layer has the best extraction effect. Therefore, the Bert-Bilstm-Att-CRF model is selected to complete the event element extraction.

[0132] Table 11 Model parameter settings

[0133]

[0134] Table 12 Algorithm model results

[0135] Model P R F1 Bert-Bilstm-CRF 0.40 0.57 0.48 Bert-Span-Bilstm-CRF 0.51 0.61 0.55 Bert-Bilstm-Att-CRF 0.54 0.63 0.58

[0136] Step 34, event generalization sub-step:

[0137] In order to further obtain the characteristics and evolutionary relationship of domain events in the field of quality and safety problem events, each node event is generalized to summarize the evolutionary characteristics of the quality and safety problem event field. The embodiment of the present application uses event comprehensive similarity calculation to generalize node events, and the comprehensive similarity calculation considers both the event description sentence similarity and the event element similarity. The event description sentence similarity uses the cosine distance similarity to calculate the semantic similarity of the event description sentence. The event description sentence is vectorized by Bert coding, and the cosine distance is used to calculate the event description sentence similarity. The formula is shown in (5), where V1k and V2k represent the representation vectors of events E1 and E2, respectively.

[0138]

[0139] The event element similarity is measured by the Jaccard coefficient between all event elements of two event sentences. The Jaccard coefficient refers to the ratio of the number of elements in the intersection of two sets X and Y to the number of elements in the union of X and Y. The formula for calculating the event element Jaccard coefficient is shown in (6), where X refers to the event element of node event E1, and Y refers to the event element of node event E2.

[0140]

[0141] After obtaining the event description similarity results and event element similarity results, the event comprehensive similarity is calculated. The calculation formula is as follows: event pairs whose event comprehensive similarity results are higher than the threshold of 0.5 are generalized as node events.

[0142] Sim(E1,E2)=0.6*Sim sem (E1,E2)+0.4*Sim ent (E1,E2) (7)

[0143] After the similarity fusion of events, the generalized abstract event nodes need to be named, mainly based on the common parts of the original event node descriptions, and combined with domain knowledge, the abstract event nodes are named, and finally the abstract nodes corresponding to the event types of each node are obtained as shown in Table 13.

[0144] Table 13 Classification of typical event nodes (partial)

[0145]

[0146] Step 33, event transition probability calculation sub-step:

[0147] Based on the generalized event nodes, the causal relationship between events is mainly used to calculate the transition probability between causal events. The formula is shown in (8), where count(ei , e j ) represents event e i Occurs and event e j The frequency of occurrence, ∑ k count(e i , e k ) means in e i The number of all possible events that may occur if the event occurs

[0148]

[0149] Step 4: Knowledge graph display steps, including:

[0150] Step 41: Abstract Principle Diagram Display Sub-step

[0151] The embodiment of the present application uses Gephi as a visualization tool for the abstract event graph. The event generalization results of the causal relationship are stored in a csv file and imported into Gephi for visualization. A total of 131 generalized event node types and 417 pairs of event generalized causal relationships are imported. The abstract event graph is as follows: Figure 4 As shown. In the abstract event graph, different colors indicate different node event types. Green represents product-level events, purple represents system-level dangerous node events, blue represents human-level events, and orange represents system-level accident node events. Through the abstract event graph, we can clearly see the node events with large in-degree and out-degree in smart home quality and safety issues. The evolutionary paths represented by these events are often the evolutionary paths that need to be focused on. The node sizes are displayed according to the in-degree and out-degree sizes of the nodes, and the transition probability size is displayed as the weight of the edge. The larger the weight of the edge, the thicker the edge, so as to perform evolutionary path analysis. The analysis results help smart home manufacturers to grasp the development context and internal connections of quality and safety issues, grasp the key to the problem, and thus better optimize the product production process.

[0152] Step 42: Display of knowledge graph

[0153] Neo4j is a high-performance graph database that stores structured data in graphs. The visualization platform built into the neo4j graph database can well visualize the graph and the data stored in the database. At the same time, neo4j provides a user-friendly web interface for adding, modifying, querying and other related operations. The training annotation data and the extracted data are imported into the neo4j database, with a total of 6652 triples. The obtained triples are imported into neo4j in csv format with the help of cypher language to realize the storage and visualization of the smart home quality and safety problem graph. The graph visualization results are as follows: Figure 5 shown.

[0154] The embodiment of the present application is aimed at the field of smart home quality and safety issues. It crawls smart home quality and safety issue events, analyzes data characteristics in the field of smart home quality and safety issues, conducts research on quality and safety issue event ontology construction, event type identification, event and event relationship extraction, event generalization, and event transition probability calculation, and realizes event visualization in the form of a graph.

[0155] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0156] A person skilled in the art may understand that the various numerical numbers such as first and second involved in the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application, and also indicate the order of precedence.

[0157] At least one in the present application can also be described as one or more, and a plurality can be two, three, four or more, which is not limited in the present application. In the embodiments of the present application, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".

[0158] The corresponding relationships shown in each table in the present application can be configured or predefined. The values ​​of the information in each table are only examples and can be configured as other values, which are not limited by the present application. When configuring the corresponding relationship between the information and each parameter, it is not necessarily required to configure all the corresponding relationships illustrated in each table. For example, in the table in the present application, the corresponding relationships shown in some rows may not be configured. For another example, appropriate deformation adjustments can be made based on the above table, such as splitting, merging, etc. The names of the parameters shown in the titles of the above tables can also use other names that can be understood by the communication device, and the values ​​or representations of the parameters can also be other values ​​or representations that can be understood by the communication device. When implementing the above tables, other data structures can also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables or hash tables.

[0159] The predefined in the present application may be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining the quality and safety of smart homes based on a knowledge graph, characterized in that: include: The steps of establishing a framework are used to establish a framework including a data layer, a graph construction layer and a display application layer; wherein: the data layer is used to crawl relevant data from the corresponding website to meet the needs of smart home quality and safety problem analysis, and use natural language processing tools to complete data preprocessing; the graph construction layer is based on the data in the data layer and follows the construction process of the knowledge graph to complete event type identification, event relationship extraction, event element extraction, and event generalization; the display application layer stores event element extraction knowledge and event generalization results in a graph database for storage and visualization, and analyzes the evolution path of the abstract graph and the application value of the knowledge graph.

2. According to claim 1, the method for determining the quality and safety of smart homes based on the knowledge graph is characterized in that: The steps of establishing the framework include: Step 1: Data collection and preprocessing steps: Access to domestic and foreign data, Foreign data include: U.S. CPSC recall information on Chinese consumer products, which comes from the China Technical Trade Measures website and Shenzhen Institute of Standards and Technology; EU RAPEX recall information on Chinese consumer products, which comes from the China Technical Trade website and Shenzhen Institute of Standards and Technology; Canadian Ministry of Health recall information on Chinese consumer products, which comes from the China Technical Trade website; Domestic data include: recall information of domestic consumer products in China from the State Administration for Market Regulation and provincial and municipal market supervision administrations, which comes from the China Product Safety and Recall Information Network; consumer complaints about products purchased on various e-commerce platforms, which comes from the Black Cat Complaint Platform; Preprocess the aforementioned domestic and foreign data, including sentence segmentation, word segmentation, and part-of-speech tagging; Step 2, event ontology construction step: refine the event concept around the three dimensions of people-product-environment. The relationship part is the semantic relationship between node events and the relationship between concepts. The concept layer includes the node events divided, including human factor node events, product layer node events, system-level hazards and system-level accidents; each node event contains the subdivided concept levels involved. The human factor node events correspond to consumer behavior, which refers to the behavior of consumers directly participating in the product life cycle; the product layer node events mainly include product components, product safety constraints and product layer unsafe control behaviors. Product layer unsafe control behaviors refer to product safety problems caused by problems in the design, production and manufacturing processes. The quality insecurity or the risk source due to the characteristics of the product itself; the system-level hazard corresponds to the accident hazard link, which refers to the dangerous event that directly causes the accident at the system level; the system-level accident corresponds to the product safety accident, which refers to the final accident result of the product quality and safety problem event; environmental factors refer to the surrounding environmental factors during the product's life cycle, because environmental factors exist when other node events occur, so they are not divided as separate node events; the semantic relationship in the relationship layer refers to the causal relationship, conditional relationship, sequential relationship and parallel relationship between each node event, and the conceptual relationship refers to the relationship between each subdivided concept level under the concept of each node event; Step 3: Knowledge graph construction steps, including: Step 31, event type identification sub-step, specifically includes: (1) Event trigger word identification and screening: Use the LTP tool to perform dependency syntactic analysis, extract and screen the subject-predicate relationship SBV, verb-object relationship VOB, prepositioned object FOB and core relationship HED in the event corpus, and extract the core verbs representing the event type; the extraction rules involving core verbs are as follows: A1. If a verb in a sentence is the core word of both the SBV subject-predicate relationship and the VOB verb-object relationship, it is taken as the core verb of the sentence; A2. If there is no verb that meets rule 1, the core word in any combination of the HED core relationship and the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence is taken as the core verb; A3. If neither of the above two rules is met, the core word in the SBV subject-predicate relationship, the VOB verb-object relationship, and the FOB prepositioned object in the sentence is taken as the core verb; A4. If none of the above three rules are met, the sentence is not an event sentence and core verb extraction is not performed; (2) Event type recognition model: The classic model TextCNN in text classification tasks is used to combine the trigger word position feature to perform text type classification tasks. When performing event type recognition, the event trigger word position is embedded and represented, and then concatenated with the text semantic vector to perform event type recognition and trigger word position embedding process. Step 32: Event relationship extraction sub-step: According to the above steps, the quality and safety problem events are divided into node events based on the event body, and the two node events constitute a candidate node event pair. Event relationship extraction is to extract the relationship between the candidate node events; wherein the relationship between the smart home product quality and safety problem events includes: causal relationship, conditional relationship, sequential relationship and parallel relationship, among which causal relationship and conditional relationship are the main ones, and sentences with clear relationship prompt words account for the majority of the four types of relationships. Therefore, the embodiment of the present application distinguishes between explicit relationship and implicit relationship in the extraction of causal relationship and conditional relationship, and uniformly adopts implicit relationship extraction method for sequential relationship and parallel relationship for extraction; The summary of event relationship prompt words mainly comes from semantic dictionary HowNet and related literature. At the same time, combined with the data characteristics of this research field, event relationship extraction prompt words for template extraction are screened and corresponding template matching is constructed. After obtaining the event relationship pairs after template matching, the accuracy of event pair relationship discrimination by template matching is statistically analyzed; In event implicit relation extraction, the event implicit relation extraction task is regarded as a classification task, and the TextCNN model is used to extract the semantic features of event sentence pairs; Step 33, event element extraction sub-step: Smart home quality and safety event elements refer to the description of key node events during the occurrence of quality and safety events, including the entity of the event, its attributes, and the specific form of event changes; the event elements involved in the quality and safety event ontology include: Product name, used to indicate the product name described in the product quality and safety issue incident; Product parts, used to represent the product parts described in the product quality and safety incident; Product safety items are used to indicate the safety items that a product needs to meet the standard requirements; Safety standards, which are used to indicate the safety standards that a product needs to meet; Product-level unsafe control behavior is used to indicate the unsafe control behavior of the product in the system control loop, which is a product factor that may cause system risk; Accident-risk link is used to indicate a dangerous state of a system that will lead to an accident under certain most unfavorable conditions; Environmental factors are used to indicate the external environment conditions in which the product is used; Consumer behavior, which refers to the behavior of consumers in quality and safety incidents; Product safety incidents are used to refer to incidents involving product quality and safety issues; In the corresponding node event, the relevant event elements are extracted and composed to fully describe the event. Most of the above event elements can be directly combined to complete the semantic representation. However, the word "non-compliant" is often used as a semantic connector between the two event elements "product safety items" and "safety standards" to represent the event. Therefore, after obtaining these two event elements, the embodiment of the present application automatically adds the word "non-compliant" to represent the event. Event extraction is information extraction, which can be considered as a sequence labeling task. The embodiment of this application adopts the BMOES labeling system, introduces a large language model to label the initial sample, and assists in the labeling process of event elements through a prompt-based fine-tuning method. First, a relevant prompt question-and-answer template for the large language model is constructed to guide the large language model to understand the semantic meaning of event elements; secondly, appropriate labeling examples are constructed to assist the large language model in learning; after obtaining the labeling results of the large language model, manual review and proofreading are performed in combination with domain knowledge; Step 34, event generalization sub-step: In order to further obtain the characteristics and evolutionary relationship of domain events in the field of quality and safety problem events, each node event is generalized to summarize the evolutionary characteristics of the quality and safety problem event field. The embodiment of the present application uses event comprehensive similarity calculation to generalize node events, and the comprehensive similarity calculation considers both the event description sentence similarity and the event element similarity. The event description sentence similarity uses the cosine distance similarity to calculate the semantic similarity of the event description sentence. The event description sentence is vectorized by Bert coding, and the cosine distance is used to calculate the event description sentence similarity. The formula is shown in (5), where V1k and V2k represent the representation vectors of events E1 and E2, respectively. The event element similarity is measured by the Jaccard coefficient between all event elements of two event sentences. The Jaccard coefficient refers to the ratio of the number of elements in the intersection of two sets X and Y to the number of elements in the union of X and Y. The formula for calculating the event element Jaccard coefficient is shown in (6), where X refers to the event element of node event E1, and Y refers to the event element of node event E2. After obtaining the event description similarity results and event element similarity results, the event comprehensive similarity is calculated. The calculation formula is as follows: event pairs whose event comprehensive similarity results are higher than the threshold of 0.5 are generalized as node events. Sim(E1,E2)=0.6*Sim sem (E1,E2)+0.4*Sim ent (E1,E2) (7) After the similarity fusion of events, the generalized abstract event nodes need to be named, mainly based on the common parts of the original event node descriptions, and combined with domain knowledge, the abstract event nodes are named. Finally, the abstract nodes corresponding to the event types of each node are obtained, including: product-level events, system-level hazards, human-level events, and system-level accidents. Step 33, event transition probability calculation sub-step: Based on the generalized event nodes, the causal relationship between events is mainly used to calculate the transition probability between causal events. The formula is shown in (8), where count(e i , e j ) represents event e i Occurs and event e j The frequency of occurrence, ∑ k count(e i , e k ) means in e i The number of all possible events that may occur if the event occurs 3. The method for determining the quality and safety of smart homes based on a knowledge graph according to claim 1, characterized in that: The method further comprises: Step 4: Knowledge graph display steps, including: Step 41: Abstract Principle Diagram Display Sub-step Gephi is used as a visualization tool for abstract event graphs. The generalization results of causal events are stored in csv files and imported into Gephi for visualization. In the abstract event graphs, different colors indicate different types of node events. Green represents product-level events, purple represents system-level dangerous node events, blue represents human-level events, and orange represents system-level accident node events. Through the abstract event graph, we can clearly see the node events with large in-degree and out-degree in smart home quality and safety problem events. The evolutionary paths represented by these events are often the evolutionary paths that need to be focused on. The node sizes are displayed according to the in-degree and out-degree sizes of the nodes, and the transfer probability size is displayed as the weight of the edge. The larger the weight of the edge, the thicker the edge, so as to perform evolutionary path analysis. The analysis results help smart home manufacturers to grasp the development context and internal connections of quality and safety problem events. Step 42: Display of knowledge graph Neo4j is a high-performance graph database that stores structured data in graphs. Based on the visualization platform that comes with the neo4j graph database itself, the graph can be visualized well, and the data stored in the database can be visualized well. At the same time, neo4j provides a user-friendly web interface for addition, modification, query and other related operations. The training annotation data and the extracted data are imported into the neo4j database, and a total of 6652 triples are imported. With the help of cypher language, the obtained triples are imported into neo4j in csv format to realize the storage and visualization of the smart home quality and safety problem graph.

Citation Information

Patent Citations

  • Cause-and-effect graph construction method based on hydrological events

    CN112559656A

  • Knowledge graph and affair graph fusion method, device and system

    CN114417004A

  • Risk prediction method and apparatus, and device and storage medium

    WO2023065545A1

  • Affair information query method and apparatus, and computer device and storage medium

    WO2023134057A1

Cited By

  • Method and system for extracting and visualizing multi-level events from telephone audio data

    CN120087364A

  • Method and System for Extracting Multi-Level Events from Telephone Audio Data and Visualizing Them

    CN120087364B

  • Knowledge graph creating method and device and computer readable medium

    CN120450021A

  • Composite knowledge chain construction method for scientific research logic representation

    CN120930751A

  • Intelligent management system for apartments

    CN121509481A