Retrieval method, device and equipment based on knowledge graph and medium

Through the search method based on knowledge graph, the target search terms and historical search terms entered by the user are used to determine the matching entity and intention search terms, which solves the problem that traditional search methods cannot meet the diverse needs of users and achieves a richer Retrieval results are displayed.

CN119293263APending Publication Date: 2025-01-10SHANDONG NUCLEAR POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411413653.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the prior art, users use traditional information retrieval methods when searching, making it difficult to display rich search results and cannot meet the diverse needs of users.

Method used

Using a search method based on knowledge graph, by obtaining the target search terms and historical search terms entered by the user, querying the entities matching the target search terms, and determining the intent search terms matching the target search terms based on the historical search entity, thereby enriching the search results. .

Benefits of technology

It realizes the determination of user's search entities and intent search terms from knowledge graphs and historical search entities, providing richer search results and meeting users' diverse needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293263A_ABST
    Figure CN119293263A_ABST
Patent Text Reader

Abstract

The invention discloses a retrieval method, device and equipment based on a knowledge graph and a medium, and relates to the technical field of retrieval, the method comprises the following steps: obtaining a target retrieval word input by a user, a historical retrieval word and a historical retrieval entity corresponding to the historical retrieval word; querying a first retrieval entity matched with the target retrieval word in the knowledge graph; determining a second retrieval entity matched with the target retrieval word from the historical retrieval entities according to the target retrieval word, the historical retrieval words, the historical retrieval entities and the first retrieval entity; determining a historical search word corresponding to the second search entity as an intention search word of the user; and determining the first retrieval entity, the second retrieval entity and the intention retrieval word as a target retrieval result of the target retrieval word. According to the method, the retrieval results of the retrieval words are enriched, and the retrieval requirements of users can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of train control system testing, and in particular to a retrieval method, device, equipment and medium based on a knowledge graph. Background Art

[0002] The knowledge graph can display the development process and structural relationship of knowledge. It includes a series of various graphics, uses visualization technology to describe knowledge resources and their carriers, mines, analyzes, constructs, draws and displays knowledge and their interrelationships, and has a huge amount of information content.

[0003] In the prior art, when users conduct searches, they often use traditional information search methods, such as keyword matching, to search. The content of the search results is relatively simple, and it is difficult to show the search results that the users need. Summary of the invention

[0004] The present invention provides a retrieval method, device, equipment and medium based on knowledge graph to enrich the retrieval results of search terms and meet the retrieval needs of users.

[0005] In a first aspect, the present invention provides a retrieval method based on a knowledge graph, comprising:

[0006] Obtaining the target search term input by the user, as well as the historical search terms and the historical search entities corresponding to the historical search terms;

[0007] In the knowledge graph, query the first search entity that matches the target search term;

[0008] According to the target search term, the historical search term, the historical search entity and the first search entity, determining a second search entity matching the target search term from the historical search entities;

[0009] Determining the historical search term corresponding to the second search entity as the user's intended search term;

[0010] The first search entity, the second search entity and the intended search term are determined as target search results of the target search term.

[0011] In a second aspect, the present invention further provides a retrieval device based on a knowledge graph, comprising:

[0012] A search term acquisition module is used to acquire a target search term input by a user, as well as a historical search term and a historical search entity corresponding to the historical search term;

[0013] A first entity determination module, used to search the knowledge graph for a first search entity that matches the target search term;

[0014] A second entity determination module, configured to determine a second search entity matching the target search term from the historical search entities according to the target search term, the historical search terms, the historical search entities and the first search entity;

[0015] A search term determination module, used to determine the historical search term corresponding to the second search entity as the user's intended search term;

[0016] The search result determination module is used to determine the first search entity, the second search entity and the intended search term as the target search result of the target search term.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0018] at least one processor; and

[0019] a memory communicatively coupled to at least one processor; wherein

[0020] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the knowledge graph-based retrieval method provided by any embodiment of the present invention.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to implement the knowledge graph-based retrieval method of any embodiment of the present invention when executed.

