Knowledge graph-based information acquisition method and device, equipment and storage medium

By using a knowledge graph-based approach, the feature and attribute descriptions input by the user are automatically calculated, which solves the problems of low efficiency and low accuracy in existing technologies and achieves efficient and accurate information acquisition.

CN120596633BActive Publication Date: 2026-03-20CHINESE ACAD OF PREVENTIVE MEDICINE +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In the existing dialogue process, the second user needs to rely on experience to drive the conversation, which leads to inefficiency and low accuracy in obtaining key information.

Method used

By using a knowledge graph-based approach, the priority of feature nodes and state nodes is automatically calculated by obtaining the feature and attribute descriptions input by the user, and the feature with the highest priority is obtained as the target information.

Benefits of technology

It improves the efficiency and accuracy of information acquisition, reduces the burden on secondary users, and increases the degree of automation in information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596633B_ABST
    Figure CN120596633B_ABST
Patent Text Reader

Abstract

The present application relates to the computer technology application field, specifically to a kind of information acquisition method, device and equipment based on knowledge graph and storage medium, comprising: obtaining the input information of current input of user;Based on the input information of current input of user, the identification of feature node and attribute node is set;Any state node in knowledge graph corresponding priority is obtained;Any feature node in knowledge graph corresponding priority is obtained;The feature corresponding to the maximum in the priority of feature node is taken as target information.The present application utilizes the relationship between feature and state in knowledge graph, can automatically obtain the key information corresponding to the feature description, so as to improve the efficiency and accuracy of information acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer technology application, and particularly relates to an information acquisition method and device based on a knowledge graph, equipment and a storage medium. BACKGROUND

[0002] In some application scenarios, for a question of a first user, a second user needs to have a multi-round conversation with the first user to obtain key information corresponding to the question. However, in the existing conversation process, the conversation process basically needs to be promoted by experience of the second user, and such a conversation mode increases the burden of the second user, leads to low efficiency, and the accuracy of the obtained key information is not high. SUMMARY

[0003] To solve the above technical problems, the technical scheme adopted by the present application is as follows:

[0004] According to the first aspect of the present application, an information acquisition method based on a knowledge graph is provided, and the method comprises the following steps:

[0005] S100, input information currently input by a user is acquired, the input information comprises feature description or comprises feature description and attribute description, the feature description comprises first feature description or comprises first feature description and second feature description, the first feature description is a feature selected by the user, the second feature description is a feature not selected by the user, and the attribute description comprises an attribute selected by the user.

[0006] S200, based on the input information currently input by the user, an identifier of a feature node corresponding to the first feature description in a current knowledge graph is set as a first identifier, as a first feature node, an identifier of a feature node corresponding to the second feature description in the current knowledge graph is set as a second identifier, as a second feature node, and an identifier of an attribute node corresponding to the attribute description in the current knowledge graph is set as the first identifier.

[0007] S300, for any state node i in the current knowledge graph, based on an edge weight between the state node i and a corresponding feature node and an edge weight between the state node i and a corresponding attribute node, a priority PS of the state node i is acquired. i , the value of i is 1 to m, and m is the number of state nodes in the knowledge graph.

[0008] S400, for any third feature node u in the current knowledge graph, based on the first preset path length, the second preset path length, the bias value corresponding to the third feature node u, the edge weight between the third feature node u and the corresponding state node, the edge weight between the third feature node u and the corresponding first feature node, and the edge weight between the third feature node u and the corresponding state node, the priority PF corresponding to the third feature node u is obtained u , the third feature node is a feature node in the knowledge graph except the first feature node and the second feature node, the value of u is 1 to n, and n is the number of third feature nodes.

[0009] S500, the corresponding feature of max(PF1, PF2,..., PF u ,..., PF n ) is obtained as target information, and max() represents taking the maximum value.

[0010] According to the second aspect of the application, a knowledge graph-based information acquisition device is provided, the knowledge graph is composed of first to fourth nodes, wherein the first node is a state node representing state, the second node is a feature node representing the feature of state, the third node is an attribute node representing the attribute of state, and the fourth node is a region node representing the region to which the state belongs; the device comprises:

