Document search method and apparatus, computing device, and readable storage medium

By combining semantic and entity feature extraction networks with a classifier in the document search method, the shortcomings of relying on keywords in existing technologies are addressed, resulting in more accurate document matching and search results.

CN118796769BActive Publication Date: 2026-08-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310439906.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2026-08-25
Estimated Expiration
2043-04-12

AI Technical Summary

Technical Problem

Existing document search methods rely on a small number of keywords, resulting in less than ideal search results that fail to meet search needs, especially when search texts with significantly different actual meanings may extract the same keywords, thus deviating from the intent of the search text.

Method used

By acquiring the search text and entity relationship graph, semantic feature extraction network and entity feature extraction network are used to extract features from the text and entities. Combined with a trained classifier, it is determined whether the candidate document matches the search text, making full use of the search text and entity information for document matching.

Benefits of technology

It achieves more accurate document search results, making full use of search text and entity information, and improving the accuracy and comprehensiveness of matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796769B_ABST
    Figure CN118796769B_ABST
Patent Text Reader

Abstract

A document search method, device, computing equipment and readable storage medium are disclosed. The document search method comprises: obtaining a search text, a plurality of candidate documents and an entity relationship graph; determining an entity corresponding to the search text in the entity relationship graph and an associated entity associated with the entity; for each candidate document in the plurality of candidate documents, performing a document matching step to determine whether the candidate document matches the search text; and determining the candidate document matching the search text as a document search result. The document matching step comprises: extracting first text features from the search text and the candidate document; extracting first entity features from the entity and the associated entity; determining first fusion features based on the first text features and the first entity features; and determining whether the search text and the candidate document match based on the first fusion features by using a trained classifier. By the present application, the information of the search text can be fully utilized, and accurate document search can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a document search method and apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the development of information technology, the number of documents being transmitted and stored is increasing, making it increasingly important to accurately search for documents of interest from a large volume of documents.

[0003] Common document search methods receive search text, determine keywords based on it, and then search through a large number of documents to find those containing those keywords. While convenient, this method relies heavily on a limited number of keywords, often resulting in less than ideal search results. For example, this method can only identify a few shorter keywords from longer search texts, wasting some information within the text. In some scenarios, two search texts with significantly different meanings may extract the same keywords, causing search results that, while matching the keywords, still deviate from the original search text. This makes existing document search methods insufficient for meeting specific search needs. Summary of the Invention

[0004] In view of this, this application provides a document search method and apparatus, a computing device, a computer-readable storage medium, and a computer program product, which are intended to alleviate or overcome some or all of the defects mentioned above, as well as other possible defects.

[0005] According to one aspect of this application, a document search method is provided, comprising: acquiring a search text, multiple candidate documents, and an entity relationship graph, wherein the entity relationship graph contains multiple entities and associations between the multiple entities, and the multiple entities include an entity corresponding to the search text; determining the entity corresponding to the search text in the entity relationship graph and the associated entities associated with that entity; for each candidate document among the multiple candidate documents, performing a document matching step to determine whether the candidate document matches the search text; and determining the candidate document matching the search text as the document search result. The document matching step includes: extracting first text features from the search text and candidate documents using a semantic feature extraction network; extracting first entity features from the entity and associated entities using an entity feature extraction network; determining a first fusion feature based on the first text features and the first entity features; and determining whether the search text and candidate documents match using a trained classifier based on the first fusion feature.

[0006] According to another aspect of this application, a document search apparatus is provided, including an acquisition module, a first determination module, a document matching module, and a second determination module. The acquisition module is configured to acquire search text, multiple candidate documents, and an entity relationship graph, wherein the entity relationship graph contains multiple entities and associations between the multiple entities, and the multiple entities include an entity corresponding to the search text. The first determination module is configured to determine the entity corresponding to the search text in the entity relationship graph and the associated entities associated with that entity. The document matching module is configured to perform a document matching step for each of the multiple candidate documents to determine whether the candidate document matches the search text. The second determination module is configured to determine the candidate document matching the search text as the document search result. The document matching step includes: extracting first text features from the search text and candidate documents using a semantic feature extraction network; extracting first entity features from the entity and associated entities using an entity feature extraction network; determining a first fusion feature based on the first text features and the first entity features; and determining whether the search text and candidate documents match using a trained classifier based on the first fusion feature.

[0007] In a document search apparatus according to some embodiments of this application, determining the entity corresponding to the search text in an entity relationship graph and the associated entity of the entity includes: extracting the entity name and entity description from the search text; traversing multiple entities in the entity relationship graph to determine the candidate entity corresponding to the entity name; determining whether the associated entity of the candidate entity contains the entity description; and, in response to the associated entity of the candidate entity containing the entity description, determining the candidate entity as the entity corresponding to the search text.

[0008] In a document search apparatus according to some embodiments of this application, extracting first text features from search text and candidate documents using a semantic feature extraction network includes: selecting candidate document key text from candidate documents; determining a first composite text based on the search text and candidate document key text; and extracting first text features from the first composite text using a semantic feature extraction network.

[0009] In a document search apparatus according to some embodiments of this application, candidate document key text includes the document title of the candidate document; determining a first composite text based on search text and candidate document key text includes: concatenating the search text and candidate document key text, and determining the result of the text concatenation as the first composite text.

