Visual intelligence graph retrieval method, device, electronic device and storage medium
By dividing and indexing the visual intelligence maps by search scenarios and separately, the problem of low data retrieval efficiency under large data volume is solved, and efficient and accurate data retrieval and user-friendly interactive experience are achieved.
Patent Information
- Application Number
- CN202211351681.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The existing knowledge graph system has low data retrieval efficiency under the conditions of large data volume and cannot efficiently process complex feature data.
By dividing the visual intelligence maps into data according to the search scenarios, and indexing the data of different search scenarios, including entity search, graph search and knowledge link file search, B+ tree, hash table and inverted indexing are used for indexing, and the target search scenario is determined according to the word segmentation category of the search conditions for data retrieval.
It improves data retrieval efficiency, reduces the amount of retrieval data, improves retrieval accuracy and user experience, and enhances the interactivity of visual intelligence maps.
Smart Images

Figure CN115577147B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of knowledge graph technology, and in particular to a visual intelligence graph retrieval method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of theories and technologies in disciplines such as information technology, topology, and image science, the amount of information and data is growing exponentially. Knowledge graph technology has emerged to address the complex characteristics of this data. By linking various knowledge elements to form a graph, knowledge graphs can efficiently process large amounts of complex feature data. However, facing such large amounts of knowledge graphs, data retrieval becomes a key issue.
[0003] Existing knowledge graph systems usually simply accumulate or organize information, which is inefficient when performing data retrieval. Summary of the Invention
[0004] The embodiments of the present invention provide a visual intelligence graph retrieval method, device, electronic device and storage medium, which can improve retrieval efficiency.
[0005] In a first aspect, an embodiment of the present invention provides a method for visual intelligence graph retrieval, comprising:
[0006] Determine at least two search scenarios included in the visual intelligence map to be indexed, and index the data of each search scenario separately;
[0007] Obtaining a search condition input by a user, performing word segmentation processing on the search condition to obtain at least one word segmentation;
[0008] determining a category of each of the at least one segmented word;
[0009] Determining a target search scenario corresponding to the search condition according to the category of each segmented word;
[0010] Based on the index of the target retrieval scenario, data matching the retrieval condition is retrieved.
[0011] In a possible implementation, the retrieval scenario includes at least: an entity retrieval scenario and a graph retrieval scenario; or,
[0012] The retrieval scenarios include at least: entity retrieval scenario, graph retrieval scenario and knowledge link file retrieval scenario.
[0013] In a possible implementation, when the retrieval scenario includes a knowledge link file retrieval scenario, the knowledge link file is associated in the visual intelligence graph in the form of a knowledge link, and the knowledge link file is an unstructured file.
[0014] In a possible implementation, indexing the data of the entity retrieval scenario includes: using the data result of the B+ tree to index the attributes of the entity in the visual intelligence map; and / or,
[0015] Indexing the data of the graph retrieval scene includes: establishing a hash table index based on the objects, relationships, and triples of objects included in the visual intelligence graph; and / or,
[0016] Indexing the data of the knowledge link file retrieval scenario includes: performing multimodal content understanding on the knowledge link file of the visual intelligence map, and generating an inverted index based on the understood text information.
[0017] In a possible implementation, determining the category of each of the at least one word segmentation includes:
[0018] Based on the pre-defined categories, the category to which each word segment belongs is determined; the categories include: objects, relations, and attribute keys.
[0019] In a possible implementation, determining the target search scenario corresponding to the search condition according to the category of each word segmentation includes:
[0020] When the category of the at least one word segment includes an object category and does not include other categories, determining that the target search scenario corresponding to the search condition is an entity search scenario;
[0021] When the category of the at least one word segment includes an object category and a relationship category but does not include other categories, determining that the target search scenario corresponding to the search condition is a graph search scenario;
[0022] When the category of the at least one word segmentation includes an attribute key-value relationship category, it is determined that the target retrieval scenario corresponding to the retrieval condition is a knowledge link file retrieval scenario.
[0023] In a possible implementation, the method further includes:
[0024] If data matching the search criteria is found, the search results are formed into a knowledge dictionary classification tree;
[0025] In response to a roaming operation on a target knowledge item in the knowledge dictionary classification tree, the target knowledge item is located at a corresponding coordinate position in the visual intelligence map.
[0026] In a second aspect, an embodiment of the present invention further provides a visual intelligence graph retrieval device, comprising:
[0027] An indexing unit, configured to determine at least two search scenarios included in the visual intelligence map to be indexed, and index the data of each search scenario separately;
[0028] A word segmentation processing unit, configured to obtain a search condition input by a user, perform word segmentation processing on the search condition, and obtain at least one word segmentation;
[0029] a category determination unit, configured to determine a category of each of the at least one segmented word;
[0030] A scene determination unit, configured to determine a target search scene corresponding to the search condition according to the category of each segmented word;
[0031] A retrieval unit is configured to retrieve data matching the retrieval condition based on an index of the target retrieval scenario.
[0032] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.
[0033] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.
[0034] The embodiments of the present invention provide a visual intelligence graph retrieval method, device, electronic device and storage medium. The method divides the data of the visual intelligence graph according to the retrieval scenario so that the data of different retrieval scenarios are indexed separately. When the user enters the retrieval conditions to retrieve the data of the visual intelligence graph, the user's demand for the retrieval scenario is determined by determining the category of the segmented words obtained after the retrieval condition segmentation processing. In this way, the total data volume of the visual intelligence graph can be reduced to the data volume of the target retrieval scenario, thereby improving the retrieval efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 This is a flow chart of a visual intelligence graph retrieval method provided by one embodiment of the present invention;
[0037] Figure 2This is a hardware architecture diagram of an electronic device provided by one embodiment of the present invention;
[0038] Figure 3 This is a structural diagram of a visual intelligence graph retrieval device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0040] As mentioned earlier, when faced with a large number of knowledge graphs, simply piling up or arranging the information will result in low efficiency in information retrieval.
[0041] Based on the above problems, an analysis of the knowledge graph shows that the knowledge graph includes entities and the connection relationships between entities. When unstructured data is linked to the knowledge graph through knowledge links, a visual intelligence graph is formed. Therefore, the visual intelligence graph can also include unstructured knowledge link files. It can be seen that when searching the visual intelligence graph, data for different search scenarios can be searched separately. Therefore, when indexing this data in the visual intelligence graph, data based on different search scenarios can be indexed separately. When searching for data, the search scenario that meets the user's needs is determined based on the search conditions entered by the user, and the search is performed in the data within the corresponding search scenario, without having to search the data in other search scenarios. It can be seen that the search efficiency can be improved by reducing the amount of search data.
[0042] The specific implementation of the above concept is described below.
[0043] Please refer to Figure 1 , an embodiment of the present invention provides a visual intelligence graph retrieval method, the method comprising:
[0044] Step 100: determining at least two search scenarios included in the visual intelligence map to be indexed, and indexing the data of each search scenario separately;
[0045] Step 102: Obtain search conditions input by the user, perform word segmentation on the search conditions, and obtain at least one word segmentation;
[0046] Step 104, determining the category of each segmented word in the at least one segmented word;
[0047] Step 106, determining a target search scenario corresponding to the search condition according to the category of each segmented word;
[0048] Step 108: Retrieve data matching the retrieval condition based on the index of the target retrieval scenario.
[0049] In an embodiment of the present invention, the data of the visual intelligence map is divided according to the retrieval scenario, so that the data of different retrieval scenarios are indexed separately. When the user enters the retrieval conditions to perform data retrieval on the visual intelligence map, the user's demand for the retrieval scenario is determined by determining the category of the segmented words obtained after the retrieval conditions are segmented. This can reduce the total data volume of the visual intelligence map to the data volume of the target retrieval scenario, thereby improving the retrieval efficiency.
[0050] Described below Figure 1 How to perform the steps shown.
[0051] First, with respect to step 100, at least two search scenarios included in the visual intelligence map to be indexed are determined, and the data of each search scenario is indexed separately.
[0052] After obtaining the visual intelligence map, the data of the visual intelligence map needs to be stored. When the amount of data in the visual intelligence map is large, it can usually be directly located on the search target through retrieval. In order to improve the retrieval efficiency, the data of the visual intelligence map can be indexed when storing it.
[0053] When faced with a large amount of visual intelligence graph, if all the data in the visual intelligence graph is uniformly indexed, the amount of data to be retrieved during data retrieval will also be large, and the retrieval efficiency will be low. Based on this problem, in an embodiment of the present invention, the data of the visual intelligence graph can be divided according to the retrieval scenario. By determining the retrieval scenarios included in the visual intelligence graph, the data of each retrieval scenario can be indexed separately, thereby dividing the total amount of data in the visual intelligence graph into at least two groups of retrieval data, each group of retrieval data is smaller than the total amount of data, wherein at least two groups of retrieval data correspond one-to-one to at least two retrieval scenarios, so that the retrieval of the total amount of data is converted into the retrieval of the data of one of the retrieval scenarios, thereby improving the retrieval efficiency.
[0054] In one embodiment of the present invention, since a visual intelligence graph includes entities and relationships between entities, users can search for entities alone or for relationships between two entities when searching the visual intelligence graph. Therefore, the search scenarios can include at least entity search and graph search. The entity search scenario refers to searching for entity information that meets the search criteria, while the graph search scenario refers to searching for entities, relationships, and entity triples within the graph that meet the search criteria.
[0055] Furthermore, because existing visual intelligence graphs contain structured data, relying solely on structured data cannot fully convey information. In one embodiment of the present invention, to enrich the visual intelligence graph's expressive content, knowledge link files can be associated with entities in the visual intelligence graph using knowledge linking. These knowledge link files are unstructured files, such as documents, images, videos, and audio.
[0056] When a knowledge link file is associated with the visual intelligence graph, the search scenario may also include a knowledge link file search scenario. The knowledge link file search scenario refers to searching for unstructured files associated with entities in the visual intelligence graph.
[0057] It can be understood that in an embodiment of the present invention, when the retrieval scenario includes a knowledge link file retrieval scenario, the knowledge link file is associated in the visual intelligence graph in the form of a knowledge link, and the knowledge link file is an unstructured file.
[0058] In the embodiment of the present invention, data in different retrieval scenarios may be indexed using the same indexing method, or may be indexed using different indexing methods based on data features of different retrieval scenarios.
[0059] The following uses different indexing methods in different search scenarios as examples to illustrate respectively.
[0060] 1. Entity retrieval scenario
[0061] In an entity retrieval scenario, entity attributes are usually used as retrieval conditions, and the entities in the visual intelligence map belong to structured data. Therefore, in an embodiment of the present invention, when indexing data for the entity retrieval scenario, the data results of the B+ tree can be used to index the attributes of the entities in the visual intelligence map.
[0062] Specifically, the objects contained in the visual intelligence map and the multiple attributes of each object can be determined, and a B+ tree can be generated for the multiple attributes of each object. Among them, the B+ tree includes two types of nodes, one is the internal node (that is, the index node), and the other is the leaf node that stores data. The keys in the internal nodes are arranged in order of size. For an internal node, all keys in the left tree are smaller than the key of the internal node, and all keys in the right tree are larger than the key of the internal node. The data in the leaf nodes are also arranged according to the size of the key. Each leaf node stores pointers to adjacent leaf nodes, and the leaf nodes are linked in order of keyword size.
[0063] 2. Graph retrieval scenario
[0064] In a graph retrieval scenario, users usually input objects and their relationships as retrieval conditions to retrieve entities, relationships, and entity triple data that meet the conditions in the graph. Therefore, in an embodiment of the present invention, a hash table index can be established based on the objects, relationships, and object triple data included in the visual intelligence graph.
[0065] Specifically, you can specify a triple data of an object, a relationship, and an object, and traverse all entities and relationships in the visual intelligence map that match this triple to establish a hash table index. The key of the hash table is the triple data of the object, the relationship, and the object, and the value of the hash table is the corresponding entity and relationship set.
[0066] For example, if the visual intelligence graph includes object 1, object 2, and object 3, then you can specify the triple data of object 1, relationship, and object 2, calculate the key of the triple data, and calculate the corresponding value of the entities and relationships in the visual intelligence graph that match this triple to form a set of entities and relationships of the triple data.
[0067] It should be noted that the correspondence between objects and entities is: an object becomes an entity after being filled with information. When the same object is filled with different information, the resulting entity is also different.
[0068] 3. Knowledge link file retrieval scenario
[0069] In the knowledge link file retrieval scenario, since the knowledge link file is an unstructured file, when indexing the data of the knowledge link file retrieval scenario, the knowledge link file of the visual intelligence map can be subjected to multimodal content understanding, and an inverted index can be generated based on the understood text information.
[0070] In an embodiment of the present invention, for knowledge link files of text information, an inverted index can be generated directly using the text information, while for non-text knowledge link files such as pictures, audio, and video, multimodal content understanding can be performed first to form the corresponding text information before generating an inverted index.
[0071] Specifically, when generating an inverted index based on text information, we can first divide the text information into word sequences and convert each text into a data stream consisting of word sequences; then assign a unique word number (ID) to each different word, and record the document frequency of each word, the document number containing the word (DocID), the word frequency (TF) of the word in each corresponding document, and the position (POS) of the word in a certain document; finally, generate a word document matrix according to the following Table 1.
[0072] Table 1
[0073] Word ID word Document frequency Inverted list (DocId; TF; POS)
[0074] The above completes the separate indexing of each retrieved scene data.
[0075] Then, step 102 "obtaining the search conditions input by the user, performing word segmentation on the search conditions to obtain at least one word segmentation", step 104 "determining the category of each word segmentation in the at least one word segmentation" and step 106 "determining the target search scenario corresponding to the search conditions according to the category of each word segmentation" are explained at the same time.
[0076] In the embodiment of the present invention, the word segmentation processing for the search conditions may adopt a string matching method, a rule-based method, etc.
[0077] After the search conditions are segmented, each segmented word has its own meaning. Its meaning can be used to estimate the search purpose, and then determine the search scenario that the user needs to search, so as to perform the search in the corresponding search scenario and improve the user experience.
[0078] Specifically, the category to which each word segment belongs can be determined based on the pre-defined categories; the categories include: objects, relations, and attribute keys.
[0079] An object is encapsulated by entity attributes. For example, if the object is an organization, its entity attributes are the organization name, organization code, organization field, and organization business scope. When these entity attributes are filled with actual information, the entity of the organization is obtained. When the filled information is different, the entity obtained is also different. Specifically, the entity attributes of all objects contained in the visual intelligence map can be used to generate an entity attribute set. When determining whether the category to which a segmentation belongs is an object, the segmentation can be matched with the entity attribute set. If the segmentation exists in the entity attribute set, the category to which the segmentation belongs is determined to be an object.
[0080] A relationship refers to the connection between two connected entities in a visual intelligence graph. For example, the relationship between an organization and a person is an employment relationship, and the relationship between two organizations is a branch-headquarter relationship. Specifically, all relationships contained in the visual intelligence graph can be generated into a relationship set. When determining whether a segmented word belongs to a relationship, the segmented word can be matched with the relationship set. If the segmented word exists in the relationship set, the segmented word is determined to belong to a relationship.
[0081] Attribute keys are used to represent the actual configuration information and data associated with an entity. For example, if the entity is a person, its attribute key can be the person's relevant experience information, educational information, position information, etc. Specifically, the attribute key of the visual intelligence graph can be learned based on deep learning. Several knowledge link files associated with the visual intelligence graph can be used for feature learning. Words marked with attribute keys of "yes" or "no" are input into the neural network. The neural network is trained to learn the features of the word segmentation. When the word segmentation obtained after the search condition segmentation processing does not belong to the object and relationship categories, it can be input into the trained neural network to use the neural network to output information on whether the word segmentation is an attribute key value.
[0082] When a word does not belong to the category of object, relationship and attribute key value, it is determined that the word has no category.
[0083] After determining the category of the word segmentation using the above definition, the search scenario corresponding to the search condition can be evaluated based on the determined category. Specifically:
[0084] When the category of the at least one word segment includes an object category and does not include other categories, determining that the target search scenario corresponding to the search condition is an entity search scenario;
[0085] When the category of the at least one word segment includes an object category and a relationship category but does not include other categories, determining that the target search scenario corresponding to the search condition is a graph search scenario;
[0086] When the category of the at least one word segmentation includes an attribute key-value relationship category, it is determined that the target retrieval scenario corresponding to the retrieval condition is a knowledge link file retrieval scenario.
[0087] By determining the category of at least one word segment corresponding to the search condition, the target search scenario corresponding to the search condition is determined, thereby improving the search accuracy and user experience.
[0088] Finally, for step 108 , data matching the search condition is retrieved based on the index of the target search scenario.
[0089] Since the large amount of data in the visual intelligence map is divided into several small amounts of data in retrieval scenarios, the retrieval efficiency can be improved by performing data retrieval in a small number of retrieval scenarios.
[0090] Furthermore, after retrieving data that matches the retrieval conditions, if data that matches the retrieval conditions is retrieved, the retrieval results are formed into a knowledge dictionary classification tree; in response to a roaming operation on a target knowledge item in the knowledge dictionary classification tree, the target knowledge item is located at the corresponding coordinate position in the visual intelligence map.
[0091] Specifically, when forming a knowledge dictionary classification tree, search results can be classified according to different characteristics. For example, if multiple entity-linked files all contain data matching the search criteria, one approach is to classify them according to the different entities linked; another approach is to classify them according to the type of linked files; and yet another approach is to classify them according to the knowledge structure of the intelligence field, such as personnel, positions, arms, organizations, formations, equipment, projects, actions, platforms, processes, discourse, and opinions. By presenting the search results to the user in the form of a knowledge dictionary classification tree, it is easier for the user to view the search results based on the classification. In addition, when a user navigates to a target knowledge item in the knowledge dictionary classification tree, indicating that the user needs to view the target knowledge item, due to the large amount of data in the visual intelligence map, it is difficult to quickly locate the target knowledge item manually in the visual interface. By directly locating the target knowledge item at the corresponding coordinate position in the visual intelligence map, the user can more conveniently access the knowledge item and improve the interactivity between the user and the visual intelligence map.
[0092] like Figure 2 、 Figure 3 As shown, the embodiment of the present invention provides a visual intelligence graph retrieval device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 The figure shows a hardware architecture diagram of an electronic device where a visual intelligence graph retrieval device is provided in an embodiment of the present invention. Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a device in a logical sense, the CPU of the electronic device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it. This embodiment provides a visual intelligence map retrieval device, including:
[0093] An indexing unit 301 is configured to determine at least two search scenarios included in the visual intelligence graph to be indexed, and index the data of each search scenario separately;
[0094] The word segmentation processing unit 302 is used to obtain the search conditions input by the user, perform word segmentation processing on the search conditions, and obtain at least one word segmentation;
[0095] A category determination unit 303, configured to determine a category of each of the at least one segmented word;
[0096] A scene determination unit 304 is configured to determine a target search scene corresponding to the search condition according to the category of each segmented word;
[0097] The retrieval unit 305 is configured to retrieve data matching the retrieval condition based on the index of the target retrieval scenario.
[0098] In one embodiment of the present invention, the search scenarios include at least: entity search scenarios and graph search scenarios; or,
[0099] The retrieval scenarios include at least: entity retrieval scenario, graph retrieval scenario and knowledge link file retrieval scenario.
[0100] In one embodiment of the present invention, when the retrieval scenario includes a knowledge link file retrieval scenario, the knowledge link file is associated in the visual intelligence graph in the form of a knowledge link, and the knowledge link file is an unstructured file.
[0101] In one embodiment of the present invention, when the indexing unit indexes the data of the entity search scenario, it is specifically used to: use the data results of the B+ tree to index the attributes of the entity in the visual intelligence map; and / or,
[0102] When the indexing unit indexes the data of the graph retrieval scene, it is specifically used to: establish a hash table index based on the objects, relationships, and triple data of objects included in the visual intelligence graph; and / or,
[0103] When the indexing unit indexes the data of the knowledge link file retrieval scenario, it is specifically used to: perform multimodal content understanding on the knowledge link file of the visual intelligence map, and generate an inverted index based on the understood text information.
[0104] In one embodiment of the present invention, the category determination unit is specifically configured to determine the category to which each word segment belongs based on a pre-defined number of categories; the number of categories include: objects, relations, and attribute keys.
[0105] In one embodiment of the present invention, the scenario determination unit is specifically used to: when the category of the at least one word segmentation includes an object category but does not include other categories, determine that the target retrieval scenario corresponding to the retrieval condition is an entity retrieval scenario; when the category of the at least one word segmentation includes an object category and a relationship category but does not include other categories, determine that the target retrieval scenario corresponding to the retrieval condition is a graph retrieval scenario; when the category of the at least one word segmentation includes an attribute key-value relationship category, determine that the target retrieval scenario corresponding to the retrieval condition is a knowledge link file retrieval scenario.
[0106] In one embodiment of the present invention, the retrieval unit is further used to form a knowledge dictionary classification tree with the retrieval results if data matching the retrieval conditions is retrieved; and in response to a roaming operation on a target knowledge item in the knowledge dictionary classification tree, locate the target knowledge item at the corresponding coordinate position in the visual intelligence map.
[0107] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on a visual intelligence graph retrieval device. In other embodiments of the present invention, a visual intelligence graph retrieval device may include more or fewer components than illustrated, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0108] The information interaction, execution process, etc. between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.
[0109] An embodiment of the present invention further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a visual intelligence graph retrieval method in any embodiment of the present invention is implemented.
[0110] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor executes a visual intelligence graph retrieval method according to any embodiment of the present invention.
[0111] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.
[0112] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.
[0113] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0114] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.
[0115] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or into a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
[0116] It should be noted that, in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical factors in the process, method, article or device comprising the elements.
[0117] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A visual intelligence graph retrieval method, characterized in that: include: Determine at least two search scenarios included in the visual intelligence map to be indexed, and index the data of each search scenario separately; Obtaining a search condition input by a user, performing word segmentation processing on the search condition to obtain at least one word segmentation; determining a category of each of the at least one segmented word; Determining a target search scenario corresponding to the search condition according to the category of each segmented word; Retrieving data matching the search condition based on the index of the target search scenario; The search scenarios include at least: entity search scenario, graph search scenario and knowledge link file search scenario; Indexing the data of the entity retrieval scenario includes: using the data result of the B+ tree to index the attributes of the entity in the visual intelligence map; Indexing the data of the graph retrieval scene includes: establishing a hash table index based on the objects, relationships, and triple data of the objects included in the visual intelligence graph; Indexing the data of the knowledge link file retrieval scenario includes: performing multimodal content understanding on the knowledge link file of the visual intelligence map, and generating an inverted index based on the understood text information.
2. The method according to claim 1, characterized in that When the retrieval scenario includes a knowledge link file retrieval scenario, the knowledge link file is associated in the visual intelligence graph in a knowledge link manner, and the knowledge link file is an unstructured file.
3. The method according to claim 1, characterized in that Determining the category of each of the at least one segmented word includes: Based on the pre-defined categories, the category to which each word segment belongs is determined; the categories include: objects, relations, and attribute keys.
4. The method according to claim 3, characterized in that The step of determining a target search scenario corresponding to the search condition according to the category of each word segment includes: When the category of the at least one word segment includes an object category and does not include other categories, determining that the target search scenario corresponding to the search condition is an entity search scenario; When the category of the at least one word segment includes an object category and a relationship category but does not include other categories, determining that the target search scenario corresponding to the search condition is a graph search scenario; When the category of the at least one word segmentation includes an attribute key-value relationship category, it is determined that the target retrieval scenario corresponding to the retrieval condition is a knowledge link file retrieval scenario.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: If data matching the search criteria is found, the search results are formed into a knowledge dictionary classification tree; In response to a roaming operation on a target knowledge item in the knowledge dictionary classification tree, the target knowledge item is located at a corresponding coordinate position in the visual intelligence map.
6. A visual intelligence map retrieval device, characterized in that: include: An indexing unit, configured to determine at least two search scenarios included in the visual intelligence map to be indexed, and index the data of each search scenario separately; A word segmentation processing unit, configured to obtain a search condition input by a user, perform word segmentation processing on the search condition, and obtain at least one word segmentation; a category determination unit, configured to determine a category of each of the at least one segmented word; A scene determination unit, configured to determine a target search scene corresponding to the search condition according to the category of each segmented word; A retrieval unit, configured to retrieve data matching the retrieval condition based on an index of the target retrieval scenario; The search scenarios include at least: entity search scenario, graph search scenario and knowledge link file search scenario; Indexing the data of the entity retrieval scenario includes: using the data result of the B+ tree to index the attributes of the entity in the visual intelligence map; Indexing the data of the graph retrieval scene includes: establishing a hash table index based on the objects, relationships, and triple data of the objects included in the visual intelligence graph; Indexing the data of the knowledge link file retrieval scenario includes: performing multimodal content understanding on the knowledge link file of the visual intelligence map, and generating an inverted index based on the understood text information.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Position searching method and device and electronic equipment
CN110399566A
Drug name searching method and device, equipment and storage medium
CN114281923A