[0011] The information acquisition module is used for acquiring the input information currently input by the user, the input information includes feature description or includes feature description and attribute description, the feature description includes first feature description and second feature description, the first feature description is the feature selected by the user, the second feature description is the feature not selected by the user, and the attribute description includes the attribute selected by the user.

[0012] The setting module is used for setting the identification of the feature node corresponding to the first feature description in the current knowledge graph as the first identification as the first feature node, setting the identification of the feature node corresponding to the second feature description in the current knowledge graph as the second identification as the second feature node, and setting the identification of the attribute node corresponding to the attribute description in the current knowledge graph as the first identification.

[0013] The first priority acquisition module is used for acquiring the priority PS i corresponding to any state node i in the current knowledge graph based on the edge weight between the state node i and the corresponding feature node and the edge weight between the state node i and the corresponding attribute node, the value of i is 1 to m, and m is the number of state nodes in the knowledge graph.

[0014] The second priority acquisition module is configured to acquire the priority of the third feature node u based on the first preset path length, the second preset path length, a bias value corresponding to the third feature node u, an edge weight between the third feature node u and the corresponding state node, an edge weight between the third feature node u and the corresponding first feature node, and an edge weight between the third feature node u and the corresponding state node. u The third feature node is a feature node in the knowledge graph other than the first feature node and the second feature node, and the value of u is 1 to n, where n is the number of the third feature nodes.

[0015] The target information acquisition module is configured to acquire a feature corresponding to max(PF1, PF2, …, PF u , …, PF n ) as target information, where max() represents taking the maximum value.

[0016] According to a third aspect of the present application, an electronic device is provided, comprising a processor and a memory; the processor is configured to execute the steps of the method according to the first aspect of the present application by calling programs or instructions stored in the memory.

[0017] According to a fourth aspect of the present application, a non-transitory computer readable storage medium is provided, which stores programs or instructions, and the programs or instructions are configured to make a computer execute the steps of the method according to the first aspect of the present application.

[0018] The present application has at least the following beneficial effects:

[0019] The information acquisition method based on the knowledge graph provided by the embodiments of the present application can automatically acquire key information corresponding to the feature description based on the feature description input by the user and the relationship between the features and the states in the knowledge graph, thereby improving the efficiency and accuracy of information acquisition.

[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0022] Figure 1A flowchart of the information acquisition method based on a knowledge graph provided by an embodiment of the present application is shown in FIG. 1. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0024] 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 application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0025] It should be noted that some of the example embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict the steps in sequential order, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps can be re-arranged. A process can be terminated when its operations are completed, but could also occur under some other condition, such as, when operational input is received. Processes might also correspond in whole or in part to a method, a function, a procedure, a subroutine, a subprogram, etc. When actions of a process are completed, the process can end, but can also await start of another process, or await a signal to continue.

[0026] An embodiment of the present application provides an information acquisition method based on a knowledge graph. A specific application scenario of the method can be a dialogue scenario, which can include a first user and a second user. The first user is a user who asks a question, and the second user is a user who guides the first user to have a dialogue based on the question of the first user to obtain a conclusion corresponding to the question. A specific application scenario can be a questioning scenario in a traditional Chinese medicine diagnosis process, in which the first user can be a doctor, and the second user can be a patient.

[0027] In the embodiments of the present application, the knowledge graph can be composed of the first type of nodes to the fourth type of nodes, wherein the first type of nodes are state nodes representing states, the second type of nodes are feature nodes representing features of the states, the third type of nodes are attribute nodes representing attributes of the states, and the fourth type of nodes are region nodes representing regions to which the states belong. There are association relationships between the first type of nodes and the second type of nodes, between the first type of nodes and the third type of nodes, between the first type of nodes and the fourth type of nodes, and between the second type of nodes. The nodes with the association relationships are connected by connection lines. The association relationship between the first type of nodes and the second type of nodes indicates that the state corresponding to the first type of nodes has the feature corresponding to the second type of nodes, the association relationship between the first type of nodes and the third type of nodes indicates that the state corresponding to the first type of nodes can have the attribute corresponding to the third type of nodes, and the association relationship between the first type of nodes and the fourth type of nodes indicates that the state corresponding to the first type of nodes can occur in the region corresponding to the fourth type of nodes. The relationship between the second type of nodes can include mutual exclusion relationship and mutual existence relationship.