[0022] The embodiment of the present invention obtains the target search term input by the user, as well as the historical search term and the historical search entity corresponding to the historical search term; in the knowledge graph, the first search entity matching the target search term is queried; according to the target search term, the historical search term, the historical search entity and the first search entity, the second search entity matching the target search term is determined from the historical search entity; the historical search term corresponding to the second search entity is determined as the user's intended search term; the first search entity, the second search entity and the intended search term are determined as the target search result of the target search term. The embodiment of the present invention determines the user's search entity from the knowledge graph and the historical search entity, and predicts the user's intended search term, and provides the intended search term to the user as a search result, thereby enriching the search results of the search term and meeting the user's search needs.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 is a flowchart of a knowledge graph-based retrieval method provided according to Embodiment 1 of the present invention;

[0026] Figure 2 is a flow chart of a knowledge graph-based retrieval method provided according to Embodiment 2 of the present invention;

[0027] Figure 3 is a schematic diagram of the structure of a knowledge graph-based retrieval device provided according to Embodiment 3 of the present invention;

[0028] Figure 4 It is a schematic diagram of the structure of an electronic device that implements the knowledge graph-based retrieval method of an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the real-time spatial position and real-time status parameters involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0032] Embodiment 1

[0033] Figure 1 A flowchart of a knowledge graph-based retrieval method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where knowledge entities are retrieved based on search terms. The method can be executed by a knowledge graph-based retrieval device, which can be implemented in the form of hardware and / or software and specifically configured in an electronic device, such as a server.

[0034] See also Figure 1 The retrieval method based on knowledge graph shown includes:

[0035] S101. Obtain a target search term input by a user, as well as a historical search term and a historical search entity corresponding to the historical search term.

[0036] In this embodiment, the target search term may be a search term to be searched that is input by the user. The historical search term may be a search term that the user searched for before searching for the target search term, that is, the search time of the historical search term is before the input time of the target search term. The historical search entity may be a knowledge entity obtained by searching the historical search term in the knowledge graph.

[0037] S102. In the knowledge graph, query the first search entity that matches the target search term.

[0038] In this embodiment, the first search entity is an entity included in the knowledge graph that matches the target search term. Specifically, a certain algorithm is used to query the first search entity that matches the target search term in the knowledge graph.

[0039] Optionally, the knowledge graph includes at least one knowledge entity; in the knowledge graph, querying the first retrieval entity that matches the target search term includes: for each knowledge entity in the knowledge graph, detecting the first similarity between the text of the knowledge entity and the target search term; determining the knowledge entity whose first similarity is greater than a first similarity threshold as a candidate retrieval entity; and determining the first retrieval entity based on the candidate retrieval entity.

[0040] Specifically, for each knowledge entity in the knowledge graph, a certain algorithm is used to detect the first similarity between the text of the knowledge entity and the target search term; the knowledge entity whose first similarity is greater than the first similarity threshold is determined as a candidate search entity; and a certain algorithm is used to determine the first search entity based on the candidate search entity. It should be noted that the first similarity threshold can be independently set by the technician according to actual needs or practical experience, and the present invention does not limit this.

[0041] It can be understood that by adopting the above technical solution, for each knowledge entity in the knowledge graph, the first similarity between the text of the knowledge entity and the target search term is detected; the knowledge entity whose first similarity is greater than the first similarity threshold is determined as a candidate retrieval entity; and the first retrieval entity is determined based on the candidate retrieval entity, which can improve the accuracy of the first retrieval entity that matches the target search term.

[0042] Optionally, detecting the first similarity between the text of the knowledge entity and the target search term includes: performing feature extraction on the target search term to obtain a target feature vector; performing feature extraction on the text of the knowledge entity to obtain an entity feature vector; determining the vector similarity between the target feature vector and the entity feature vector; and determining the vector similarity as the first similarity between the target search term and the historical search term.