[0010] In a document search apparatus according to some embodiments of this application, extracting a first entity feature from an entity and related entities using an entity feature extraction network includes: determining entity information text of an entity based on the entity; determining entity information text of related entities and the relationship between related entities and the entity based on related entities; and extracting the first entity feature from the entity information text of the entity, the entity information text of related entities, and the relationship between related entities and the entity using an entity feature extraction network.

[0011] In a document search apparatus according to some embodiments of this application, determining a first fusion feature based on a first text feature and a first entity feature includes: performing vector concatenation on the first text feature and the first entity feature; and determining the result of the vector concatenation as the first fusion feature.

[0012] In a document search apparatus according to some embodiments of this application, a trained classifier is trained using a training set. The classifier receives a first fusion feature and outputs a classification result, which includes the probability of being assigned to each matching level, including mutual matching and mutual non-matching. Determining whether the search text and candidate documents match based on the first fusion feature using the trained classifier includes: inputting the first fusion feature into the trained classifier; determining the mutual matching probability output by the trained classifier as the matching probability of the search text and candidate documents; and determining that the search text and candidate documents match in response to the matching probability being greater than or equal to a first predetermined threshold.

[0013] In a document search apparatus according to some embodiments of this application, the training set includes multiple training sample pairs. Each training sample pair includes a first fusion feature and its corresponding matching level. The matching level is the matching level between the search text corresponding to the first fusion feature and the candidate document. A trained classifier performs a training step on the classifier using the training set. The training step includes: obtaining training sample pairs from the training set; inputting the first fusion feature of the training sample pair into the classifier to obtain an actual output; determining the matching level corresponding to the first fusion feature as the expected output of the classifier; and adjusting the classifier until the difference between the actual output and the expected output is less than a second predetermined threshold.

[0014] In a document search apparatus according to some embodiments of this application, a trained classifier is trained using a training set. The classifier receives a first fusion feature and outputs a classification result, which includes the probability of being classified into each matching level. The matching levels include highly matched, moderately matched, and mismatched. Determining whether the search text and candidate documents match based on the first fusion feature using the trained classifier includes: inputting the first fusion feature into the trained classifier; determining the probabilities of highly matched and moderately matched output by the trained classifier as the highly matched probability and moderately matched probability of the search text and candidate documents, respectively; determining that the search text and candidate documents are highly matched in response to a highly matched probability being greater than or equal to a third predetermined threshold; and determining that the search text and candidate documents are moderately matched in response to a moderately matched probability being greater than or equal to a fourth predetermined threshold.

[0015] According to another aspect of this application, a computing device is provided, comprising: a memory configured to store computer-executable instructions; and a processor configured to perform steps of a document method according to some embodiments of this application when the computer-executable instructions are executed by the processor.

[0016] According to another aspect of this application, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed, implement the document search steps according to some embodiments of this application.

[0017] According to another aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of a document search method according to some embodiments of this application.

[0018] In the document search method and apparatus according to some embodiments of this application, firstly, search text, multiple candidate documents, and an entity relationship graph are obtained, and the entity corresponding to the search text in the entity relationship graph and the associated entities associated with that entity are determined. This allows the information of the search text to be fully utilized, and more usable information can be extracted from the entity relationship graph based on the information of the search text. Then, for each of the multiple candidate documents, a document matching step is performed to determine whether the candidate document matches the search text. Since the information of the corresponding entity is fully utilized in the document matching step, the matching result between the search text and the candidate documents is more accurate. Finally, the candidate documents that match the search text are determined as the document search results. Therefore, through the document search method and apparatus disclosed in this application, accurate document search can be achieved by fully utilizing the information of the search text.

[0019] These and other advantages of this application will become clear from the embodiments described below, and will be illustrated with reference to the embodiments described below. Attached Figure Description

[0020] Embodiments of this application will now be described in more detail with reference to the accompanying drawings, wherein:

[0021] Figure 1 Exemplary application scenarios of document search methods according to some embodiments of this application are illustrated;

[0022] Figure 2A An exemplary flowchart of a document search method according to some embodiments of this application is shown;

[0023] Figure 2B An exemplary flowchart of document matching steps according to some embodiments of this application is shown;

[0024] Figure 3 A schematic diagram illustrating the relationships between entities according to some embodiments of this application is shown;

[0025] Figure 4 A schematic diagram illustrating document matching according to some embodiments of this application is shown;

[0026] Figure 5 An exemplary flowchart of training a classifier according to some embodiments of this application is shown;

[0027] Figure 6 An exemplary structural block diagram of a document search apparatus according to some embodiments of this application is shown; and,

[0028] Figure 7 An example system is shown, which includes an example computing device representing one or more systems and / or devices that can implement the various methods described herein. Detailed Implementation

[0029] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0030] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0032] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all promotional information and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0033] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the terms "and / or" and similar terms include all combinations of any, multiple, and all of the associated listed items.

[0034] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.

[0035] Before detailing the embodiments of this application, some terms used in the embodiments of this application will be explained first, so that those skilled in the art can understand them.

[0036] Entities refer to things in the real world, such as people, companies, groups, and institutions.

[0037] Knowledge graph: A graph-based data structure, a type of knowledge base, composed of nodes and edges. Each node represents an "entity," and each edge represents a "relationship" between entities. Essentially, a knowledge graph is a semantic network. Entities in the graph can refer to things in the real world, while relationships are used to express the connections between different entities.