[0028] In a specific embodiment of the present application, the knowledge graph can be a traditional Chinese medicine knowledge graph. The first type of nodes can be nodes representing abnormal states of the body such as diseases, the second type of nodes can be nodes representing symptoms, the third type of nodes can be nodes representing pathogenesis, and the fourth type of nodes can be nodes representing disease location. In the embodiments of the present application, the pathogenesis can include deficiency, excess, cold, heat, normal state, etc.

[0029] In the embodiments of the present application, the traditional Chinese medicine symptom knowledge graph can be constructed and updated based on the latest traditional Chinese medicine research results and clinical data.

[0030] In the embodiments of the present application, the edge weight between two nodes with a connection relationship can be initialized, and the bias value of the feature node can be initialized. The edge weight can be determined according to the association degree between the corresponding two nodes. When the knowledge graph is a traditional Chinese medicine knowledge graph, the edge weight can be initialized and set based on clinical data. For example, the initial weight value of the edge weight between a general symptom and a disease can be set to 1, and the weight value of the importance of some symptoms in a specific disease can be set to 5. The edge weight between two feature nodes with mutual exclusion relationship, such as the nodes of “dry mouth” and “not dry mouth”, can be represented by -1, and the edge weight between two feature nodes with mutual existence relationship, such as the nodes of “irritability” and “easily irritable”, can be represented by +1.

[0031] In the embodiments of the present application, the bias value of the feature node can be determined based on the order of the feature appearing in the dialogue scene. For example, in the traditional Chinese medicine diagnosis scene, the bias value of each symptom can be set according to the priority order rule of traditional Chinese medicine inquiry (such as the order in the traditional Chinese medicine inquiry ten questions song). The bias value corresponding to any feature node is bias = log 10(V), where V is the value corresponding to the feature node, ranging from [1, 10]. Taking the logarithm of the value is to reduce the influence of the bias value and ensure the importance of other factors in the priority calculation.

[0032] In this embodiment of the invention, the initial priority of all nodes in the knowledge graph is set to 0.

[0033] Furthermore, such as Figure 1 As shown, the knowledge graph-based information acquisition method provided in this embodiment of the invention may include, for example: Figure 1 The steps shown are as follows:

[0034] S100: Obtain the input information currently entered by the user.

[0035] In this embodiment of the invention, the input information includes feature descriptions or a combination of feature descriptions and attribute descriptions; that is, it may include only feature descriptions or both feature descriptions and attribute descriptions. The attribute descriptions include attributes selected by the user. For example, an attribute description of "cold" indicates that the user has selected the attribute of "coldness."

[0036] The feature description includes a first feature description or includes both a first feature description and a second feature description. That is, the feature description may include only the first feature description or both the first feature description and the second feature description. The first feature description is a feature selected by the user, and the second feature description is a feature not selected by the user. For example, if the input feature description is "headache, no palpitations", then the first feature description is "headache" and the second feature description is "palpitations".

[0037] In this embodiment of the invention, the user can be a second user in the dialogue scenario. When the dialogue scenario is a traditional Chinese medicine diagnosis scenario, the attribute description can be obtained based on the tongue image information of the first user.

[0038] In this embodiment of the invention, the current input information may be the response information of the first user to the current query content of the second user.

[0039] S200, based on the input information currently input by the user, the identifier of the feature node corresponding to the first feature description in the current knowledge graph is set as the first identifier, and it is used as the first feature node; the identifier of the feature node corresponding to the second feature description in the current knowledge graph is set as the second identifier, and it is used as the second feature node; and the identifier of the attribute node corresponding to the attribute description in the current knowledge graph is set as the first identifier.

[0040] In this embodiment of the invention, the first identifier and the second identifier may be different identifiers, and the specific identifier may be limited based on actual needs. This invention does not impose any special limitations.

[0041] S300, for any state node i in the current knowledge graph, based on the edge weight between the state node i and the corresponding feature node and the edge weight between the state node i and the corresponding attribute node, the priority PS corresponding to the state node i is obtained i .