[0043] Among them, the target feature vector is the vector obtained by extracting features from the target search term. The entity feature vector is the vector obtained by extracting features from the text of the knowledge entity. The text of the knowledge entity can be the attribute text of the knowledge entity, such as the name of the knowledge entity or the content text associated with the knowledge entity. Specifically, the cosine similarity between the target feature vector and the entity feature vector can be calculated, and the determined cosine similarity can be determined as the vector similarity; the vector similarity can be determined as the first similarity between the target search term and the historical search term.

[0044] It can be understood that by adopting the above technical scheme, feature extraction is performed on the target search term to obtain a target feature vector; feature extraction is performed on the text of the knowledge entity to obtain an entity feature vector; the vector similarity between the target feature vector and the entity feature vector is determined; and the vector similarity is determined as the first similarity between the target search term and the historical search term, which can improve the accuracy of the first similarity.

[0045] Optionally, determining the first retrieval entity based on the candidate detection entities includes: for each candidate retrieval entity, searching for knowledge entities associated with the candidate retrieval entity based on the topological relationship of the knowledge graph; determining the found knowledge entity as the first retrieval entity, and determining each candidate retrieval entity as the first retrieval entity.

[0046] Among them, the knowledge graph includes the topological relationship between each knowledge entity. The knowledge entity associated with the candidate retrieval entity can be understood as the knowledge entity connected to the candidate retrieval entity. It can be understood that, by adopting the above technical solution, for each candidate retrieval entity, according to the topological relationship of the knowledge graph, the knowledge entity associated with the candidate retrieval entity is searched; the found knowledge entity is determined as the first retrieval entity, and each candidate retrieval entity is determined as the first retrieval entity, thereby improving the accuracy of the first retrieval entity.

[0047] In an optional embodiment, determining the first retrieval entity according to the candidate detection entity includes: determining the candidate detection entity as the first retrieval entity.

[0048] S103: Determine a second search entity matching the target search term from among the historical search entities according to the target search term, the historical search terms, the historical search entities and the first search entity.

[0049] In this embodiment, the second search entity is the knowledge entity in the historical search entity that matches the target search term. Specifically, a certain algorithm is used to determine the second search entity that matches the target search term from the historical search entity based on the target search term, the historical search term, the historical search entity and the first search entity.

[0050] S104: Determine the historical search term corresponding to the second search entity as the user's intended search term.

[0051] In this embodiment, the intended search term may be a presumed other search term that the user wants to search. There is an association relationship between the historical search entity and the historical search term. Each historical search term may be associated with at least one historical search entity. Different historical search terms may correspond to different historical search entities. Specifically, the historical search term associated with the second search entity is determined as the user's intended search term.

[0052] S105: Determine the first search entity, the second search entity, and the intended search term as a target search result of the target search term.

[0053] The embodiment of the present invention obtains the target search term input by the user, as well as the historical search term and the historical search entity corresponding to the historical search term; in the knowledge graph, the first search entity matching the target search term is queried; according to the target search term, the historical search term, the historical search entity and the first search entity, the second search entity matching the target search term is determined from the historical search entity; the historical search term corresponding to the second search entity is determined as the user's intended search term; the first search entity, the second search entity and the intended search term are determined as the target search result of the target search term. The embodiment of the present invention determines the user's search entity from the knowledge graph and the historical search entity, and predicts the user's intended search term, and provides the intended search term to the user as a search result, thereby enriching the search results of the search term and meeting the user's search needs.

[0054] Embodiment 2

[0055] Figure 2 A flowchart of a knowledge graph-based retrieval method provided in the second embodiment of the present invention. The embodiment of the present invention optimizes and improves the operation of determining the first detection result based on the technical solutions of the above embodiments.

[0056] Further, "based on the target search term, historical search terms, historical search entities and the first search entity, determine the second search entity that matches the target search term from the historical search entities" is refined into "for each historical search term, determine the second similarity between the target search term and the historical search term; for each historical search entity of the historical search term, determine the third similarity between the target search term and the text of the historical search entity; based on the second similarity and the third similarity, determine the fourth similarity between the target search term and the text of the historical search entity; based on the fourth similarity between the target search term and the text of each historical search entity, determine the second search entity that matches the target search term from the historical search entities" to complete the determination operation.