[0038] BERT, short for Bidirectional Encoder Representations from Transformers, is a pre-trained language representation model. It emphasizes a departure from traditional unidirectional language models or shallow concatenation of two unidirectional models for pre-training. Instead, it employs a novel Masked Language Model (MLM) to generate deep bidirectional language representations. The foundation of the BERT model is Transformer, a mainstream feature extractor in Neuro-Linguistic Programming (NLP).

[0039] CNN: Convolutional Neural Networks (CNN) are a class of feedforward neural networks that include convolutional computations and have a deep structure. They are one of the representative algorithms of deep learning.

[0040] GNN: Graph Neural Network (GNN) refers to a general term for algorithms that use neural networks to learn graph-structured data, extract and discover features and patterns in graph-structured data, and meet the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation.

[0041] Word embedding: It can be understood as a mapping. The process is to map or embed a word in the text space into another numerical vector space through a certain method. This representation method often implies a dimensionality reduction.

[0042] A classifier is a device used to classify data. It can be implemented in software (e.g., mathematical models) or hardware (e.g., circuits). The concept of classification is to learn a classification function or construct a classification model based on existing data. This function or model can map data records in a database to a given category, thus enabling its application in data prediction. Methods for classifying samples in data mining can all be used as classifiers, such as decision trees, logistic regression, Naive Bayes, and neural networks. The role of a classifier: A typical task is to use given categories and known training data to learn classification rules and a classifier, and then classify (or predict) unknown data.

[0043] The technical solutions provided in this application relate to technologies such as natural language processing and machine learning in artificial intelligence. Artificial intelligence (AI) is the theory, methods, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0044] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.

[0045] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.

[0046] Figure 1An exemplary application scenario 100 of a document search method according to some embodiments of this application is illustrated. Application scenario 100 may include a server 110, a terminal device 120, and a terminal device 130. The server 110, terminal device 120, and terminal device 130 are communicatively coupled together via a network 140. The network 140 may be, for example, a wide area network (WAN), a local area network (LAN), a wireless network, a public telephone network, an intranet, and any other type of network well known to those skilled in the art.

[0047] As an example, on server 110, search text, multiple candidate documents, and an entity relationship graph can be obtained first. The entity relationship graph contains multiple entities and the associations between the multiple entities, including the entity corresponding to the search text. Then, the entity corresponding to the search text in the entity relationship graph and the associated entities associated with the entity are determined. Then, for each candidate document among the multiple candidate documents, a document matching step is performed to determine whether the candidate document matches the search text. Finally, the candidate document that matches the search text is determined as the document search result. The document matching step includes: extracting first text features from the search text and candidate documents using a semantic feature extraction network; extracting first entity features from the entity and associated entities using an entity feature extraction network; determining a first fusion feature based on the first text features and the first entity features; and determining whether the search text and candidate documents match using a trained classifier based on the first fusion feature. The search text, multiple candidate documents, entity relationship graph, semantic feature extraction network, and entity feature extraction network can be stored in server 110 or obtained from a terminal or other server via network 140.

[0048] As an example, the document search method can also be executed on terminal 120 or terminal 130. It should be noted that server 110, terminal device 120, and terminal device 130 may all include media and / or devices capable of persistently storing information, and / or tangible storage devices. Therefore, computer-readable storage media refers to non-signal-bearing media. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented with methods or techniques suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). As understood by those skilled in the art, instances of server 110 can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals and servers can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Server 110 can present the data allocation strategy to be determined to the developers through terminal device 120 and interact with the developers to achieve a visual determination of the development strategy.

[0049] Terminal devices 120 and 130 can be any type of mobile computing device, including mobile computers (e.g., personal digital assistants (PDAs), laptops, notebook computers, tablets, netbooks, etc.), mobile phones (e.g., cellular phones, smartphones, etc.), wearable computing devices (e.g., smartwatches, head-mounted devices, including smart glasses, etc.) or other types of mobile devices. In some embodiments, terminal devices 120 and 130 can also be fixed computing devices, such as desktop computers, game consoles, smart TVs, etc. Furthermore, when application scenario 100 includes multiple terminal devices 130, these multiple terminal devices 130 can be the same or different types of computing devices.

[0050] like Figure 1As shown, terminal devices 120 and 130 may include a display screen and a terminal application that can interact with the terminal user via the display screen. The terminal application can be a local application, a web application, or a lightweight application (such as a mobile app or WeChat mini-program). If the terminal application is a local application that requires installation, it can be installed on terminal devices 220 and 230. If the terminal application is a web application, it can be accessed through a browser. If the terminal application is a mini-program, it can be opened directly on the user's terminal devices 220 and 230 by searching for relevant information (such as the application's name) or scanning its graphic code (such as a barcode or QR code), without requiring installation.

[0051] In some embodiments, the application scenario 100 described above can be a distributed system composed of servers 110, which can, for example, constitute a blockchain system. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0052] The underlying blockchain platform can include processing modules such as user management, basic services, and smart contracts. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Under authorization, it also monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), then encrypt the business information using a consensus algorithm (consensus management), and finally transmit it completely and consistently to the shared ledger (network communication) for recording and storage. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). Based on the contract terms, execution is triggered by calling keys or other events to complete the contract logic. It also provides functions for contract upgrades and cancellations.

[0053] The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.

