A knowledge graph-based link tracking method and device
By using a knowledge graph-based link tracing method, directed connected graphs are dynamically generated, solving the problem of low graph construction efficiency in existing technologies and enabling online, efficient graph construction and flexible adjustment of link tracing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HAIPU WANGJU TECH LTD
- Filing Date
- 2023-05-31
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, online dynamic graph construction is not possible during the knowledge graph construction process, and the graph construction efficiency is low.
This paper presents a knowledge graph-based link tracing method that generates a directed connected graph, supports dynamic stopping of tracing for single links and all links, dynamic graph output, and supports starting a new round of link tracing from a certain node.
It enables online dynamic mapping, improves mapping efficiency, and supports adjusting link tracing according to actual conditions to achieve efficient mapping.
Smart Images

Figure CN116756334B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management technology, and more specifically, to a knowledge graph-based link tracing method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] The description of the background art in this invention pertains to related technologies and is used merely for illustration and to facilitate understanding of the invention. It should not be construed as the applicant explicitly believing or presuming that the invention was prior art on the filing date of the first application.
[0003] Knowledge graphs are a technical approach that uses graph models to describe knowledge and model the relationships between everything in the world. In existing technologies, online dynamic graph building is not possible during the graph construction process, and the graph building efficiency is low.
[0004] To address the aforementioned technical problems, this invention proposes a knowledge graph-based link tracing method, apparatus, device, and computer-readable storage medium. The link tracing method presents the knowledge graph in a visual form, dynamically generating the graph. Following the graph generation order, it obtains a set of entity and relation data, generates a directed connected graph, and, based on actual conditions, supports stopping tracing for a single link online, supports stopping tracing for all links, and after the dynamic graph generation is complete, supports starting a new round of link tracing from a certain node. Summary of the Invention
[0005] This invention provides a knowledge graph-based link tracing method, apparatus, device, and computer-readable storage medium. The link tracing method presents the knowledge graph in a visual form, dynamically generates the graph, obtains a set of entity and relationship data according to the graph generation order, generates a directed connected graph, and supports stopping tracing for a single link or all links online, depending on the actual situation. After the dynamic graph generation is completed, it supports starting a new round of link tracing from a certain node.
[0006] An embodiment of the first aspect of the present invention provides a knowledge graph-based link tracing method, comprising the following steps: A web client initiates link tracing; a server-side graph management component calculates the Session ID for initiating the link tracing, returns it to the web client, and submits the link tracing task to a graph analysis component; the graph analysis component performs graph calculation and analysis according to business rules and notifies the graph management component to obtain the calculation results; the graph management component persists the obtained calculation results to the corresponding storage medium based on the Session ID; the web client initiates a query result request in a polling manner based on the obtained Session ID; the server obtains the result data from the graph management component through a graph display component, constructs a directed connected graph according to the corresponding business rules, and returns it to the web client; the web client renders the results and performs link tracing operations.
[0007] Preferably, the web client initiates a tracing process. The server-side graph management component calculates the Session ID that initiated the tracing, returns it to the web client, and submits the tracing task to the graph analysis component step. The web client then initiates a tracing process based on data from a specific business edge.
[0008] Preferably, the web client initiates a tracing operation. The server-side graph management component calculates the Session ID that initiated the tracing operation, returns it to the web client, and submits the tracing task to the graph analysis component. The server-side graph management component then calculates the Session ID that initiated the tracing operation based on the relevant metadata.
[0009] Preferably, the web client renders the results, and the link tracing operation steps include manually stopping link tracing as needed, or initiating a new round of link tracing based on a certain entity point.
[0010] Preferably, the web client renders the results, and the link tracing operation steps also include determining whether the tracing depth has been reached after starting link tracing; if so, link tracing is automatically stopped.
[0011] Preferably, after starting link tracing, it is determined whether the tracing depth has been reached. If not, it is determined whether to stop link tracing. If so, link tracing is manually stopped.
[0012] Preferably, it determines whether to stop link tracing; if not, it calculates and updates the result, and initiates a new round of link tracing based on a certain entity point.
[0013] A second aspect of the present invention also provides a knowledge graph-based link tracing device, comprising: a link tracing task submission module, which is used by a web client to initiate link tracing, a server-side graph management component to calculate the Session ID for initiating the link tracing, return it to the web client, and submit the link tracing task to a graph analysis component; a graph calculation and analysis module, which is used by the graph analysis component to perform graph calculation and analysis according to business rules, and notify the graph management component to obtain the calculation results; a persistence module, which is used by the graph management component to persist the obtained calculation results to the corresponding storage medium according to the Session ID; a connected graph construction module, which is used by the web client to initiate query result requests based on the obtained Session ID, the server to obtain result data from the graph management component through a graph display component, and construct a directed connected graph according to the corresponding business rules and return it to the web client; and a link tracing module, which is used by the web client to render the results and perform link tracing operations.
[0014] A third aspect of the present invention also provides a knowledge graph-based link tracing device, which includes a memory and a processor; wherein the memory is used to store executable program code; and the processor is used to read the executable program code stored in the memory to execute a knowledge graph-based link tracing method.
[0015] An embodiment of the fourth aspect of the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a knowledge graph-based link tracing method.
[0016] The present invention provides a knowledge graph-based link tracing method, apparatus, device, and computer-readable storage medium. The link tracing method presents the knowledge graph in a visual form, dynamically generates the graph, obtains a set of entity and relation data according to the graph generation order, generates a directed connected graph, and supports stopping the tracing of a single link or all links online, depending on the actual situation. After the dynamic graph generation is completed, it supports starting a new round of link tracing from a certain node.
[0017] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0018] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0019] Figure 1 A flowchart of a knowledge graph-based link tracing method according to an embodiment of the present invention is shown;
[0020] Figure 2 This is a structural diagram of one embodiment of a knowledge graph-based link tracing device described in this specification;
[0021] Figure 3 This is a structural diagram of an embodiment of a computer-readable storage medium based on the knowledge graph link tracing method described in this specification. Detailed Implementation
[0022] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0024] The following discussion provides several embodiments of the invention. While each embodiment represents a single combination of the invention, different embodiments of the invention can be substituted or combined, and therefore the invention can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes A, B, and C, and another embodiment includes a combination of B and D, then the invention should also be considered to include embodiments containing one or more other all other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0025] Figure 1 A flowchart illustrating a knowledge graph-based link tracing method according to an embodiment of the present invention is shown. Figure 1As shown, the knowledge graph-based link tracing method includes the following steps: The web client initiates link tracing based on data from a specific business edge. The server-side GraphClient (graph management component) calculates the Session ID (MD5 value) for initiating this link tracing from the relevant metadata, returns it to the web client, and submits the link tracing task to GraphAnalysis (graph analysis component). GraphAnalysis (graph analysis component) performs graph computation and analysis according to relevant business rules and notifies GraphClient (graph management component) to obtain the computation results. GraphClient (graph management component) persists the obtained results to the corresponding storage medium based on the Session ID. The web client initiates query result requests in a polling manner based on the obtained Session ID. The server obtains the result data from GraphClient (graph management component) through GraphDisplayLogic (graph display component), constructs a directed connected graph according to the corresponding business rules, and returns it to the web client. The web client renders the results and can manually stop a link tracing or initiate a new round of link tracing based on a specific entity point, depending on the situation.
[0026] The knowledge graph link tracing method presents the knowledge graph in a visual format, dynamically generating the graph. Following the graph generation order (depth-first / breadth-first), it obtains a set of entity and relationship data, generating a directed connected graph. It supports online tracing stopping for a single link or all links, and allows starting a new round of link tracing from a specific node after dynamic graph generation. The link tracing backend consists of the following components: GraphAnalysis, GraphClient, and GraphDisplayLogic. The web interface, through the knowledge graph link tracing method, enables online dynamic graph construction and adjustment of corresponding graph tracing branches based on actual conditions, achieving efficient graph construction.
[0027] In the knowledge graph-based link tracing method of this invention, the web client renders the results and the link tracing operation steps also include: after starting link tracing, determining whether the tracing depth has been reached; if yes, automatically stopping link tracing; if no, determining whether to stop link tracing; if yes, manually stopping link tracing; if no, calculating and updating the results, and initiating a new round of link tracing based on a certain entity point.
[0028] In the knowledge graph-based link tracing method of this invention, the Session ID is calculated, and it is determined whether the Session ID exists. If it exists, the query result is retrieved and the process ends. If it does not exist, the tracing relationship data is queried to see if it meets the conditions. If the conditions are not met, the tracing is stopped. If the conditions are met, the tracing graph is initialized, a graph analysis task is generated, and the tracing begins.
[0029] The knowledge graph-based link tracing device provided in this invention includes: a link tracing task submission module, used by the web client to initiate link tracing, whereby the server-side graph management component calculates the Session ID for initiating the link tracing, returns it to the web client, and submits the link tracing task to the graph analysis component; a graph calculation and analysis module, used by the graph analysis component to perform graph calculation and analysis according to business rules, and notifies the graph management component to obtain the calculation results; a persistence module, used by the graph management component to persist the obtained calculation results to the corresponding storage medium according to the Session ID; a connected graph construction module, used by the web client to initiate query result requests based on the obtained Session ID, whereby the server obtains the result data from the graph management component through the graph display component, constructs a directed connected graph according to the corresponding business rules, and returns it to the web client; and a link tracing module, used by the web client to render the results and perform link tracing operations.
[0030] Figure 2 This is a structural diagram of one embodiment of a knowledge graph-based link tracing device described in this specification. See below for reference. Figure 2 The diagram illustrates a structural schematic suitable for implementing the knowledge graph-based link tracing device 300 of the embodiments of this disclosure. The electronic devices in the embodiments of this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 2 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0031] like Figure 2As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0032] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 2 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0033] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. When the computer program is executed by the processing device 301, it performs the functions defined in the methods of embodiments of this disclosure.
[0034] Figure 3 This is a structural diagram of an embodiment of a computer-readable storage medium based on a knowledge graph link tracing method, as described in this specification. Figure 3 As shown, a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon. When the non-transitory computer-readable instructions 41 are executed by a processor, all or part of the steps of the knowledge graph-based link tracing method of the foregoing embodiments of the present disclosure are performed.
[0035] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0036] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0037] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.
[0038] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: construct a base page, the page code of which is used to build the environment required for the operation of the business page and / or implement the same workflow abstracted from similar business scenarios; construct one or more page templates, the page templates being used to provide code templates for implementing business functions in the business scenario; based on the corresponding page templates, through code conversion of the specific functions of each page in the business scenario, generate the final page code for each page in the business scenario; and merge the generated final page code of each page into the page code of the base page to generate the code for the business page.
[0039] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0040] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0041] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0042] The present invention provides a knowledge graph-based link tracing method, apparatus, device, and computer-readable storage medium. The link tracing method presents the knowledge graph in a visual form, dynamically generates the graph, obtains a set of entity and relation data according to the graph generation order, generates a directed connected graph, and supports stopping the tracing of a single link or all links online, depending on the actual situation. After the dynamic graph generation is completed, it supports starting a new round of link tracing from a certain node.
[0043] In this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise explicitly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0044] In the description of this invention, it should be understood that the terms "upper" and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0045] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0046] The above are merely some embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A knowledge graph-based link tracing method, characterized in that, Includes the following steps: The web client initiates a tracing process. The server-side graph management component calculates the SessionID that initiated the tracing and returns the SessionID to the web client. It also submits the tracing task to the graph analysis component. The web client initiates the tracing based on data from a specific business edge. The graph analysis component performs graph calculations and analysis according to business rules, and notifies the graph management component to obtain the calculation results; The graph management component persists the obtained calculation results to the corresponding storage medium according to the SessionID; The web client initiates query result requests in a polling manner based on the obtained SessionID. The server obtains the result data from the graph management component through the graph display component, constructs a directed connected graph according to the corresponding business rules, and returns it to the web client. The web client renders the results and performs link tracing operations, which include: manually stopping the tracing of a specified link, or initiating a new round of link tracing starting from any entity point in the rendered directed connected graph.
2. The knowledge graph-based link tracing method according to claim 1, characterized in that, When the web client initiates a tracing operation, the server-side graph management component calculates the SessionID that initiated the tracing, returns it to the web client, and submits the tracing task to the graph analysis component. The server-side graph management component then calculates the SessionID that initiated the tracing based on the relevant metadata.
3. The knowledge graph-based link tracing method according to claim 2, characterized in that, The web client renders the results, and the link tracing operation also includes determining whether the tracing depth has been reached after starting link tracing; if so, link tracing is automatically stopped.
4. The knowledge graph-based link tracing method according to claim 3, characterized in that, After starting link tracing, determine whether the tracing depth has been reached. If not, determine whether to stop link tracing. If so, manually stop link tracing.
5. The knowledge graph-based link tracing method according to claim 4, characterized in that, Determine whether to stop link tracing. If not, calculate and update the result, and initiate a new round of link tracing based on a certain entity point.
6. A knowledge graph-based link tracing device, characterized in that, include: The link tracing task submission module is used to initiate link tracing on the web client. The server-side graph management component calculates the SessionID for initiating this link tracing and returns the SessionID to the web client. It also submits the link tracing task to the graph analysis component. The web client initiates link tracing based on data from a certain business edge. The graph calculation and analysis module is used by the graph analysis component to perform graph calculations and analysis according to business rules, and to notify the graph management component to obtain the calculation results. The persistence module is used by the graph management component to persist the obtained calculation results to the corresponding storage medium according to the SessionID. The connected graph construction module is used by the web client to initiate query result requests in a round-robin manner based on the obtained SessionID. The server obtains the result data from the graph management component through the graph display component, constructs a directed connected graph according to the corresponding business rules, and returns it to the web client. The link tracing module is used by the web client to render the results and perform link tracing operations. The link tracing operations include: manually stopping the tracing of a specified link, or initiating a new round of link tracing starting from any entity point in the rendered directed connected graph.
7. A knowledge graph-based link tracing device, comprising a memory and a processor; wherein, The memory is used to store executable program code; The processor is used to read executable program code stored in the memory to execute the knowledge graph-based link tracing method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the knowledge graph-based link tracing method according to any one of claims 1-5.