[0057] It should be noted that, for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions in the aforementioned embodiments.

[0058] See also Figure 2 The retrieval method based on knowledge graph shown includes:

[0059] S201. Obtain a target search term input by a user, as well as a historical search term and a historical search entity corresponding to the historical search term.

[0060] S202. In the knowledge graph, query the first search entity that matches the target search term.

[0061] S203: For each historical search term, determine a second similarity between the target search term and the historical search term.

[0062] In this embodiment, the second similarity is the similarity between the target search term and the historical search term. Specifically, feature extraction is performed on the target search term to obtain a target feature vector; for each historical search term, feature extraction is performed on the historical search term to obtain a historical feature vector; and the cosine similarity between the target feature vector and the historical feature vector is determined as the second similarity between the target search term and the historical search term.

[0063] S204: For each historical search entity of the historical search term, determine a third similarity between the target search term and the text of the historical search entity.

[0064] In this embodiment, the third similarity is the similarity between the target search term and the text of the historical search entity. It should be noted that the process of determining the third similarity is similar to the process of determining the first similarity, which will not be repeated here.

[0065] S205. According to the second similarity, the third similarity is modified to obtain a fourth similarity between the target search term and the text of the historical search entity.

[0066] In this embodiment, the fourth similarity is the modified third similarity. Specifically, a certain algorithm is used to modify the third similarity according to the second similarity to obtain the fourth similarity between the target search term and the text of the historical search entity.

[0067] Optionally, the third similarity is modified according to the second similarity to obtain a fourth similarity between the target search term and the text of the historical search entity, including: determining the product of the second similarity and the third similarity as the fourth similarity. It can be understood that, by adopting the above technical solution, the product of the second similarity and the third similarity is determined as the fourth similarity, which improves the accuracy of the fourth similarity, that is, the accuracy of the similarity between the target search term and the text of the historical search entity.

[0068] S206: Determine a second search entity matching the target search term from the historical search entities according to the fourth similarity between the target search term and the text of each historical search entity.

[0069] Specifically, a certain algorithm is used to determine a second search entity matching the target search term from the historical search entities according to the fourth similarity between the target search term and the text of each historical search entity.

[0070] Optionally, according to the fourth similarity between the target search term and the text of each historical search entity, a second search entity matching the target search term is determined from the historical search entities, including: determining the historical search entity whose fourth similarity is greater than the second similarity threshold as the second search entity.

[0071] It should be noted that the second similarity threshold can be independently set by technical personnel according to actual needs or practical experience, and the present invention does not limit this.

[0072] It can be understood that, by adopting the above technical solution, the historical search entity whose fourth similarity is greater than the second similarity threshold is determined as the second search entity, which can improve the accuracy of the second search entity.

[0073] S207: Determine the historical search term corresponding to the second search entity as the user's intended search term.

[0074] S208: Determine the first search entity, the second search entity, and the intended search term as a target search result of the target search term.

[0075] The embodiment of the present invention determines, for each historical search term, a second similarity between a target search term and the historical search term; for each historical search entity of the historical search term, determines a third similarity between the target search term and the text of the historical search entity; based on the second similarity, the third similarity is corrected to obtain a fourth similarity between the target search term and the text of the historical search entity; based on the fourth similarity between the target search term and the text of each historical search entity, a second search entity matching the target search term is determined from the historical search entities, thereby improving the accuracy of the second search entity.

[0076] Embodiment 3

[0077] Figure 3 A schematic diagram of the structure of a knowledge graph-based retrieval device provided in Embodiment 3 of the present invention. This embodiment is applicable to the case where knowledge entities are retrieved based on search terms. The device can execute a knowledge graph-based retrieval method. The knowledge graph-based retrieval device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, such as a server.

[0078] See also Figure 3 The retrieval device based on the knowledge graph shown includes a search term acquisition module 301, a first entity determination module 302, a second entity determination module 303, a search term determination module 304 and a search result determination module 305, wherein:

[0079] The search term acquisition module 301 is used to acquire the target search term input by the user, as well as the historical search terms and the historical search entities corresponding to the historical search terms;