[0054] Figure 2A An exemplary flowchart of a document search method 200 according to some embodiments of this application is shown. Figure 2A As shown, method 200 includes steps S210, S220, S230 and S240.

[0055] In step S210, the search text, multiple candidate documents, and an entity relationship graph are obtained. The entity relationship graph contains multiple entities and the relationships between them, with the multiple entities including the entity corresponding to the search text. As an example, the entity relationship graph is used to illustrate the relationships between multiple entities. In some embodiments, the entity relationship graph may be a knowledge graph of entities, etc.

[0056] In step S220, the entity corresponding to the search text in the entity relationship graph and the associated entities are determined. As an example, determining the entity corresponding to the search text in the entity relationship graph can be done using common entity recognition tools, such as some open-source semantic-based entity recognition tools to identify the entity corresponding to the search text from the knowledge graph. The associated entities of this entity can be determined through the association relationships in the entity relationship graph.

[0057] In step S230, for each of the multiple candidate documents, a document matching step is performed to determine whether the candidate document matches the search text. As an example, the document matching step may include... Figure 2B The steps S230a, S230b, S230c, and S230d are shown.

[0058] In step S230a, a semantic feature extraction network is used to extract first text features from the search text and candidate documents. As an example, the semantic feature extraction network can be a neural network such as CNN or BERT.

[0059] In step S230b, a first entity feature is extracted from the entity and associated entities using an entity feature extraction network. As an example, the entity feature extraction network can be a neural network such as a GNN.

[0060] In step S230c, a first fusion feature is determined based on the first text feature and the first entity feature. Therefore, the first fusion feature contains information from the first text feature and the first entity feature, and can more comprehensively represent the key information of the search text, the entity corresponding to the search text, and the candidate document.

[0061] In step S230d, a trained classifier is used to determine whether the search text and candidate documents match based on the first fused features. As an example, the classifier can be a CNN-based classifier, a softmax classifier, etc.

[0062] In step S240, candidate documents that match the search text are determined as document search results. For example, if multiple candidate documents match the search text in step S230, then these candidate documents are determined as document search results in step S240.

[0063] Therefore, Method 200 can fully utilize the information in the search text and extract more usable information from the entity relationship graph based on the search text. Then, for each candidate document among multiple candidate documents, a document matching step is performed to determine whether the candidate document matches the search text. Because the information of the corresponding entities is fully utilized in the document matching step, the matching results between the search text and the candidate documents are more accurate. It can be seen that Method 200 achieves accurate document search by fully utilizing the information in the search text.

[0064] In some embodiments, determining the entity corresponding to the search text in an entity relationship graph and the associated entities of that entity may include the following steps: First, extract the entity name and entity description from the search text. Then, traverse multiple entities in the entity relationship graph to determine candidate entities corresponding to the entity name. Then, determine whether the associated entities of the candidate entity contain an entity description. In response to the candidate entity's associated entities containing an entity description, the candidate entity is determined as the entity corresponding to the search text. As an example, if the search text is "Beijing Wang Moumou", then the entity name "Wang Moumou" and the entity description "Beijing" are extracted. Then, traverse multiple entities in the entity relationship graph to determine the candidate entity corresponding to "Wang Moumou". Then, determine whether the candidate entity's associated entities contain the entity description "Beijing". In response to the candidate entity's associated entities containing the entity description "Beijing", the candidate entity is determined as the entity corresponding to the search text "Beijing Wang Moumou".

[0065] As an example, an entity relationship graph can be a knowledge graph. The associated entities of an entity in a knowledge graph can be entities directly connected to that entity, or entities connected through one entity or a predetermined number of entities. For instance, when an entity's associated entities are set to entities directly connected to that entity, all of that entity's associated entities have the characteristic of a direct association with that entity. Figure 3 A schematic diagram illustrating the relationships between entities according to some embodiments of this application is shown. For example... Figure 3 As shown, there is a direct association between the entity "Wang Moumou" and the entity "Beijing", that is, the place of origin of the entity "Wang Moumou" is the entity "Beijing".

[0066] In some embodiments, extracting first text features from search text and candidate documents using a semantic feature extraction network may include the following steps: First, selecting key text from candidate documents. For example, key text may include document titles, document keywords, etc., or key sentences, key paragraphs, etc. Then, determining a first composite text based on the search text and the key text of candidate documents. For example, this can be achieved by concatenating the search text and the key text of candidate documents, for example, by combining them using punctuation marks or separators. Finally, extracting first text features from the first composite text using a semantic feature extraction network. For example, the semantic feature extraction network may be a neural network of various structures, such as BERT, CNN, etc., and is not limited here.

[0067] In some embodiments, the candidate document key text includes the document title of the candidate document. Determining the first composite text based on the search text and the candidate document key text includes: concatenating the search text and the candidate document key text, and determining the result of the text concatenation as the first composite text. For example, the search text can be placed first, followed by the candidate document key text, and then connected by a delimiter to achieve text concatenation.

[0068] In some embodiments, extracting first entity features from an entity and related entities using an entity feature extraction network includes the following steps: First, determining the entity information text of the entity. For example, the entity "Wang Moumou" includes the entity information text: "Entity Attributes - Natural Person, Entity Name - Wang Moumou, Entity Year - 62 years old". Then, determining the entity information text of related entities and the relationship between related entities and the entity based on related entities. Finally, extracting the first entity features from the entity information text of the entity, the entity information text of related entities, and the relationship between related entities and the entity using an entity feature extraction network. For example, from... Figure 3 The first entity feature of entity "Wang Moumou" is extracted from the diagram showing the relationship between entities.