[0042] Further, in the embodiment of the application, PS i satisfies the following condition:

[0043] PS i =(∑ f1(i) j1=1 w ds ij1 -∑ f2(i) j2=1 w ds ij2 ) / ∑ h(i) j=1 w ds ij ×λ1+(∑ z(i) r=1 w dn ir ) / (∑ g(i) s=1 w dn is )×λ2.

[0044] Wherein, the value of i is 1 to m, m is the number of state nodes in the knowledge graph, w ds ij1 is the edge weight between the state node i and the j1th first feature node connected with the state node i, the value of j1 is 1 to f1(i), f1(i) is the number of first feature nodes connected with the state node i, w ds ij2 is the edge weight between the state node i and the j2th second feature node connected with the state node i, the value of j2 is 1 to f2(i), f2(i) is the number of second feature nodes connected with the state node i, w ds ij is the edge weight between the state node i and the jth feature node in the feature nodes connected with the state node i, the value of j is 1 to h(i), h(i) is the number of feature nodes connected with the state node i, w dn ir is the edge weight between the state node i and the rth attribute node in the attribute nodes connected with the state node i and identified as the first identification, the value of r is 1 to z(i), z(i) is the number of attribute nodes connected with the state node i and identified as the first identification, w dn isis the edge weight between the state node i and the s-th attribute node connected to the state node i, s is 1 to g(i), g(i) is the number of attribute nodes connected to the state node i, λ1 is a first preset coefficient, and λ2 is a second preset coefficient.

[0045] It is known to those skilled in the art that if the second feature description and the attribute description are not contained in the input information, the number of the second feature nodes is 0, and the number of the attribute nodes with the first identification is 0.

[0046] Further, w ds ij1 satisfies the following condition: if 0≤w ds-init ij1 ≤1, w ds ij1 =1 if w ds-init ij1 >1, w ds ij1 =w ds-init ij1 .

[0047] w ds ij2 satisfies the following condition: if 0≤w ds-init ij2 ≤1, w ds ij2 =0 if w ds-init ij2 >1, w ds ij2 =w ds -init ij2 .

[0048] wherein w ds-init ij1 is the initial weight corresponding to w ds ij1 , and w ds-init ij2 is the initial weight corresponding to w ds ij2 . Since the description of the first user can be inaccurate, by increasing the weight of the first feature node with a lower initial weight and decreasing the weight of the second feature node with a lower initial weight, a higher fault tolerance can be allowed.

[0049] In the embodiments of the present application, λ1>λ2, and λ1+λ2=1, which can be empirical values. In one illustrative embodiment, λ1=0.9 and λ2=0.1.

[0050] In this embodiment of the invention, the priority of each state node can be dynamically calculated based on features selected by the user and features not selected, thereby more accurately reflecting the actual state of the first user. Furthermore, by considering the attributes of the state, the obtained information is more comprehensive and accurate.

[0051] S400, for any third feature node u in the current knowledge graph, obtain the priority PF corresponding to the third feature node u based on the first preset path length, the second preset path length, the bias value corresponding to the third feature node u, the edge weight between the third feature node u and the corresponding state node, the edge weight between the third feature node u and the corresponding first feature node, and the edge weight between the third feature node u and the corresponding state node. u The third feature node is a feature node in the knowledge graph other than the first and second feature nodes. The value of u ranges from 1 to n, where n is the number of third feature nodes.

[0052] Furthermore, PF u The following conditions must be met:

[0053] PF u =∑ y1(u) q1=1 ((1-log 10 (path1+1)×w ds-init uq1 ×PS 3 uq1 )+∑ y2(u) q2=1 ((1-log 10 (path2+1)

[0054] ×w ss-init uq2 )+bias u ;path1 is the first preset path length, path2 is the second preset path length, w ds -init uq1 Let y1(u) be the initial edge weight between the third feature node u and the q1-th state node among its connected state nodes, where q1 ranges from 1 to y1(u), and y1(u) is the number of state nodes connected to the third feature node u. uq1 w represents the priority of the q1th state node. ss-init uq2 Let y2(u) be the initial edge weight between the third feature node u and its connected q2-th first feature node, where q2 ranges from 1 to y2(u), and y2(u) is the number of first feature nodes connected to the third feature node u. u This is the bias value corresponding to the third feature node u.

[0055] In the embodiment of the present application, the priority of the feature node considers the priority of the state node connected thereto, the weight of the first feature node connected thereto, and the bias value, so that the acquired priority is more accurate.

[0056] In the embodiment of the present application, path1 and path2 can be empirical values for ensuring that the calculation result is as accurate as possible. In an illustrative embodiment, path1 = 2 and path2 = 1.

[0057] S500, acquiring a feature node corresponding to max(PF1, PF2, …, PF u , …, PF n ) as target information, where max() represents taking the maximum value.

[0058] In a specific application scenario, when the user input information is "headache", the highest priority feature node, i.e., the symptom of "abnormal blood pressure", can be obtained through the above steps, and the second user is suggested to ask about the "abnormal blood pressure" symptom first in the next inquiry, and then based on the reply information of the first user to this inquiry content, the current input information is obtained.

[0059] Based on the same inventive concept, the embodiment of the present application provides an information acquisition device based on a knowledge graph, wherein the knowledge graph is composed of first to fourth nodes, wherein the first node is a state node representing a state, the second node is a feature node representing a feature of the state, the third node is an attribute node representing an attribute of the state, and the fourth node is a region node representing a region to which the state belongs; the device comprises:

[0060] An information acquisition module is configured to acquire input information currently input by a user, wherein the input information includes feature description or includes feature description and attribute description, the feature description includes first feature description and second feature description, the first feature description is a feature selected by the user, the second feature description is a feature not selected by the user, and the attribute description includes an attribute selected by the user.

[0061] A setting module is configured to set an identifier of a feature node corresponding to the first feature description in the current knowledge graph as a first identifier as a first feature node, set an identifier of a feature node corresponding to the second feature description in the current knowledge graph as a second identifier as a second feature node, and set an identifier of an attribute node corresponding to the attribute description in the current knowledge graph as the first identifier.

[0062] The first priority acquisition module is configured to acquire a priority PS of a state node i in the knowledge graph based on an edge weight between the state node i and a corresponding feature node and an edge weight between the state node i and a corresponding attribute node i .

[0063] The second priority acquisition module is configured to acquire a priority PF of a third feature node u based on the first preset path length, the second preset path length, a bias value of the third feature node u, an edge weight between the third feature node u and a corresponding state node, an edge weight between the third feature node u and a corresponding first feature node, and an edge weight between the third feature node u and a corresponding state node u , the third feature node is a feature node other than the first feature node and the second feature node in the knowledge graph, the value of u is 1 to n, and n is the number of the third feature nodes.

[0064] The target information acquisition module is configured to acquire a feature corresponding to max(PF1, PF2,..., PF u ,..., PF n ) as target information, where max() represents a maximum value.

[0065] Further, PS i satisfies the following condition:

[0066] PS i = (∑ f1(i) j1=1 w ds ij1 -∑ f2(i) j2=1 w ds ij2 ) / ∑ h(i) j=1 w ds ij ×λ1+(∑ z(i) r=1 w dn ir ) / (∑ g(i) s=1 w dn is

[0067] ×λ2, where the value of i is 1 to m, m is the number of state nodes in the knowledge graph, w ds ij1 is an edge weight between a state node i and a j1th first feature node connected to the state node i, the value of j1 is 1 to f1(i), f1(i) is the number of first feature nodes connected to the state node i, w ds ​ij2 is an edge weight between state node i and the j2th second feature node connected to state node i, j2 takes value from 1 to f2(i), f2(i) is the number of second feature nodes connected to state node i, w ds ij is an edge weight between state node i and the jth feature node in the feature nodes connected to state node i, j takes value from 1 to h(i), h(i) is the number of feature nodes connected to state node i, w dn ir is an edge weight between state node i and the rth attribute node in the attribute nodes connected to state node i and identified as the first identity, r takes value from 1 to z(i), z(i) is the number of attribute nodes connected to state node i and identified as the first identity, w dn is is an edge weight between state node i and the sth attribute node in the attribute nodes connected to state node i, s takes value from 1 to g(i), g(i) is the number of attribute nodes connected to state node i, λ1 is a first preset coefficient, and λ2 is a second preset coefficient.

[0068] Further, PF u satisfies the following condition:

[0069] PF u =∑ y1(u) q1=1 ((1-log 10 (path1+1)×w ds-init uq1 ×PS 3 uq1 )+∑ y2(u) q2=1 ((1-log 10 (path2+1)

[0070] ×w ss-init uq2 )+bias u ; path1 is a first preset path length, path2 is a second preset path length, w ds -init uq1 is an initial edge weight between the third feature node u and the q1th state node in the state nodes connected to the third feature node u, q1 takes value from 1 to y1(u), y1(u) is the number of state nodes connected to the third feature node u, w uq1 is a priority corresponding to the q1th state node, w ss-init uq2is an initial edge weight between the third feature node u and a q2th first feature node connected to the third feature node u, q2 is an integer from 1 to y2(u), y2(u) is a number of first feature nodes connected to the third feature node u, and bias u is a bias value corresponding to the third feature node u.

[0071] The apparatus can be used to execute the method shown in the embodiments shown in the figures, and thus the functions and the like that can be achieved by the functional modules of the apparatus can refer to the descriptions of the embodiments shown in the figures. Figure 1 The functions and the like that can be achieved by the functional modules of the apparatus can refer to the descriptions of the embodiments shown in the figures. Figure 1 The functions and the like that can be achieved by the functional modules of the apparatus can refer to the descriptions of the embodiments shown in the figures.

[0072] The embodiments of the present application also provide an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiments of the present application.

[0073] The embodiments of the present application also provide a non-transitory computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the method described in the embodiments of the present application.

[0074] It should be understood that the steps shown in the above various forms of flow can be reordered, added or deleted. For example, each step described in the present application can be executed in parallel, sequentially or in different order, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present application does not limit herein.

[0075] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent replacement and improvement within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A knowledge graph-based information acquisition method, characterized in that, The method includes the following steps: S100, obtain the input information currently input by the user, the input information includes feature description or includes feature description and attribute description, the feature description includes a first feature description or includes a first feature description and a second feature description, the first feature description is a feature selected by the user, the second feature description is a feature not selected by the user, and the attribute description includes the attribute selected by the user; S200, based on the input information currently input by the user, the identifier of the feature node corresponding to the first feature description in the current knowledge graph is set as the first identifier, and is used as the first feature node; the identifier of the feature node corresponding to the second feature description in the current knowledge graph is set as the second identifier, and is used as the second feature node; and the identifier of the attribute node corresponding to the attribute description in the current knowledge graph is set as the first identifier. S300, for any state node i in the current knowledge graph, obtain the priority PS corresponding to state node i based on the edge weights between state node i and the corresponding feature node and the edge weights between state node i and the corresponding attribute node. i The value of i ranges from 1 to m, where m is the number of state nodes in the knowledge graph. S400, for any third feature node u in the current knowledge graph, obtain the priority PF corresponding to the third feature node u based on the first preset path length, the second preset path length, the bias value corresponding to the third feature node u, the edge weight between the third feature node u and the corresponding state node, the edge weight between the third feature node u and the corresponding first feature node, and the edge weight between the third feature node u and the corresponding state node. u The third feature node is the feature node in the knowledge graph other than the first and second feature nodes. The value of u ranges from 1 to n, where n is the number of third feature nodes. S500, obtain max(PF1, PF2, ..., PF500), u , ..., PF n The corresponding feature nodes are used as target information, and max() means taking the maximum value.

2. The method according to claim 1, characterized in that, PS i The following conditions must be met: ; in, Let f1(i) be the edge weight between state node i and the j1-th first feature node connected to state node i, where j1 ranges from 1 to f1(i), and f1(i) is the number of first feature nodes connected to state node i. Let f2(i) be the edge weight between state node i and the j2-th second feature node connected to state node i, where j2 ranges from 1 to f2(i), and f2(i) is the number of second feature nodes connected to state node i. Let h(i) be the edge weight between state node i and the j-th feature node connected to state node i, where j ranges from 1 to h(i), and h(i) is the number of feature nodes connected to state node i. Let z(i) be the edge weight between state node i and the r-th attribute node connected to state node i and identified by the first identifier. The value of r is from 1 to z(i), and z(i) is the number of attribute nodes connected to state node i and identified by the first identifier. Let g(i) be the edge weight between state node i and the s-th attribute node among the attribute nodes connected to state node i, where s takes values ​​from 1 to g(i), g(i) is the number of attribute nodes connected to state node i, λ1 is the first preset coefficient, and λ2 is the second preset coefficient.

3. The method according to claim 2, characterized in that, The following conditions must be met: If 0≤ ≤1, =1, if >1, = ; The following conditions must be met: If 0≤ ≤1, =0, if >1, = ; in, for The corresponding initial weights, for The corresponding initial weights.

4. An information acquisition device based on a knowledge graph, characterized in that, The knowledge graph consists of nodes of types one through four, wherein the first type of nodes are state nodes representing states, the second type of nodes are feature nodes representing characteristics of states, the third type of nodes are attribute nodes representing attributes of states, and the fourth type of nodes are region nodes representing the region to which the state belongs; the device includes: The information acquisition module is used to acquire the input information currently input by the user. The input information includes feature description or feature description and attribute description. The feature description includes a first feature description and a second feature description. The first feature description is a feature selected by the user, and the second feature description is a feature not selected by the user. The attribute description includes the attribute selected by the user. The setting module is used to set the identifier of the feature node corresponding to the first feature description in the current knowledge graph as the first identifier, and the identifier of the feature node corresponding to the second feature description in the current knowledge graph as the second identifier, and the identifier of the attribute node corresponding to the attribute description in the current knowledge graph as the first identifier, based on the input information currently input by the user. The first priority acquisition module is used to obtain the priority PS corresponding to any state node i based on the edge weights between any state node i and its corresponding feature node and the edge weights between state node i and its corresponding attribute node in the current knowledge graph. i The value of i ranges from 1 to m, where m is the number of state nodes in the knowledge graph. The second priority acquisition module is used to acquire the priority PF of the third feature node u based on the first preset path length, the second preset path length, the bias value corresponding to the third feature node u, the edge weight between the third feature node u and the corresponding state node, the edge weight between the third feature node u and the corresponding first feature node, and the edge weight between the third feature node u and the corresponding state node. u The third feature node is the feature node in the knowledge graph other than the first and second feature nodes. The value of u ranges from 1 to n, where n is the number of third feature nodes. The target information acquisition module is used to obtain max(PF1, PF2, ..., PF2). u , ..., PF n The corresponding feature nodes are used as target information, and max() means taking the maximum value.

5. The apparatus according to claim 4, characterized in that, PS i The following conditions must be met: ; in, Let f1(i) be the edge weight between state node i and the j1-th first feature node connected to state node i, where j1 ranges from 1 to f1(i), and f1(i) is the number of first feature nodes connected to state node i. Let f2(i) be the edge weight between state node i and the j2-th second feature node connected to state node i, where j2 ranges from 1 to f2(i), and f2(i) is the number of second feature nodes connected to state node i. Let h(i) be the edge weight between state node i and the j-th feature node connected to state node i, where j ranges from 1 to h(i), and h(i) is the number of feature nodes connected to state node i. Let z(i) be the edge weight between state node i and the r-th attribute node connected to state node i and identified by the first identifier. The value of r is from 1 to z(i), and z(i) is the number of attribute nodes connected to state node i and identified by the first identifier. Let g(i) be the edge weight between state node i and the s-th attribute node among the attribute nodes connected to state node i, where s takes values ​​from 1 to g(i), g(i) is the number of attribute nodes connected to state node i, λ1 is the first preset coefficient, and λ2 is the second preset coefficient.

6. An electronic device, characterized in that, Including processor and memory; The processor executes the steps of the method as described in any one of claims 1 to 3 by invoking programs or instructions stored in the memory.

7. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store a program or instructions that cause a computer to perform the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Digital human interaction method and system based on knowledge graph, medium and product program

    CN119884388A

  • Recommendation method and apparatus based on knowledge graph, and computer device and storage medium

    WO2022048368A1