[0080] A first entity determination module 302 is used to search for a first search entity matching a target search term in the knowledge graph;

[0081] A second entity determination module 303, for determining a second search entity matching the target search term from the historical search entities according to the target search term, the historical search term, the historical search entity and the first search entity;

[0082] A search term determination module 304, configured to determine the historical search term corresponding to the second search entity as the user's intended search term;

[0083] The search result determination module 305 is used to determine the first search entity, the second search entity and the intended search term as the target search result of the target search term.

[0084] The embodiment of the present invention obtains the target search term input by the user, as well as the historical search term and the historical search entity corresponding to the historical search term through the search term acquisition module; through the first entity determination module, in the knowledge graph, the first search entity matching the target search term is queried; through the second entity determination module, according to the target search term, the historical search term, the historical search entity and the first search entity, the second search entity matching the target search term is determined from the historical search entity; through the search term determination module, the historical search term corresponding to the second search entity is determined as the user's intended search term; through the search result determination module, the first search entity, the second search entity and the intended search term are determined as the target search result of the target search term. The embodiment of the present invention determines the first search entity, the second search entity and the intended search term as the target search result of the target search term by querying the first search entity matching the target search term, determining the second search entity matching the target search term and the predicted intended search term, and determining the first search entity, the second search entity and the intended search term as the target search result of the target search term, which can determine the user's search entity from the knowledge graph and the historical search entity, and predict the user's intended search term, and provide the intended search term to the user as a search result, thereby enriching the search results of the search term and meeting the user's search needs.

[0085] Optionally, the knowledge graph includes at least one knowledge entity; the first entity determination module 302 includes:

[0086] A first similarity determination unit, configured to detect, for each knowledge entity in the knowledge graph, a first similarity between the text of the knowledge entity and the target search term;

[0087] A candidate entity determination unit, configured to determine a knowledge entity having a first similarity greater than a first similarity threshold as a candidate retrieval entity;

[0088] The first entity determining unit is used to determine a first retrieval entity according to the candidate retrieval entities.

[0089] Optionally, the first similarity determination unit is specifically configured to:

[0090] Extract features of the target search terms to obtain target feature vectors;

[0091] Extract features from the text of knowledge entities to obtain entity feature vectors;

[0092] Determining vector similarity between the target feature vector and the entity feature vector;

[0093] The vector similarity is determined as the first similarity between the target search term and the historical search term.

[0094] Optionally, the first entity determination unit is specifically configured to:

[0095] For each candidate retrieval entity, find the knowledge entity associated with the candidate retrieval entity according to the topological relationship of the knowledge graph;

[0096] The found knowledge entity is determined as the first search entity, and each candidate search entity is determined as the first search entity.

[0097] Optionally, the second entity determination module 303 includes:

[0098] A second similarity determination unit, configured to determine, for each historical search term, a second similarity between the target search term and the historical search term;

[0099] A third similarity determination unit, for determining, for each historical search entity of the historical search term, a third similarity between the target search term and the text of the historical search entity;

[0100] A fourth similarity determination unit, configured to modify the third similarity according to the second similarity to obtain a fourth similarity between the target search term and the text of the historical search entity;

[0101] The second entity determination unit is used to determine a second search entity matching the target search term from the historical search entities according to a fourth similarity between the target search term and the text of each historical search entity.

[0102] Optionally, the fourth similarity determination unit is specifically configured to:

[0103] The product of the second similarity and the third similarity is determined as a fourth similarity.

[0104] Optionally, the second entity determination unit is specifically configured to:

[0105] The historical retrieval entity whose fourth similarity is greater than the second similarity threshold is determined as the second retrieval entity.

[0106] The knowledge graph-based retrieval device provided in an embodiment of the present invention can execute the knowledge graph-based retrieval method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the knowledge graph-based retrieval method.

[0107] Embodiment 4