[0069] As an example, determining the first fused feature based on the first text feature and the first entity feature includes: concatenating the first text feature and the first entity feature into vectors; and determining the result of the vector concatenation as the first fused feature. For example, the vector concatenation is performed with the first text feature first and the first entity feature second.

[0070] Figure 4 A schematic diagram illustrating document matching according to some embodiments is shown. For example... Figure 4As shown, the process first obtains the search text and candidate document key text. For example, the candidate document key text could be the title of the candidate document. Then, they are concatenated to obtain the first composite text. For example, the search text can be concatenated first, followed by the candidate document, separated by "#", such as "Search text #candidate document title". Next, a semantic feature extraction network is used to extract the first text features from the first composite text. This semantic feature extraction network could be a neural network such as BERT or CNN. Furthermore, the entity corresponding to the search text is identified in the entity relationship graph, and the entities associated with that entity are extracted as an entity relationship subgraph. Then, an entity feature extraction network is used to extract the first entity features from the entity relationship subgraph. For example, this entity feature extraction network could be GNN. Then, the first text features and the first entity features are concatenated as vectors to obtain the first fused feature. For example, the first fused feature could be in the form of "[first text feature, first entity feature]". Finally, the first fused feature is input into a trained classifier, and the classifier's output determines whether the search text and candidate document match. As an example, a classifier can categorize the input and output corresponding classifiers, such as an output of 1 indicating a match and an output of 0 indicating a non-match. In other embodiments, the classifier can also output corresponding classification probabilities, such as the probability of a match and the probability of a non-match.

[0071] In some embodiments, the trained classifier is trained using a training set. The classifier receives a first fused feature and outputs a classification result. As an example, the classifier may employ algorithms such as decision trees, logistic regression, Naive Bayes, or neural networks; no limitation is made here. The classification result includes the probability of being assigned to each matching level, which includes mutual matching and mutual non-matching. Determining whether the search text and candidate documents match based on the first fused feature using the trained classifier includes the following steps: First, the first fused feature is input into the trained classifier. Then, the mutual matching probability output by the trained classifier is determined as the matching probability of the search text and candidate documents. Finally, in response to a matching probability greater than or equal to a first predetermined threshold, the search text and candidate documents are determined to match.

[0072] In some embodiments, the training set includes multiple training sample pairs, each training sample pair including a first fusion feature and its corresponding matching grade. The matching grade is the matching level between the search text corresponding to the first fusion feature and the candidate document. The trained classifier can be determined by performing a training step on the classifier using the training set. As an example, the training step may include... Figure 5 The steps are shown. Figure 5 An exemplary flowchart of training a classifier according to some embodiments of this application is shown. Figure 5 As shown, the training steps include steps S510, S520, S530 and S540.

[0073] In step S510, training sample pairs are obtained from the training set. For example, the training set contains 1000 training sample pairs, each containing the matching search text and candidate documents.

[0074] In step S520, the first fusion feature of the training sample pair is input into the classifier to obtain the actual output. As an example, the first fusion feature of the training sample pair can be determined by the method described above.

[0075] In step S530, the matching level corresponding to the first fusion feature is determined as the expected output of the classifier. For example, if the matching level corresponding to the first fusion feature is "match", then its expected output is set to a probability of 1 for matching and a probability of 0 for non-matching.

[0076] In step S540, the classifier is adjusted until the difference between the actual output and the expected output is less than a second predetermined threshold. For example, the actual output of the classifier is: the probability of classifying the first fused feature as a mismatch is 0.2, and the probability of classifying it as a match is 0.8. The classifier is then adjusted until the difference between the actual output and the expected output is less than the second predetermined threshold. As an example, the difference can be represented by a loss function. That is, the actual output and the expected output are input together into the loss function, and the output of the loss function is determined as the difference value. The classifier is adjusted until the output of the loss function is less than the second predetermined threshold.

[0077] As an example, the loss function can be the negative logarithmic loss function, as shown in the following formula:

[0078]

[0079] Where loss is the loss function, n is the number of training data, and y i Represents the category (e.g., it can be 0 or 1, where 1 represents a match and 0 represents no match), a i It represents the probability of being assigned to the corresponding category.

[0080] In some embodiments, the matching levels include highly matched, moderately matched, and mismatched. Determining whether the search text and candidate document match based on a first fusion feature using a trained classifier includes the following steps: First, the first fusion feature is input into the trained classifier. Then, the probabilities of highly matched and moderately matched output by the trained classifier are determined as the highly matched probability and moderately matched probability of the search text and candidate document, respectively. Then, in response to a highly matched probability being greater than or equal to a third predetermined threshold, the search text and candidate document are determined to be highly matched. In response to a moderately matched probability being greater than or equal to a fourth predetermined threshold, the search text and candidate document are determined to be moderately matched. As an example, a two-dimensional vector can be used to identify the category, such as "y". i = (0, 0) indicates a mismatch, "y i =(0,1)" indicates a general match, "y i =(1,1)” indicates a high match.

[0081] Figure 6 An exemplary structural block diagram of a document search apparatus 600 according to some embodiments of this application is shown. Figure 6 As shown, the document search device 600 includes an acquisition module 610, a first determination module 620, a document matching module 630, and a second determination module 640.

