Knowledge tracing and connection methods, systems, devices, and media based on graph editors
By using a knowledge tracing and connection method based on a graph editor, the problem of lack of interactive display between knowledge graphs and knowledge tracing information is solved, realizing automated knowledge tracing and connection, and improving the visualization capabilities and user experience of the knowledge graph system.
Patent Information
- Application Number
- CN202311240225.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-09-22
AI Technical Summary
In existing technologies, the interactive display between knowledge graphs and knowledge source information leads to poor visualization capabilities of knowledge graphs. Furthermore, existing technologies lack visual interaction between knowledge graphs and knowledge source information, resulting in poor visualization capabilities for knowledge graph systems.
The knowledge tracing and connection method based on a graph editor, including a graph editor window and a tracing fragment window, acquires tracing information data, generates a knowledge graph, determines the target entity node in response to click signals, generates tracing fragment cards, and performs connection processing based on the correlation coefficient, thereby realizing automated knowledge tracing and connection.
It improves the visualization capabilities of the knowledge graph system, enabling users to quickly track, verify, and trace the location of relevant nodes and the source of information, thereby enhancing the user experience.
Smart Images

Figure CN117390195B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, and in particular to a method, system, device, and medium for knowledge tracing and connection based on a graph editor. Background Technology
[0002] In recent years, knowledge graph technology has been widely used in various data management and service platforms to enable more effective knowledge retrieval. This allows the platform to act as a knowledge middleware to integrate, manage, and share internal and external knowledge assets, and to provide enterprises with an integrated view of data and intelligent data services.
[0003] Currently, there are various visualization libraries or image libraries that provide basic chart types and interactive functions for creating interactive and customizable charts and data visualizations, such as ECharts and G6. Technical personnel can use these visualization libraries or image libraries to draw and edit knowledge graph content to complete the development of the knowledge graph. They can also display knowledge traceability information related to the knowledge graph content by setting up a separate sliding window in the knowledge graph system for easy viewing by users.
[0004] However, in practical use, when there are many nodes in the knowledge graph and a large amount of corresponding knowledge source information, the lack of visual interaction between the knowledge graph and the knowledge source information makes it difficult for users to identify the location of the currently selected node and the corresponding knowledge source information. This affects the visualization capability of the knowledge graph system, and ordinary users may have to rely on technical personnel to manually draw the knowledge source connections between the graph nodes and information based on their own understanding before they can selectively view the relevant knowledge source information, which is time-consuming and laborious. Summary of the Invention
[0005] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0006] This invention provides a knowledge tracing connection method, electronic device, and medium based on a graph editor. It aims to address the technical problem in the prior art where there is no visual interaction between knowledge graphs and knowledge tracing information, resulting in poor visualization capabilities of knowledge graph systems. The invention provides a technical solution for automatically connecting knowledge graphs and knowledge tracing information, enabling users to track, verify, and trace the locations of relevant nodes and the source locations of related information, thereby allowing for faster and more effective viewing of knowledge tracing information.
[0007] To achieve the above objectives, a first aspect of this invention proposes a knowledge tracing and connection method based on a graph editor, comprising:
[0008] The front-end interface is built using a front-end framework, and the front-end interface includes a graph editor window and a source fragment window;
[0009] Acquire source information data and generate a knowledge graph in the graph editor window based on the source information data. The knowledge graph includes multiple entity nodes.
[0010] In response to a click signal received by the graph editor window, the target entity node selected by the click signal is determined;
[0011] Based on the target entity node, multiple related traceability segments are determined from the traceability information data, and multiple traceability segment cards corresponding to the related traceability segments are generated in the traceability segment window;
[0012] Obtain the correlation coefficients of multiple traceability fragment cards, and determine the target traceability fragment card from the multiple traceability fragment cards based on the correlation coefficients;
[0013] Obtain the location information of the target entity node and the target traceability fragment card, and perform connection processing on the target entity node and the target traceability fragment card according to the location information.
[0014] In some embodiments, multiple entity nodes are connected by relation edges, and the generation of a knowledge graph based on the source information data in the graph editor window includes:
[0015] The source information data is subjected to feature capture processing to obtain multiple entity features and relationship features between the multiple entity features, as well as the weight coefficients of the entity features in the knowledge graph;
[0016] In the graph editor window, based on the ECharts visualization library, the entity nodes in the knowledge graph are generated according to the entity features and the weight coefficients, and the relationship edges in the knowledge graph are generated according to the relationship features.
[0017] In some embodiments, generating entity nodes in the knowledge graph based on the entity features and weight coefficients, and generating relation edges in the knowledge graph based on the relation features, using the ECharts visualization library, includes:
[0018] The node name of the entity node is determined based on the entity characteristics;
[0019] The node size of the entity node is determined based on the weighting coefficients;
[0020] Based on the ECharts visualization library, node coordinates are assigned to the entity nodes, and the entity nodes are generated in the knowledge graph according to the node coordinates, the node name, and the node size;
[0021] The node coordinates of the entity nodes at both ends of the relationship edge are obtained based on the relationship features, and the relationship edge is generated in the knowledge graph based on the node coordinates of the entity nodes at both ends.
[0022] In some embodiments, the traceability information data includes multiple traceability segments, and determining multiple relevant traceability segments from the traceability information data based on the target entity node includes:
[0023] Obtain the connection relationship information of the target entity node in the knowledge graph;
[0024] Based on the connection relationship information, determine the neighboring nodes of the target entity node, and determine the relationship edges between the target entity node and the neighboring nodes;
[0025] The source fragments of the entity features corresponding to the target entity node and the adjacent nodes are determined as relevant source fragments, and the source fragments of the relationship features corresponding to the relationship edge are determined as relevant source fragments.
[0026] In some embodiments, obtaining the correlation coefficients of the plurality of traceability fragment cards and determining the target traceability fragment card from the plurality of traceability fragment cards based on the correlation coefficients includes:
[0027] From the plurality of source fragment cards, determine the relation source fragment cards corresponding to the relation edges;
[0028] Obtain the association weight coefficients of multiple relation tracing fragment cards, wherein the association weight coefficients are the weight coefficients of the adjacent nodes corresponding to the relation tracing fragment cards;
[0029] The association coefficients of multiple relation tracing fragment cards are determined based on the association weight coefficients;
[0030] The relationship traceability fragment cards with a correlation coefficient greater than a preset correlation threshold are identified as target traceability fragment cards.
[0031] In some embodiments, the location information of the target entity node includes starting point location information, and the location information of the target traceability fragment card includes ending point location information;
[0032] The steps for obtaining the starting point location information are as follows:
[0033] Using the top left corner of the front-end interface as the origin, the click coordinate information of the click signal is obtained through the ECharts visualization library, and the starting point position information is obtained based on the click coordinate information;
[0034] The steps for obtaining the starting point location information are as follows:
[0035] Obtain the card width information of the target traceability fragment card;
[0036] Obtain the distance information between the multiple target tracing fragment cards and the top of the tracing fragment window;
[0037] The destination location information is obtained based on the card width information and the distance information.
[0038] In some embodiments, the process of connecting the target entity node and the target traceability fragment card based on the location information includes:
[0039] The relationship type and relationship strength are determined based on the relationship features corresponding to the target tracing fragment card;
[0040] The line color parameters are determined based on the relationship type, and the line shape parameters are determined based on the relationship strength.
[0041] Based on the ECharts visualization library, connecting lines are generated according to the starting point position information, the ending point position information, the line color parameters, and the line shape parameters for connection processing.
[0042] In some embodiments, the source tracing segment window includes a vertically sliding window located on the right side of the front-end interface. After obtaining the distance information between the multiple target source tracing segment cards and the top of the source tracing segment window, the method further includes:
[0043] When the vertical sliding window responds to the received sliding signal and performs sliding display processing on multiple traceability segment cards, the vertical sliding distance of multiple traceability segments is obtained;
[0044] The distance information is adjusted based on the longitudinal sliding distance;
[0045] The endpoint location information of the target tracing fragment card is obtained based on the card width information and the adjusted distance information.
[0046] In some embodiments, after generating the knowledge graph based on the source information data in the graph editor window, the method further includes:
[0047] In response to the editing control signal received by the graph editor window, the knowledge graph is edited and controlled through the graph editor function module deployed in the graph editor window;
[0048] The editing control process includes at least one of the following:
[0049] The knowledge graph is scaled.
[0050] The entity nodes and the relationship edges between multiple entity nodes in the knowledge graph are added, deleted, and edited.
[0051] The attribute information of the entity nodes and relation edges in the knowledge graph is displayed in a floating window.
[0052] The entity nodes in the knowledge graph are searched to determine the target entity node, and the visible range of the knowledge graph is adjusted according to the location information of the target entity node.
[0053] To achieve the above objectives, a second aspect of the present invention proposes a knowledge tracing and connection system based on a graph editor, comprising:
[0054] The interface building module is used to build a front-end interface using a front-end framework. The front-end interface includes a graph editor window and a source fragment window.
[0055] The knowledge graph generation module is used to acquire source information data and generate a knowledge graph in the graph editor window based on the source information data. The knowledge graph includes multiple entity nodes.
[0056] The entity node determination module is used to determine the target entity node selected by the click signal in response to the click signal received by the graph editor window.
[0057] The traceability segment determination module is used to determine multiple related traceability segments from the traceability information data based on the target entity node, and generate multiple traceability segment cards corresponding to the related traceability segments in the traceability segment window;
[0058] The traceability card determination module is used to obtain the correlation coefficient of multiple traceability segment cards and determine the target traceability segment card from the multiple traceability segment cards according to the correlation coefficient;
[0059] The traceability information connection module is used to obtain the location information of the target entity node and the target traceability fragment card, and to perform connection processing on the target entity node and the target traceability fragment card according to the location information.
[0060] To achieve the above objectives, a third aspect of the present invention provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.
[0061] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0062] This invention proposes a knowledge tracing and connection method, system, device, and medium based on a graph editor. It utilizes a front-end framework to build a front-end interface, which includes a graph editor window and a tracing fragment window. By using the front-end framework, a user interface can be created quickly and efficiently, reducing development time and costs, allowing users to view both the knowledge graph and tracing information simultaneously in an integrated environment. Furthermore, tracing information data is acquired, and a knowledge graph is generated in the graph editor window based on this data. The knowledge graph includes multiple entity nodes. With the front-end interface ready, the system can generate a knowledge graph based on real-time tracing information data. The generated knowledge graph is embedded in the graph editor window for easy user editing. Furthermore, in response to a click signal received by the graph editor window, the target entity node selected by the click signal is determined. This signal response process provides interactivity, allowing users to select specific entity nodes of interest through clicking. Further, based on the target entity node, multiple related traceability fragments are determined from the traceability information data, and multiple traceability fragment cards corresponding to these fragments are generated in the traceability fragment window. This allows users to intuitively see the traceability information related to the selected node after initial screening, further enhancing the knowledge graph. The visualization capability is further enhanced by obtaining the correlation coefficients of multiple traceability fragment cards and determining the target traceability fragment card from the multiple traceability fragment cards based on the correlation coefficients, thereby achieving a secondary filtering effect and guiding users to view traceability information with a higher degree of correlation. Furthermore, the location information of the target entity node and the target traceability fragment card is obtained, and the target entity node and the target traceability fragment card are connected based on the location information to achieve an automatic knowledge traceability connection function. Specifically, when a user clicks on an entity node through the front-end interface of this invention, the invention automatically finds multiple traceability fragments related to this node from the traceability information data and uses them to... The traceability fragments are displayed in the form of cards in the traceability fragment window. Furthermore, this invention analyzes the correlation coefficients between these traceability fragment cards to determine which traceability fragment is most relevant or important. It then automatically obtains the location information of the user-selected entity node and the traceability fragment card, and draws a line to visually demonstrate the relationship between them. This automated traceability information connection function effectively solves the problem of a lack of intuitive interaction between knowledge graphs and knowledge traceability information, improves the visualization capabilities of the knowledge graph system, and enables users to more quickly track, verify, and trace the locations of relevant nodes and the source locations of related information, as well as view relevant knowledge traceability information, thereby improving the user experience. Attached Figure Description
[0063] Figure 1This is a flowchart of the knowledge tracing and connection method based on a graph editor provided in an embodiment of the present invention;
[0064] Figure 2 yes Figure 1 The flowchart of step S120 in the middle;
[0065] Figure 3 yes Figure 2 The flowchart of step S220 in the text;
[0066] Figure 4 yes Figure 1 The flowchart of step S140 in the middle;
[0067] Figure 5 yes Figure 1 The flowchart of step S150 in the middle;
[0068] Figure 6 This is a flowchart for obtaining the starting point position information;
[0069] Figure 7 yes Figure 1 The flowchart of step S160 in the middle;
[0070] Figure 8 This is a schematic diagram of the interface of the knowledge tracing and connection system based on a graph editor provided in an embodiment of the present invention;
[0071] Figure 9 This is a schematic diagram of a knowledge tracing and connection system based on a graph editor provided in an embodiment of the present invention;
[0072] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0074] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0076] In recent years, knowledge graph technology has been widely applied to various data management and service platforms to facilitate more effective knowledge retrieval. These platforms act as knowledge middleware, integrating, managing, and sharing internal and external knowledge assets, and providing enterprises with a unified view of data and intelligent data services. Currently, there are various visualization libraries or image libraries available for creating interactive and customizable charts and data visualizations, offering basic chart types and interactive functions, such as ECharts and G6. Technical personnel can use these visualization libraries or image libraries to draw and edit knowledge graph content to complete the knowledge graph development. Furthermore, a separate sliding window within the knowledge graph system can be used to display knowledge traceability information related to the knowledge graph content for easy user viewing.
[0077] However, neither ECharts nor G6 supports automated connection requirements. In practical use, when there are many nodes in the knowledge graph and a large amount of corresponding knowledge source information, the lack of visual interaction between the knowledge graph and the knowledge source information makes it difficult for users to identify the position of the currently selected node and its corresponding knowledge source information. This affects the visualization capabilities of the knowledge graph system, and ordinary users may have to rely on technical personnel to manually draw the knowledge source connections between the graph nodes and information based on their own understanding before they can selectively view the relevant knowledge source information, which is time-consuming and laborious.
[0078] Based on this, embodiments of the present invention provide a knowledge tracing connection method, electronic device, and medium based on a graph editor, aiming to solve the technical problem that the lack of visual interaction between knowledge graphs and knowledge tracing information in the prior art leads to poor visualization capabilities of knowledge graph systems. The invention provides a technical solution for automating knowledge tracing connections between knowledge graphs and knowledge tracing information, enabling users to track, verify, and trace the positions of relevant nodes and the source locations of related information, thereby viewing knowledge tracing information more quickly and effectively.
[0079] In this invention, the invention can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. The invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via communication networks. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices, and are not specifically limited in the embodiments of this invention.
[0080] Specifically, in this embodiment of the invention, since the graph editor is an important requirement for knowledge retrieval in the knowledge platform, and the visualization of knowledge source connection in the graph of this invention can facilitate internal medical personnel and related product personnel to quickly understand the current knowledge reserve and the external presentation of structured knowledge, the knowledge source connection is the relationship between the graph and the knowledge source information, so that users can track, verify and trace the source of information. Therefore, the knowledge source connection method based on the graph editor in this invention can be applied to medical research, diagnosis, pharmaceutical product development and other medical-related fields: providing researchers and other users with an intuitive knowledge source tracking tool, helping users to quickly understand the history and source of relevant research, facilitating users to trace the knowledge source of disease diagnosis and treatment methods, and to conduct relevant research or diagnosis of related diseases.
[0081] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0082] Figure 1 This is a flowchart of the knowledge tracing and connection method based on a graph editor provided in an embodiment of the present invention. Figure 1 The method may include, but is not limited to, steps S110 to S160.
[0083] Step S110: Build the front-end interface using the front-end framework. The front-end interface includes a graph editor window and a source fragment window.
[0084] Step S120: Obtain source information data and generate a knowledge graph based on the source information data in the graph editor window. The knowledge graph includes multiple entity nodes.
[0085] Step S130: In response to the click signal received by the graph editor window, determine the target entity node selected by the click signal;
[0086] Step S140: Based on the target entity node, determine multiple related traceability segments from the traceability information data, and generate traceability segment cards corresponding to multiple related traceability segments in the traceability segment window;
[0087] Step S150: Obtain the correlation coefficients of multiple traceability fragment cards, and determine the target traceability fragment card from the multiple traceability fragment cards based on the correlation coefficients.
[0088] Step S160: Obtain the location information of the target entity node and the target traceability fragment card, and perform connection processing on the target entity node and the target traceability fragment card according to the location information.
[0089] Steps S110 to S160 of this embodiment of the invention involve building a front-end interface using a front-end framework. The front-end interface includes a graph editor window and a source fragment window. It is conceivable that by using a front-end framework, a user interface can be created quickly and effectively, thereby reducing development time and costs, allowing users to view the knowledge graph and source information simultaneously in an integrated environment. Furthermore, source information data is acquired, and a knowledge graph is generated in the graph editor window based on the source information data. The knowledge graph includes multiple entity nodes. It is conceivable that, with the front-end interface ready, the knowledge graph is generated based on the real-time state of the source information data. The knowledge graph is embedded in a graph editor window for easy user editing. Furthermore, in response to click signals received by the graph editor window, the target entity node selected by the click signal is determined. This signal response process provides interactivity, allowing users to select specific entity nodes of interest through clicks. Further, based on the target entity node, multiple related traceability fragments are identified from the traceability information data, and traceability fragment cards corresponding to these fragments are generated in the traceability fragment window. This allows users to intuitively see the traceability information related to the selected node after initial filtering, further enhancing the visualization capabilities of the knowledge graph. Furthermore, the correlation coefficients of multiple traceability fragment cards are obtained, and the target traceability fragment card is determined from the multiple traceability fragment cards based on the correlation coefficients to achieve a secondary filtering effect, guiding users to view traceability information with a higher degree of correlation. Furthermore, the location information of the target entity node and the target traceability fragment card is obtained, and the target entity node and the target traceability fragment card are connected based on the location information to achieve an automatic knowledge traceability connection function. Specifically, when a user clicks on an entity node through the front-end interface of this invention, the invention automatically finds multiple traceability fragments related to this node from the traceability information data and displays them in the form of cards on the traceability fragment. In the segment window, the present invention further analyzes the correlation coefficients between these traceability segment cards. After determining which traceability segment is most relevant or important, it automatically obtains the location information of the entity node and traceability segment card selected by the user, and draws a line to intuitively show the relationship between the two. This automated traceability information connection function can effectively solve the problem of lack of intuitive interaction between knowledge graph and knowledge traceability information, improve the visualization capability of knowledge graph system, enable users to more quickly track, verify and trace the location of relevant nodes and the source location of relevant information, and view relevant knowledge traceability information, thereby improving the user experience.
[0090] In some embodiments, the present invention first determines multiple related traceability segments from traceability information data based on the target entity node, and generates traceability segment cards corresponding to the multiple related traceability segments in the traceability segment window for a first filtering. Then, it obtains the correlation coefficients of the multiple traceability segment cards and determines the target traceability segment card from the multiple traceability segment cards based on the correlation coefficients for a second filtering. Compared with solutions that directly display all traceability segment cards or only display the target traceability segment card, the present invention is more targeted. By employing a two-stage filtering process, the information scope is first narrowed down, and then the most critical and relevant information is identified within that narrowed scope. This ensures that users see only the most relevant and crucial traceability information, avoiding interference from a large amount of irrelevant or secondary information. Furthermore, it ensures that the amount of information displayed in the traceability fragment cards is moderate. Displaying all relevant cards directly could lead to information overload, making it difficult for users to absorb and understand, while also placing significant pressure on the system and front-end interface, impacting performance and response speed. Additionally, some less relevant traceability information might mislead users. Conversely, displaying only the target traceability fragment card might overlook other relevant and valuable information. This invention, through the aforementioned two-stage filtering method, ensures the relevance and comprehensiveness of the information, providing a relatively comprehensive yet non-redundant view, thereby improving the user experience.
[0091] The above is a general description of steps S110 to S160. Steps S110 to S160 will be described in detail below.
[0092] In step S110, a front-end interface is built using a front-end framework. The front-end interface includes a graph editor window and a source fragment window. In some embodiments, the front-end framework is the React front-end framework. The React front-end framework uses a virtual DOM to track page changes and perform efficient re-rendering. By applying interface changes to the virtual DOM, React can compare the differences between the virtual DOM and the actual DOM and only perform actual DOM operations on the parts that need to be updated, thereby improving the performance and rendering speed of the interface system. For example, it improves the speed of knowledge graph generation and automatic connection in this invention and improves the system flow. Specifically, this invention uses a front-end framework (React.js) to build the front-end page of the knowledge graph, including the display and editing of information such as nodes, edges, and attributes, and the interactive functions of the graph editor. It also uses the visualization library echarts to implement data visualization functions, including the display and analysis of information such as nodes, edges, and attributes, and the filtering and aggregation of data, to realize a data visualization solution and help users understand the relationships between knowledge more intuitively and conveniently.
[0093] In step S120, source tracing information data is obtained, and a knowledge graph is generated in the graph editor window based on the source tracing information data. The knowledge graph includes multiple entity nodes.
[0094] In some embodiments, this invention generates a knowledge graph based on source information data in a graph editor window. This enables users to more intuitively understand the relationships between data by implementing knowledge source connection functionality, thereby improving their data comprehension and usage efficiency. Furthermore, the graph editor window supports interactive functions such as zooming in / out and moving the knowledge graph, further enhancing the user experience. Compared to conventional editing software such as Lucidchart, Coggle, and Visio, this invention's graph editor-based knowledge source connection scheme has stronger knowledge graph construction and visualization capabilities, making it easier to build and display complex knowledge relationships. Simultaneously, the invention uses a graph editor for front-end interface generation, allowing the knowledge graph in this application to be expanded and customized based on automatic connection functionality. This enables customized development according to user needs, effectively addressing the graphical display and interaction issues in knowledge source tracing.
[0095] In some embodiments, the traceability information data supports data retrieval from a data source (backend API). A user interface is provided that allows users to select a data source and configure connection parameters.
[0096] In some embodiments, the nodes, edges, attributes, and other information of the knowledge graph are stored in a database or other data storage scheme to facilitate subsequent querying and analysis. Specifically, the data structure of nodes and connections in the defined knowledge graph is as follows:
[0097] Define the array `categories` to represent different entity categories. For example: Central Entity: might be the main or core entity of the knowledge graph; Inspection: might be a certain inspection or process related to the main entity.
[0098] Define an array `nodes` to describe the nodes in the knowledge graph. Each node contains the following attributes: `category`: an index pointing to a category in the `categories` array, for example, category 0 represents "central entity" and category 1 represents "inspection"; `id`: a unique identifier for the node; `name`: the name of the node; `symbolSize`: may represent the size or importance of the node; `value`: the numerical value or weight of the node; `x`, `y`: the coordinates of the node in the knowledge graph, where `symbolSize` is positively correlated with `value`.
[0099] In summary, the attributes of a node include the entity category and the desired attributes in the description array nodes.
[0100] Define an array `links` to describe the connections in the knowledge graph. Since each connection links two nodes, it contains the following attributes: `source`: the ID of the starting node of the connection, and `target`: the ID of the target node of the connection.
[0101] Specifically, the data structure for nodes and connections in a knowledge graph can be: `const data = {categories: [{ name: 'Central Entity'}, { name: 'Inspection'}] nodes: [{ category: 0 id: "0" name: "Atrial Fibrillation" symbolSize: 19.12381 value: 28.685715 x: -266.82776y: 299.6904}, { category: 1 id: "1" name: "Inspection" symbolSize:2.6666666666666665 value: 4 x: -418.08344 y: 446.8853}]links: [{ "source": "0", "target": "1",}]` In the given example, there are two nodes: the first node represents "atrial fibrillation", belongs to the "central entity" category, and has an ID of "0"; the second node represents "inspection", belongs to the "inspection" category, and has an ID of "1"; there is a connection that connects the node with ID "0" (atrial fibrillation) and the node with ID "1" (inspection). The above method can be used to store knowledge graph data.
[0102] Please see Figure 2 , Figure 2 yes Figure 1 The flowchart of step S120 in the graph editor window may include, but is not limited to, steps S210 to S220, in some embodiments where multiple entity nodes are connected by relation edges.
[0103] Step S210: Perform feature capture processing on the traceability information data to obtain multiple entity features and the relationship features between multiple entity features, as well as the weight coefficients of entity features in the knowledge graph.
[0104] Step S220: In the graph editor window, based on the ECharts visualization library, entity nodes in the knowledge graph are generated according to entity features and weight coefficients, and relation edges in the knowledge graph are generated according to relation features.
[0105] In some embodiments, through the above steps S210 to S220, the graph editor based on the traceability information data can generate a visualized knowledge graph, displaying multiple entity nodes and the edges between them. This visualization method can present complex traceability information in a concise and intuitive way, and can help users better understand the connections and importance between information, making it easier for users to browse and analyze the correlation of traceability data.
[0106] Please see Figure 3 , Figure 3 yes Figure 2 The flowchart of step S220 in the process, in some embodiments, the generation of entity nodes in the knowledge graph based on entity features and weight coefficients, and the generation of relation edges in the knowledge graph based on relation features, may include, but are not limited to, steps S310 to S340, based on the ECharts visualization library.
[0107] Step S310: Determine the node name of the entity node based on the entity characteristics;
[0108] Step S320: Determine the node size of the entity node based on the weight coefficient;
[0109] Step S330: Based on the ECharts visualization library, assign node coordinates to entity nodes, and generate entity nodes in the knowledge graph according to node coordinates, node name and node size;
[0110] Step S340: Obtain the node coordinates of the entity nodes at both ends of the relationship edge based on the relationship features, and generate the relationship edge in the knowledge graph based on the node coordinates of the entity nodes at both ends.
[0111] In some embodiments, the node size of an entity node is determined based on a weighting coefficient, which reflects the importance or relevance of the entity in the knowledge graph. Therefore, different node sizes can be assigned to entity nodes according to the weighting coefficient to highlight important entities or specific relationships. Furthermore, by analyzing relationship features, the two entity nodes connected by a relationship edge can be identified. Based on the node coordinates of these entity nodes, corresponding relationship edges are generated in the knowledge graph, displaying the relationship type and attributes between the nodes at both ends.
[0112] In some embodiments, through steps S310 to S340 above, the implementation based on the ECharts visualization library can generate a knowledge graph containing entity nodes and relational edges, visually displaying the relationships and importance between entities, enabling users to intuitively understand and analyze the information in the knowledge graph. In some embodiments, when it comes to implementing data visualization functions in a graph editor, especially connecting charts and information, feature capture is a crucial step. Feature capture refers to extracting key information from the data and mapping it onto graphical elements for display and editing in the graph editor. Through steps S210 to S340 above, the present invention can obtain entity features and relational features, and directly display them on nodes, edges, and other elements in the graph editor, so that users can more intuitively see the entities corresponding to each node or the relationships corresponding to each edge.
[0113] In step S130, in response to the click signal received by the graph editor window, the target entity node selected by the click signal is determined;
[0114] In some embodiments, the graph editor window can determine the selected target entity node based on the received click signal, and perform subsequent processing and operations on it.
[0115] In some embodiments, the method of the present invention allows users to click on a node to access specific traceable knowledge, from which a traceability line is generated and dynamically displayed, with the traceability line ending at the traceability segment. When switching to other knowledge (nodes), the traceability line of the previous knowledge (node) disappears and is simultaneously switched to the traceability line of the currently clicked knowledge (node). If a knowledge (node) is clicked multiple times consecutively, the traceability line is only displayed once and does not switch between multiple consecutive clicks.
[0116] In some embodiments, users can also view detailed information about a node by clicking on it using the method of the present invention. This information may include attribute information such as the node's name, author, document name, publication time, source, and source fragment.
[0117] In step S140, multiple related traceability segments are determined from the traceability information data based on the target entity node, and traceability segment cards corresponding to multiple related traceability segments are generated in the traceability segment window;
[0118] Please see Figure 4 , Figure 4 yes Figure 1 The flowchart of step S140 in the process, in some embodiments, the traceability information data includes multiple traceability segments, and the determination of multiple related traceability segments from the traceability information data based on the target entity node may include, but is not limited to, steps S410 to S430.
[0119] Step S410: Obtain the connection relationship information of the target entity node in the knowledge graph;
[0120] Step S420: Determine the adjacent nodes of the target entity node based on the connection relationship information, and determine the relationship edges between the target entity node and its adjacent nodes;
[0121] Step S430: The source fragments of entity features corresponding to the target entity node and its adjacent nodes are determined as relevant source fragments, and the source fragments of relation features corresponding to relation edges are determined as relevant source fragments.
[0122] In some embodiments, the above steps determine multiple relevant traceability segments from the traceability information data based on the target entity node. These segments include entity feature traceability segments of the target entity node and its neighboring nodes, as well as relation feature traceability segments of relation edges. This helps to obtain information related to the target entity node, further enriches the content of the traceability data, and provides more comprehensive information support and analysis basis.
[0123] In step S150, the correlation coefficients of multiple traceability fragment cards are obtained, and the target traceability fragment card is determined from the multiple traceability fragment cards based on the correlation coefficients.
[0124] Please see Figure 5 , Figure 5 yes Figure 1 The flowchart of step S150 in the process, in some embodiments, obtaining the correlation coefficient of multiple traceability fragment cards and determining the target traceability fragment card from multiple traceability fragment cards based on the correlation coefficient may include, but is not limited to, steps S510 to S540.
[0125] Step S510: Determine the relation source fragment cards corresponding to multiple relation edges from multiple source fragment cards;
[0126] Step S520: Obtain the association weight coefficients of multiple relationship traceability fragment cards. The association weight coefficients are the weight coefficients of the adjacent nodes corresponding to the relationship traceability fragment cards.
[0127] Step S530: Determine the association coefficients of multiple relational traceability fragment cards based on the association weight coefficients;
[0128] Step S540: The relationship traceability fragment card with a correlation coefficient greater than the preset correlation threshold is identified as the target traceability fragment card.
[0129] In some embodiments, since the association weight coefficient represents the importance or correlation between the relationship traceability fragment card and its adjacent nodes, it is used to measure the influence of the relationship traceability fragment card on the connected entity nodes. That is, the larger the weight coefficient of the adjacent node, the stronger the correlation between the adjacent node and the selected entity node. Therefore, the weight coefficient of the corresponding adjacent node can be determined as the association weight coefficient of the relationship traceability fragment card, and then a secondary screening can be performed to determine the target traceability fragment card. Through the above process, the traceability fragments that are most relevant and important to the entity nodes can be screened from multiple traceability fragment cards, further enriching the content and association information of the target traceability fragment. This allows the present invention to provide more in-depth and accurate traceability information, enabling users to have a more comprehensive understanding of the relationship between entity nodes and supporting more targeted analysis and decision-making. In addition, by setting association thresholds and weight coefficients, customized screening and sorting can be performed, improving users' understanding and grasp of the association information in the knowledge graph.
[0130] In step S160, the location information of the target entity node and the target traceability fragment card is obtained, and the target entity node and the target traceability fragment card are connected according to the location information.
[0131] In some embodiments, the components connecting the traceability relationships need to be absolutely positioned to fill the screen. Therefore, all coordinate parameters passed from the business side, such as the position information of the target entity node and the target traceability fragment card, are coordinates with the top left corner of the screen as the origin.
[0132] Please see Figure 6 , Figure 6 This is a flowchart for obtaining the starting point position information. In some embodiments, the position information of the target entity node includes the starting point position information. The steps for obtaining the starting point position information are as follows: taking the upper left corner of the front-end interface as the origin, obtain the click coordinate information of the click signal through the ECharts visualization library, and obtain the starting point position information based on the click coordinate information.
[0133] The location information of the target traceability segment card includes the endpoint location information, and the steps for obtaining the starting point location information may include, but are not limited to, steps S610 to S630.
[0134] Step S610: Obtain the card width information of the target traceability fragment card;
[0135] Step S620: Obtain distance information between multiple target traceability fragment cards and the top of the traceability fragment window;
[0136] Step S630: Obtain the destination location information based on the card width information and distance information.
[0137] Specifically, taking the top left corner of the front-end interface as the origin, the top of the traceability fragment window has the same coordinates as the top of the front-end interface. Therefore, the Y-axis coordinate of the endpoint can be obtained based on the distance information between the target traceability fragment card and the top of the traceability fragment window. Conversely, the right side of the traceability fragment window has the same coordinates as the right side of the front-end interface. By obtaining the card width information of the target traceability fragment card, the X-axis coordinate of the endpoint can be obtained.
[0138] In some embodiments, steps S610 to S630 described above can obtain the endpoint location information of the target traceability fragment card, ensuring the accuracy of the connection processing and the visualization effect, enabling users to intuitively understand the relationship between entity nodes and traceability fragments. Simultaneously, by considering the card width and layout, the readability of the graph and the user experience can be improved.
[0139] Please see Figure 7 , Figure 7 yes Figure 1 The flowchart of step S160 in the process, in some embodiments, the connection processing of the target entity node and the target traceability fragment card according to the location information may include, but is not limited to, steps S710 to S730.
[0140] Step S710: Determine the relationship type and relationship strength based on the relationship features corresponding to the target traceability fragment card;
[0141] Step S720: Determine the line color parameters based on the relationship type, and determine the line shape parameters based on the relationship strength;
[0142] Step S730: Based on the ECharts visualization library, generate connecting lines according to the starting point position information, ending point position information, line color parameters, and line shape parameters for connection processing.
[0143] In some embodiments, based on the ECharts visualization library, a connection line is generated according to the start position information, end position information, line color parameter, and line form parameter for connection processing, including: defining the namespace of SVG to ensure that the browser correctly resolves SVG elements; defining the start coordinate (corresponding to the start position information) and the end coordinate array (corresponding to the end position information) through "const sourceCoord = [x, y]; const targetCoord = [[x, y], [x, y], [x, y]];"; creating a document fragment through "const fragment = document.createDocumentFragment();". The document fragment is a lightweight Document object that is not part of the real DOM tree. The Document object can be used to add nodes, and then this document fragment is added to the real DOM, which can improve the performance of connection processing because multiple direct operations on the DOM may cause multiple repaints and reflows; starting a loop through "for (let i = 0; i < targetCoord.length; i++) {...}", iterating over each end coordinate, and creating a path element using the SVG namespace to define the path and calling the function path.setAttribute to set the attributes of this path element: for example, by calling and setting the d attribute of the path, a curve from the start point to the end point can be defined, using the syntax of the Bezier curve; by calling and setting the fill attribute to none, it can be defined that this path is not filled with any color; by calling and setting the stroke attribute, the line color of the path can be defined; by calling and setting the marker-end attribute, it can be defined that there is a marker at the end of the path, which is expected to be an arrow here. Through the above steps, the automatic connection function is completed, and the adjustment of the line color parameter and line form parameter can be realized. Furthermore, according to the attributes of the relationship, the thickness, color, arrow, etc. of the connection line can be automatically adjusted to realize the change of the style and direction of the connection line. And through flexible control of the line color and form parameters, different types and intensities of relationships can be presented to reflect different relationship types and natures.
[0144] In some embodiments, when the vertical sliding window on the right side of the front-end interface scrolls, the business party determines the end point of the arrow by calculating the position of the traceability fragment card in real time. Since the coordinate position of the node is known, the position of the node in the document object model dom can be obtained through the convertToPixel method. Since the start position of the line also needs to change when the node position changes, when the node is clicked, the knowledge graph does not support zooming in and out and moving the position. After the connection line disappears when clicked and canceled, the restoration function is available.
[0145] Specifically, the traceability segment window includes a vertical sliding window located on the right side of the front-end interface. After obtaining the distance information between multiple target traceability segment cards and the top of the traceability segment window, it also includes: obtaining the vertical sliding distance of multiple traceability segments when the vertical sliding window responds to the received sliding signal and performs sliding display processing on multiple traceability segment cards; adjusting the distance information according to the vertical sliding distance; and obtaining the endpoint position information of the target traceability segment card according to the card width information and the adjusted distance information.
[0146] In some embodiments, after generating a knowledge graph based on source information data in the graph editor window, the method further includes: responding to an editing control signal received by the graph editor window, performing editing control processing on the knowledge graph through a graph editor function module deployed in the graph editor window; wherein the editing control processing includes at least one of the following:
[0147] Scaling the knowledge graph;
[0148] Adding, deleting, and editing entity nodes and the edges between multiple entity nodes in the knowledge graph;
[0149] The attribute information of entity nodes and relation edges in the knowledge graph is displayed in a floating window.
[0150] The entity nodes in the knowledge graph are searched to identify the target entity node, and the visible range of the knowledge graph is adjusted based on the location information of the target entity node.
[0151] Specifically, the editing control processing through the graph editor function module deployed in the graph editor window can include, but is not limited to, the following functions: First, the graph editor can determine the different types of knowledge elements to be represented according to user needs, and define the appearance and attributes of nodes for each type. Compared with the conventional ECharts open-source framework, it has a higher degree of automation and a better user experience. At the same time, it automatically generates a user-friendly graphical interface, allowing users to easily create and edit nodes. Second, it allows users to draw connections between nodes and source cards, and provides automatic layout tools to ensure that the graph maintains a clear and orderly appearance. It supports automatic arrangement, alignment, and grouping of nodes and connections, while conventional ECharts only supports automatic layout of nodes and not automatic layout of connections. In addition, it can provide toolbars for zooming in and out of nodes, full-screen display, adding nodes and connections, etc., so that users can browse large knowledge graphs and allow users to view historical versions of knowledge graphs to trace the evolution of information. It provides undo and redo functions, as well as version comparison tools.
[0152] In some embodiments, the graph editor module deployed in the graph editor window allows users to edit and control the knowledge graph, and also allows users to configure the appearance of custom nodes and connections via JSON to suit their needs and preferences. Customization options such as colors, shapes, and icons are provided, and it supports importing nodes and connections from external data sources for rapid knowledge graph construction. Users can also export the graph to formats such as images, PDFs, and text.
[0153] In some embodiments, through the graph editor function module deployed in the graph editor window, users can search for nodes in the graph editor by entering keywords in the search box. The system will highlight the nodes that match the keywords and move them into the visible range.
[0154] In some embodiments, through the graph editor function module deployed in the graph editor window, users can use the mouse wheel to zoom the size of the graph editor, or drag the canvas to move the entire graph editor, which can help users better view and manipulate larger knowledge graphs.
[0155] In summary, compared to existing solutions that only use the open-source ECharts, this invention introduces a graph editor provided by the front-end framework React.js. The graph editor has the following functions: node and type definition, user-friendly graphical interface, connection creation and editing, toolbar, etc. This allows the knowledge tracing connection scheme based on the graph editor of this invention to help users more clearly visualize and understand the source, evolution and relationship of information. It allows users to create, edit and manage graphical nodes in the graphical interface to represent different knowledge elements, and then use connections to connect these nodes to show the relationship between them.
[0156] Secondly, refer to Figure 8 , Figure 8This is a schematic diagram of a knowledge tracing and connection system based on a graph editor provided in an embodiment of the present invention. The system includes: an interface building module 801, used to build a front-end interface using a front-end framework, the front-end interface including a graph editor window and a tracing fragment window; a knowledge graph generation module 802, used to acquire tracing information data and generate a knowledge graph in the graph editor window based on the tracing information data, the knowledge graph including multiple entity nodes; and an entity node determination module 803, used to determine the selected entity node in response to a click signal received by the graph editor window. The system includes: a target entity node; a traceability segment determination module 804, used to determine multiple related traceability segments from the traceability information data based on the target entity node, and generate traceability segment cards corresponding to the multiple related traceability segments in the traceability segment window; a traceability card determination module 805, used to obtain the correlation coefficient of multiple traceability segment cards, and determine the target traceability segment card from the multiple traceability segment cards based on the correlation coefficient; and a traceability information connection module 806, used to obtain the location information of the target entity node and the target traceability segment card, and perform connection processing on the target entity node and the target traceability segment card based on the location information.
[0157] Please see Figure 9 , Figure 9 This is a schematic diagram of the interface of the knowledge tracing and connection system based on a graph editor provided in this embodiment of the invention. The front-end interface 900 is built using a front-end framework, and includes a graph editor window 910 and a tracing fragment window 920. The graph editor window 910 generates a knowledge graph based on tracing information data, including multiple entity nodes. The tracing fragment window 920 includes related tracing fragments and target tracing fragment cards (as shown in Figures 921 to 923). The target tracing fragment card includes specific tracing information (such as specific tracing information 1 to 3). Furthermore, the graph editor window 910 also includes a graph editor toolbar 911, which contains multiple function keys. With user clicks, the graph editor function modules deployed in the graph editor window can perform the aforementioned editing control processing on the knowledge graph. This allows the knowledge tracing and connection scheme based on a graph editor in this invention to provide richer usage and interactive functions, thereby helping users understand the relationships between knowledge more intuitively and conveniently. Users can use different interaction methods according to their needs to achieve the best usage effect.
[0158] Acquire source information data and generate a knowledge graph based on the source information data in the graph editor window. The knowledge graph includes multiple entity nodes.
[0159] In response to a click signal received in the graph editor window, determine the target entity node selected by the click signal;
[0160] Based on the target entity node, multiple related traceability segments are determined from the traceability information data, and traceability segment cards corresponding to multiple related traceability segments are generated in the traceability segment window;
[0161] Obtain the correlation coefficients of multiple traceability fragment cards, and determine the target traceability fragment card from the multiple traceability fragment cards based on the correlation coefficients;
[0162] Obtain the location information of the target entity node and the target traceability fragment card, and connect the target entity node and the target traceability fragment card according to the location information.
[0163] Thirdly, embodiments of the present invention also provide an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned knowledge tracing and connection method based on a graph editor. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0164] Please see Figure 10 , Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. The electronic device includes:
[0165] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0166] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the knowledge tracing and connection method based on a graph editor according to the embodiments of this invention.
[0167] Input / output interface 1003 is used to implement information input and output;
[0168] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0169] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0170] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0171] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the above-described knowledge tracing and connection method based on a graph editor.
[0172] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0173] In summary, compared to existing technologies, the knowledge tracing and connection scheme based on a graph editor provided in this invention can build a front-end interface using a front-end framework, acquire tracing information data, and generate a knowledge graph in the graph editor window based on the tracing information data. When the target entity node selected by the click signal is determined, multiple tracing fragment cards corresponding to related tracing fragments are generated in the tracing fragment window. The target tracing fragment card is then determined from these multiple tracing fragment cards based on the correlation coefficient, thereby obtaining the position information of the target entity node and the target tracing fragment card. Based on the position information, the target entity node and the target tracing fragment card are connected, thus achieving automated tracing information connection functionality. This solves the problem of a lack of intuitive interaction between the knowledge graph and knowledge tracing information, improves the visualization capabilities of the knowledge graph system, and allows users to view knowledge tracing information more quickly and effectively.
[0174] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0175] It will be understood by those skilled in the art that Figures 1 to 8 The technical solutions shown do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0176] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0177] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, and the corresponding systems, can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer-readable storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0178] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be within the scope of the claims of the present invention.
Claims
1. A knowledge provenance wiring method based on a graph editor, characterized by, The method comprises the following steps: Building a front-end interface through a front-end framework, the front-end interface comprising a graph editor window and a provenance fragment window; Obtaining provenance information data and generating a knowledge graph in the graph editor window according to the provenance information data, the knowledge graph comprising a plurality of entity nodes; In response to a click signal received by the graph editor window, determining a target entity node selected by the click signal; Determining a plurality of related provenance fragments from the provenance information data according to the target entity node, and generating a plurality of provenance fragment cards corresponding to the related provenance fragments in the provenance fragment window; Obtaining correlation coefficients of a plurality of the provenance fragment cards, and determining a target provenance fragment card from a plurality of the provenance fragment cards according to the correlation coefficients; Obtaining position information of the target entity node and the target provenance fragment card, and performing connection processing on the target entity node and the target provenance fragment card according to the position information; The plurality of entity nodes are connected through relationship edges, and the generation of the knowledge graph in the graph editor window according to the provenance information data comprises: Performing feature capturing processing on the provenance information data to obtain a plurality of entity features and relationship features between a plurality of the entity features, and to obtain weight coefficients of the entity features in the knowledge graph; In the graph editor window, generating the entity nodes in the knowledge graph according to the entity features and the weight coefficients based on an ECharts visualization library, and generating the relationship edges in the knowledge graph according to the relationship features; The provenance information data comprises a plurality of provenance fragments, and the determination of a plurality of related provenance fragments from the provenance information data according to the target entity node comprises: Obtaining connection relationship information of the target entity node in the knowledge graph; Determining adjacent nodes of the target entity node according to the connection relationship information, and determining relationship edges between the target entity node and the adjacent nodes; Determining the provenance fragments of the entity features corresponding to the target entity node and the adjacent nodes as related provenance fragments, and determining the provenance fragments of the relationship features corresponding to the relationship edges as the related provenance fragments.
2. The graph editor based knowledge provenance wiring method of claim 1, wherein, The generation of the entity nodes in the knowledge graph according to the entity features and the weight coefficients based on the ECharts visualization library, and the generation of the relationship edges in the knowledge graph according to the relationship features comprise: Determining node names of the entity nodes according to the entity features; Determining node sizes of the entity nodes according to the weight coefficients; Assigning node coordinates to the entity nodes based on the ECharts visualization library, and generating the entity nodes in the knowledge graph according to the node coordinates, the node names and the node sizes; Obtaining node coordinates of entity nodes at two ends of the relationship edges according to the relationship features, and generating the relationship edges in the knowledge graph according to the node coordinates of the two end entity nodes.
3. The graph editor based knowledge provenance wiring method of claim 1, wherein, The correlation coefficients of the plurality of trace segment cards are obtained, and a target trace segment card is determined from the plurality of trace segment cards according to the correlation coefficients, including: A plurality of relationship trace segment cards corresponding to the relationship edges are determined from the plurality of trace segment cards; An association weight coefficient of the plurality of relationship trace segment cards is obtained, the association weight coefficient being the weight coefficient of the adjacent node corresponding to the relationship trace segment card; A correlation coefficient of the plurality of relationship trace segment cards is determined according to the association weight coefficient; The relationship trace segment card with the correlation coefficient greater than a preset association threshold is determined as the target trace segment card.
4. The graph editor based knowledge provenance wiring method of claim 1, wherein, The position information of the target entity node includes start point position information, and the position information of the target trace segment card includes end point position information; The start point position information is obtained as follows: Taking the upper left corner coordinate of the front-end interface as the origin, the click coordinate information of the click signal is obtained through the ECharts visualization library, and the start point position information is obtained according to the click coordinate information; The start point position information is obtained as follows: Card width information of the target trace segment card is obtained; Distance information between the plurality of target trace segment cards and the top of the trace segment window is obtained; The end point position information is obtained according to the card width information and the distance information.
5. The graph editor based knowledge provenance wiring method of claim 4, wherein, The connection processing of the target entity node and the target trace segment card according to the position information includes: A relationship type and a relationship strength are determined according to the relationship feature corresponding to the target trace segment card; A line color parameter is determined according to the relationship type, and a line shape parameter is determined according to the relationship strength; A connection line is generated based on the ECharts visualization library according to the start point position information, the end point position information, the line color parameter and the line shape parameter, so as to perform the connection processing.
6. The graph editor based knowledge provenance wiring method of claim 4, wherein, The trace segment window includes a longitudinal sliding window located on the right side of the front-end interface, and after the distance information between the plurality of target trace segment cards and the top of the trace segment window is obtained, the method further includes: In a case where the longitudinal sliding window responds to a received sliding signal and performs sliding display processing on the plurality of trace segment cards, a longitudinal sliding distance of the plurality of trace segment cards is obtained; The distance information is adjusted according to the longitudinal sliding distance; The end point position information of the target trace segment card is obtained according to the card width information and the adjusted distance information.
7. The graph editor based knowledge provenance wiring method of claim 1, wherein, After the knowledge graph is generated according to the trace information data in the graph editor window, the method further includes: In response to an editing control signal received by the graph editor window, an editing control processing is performed on the knowledge graph by a graph editor function module deployed in the middle of the graph editor window; The editing control processing at least includes one of the following: The knowledge graph is scaled; The entity nodes in the knowledge graph and the relationship edges between the plurality of entity nodes are added, deleted and edited; Attribute information of the entity nodes and the relationship edges in the knowledge graph is displayed in a floating window. The entity nodes in the knowledge graph are searched to determine a target entity node, and a visual range of the knowledge graph is adjusted according to position information of the target entity node.
8. A knowledge provenance wiring system based on a graph editor, characterized by, Comprise: An interface building module is configured to build a front-end interface through a front-end framework, the front-end interface comprising a graph editor window and a traceability fragment window; A knowledge graph generation module is configured to acquire traceability information data and generate a knowledge graph in the graph editor window according to the traceability information data, the knowledge graph comprising a plurality of entity nodes; An entity node determination module is configured to determine a target entity node selected by a click signal received by the graph editor window in response to the click signal; A traceability fragment determination module is configured to determine a plurality of relevant traceability fragments from the traceability information data according to the target entity node and generate a plurality of traceability fragment cards corresponding to the relevant traceability fragments in the traceability fragment window; A traceability card determination module is configured to acquire correlation coefficients of a plurality of the traceability fragment cards and determine a target traceability fragment card from the plurality of traceability fragment cards according to the correlation coefficients; A traceability information connection module is configured to acquire position information of the target entity node and the target traceability fragment card and perform connection processing on the target entity node and the target traceability fragment card according to the position information; The plurality of entity nodes are connected through relationship edges, and the knowledge graph is generated in the graph editor window according to the traceability information data, comprising: Feature capturing processing is performed on the traceability information data to obtain a plurality of entity features, relationship features between the plurality of entity features, and weight coefficients of the entity features in the knowledge graph; In the graph editor window, the entity nodes in the knowledge graph are generated according to the entity features and the weight coefficients based on an ECharts visualization library, and the relationship edges in the knowledge graph are generated according to the relationship features; The traceability information data comprises a plurality of traceability fragments, and the plurality of relevant traceability fragments are determined from the traceability information data according to the target entity node, comprising: Connection relationship information of the target entity node in the knowledge graph is acquired; Adjacent nodes of the target entity node are determined according to the connection relationship information, and relationship edges between the target entity node and the adjacent nodes are determined; The traceability fragments of the entity features corresponding to the target entity node and the adjacent nodes are determined as relevant traceability fragments, and the traceability fragments of the relationship features corresponding to the relationship edges are determined as the relevant traceability fragments.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the knowledge traceability connection method based on the graph editor in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the memory and executed by the processor to implement the knowledge traceability connection method based on the graph editor in any one of claims 1 to 7.
Citation Information
Patent Citations
Connection wire compiling method and graph compiling device
CN102722898A
Knowledge graph visual editing and persistence implementation method and system architecture
CN111339316A