[0108] Figure 4 A schematic diagram of the structure of an electronic device 400 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0109] like Figure 4 As shown, the electronic device 400 includes at least one processor 401, and a memory connected to the at least one processor 401 in communication, such as a read-only memory (ROM) 402, a random access memory (RAM) 403, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 401 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 402 or the computer program loaded from the storage unit 408 to the random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0110] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0111] Processor 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. Processor 401 executes the various methods and processes described above, such as a retrieval method based on a knowledge graph.

[0112] In some embodiments, the retrieval method based on the knowledge graph may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the processor 401, one or more steps of the retrieval method based on the knowledge graph described above may be performed. Alternatively, in other embodiments, the processor 401 may be configured to perform a retrieval method based on a knowledge graph by any other appropriate means (e.g., by means of firmware).

[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0114] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable knowledge graph-based retrieval device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A retrieval method based on knowledge graph, characterized in that: The method comprises: Obtaining a target search term input by a user, as well as a historical search term and a historical search entity corresponding to the historical search term; In the knowledge graph, query the first search entity matching the target search term; According to the target search term, the historical search term, the historical search entity and the first search entity, determining a second search entity matching the target search term from the historical search entities; Determining the historical search term corresponding to the second search entity as the user's intended search term; The first search entity, the second search entity and the intended search term are determined as target search results of the target search term.

2. The method according to claim 1, characterized in that The knowledge graph includes at least one knowledge entity; The step of searching the knowledge graph for a first search entity matching the target search term includes: For each knowledge entity in the knowledge graph, detecting a first similarity between the text of the knowledge entity and the target search term; Determine the knowledge entity whose first similarity is greater than a first similarity threshold as a candidate retrieval entity; A first retrieval entity is determined according to the candidate retrieval entities.

3. The method according to claim 2, characterized in that The detecting the first similarity between the text of the knowledge entity and the target search term comprises: Performing feature extraction on the target search term to obtain a target feature vector; Extracting features from the text of the knowledge entity to obtain an entity feature vector; Determining a vector similarity between the target feature vector and the entity feature vector; The vector similarity is determined as a first similarity between the target search term and the historical search term.

4. The method according to claim 2, characterized in that: The step of determining a first search entity according to the candidate detection entity comprises: For each candidate search entity, search for knowledge entities associated with the candidate search entity according to the topological relationship of the knowledge graph; The found knowledge entity is determined as the first search entity, and each candidate search entity is determined as the first search entity.

5. The method according to claim 1, characterized in that: The step of determining, based on the target search term, the historical search term, the historical search entity and the first search entity, a second search entity matching the target search term from the historical search entities comprises: For each historical search term, determining a second similarity between the target search term and the historical search term; For each historical search entity of the historical search term, determining a third similarity between the target search term and the text of the historical search entity; According to the second similarity, the third similarity is modified to obtain a fourth similarity between the target search term and the text of the historical search entity; According to the fourth similarity between the target search term and the text of each of the historical search entities, a second search entity matching the target search term is determined from the historical search entities.

6. The method according to claim 5, characterized in that The step of modifying the third similarity according to the second similarity to obtain a fourth similarity between the target search term and the text of the historical search entity includes: The product of the second similarity and the third similarity is determined as a fourth similarity.

7. The method according to claim 5, characterized in that The determining, from the historical search entities, a second search entity matching the target search term according to the fourth similarity between the target search term and the text of each of the historical search entities comprises: The historical search entity whose fourth similarity is greater than the second similarity threshold is determined as the second search entity.

8. A retrieval device based on knowledge graph, characterized in that: The device comprises: A search term acquisition module, used to acquire a target search term input by a user, as well as a historical search term and a historical search entity corresponding to the historical search term; A first entity determination module, used to query the first search entity matching the target search term in the knowledge graph; A second entity determination module, configured to determine, based on the target search term, the historical search term, the historical search entity and the first search entity, a second search entity matching the target search term from among the historical search entities; A search term determination module, used to determine the historical search term corresponding to the second search entity as the user's intended search term; The retrieval result determination module is used to determine the first retrieval entity, the second retrieval entity and the intended search term as the target retrieval result of the target search term.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the knowledge graph-based retrieval method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the knowledge graph-based retrieval method described in any one of claims 1 to 7 when executed.