[0082] The acquisition module 610 is configured to acquire search text, multiple candidate documents, and an entity relationship graph. The entity relationship graph contains multiple entities and the relationships between them, with each entity corresponding to the search text. As an example, the entity relationship graph is used to illustrate the relationships between multiple entities. In some embodiments, the entity relationship graph may be a knowledge graph of entities, etc.

[0083] The first determining module 620 is configured to determine the entity corresponding to the search text in the entity relationship graph and the associated entities of that entity. As an example, determining the entity corresponding to the search text in the entity relationship graph can be done using common entity recognition tools, such as some open-source semantic-based entity recognition tools to identify the entity corresponding to the search text from the knowledge graph. The associated entities of this entity can be determined through the association relationships in the entity relationship graph.

[0084] The document matching module 630 is configured to perform a document matching step for each of a plurality of candidate documents to determine whether the candidate document matches the search text. As an example, the document matching step may include the following steps: First, a semantic feature extraction network is used to extract first text features from the search text and candidate documents. As an example, the semantic feature extraction network may be a neural network such as CNN or BERT. Then, an entity feature extraction network is used to extract first entity features from the entity and related entities. As an example, the entity feature extraction network may be a neural network such as GNN. Then, a first fused feature is determined based on the first text features and the first entity features. Therefore, the first fused feature contains information from both the first text features and the first entity features, and can more comprehensively represent the key information of the search text, the entity corresponding to the search text, and the candidate document. Finally, a trained classifier is used to determine whether the search text and candidate documents match based on the first fused feature. As an example, the classifier may be a CNN-based classifier, a softmax classifier, etc.

[0085] The second determining module 640 is configured to determine candidate documents that match the search text as document search results. As an example, there may be one or more candidate documents that match the search text, and the second determining module 640 determines these candidate documents as document search results.

[0086] Therefore, the document search device 600 can fully utilize the information in the search text and extract more usable information from the entity relationship graph based on this information. Then, for each of the multiple candidate documents, a document matching step is performed to determine whether the candidate document matches the search text. Because the information of the corresponding entities is fully utilized in the document matching step, the matching results between the search text and the candidate documents are more accurate. It is evident that by fully utilizing the information in the search text, the document search device 600 can achieve accurate document searching.

[0087] Figure 7 An example system 700 is illustrated, which includes an example computing device 710 representing one or more systems and / or devices that can implement the various methods described herein. The computing device 710 may be, for example, a server of a service provider, a device associated with a server, a system-on-a-chip, and / or any other suitable computing device or computing system. (Refer to above) Figure 6 The document search device 600 described can take the form of a computing device 710. Alternatively, the document search device 600 can be implemented as a computer program as an application 716.

[0088] The example computing device 710 shown includes a processing system 711 communicatively coupled to each other, one or more computer-readable media 712, and one or more I / O interfaces 713. Although not shown, the computing device 710 may also include a system bus or other data and command transfer system that couples the various components to each other. The system bus may include any or a combination of different bus architectures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any of the various bus architectures. Various other examples, such as control and data lines, are also conceived.

[0089] Processing system 711 represents the functionality of performing one or more operations using hardware. Therefore, processing system 711 is illustrated as including hardware elements 714 that can be configured as processors, function blocks, etc. This may include other logic devices implemented in hardware as application-specific integrated circuits (ASICs) or formed using one or more semiconductors. Hardware element 714 is not limited by the materials in which it is formed or the processing mechanism employed therein. For example, a processor may consist of semiconductors and / or transistors (e.g., integrated circuits (ICs)). In such a context, processor-executable instructions may be electronically executable instructions.

[0090] Computer-readable medium 712 is illustrated as including memory / storage device 716. Memory / storage device 716 represents a memory / storage capacity associated with one or more computer-readable media. Memory / storage device 716 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disk, magnetic disk, etc.). Memory / storage device 716 may include fixed media (e.g., RAM, ROM, fixed hard disk drive, etc.) and removable media (e.g., flash memory, removable hard disk drive, optical disk, etc.). Computer-readable medium 712 may be configured in various other ways as further described below.

[0091] One or more I / O interfaces 713 represent the functionality to allow users to input commands and information to computing device 710 using various input devices and optionally also to present information to the user and / or other components or devices using various output devices. Examples of input devices include keyboards, cursor control devices (e.g., mice), microphones (e.g., for voice input), scanners, touch functionality (e.g., capacitive or other sensors configured to detect physical touch), cameras (e.g., capable of detecting non-touch-related motion as gestures using visible or invisible wavelengths (such as infrared frequencies), etc. Examples of output devices include display devices, speakers, printers, network interface cards, haptic-responsive devices, etc. Therefore, computing device 710 can be configured to support user interaction in various ways as further described below.

[0092] The computing device 710 also includes an application 716. The application 716 may be, for example, a software instance for a document search device 600, and may implement the techniques described herein in combination with other elements in the computing device 710.

[0093] This application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform the document search method provided in the various optional implementations described above.

[0094] This document describes various technologies within the general context of software and hardware components or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, etc., that perform specific tasks or implement specific abstract data types. As used herein, the terms "module," "function," and "component" generally refer to software, firmware, hardware, or a combination thereof. The technologies described herein are characterized as platform-independent, meaning that these technologies can be implemented on a variety of computing platforms with various processors.

[0095] Implementations of the described modules and technologies may be stored on or transmitted across some form of computer-readable medium. The computer-readable medium may include a variety of media accessible by the computing device 710. By way of example and not limitation, the computer-readable medium may include "computer-readable storage media" and "computer-readable signal media".

[0096] In contrast to simple signal transmission, carrier waves, or signals themselves, a "computer-readable storage medium" refers to a medium and / or device capable of persistently storing information, and / or a tangible storage device. Therefore, a computer-readable storage medium refers to a non-signal-bearing medium. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented using methods or techniques suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). Examples of computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, DVD or other optical storage devices, hard disks, magnetic tape cassettes, magnetic tapes, disk storage devices or other magnetic storage devices, or other storage devices, tangible media, or articles of art suitable for storing desired information and accessible by a computer.

[0097] "Computer-readable signal medium" refers to a signal-bearing medium configured to transmit instructions, such as via a network, to computing device 710. A signal medium typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, data signal, or other transmission mechanism. Signal media also include any information transmission medium. The term "modulated data signal" refers to a signal in which one or more of its characteristics are set or altered to encode information. By way of example and not limitation, communication media include wired media such as wired networks or direct connections, and wireless media such as acoustic, RF, infrared, and other wireless media.

[0098] As previously stated, hardware element 714 and computer-readable medium 712 represent instructions, modules, programmable device logic, and / or fixed device logic implemented in hardware, which in some embodiments can be used to implement at least some aspects of the techniques described herein. Hardware elements may include components of integrated circuits or systems-on-a-chip, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other implementations or other hardware devices in silicon. In this context, hardware elements can serve as processing devices for executing program tasks defined by instructions, modules, and / or logic embodied by the hardware element, and as hardware devices for storing instructions for execution, such as the previously described computer-readable storage medium.

[0099] The foregoing combinations can also be used to implement the various techniques and modules described herein. Therefore, software, hardware, or program modules and other program modules can be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 714. The computing device 710 can be configured to implement specific instructions and / or functions corresponding to the software and / or hardware modules. Thus, for example, by using the computer-readable storage medium and / or hardware elements 714 of a processing system, modules can be implemented at least partially in hardware as modules executable as software by the computing device 710. Instructions and / or functions can be executable / operable by one or more articles of art (e.g., one or more computing devices 710 and / or processing systems 711) to implement the techniques, modules, and examples described herein.

[0100] In various embodiments, the computing device 710 can be configured in various ways. For example, the computing device 710 can be implemented as a computer-type device, including personal computers, desktop computers, multi-screen computers, laptop computers, netbooks, etc. The computing device 710 can also be implemented as a mobile device, including mobile devices such as mobile phones, portable music players, portable gaming devices, tablet computers, multi-screen computers, etc. The computing device 710 can also be implemented as a television-type device, including devices with or connected to a generally large screen in a leisure viewing environment. These devices include televisions, set-top boxes, game consoles, etc.

[0101] The techniques described herein can be supported by these various configurations of computing device 710, and are not limited to specific examples of the techniques described herein. Functionality can also be implemented, wholly or partially, on the “cloud” 720 using distributed systems, such as through platform 722 as described below.

[0102] Cloud 720 includes and / or represents platform 722 for resource 724. Platform 722 abstracts the underlying functionality of the hardware (e.g., server) and software resources of cloud 720. Resource 724 may include applications and / or data that can be used when performing computer processing on a server located remotely from computing device 710. Resource 724 may also include services provided via the Internet and / or via subscriber networks such as cellular or Wi-Fi networks.

[0103] Platform 722 can abstract resources and functions to connect computing device 710 to other computing devices. Platform 722 can also be used to abstract resource hierarchy to provide a corresponding level of hierarchy for any encountered needs for resource 724 implemented via platform 722. Therefore, in interconnect device embodiments, the implementation of the functions described herein can be distributed throughout system 700. For example, functions can be implemented partly on computing device 710 and partly through platform 722, which abstracts the functions of cloud 720.

[0104] It should be understood that, for clarity, embodiments of this application have been described with reference to different functional units. However, it will be apparent that, without departing from this application, the functionality of each functional unit may be implemented in a single unit, in multiple units, or as part of other functional units. For example, functionality described as being performed by a single unit may be performed by multiple different units. Therefore, references to specific functional units are considered merely as references to the appropriate units used to provide the described functionality, and not as indicating a strict logical or physical structure or organization. Thus, this application may be implemented in a single unit, or may be physically and functionally distributed among different units and circuits.

[0105] Although this application has been described in conjunction with some embodiments, it is not intended to be limited to the specific forms set forth herein. Rather, the scope of this application is limited only by the appended claims. Additionally, although individual features may be included in different claims, these may be advantageously combined, and inclusion in different claims does not imply that such a combination of features is not feasible and / or advantageous. The order of features in the claims does not imply that the features must be in any particular order of their operation. Furthermore, in the claims, the word "comprising" does not exclude other elements, and the terms "a" or "an" do not exclude a plurality. Reference numerals in the claims are provided only as explicit examples and should not be construed as limiting the scope of the claims in any way.

[0106] It is understood that the specific embodiments of this application involve entity-related data such as entity default information. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

Claims

1. A document search method, comprising: Obtain the search text, multiple candidate documents, and an entity relationship graph, wherein the entity relationship graph contains multiple entities and the relationships between the multiple entities, and the multiple entities include the entity corresponding to the search text; Determine the entity corresponding to the search text in the entity relationship graph and the associated entities associated with the entity; For each of the plurality of candidate documents, a document matching step is performed to determine whether the candidate document matches the search text; as well as, Candidate documents that match the search text are identified as document search results; The document matching step includes: Select candidate document key text from the candidate documents; determine a first composite text based on the search text and the candidate document key text; and extract first text features from the first composite text using a semantic feature extraction network. A first entity feature is extracted from the entity and the associated entity using an entity feature extraction network; A first fusion feature is determined based on the first text feature and the first entity feature; The trained classifier is used to determine whether the search text and the candidate document match based on the first fusion feature.

2. The method according to claim 1, wherein determining the entity corresponding to the search text in the entity relationship graph and the associated entities associated with the entity comprises: Extract entity names and entity descriptions from the search text; Traverse multiple entities in the entity relationship graph to determine the candidate entities corresponding to the entity names; Determine whether the associated entity of the candidate entity contains the entity description; and, In response to the fact that the associated entity of the candidate entity contains the entity description, the candidate entity is determined as the entity corresponding to the search text.

3. The method according to claim 1, wherein the candidate document key text includes the document title of the candidate document; and the step of determining the first composite text based on the search text and the candidate document key text includes: The search text and the candidate document key text are concatenated, and the result of the text concatenation is determined as the first composite text.

4. The method according to claim 1, wherein extracting first entity features from the entity and the associated entity using an entity feature extraction network comprises: Based on the entity, determine the entity information text of the entity; Based on the associated entity, determine the entity information text of the associated entity and the relationship between the associated entity and the entity; as well as, The entity feature extraction network is used to extract the first entity feature from the entity information text of the entity, the entity information text of the associated entity, and the relationship between the associated entity and the entity.

5. The method according to claim 1, wherein determining the first fusion feature based on the first text feature and the first entity feature comprises: The first text feature and the first entity feature are concatenated as vectors; as well as, The result of concatenating the vectors is determined as the first fusion feature.

6. The method according to claim 1, wherein the trained classifier is trained and determined using a training set, the classifier receives a first fusion feature and outputs a classification result, the classification result including the probability of being classified into each matching level, the matching level including mutual matching and mutual non-matching; The process of determining whether the search text and the candidate document match based on the first fusion feature using a trained classifier includes: The first fused feature is input into the trained classifier; The probability of a mutual match output by the trained classifier is determined as the matching probability between the search text and the candidate document; and, In response to the matching probability being greater than or equal to a first predetermined threshold, it is determined that the search text and the candidate document match.

7. The method according to claim 6, wherein the training set includes multiple training sample pairs, each training sample pair includes a first fusion feature and its corresponding matching level, the matching level being the matching level between the search text corresponding to the first fusion feature and the candidate document; The trained classifier is determined by performing a training step on the classifier using the training set, the training step including: Obtain training sample pairs from the training set. The first fusion feature of the training sample pair is input into the classifier to obtain the actual output. The matching level corresponding to the first fused feature is determined as the expected output of the classifier, and The classifier is adjusted until the difference between the actual output and the expected output is less than a second predetermined threshold.

8. The method according to claim 1, wherein the trained classifier is trained and determined using a training set, the classifier receives a first fusion feature and outputs a classification result, the classification result including the probability of being classified into each matching level, the matching level including highly matched, moderately matched, and not matched. The process of determining whether the search text and the candidate document match based on the first fusion feature using a trained classifier includes: The first fused feature is input into the trained classifier; The probabilities of high mutual matching and general mutual matching output by the trained classifier are respectively determined as the high matching probability and general matching probability of the search text and the candidate document. In response to the high matching probability being greater than or equal to a third predetermined threshold, it is determined that the search text and the candidate document are highly matched; and, In response to the general matching probability being greater than or equal to a fourth predetermined threshold, it is determined that the search text and the candidate document are generally matched.

9. A document search device, comprising: The acquisition module is configured to acquire search text, multiple candidate documents, and an entity relationship graph, wherein the entity relationship graph contains multiple entities and the relationships between the multiple entities, and the multiple entities include the entity corresponding to the search text. The first determining module is configured to determine the entity corresponding to the search text in the entity relationship graph and the associated entities associated with the entity; A document matching module, configured to perform a document matching step for each of the plurality of candidate documents to determine whether the candidate document matches the search text; and... The second determining module is configured to determine candidate documents that match the search text as document search results; The document matching step includes: Select candidate document key text from the candidate documents; determine a first composite text based on the search text and the candidate document key text; and extract first text features from the first composite text using a semantic feature extraction network. A first entity feature is extracted from the entity and the associated entity using an entity feature extraction network; A first fusion feature is determined based on the first text feature and the first entity feature; The trained classifier is used to determine whether the search text and the candidate document match based on the first fusion feature.

10. A computing device, comprising: Memory, which is configured to store computer-executable instructions; as well as A processor configured to perform the method according to any one of claims 1-8 when the computer-executable instructions are executed by the processor.

11. A computer-readable storage medium storing computer-executable instructions that, when executed, implement the method according to any one of claims 1-8.

12. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Entity relationship extraction method, device and equipment and storage medium thereof

    CN111709240A

  • Graph-based document retrieval method and system and related components thereof

    CN112836029A