A text relevance determination method, device, apparatus and storage medium

By inputting combined features from the feature set of candidate documents into a pre-trained language model, interactive features are obtained and fused with domain features, thus solving the problem that the language model cannot give a reasonable relevance score and improving the accuracy of the relevance score.

CN117216190BActive Publication Date: 2026-05-26BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2023-09-19
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing language models struggle to exhaustively list all scoring rules for matching scenarios when measuring the relevance of search requests to candidate documents, resulting in an inability to provide reasonable relevance scores.

Method used

By inputting each combined feature from the feature set of candidate documents into a pre-trained language model, interaction features are obtained and fused with domain features to determine the textual relevance between the search request and the candidate documents.

Benefits of technology

By breaking down complex tasks into simpler tasks in multiple stages, the model can focus on performing specific tasks in each stage, thus improving the accuracy of the relevance score.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117216190B_ABST
    Figure CN117216190B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, and storage medium for determining text relevance. The method includes: determining model input features based on each combined feature in a feature set corresponding to a candidate document; inputting the model input features corresponding to each combined feature into a pre-trained language model to obtain interaction features output by the language model for each combined feature's model input features; determining fusion features based on the interaction features and domain features corresponding to each combined feature; and determining the text relevance between the search request and the candidate document based on the fusion features. This disclosure separates the encoding and interaction of different domains, which helps the model distinguish the relevance of different domains, thereby outputting a reasonable relevance score and improving the problem that language models cannot provide reasonable relevance scores.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data processing technology, and more particularly to a method, apparatus, device, and storage medium for determining text relevance. Background Technology

[0002] To measure the textual relevance of a search request to candidate documents, it is typically necessary to determine the textual match and intent match between the search request and the candidate documents.

[0003] Because documents contain multiple text domains, scoring rules are needed to determine the relevance scores based on the matching results between different domains of the document and the search request. These scoring rules are then used as labeled data to train the language model. However, as the types of text domains increase and the domain features included in the search request increase, it becomes difficult to exhaustively enumerate all scoring rules for matching cases as labeled data during the model training phase. This can lead to situations where the limited labeled data makes it difficult for the language model to accurately learn the scoring rules, preventing the language model from providing a reasonable relevance score between the search request and the document. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, and storage medium for determining text relevance, which can improve the problem that language models cannot provide reasonable relevance scores between search requests and documents.

[0005] In a first aspect, embodiments of this disclosure provide a method for determining text relevance, including:

[0006] The model input features are determined based on each combined feature in the feature set corresponding to the candidate document, wherein the feature set includes a first combined feature consisting of a first feature of the search request regarding the text content and a second feature of the candidate document regarding the text content, and a second combined feature consisting of a third feature of the search request regarding the search intent and a fourth feature of the candidate document regarding the genre.

[0007] The model input features corresponding to each combined feature are respectively input into the pre-trained language model to obtain the interaction features output by the language model for each combined feature, wherein the interaction features represent the correlation between the two features included in each combined feature.

[0008] A fusion feature is determined based on the interaction feature and domain feature corresponding to each combined feature, and the textual relevance between the search request and the candidate document is determined based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0009] Secondly, embodiments of this disclosure also provide a text relevance determination apparatus, the apparatus comprising:

[0010] The input feature determination module is used to determine the model input features based on each combined feature in the feature set corresponding to the candidate document. The feature set includes a first combined feature composed of a first feature of the search request about the text content and a second feature of the candidate document about the text content, and a second combined feature composed of a third feature of the search request about the search intent and a fourth feature of the candidate document about the genre.

[0011] The interaction feature determination module is used to input the model input features corresponding to each combined feature into the pre-trained language model, and obtain the interaction features output by the language model for each combined feature corresponding to the model input features, wherein the interaction features characterize the correlation between the two features included in each combined feature;

[0012] The relevance determination module is used to determine a fusion feature based on the interaction feature and domain feature corresponding to each combined feature, and to determine the text relevance between the search request and the candidate document based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0014] One or more processors;

[0015] Storage device for storing one or more programs.

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the text relevance determination method as described in any embodiment of this disclosure.

[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the text relevance determination method as described in any embodiment of this disclosure.

[0018] This disclosure provides a method, apparatus, device, and storage medium for determining text relevance. It involves inputting each combined feature from a feature set corresponding to a candidate document into a pre-trained language model to obtain the interaction features output by the language model for each combined feature. A fusion feature is determined based on the interaction feature and domain features corresponding to each combined feature. The text relevance between the search request and the candidate document is then determined based on the fusion feature. This disclosure first obtains interaction features by independently interacting with each combined feature, and then fuses and encodes the interaction features with the domain features. This separates the encoding and interaction of different domains, breaking down a complex task into multiple simple tasks. This allows the model to focus on performing simple tasks at each stage, facilitating the model's ability to distinguish the relevance of different domains and outputting a reasonable relevance score. This addresses the problem that language models cannot provide reasonable relevance scores for search requests and candidate documents. Attached Figure Description

[0019] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 A flowchart illustrating a text relevance determination method provided in an embodiment of this disclosure;

[0021] Figure 2 A schematic diagram of a text relevance determination method provided in an embodiment of this disclosure;

[0022] Figure 3 This is a schematic diagram of the structure of a text relevance determination device provided in an embodiment of the present disclosure;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0024] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0025] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0026] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0028] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0029] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0030] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0031] Figure 1 This is a flowchart illustrating a text relevance determination method provided in an embodiment of this disclosure. This embodiment is applicable to the situation of analyzing the text relevance between search requests and candidate documents. The method can be executed by a text relevance determination device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0032] like Figure 1 As shown, the method includes:

[0033] S110. Determine the model input features based on each combined feature in the feature set corresponding to the candidate document.

[0034] The feature set includes a first combined feature consisting of a first feature of the search request regarding the text content and a second feature of the candidate documents regarding the text content, and a second combined feature consisting of a third feature of the search request regarding the search intent and a fourth feature of the candidate documents regarding the genre. The search request is content entered through a search box. The search request may include a request to search for novels, or it may also include a request to search for news articles, or it may also include a request to search for academic papers, etc.

[0035] In this embodiment of the disclosure, for each candidate document, different types of features can be obtained according to the type of text field. For a search request, different types of features can be obtained according to the type of text field. For example, the text fields of a candidate document include title, summary, author, role, and genre, etc. The text fields of a search request include search text and search intent, etc. The title, summary, author, and role can be second features of the candidate document regarding its text content, and the genre can be fourth features of the candidate document regarding its genre. The search text can be first features of the search request regarding its text content, and the search intent can be third features of the search request regarding its search intent.

[0036] In some embodiments, a first feature of the search request regarding text content is combined with a second feature of the candidate text regarding text content to obtain a first combined feature in the feature set. A third feature of the search request regarding search intent is combined with a fourth feature of the candidate document regarding genre to obtain a second combined feature in the feature set.

[0037] For example, for each candidate document, the search text corresponding to the search request is combined with the title, abstract, author, or role of the candidate document to obtain a first combined feature; the search intent of the search request is combined with the genre of the candidate document to obtain a second combined feature; based on the first and second combined features of the candidate document, the feature set corresponding to the candidate document is determined. Wherein, in DOC... i In the corresponding feature set, the first combination of features can be represented as: search text + DOC i Title, search text + DOC i Summary, search text + DOC i The author, search text + DOC i The role, the second combination of features can be represented as: search intent + DOC iThe genre is defined by the candidate document number, i. Through feature decomposition in this embodiment, the search request is aligned with features belonging to the same classification system within a single text domain. This avoids combining features from different classification systems and inputting them into the pre-trained language model, allowing the language model to focus only on features relevant to the current domain and the search request. The language model training process includes: acquiring the search text and search intent of historical search requests, and acquiring the title, summary, author, role, and genre of the historical documents corresponding to the historical search requests. The search text corresponding to the historical search requests is combined with the title, summary, author, and role of each historical document to obtain a first combined feature sample. The search intent corresponding to the historical search requests is combined with the genre of each historical document to obtain a second combined feature sample. The language model is trained using the first and second combined feature samples to learn the interactions between features affecting relevance, avoiding mislearning the relevance between search intent and search text, thus deviating from the task of determining the text relevance between the search request and the document, and improving the model's ability to reasonably determine relevance scores.

[0038] For example, for each candidate document, a first combined feature corresponding to the title, abstract, author, or role is obtained from the feature set corresponding to the candidate document; a second combined feature corresponding to the genre is obtained from the feature set corresponding to the candidate document. Positional features are then superimposed onto each of the first or second combined features to obtain the model input features, wherein the positional features represent the positional embedding corresponding to each combined feature. For example, the positional features could be token position information in a language model.

[0039] After a search request is entered through the search box, the search engine obtains the search text and search intent corresponding to the search request, and retrieves the title, abstract, author, role, and genre of each candidate document in the text database. Based on the first combination of features formed by the search text and the title of each candidate document, the language model's input features are determined. Similarly, based on the first combination of features formed by the search text and the abstract of each candidate document, the language model's input features are determined. Based on the first combination of features formed by the search text and the author of each candidate document, the language model's input features are determined. Based on the first combination of features formed by the search text and the role of each candidate document, and based on the second combination of features formed by the search intent and the genre of each candidate document, the language model's input features are determined, thus combining features of the same type and inputting them separately into the language model.

[0040] S120. Input the model input features corresponding to each combined feature into the pre-trained language model to obtain the interaction features output by the language model for each combined feature corresponding to the model input features.

[0041] The interaction features represent the correlation between the two features included in each combined feature. The textual and semantic relationship between the two features can be calculated using a language model. The language model is used to identify the textual and semantic relationship between the two features included in each combined feature. A language model can be selected according to the actual application requirements, including but not limited to the BERT model or the ALBERT model.

[0042] For example, for the first combined feature corresponding to the title, the language model outputs the interaction feature corresponding to the title based on the first combined feature. For instance, the first combined feature consisting of the search text and the title is mapped into a word vector, and the word vector is added to the position vector and input into the language model. The language model then outputs a feature vector of the correlation between the search text and the title as the interaction feature corresponding to the title.

[0043] For the first combined feature corresponding to the summary, the language model outputs the interaction feature corresponding to the summary based on the first combined feature. For example, the first combined feature composed of the search text and the summary is mapped into word vectors, and the word vectors are added to the position vectors and input into the language model. The language model then outputs a feature vector of the correlation between the search text and the summary, which serves as the interaction feature corresponding to the summary.

[0044] For the first combination of features corresponding to the author, the language model outputs the corresponding interaction features for the author. For example, the first combination of features consisting of the search text and the author is mapped into word vectors, and the word vectors are added to the position vectors and input into the language model. The language model then outputs a feature vector of the correlation between the search text and the author, which serves as the corresponding interaction feature for the author.

[0045] For the first combination feature corresponding to a role, the language model outputs the interaction feature corresponding to the role based on the first combination feature. For example, the first combination feature consisting of the search text and the role is mapped into word vectors, and the word vectors are added to the position vectors and input into the language model. The language model then outputs a feature vector of the correlation between the search text and the role, which serves as the interaction feature corresponding to the role.

[0046] For the second combined feature corresponding to the genre, the language model outputs the interaction feature corresponding to the genre based on the second combined feature corresponding to the genre. For example, the second combined feature composed of search intent and genre is mapped into word vectors, and the word vectors are added to the position vectors and input into the language model. The language model then outputs a feature vector of the correlation between search intent and genre as the interaction feature corresponding to the genre.

[0047] S130. Determine the fusion feature based on the interaction feature and domain feature corresponding to each combined feature, and determine the textual relevance between the search request and the candidate document based on the fusion feature.

[0048] The domain features represent the text domain corresponding to each interaction feature. For example, the domain features can be domain vectors (field_embedding) to represent the text domain corresponding to each interaction feature. By superimposing the domain features onto the interaction features, the language model can distinguish the relevance of different domains and thus give a reasonable relevance score.

[0049] For example, the domain features are superimposed on the interactive features corresponding to the title, the interactive features corresponding to the abstract, the interactive features corresponding to the author, the interactive features corresponding to the role, and the interactive features corresponding to the genre, respectively, to obtain the superimposed features corresponding to each combined feature; the superimposed features are input into the encoding layer to obtain the fusion features output by the encoding layer.

[0050] Vector addition operations can be performed on the domain features and the interaction features corresponding to the title, abstract, author, role, and genre, respectively, to obtain the superimposed features corresponding to the title, abstract, author, role, and genre. Each superimposed feature represents the type of text domain corresponding to each interaction feature, thus adding text domain features to the interaction features. The superimposed features are then input into an encoding layer, where they are encoded to obtain the fused features.

[0051] The fused features are input into the classification layer to obtain the textual relevance between the search request and the candidate document output by the classification layer.

[0052] For example, obtaining the textual relevance between the search request output by the classification layer and the candidate document includes: calculating the relevance score corresponding to the fusion feature through the activation function corresponding to the classification layer, and using the relevance score as the textual relevance between the search request and the candidate document.

[0053] Figure 2This is a schematic diagram of a text relevance determination method provided in an embodiment of the present disclosure, as shown below. Figure 2 As shown, the model input features 220 of language model 210 are the title of the search text + candidate document, the summary of the search text + candidate document, the author of the search text + candidate document, the role of the search text + candidate document, and the genre of the search intent + candidate document. This aligns features within the same classification system, preventing the input of features from different classification systems into language model 210 from affecting the relevance score. After aligning features within the same classification system, the model input features 220 are added to the positional features 230 and then input into language model 210 for feature interaction. This ensures that the model only cares about features relevant to the current text domain and the search request. For example, the topic of the search text + candidate document is the first domain, represented by 0, and the summary of the search text + candidate document is the second domain, represented by 1. Similarly, the positional information of the remaining model input features 220 can be determined. The model input features are then input into language model 210, which calculates the relationship between the two features included in the model input features. Language model 210 outputs interaction features 240 (e.g., CLS features). Interaction features 240 include: search text-title interaction features, search text-summary interaction features, search text-author interaction features, search text-role interaction features, and search intent-genre interaction features; however, the correspondence between interaction features and text domain types is unknown. Then, the vector addition operations of domain features 250 with the search text-title interaction features, search text-summary interaction features, search text-author interaction features, search text-role interaction features, and search intent-genre interaction features are calculated respectively. The five vectors corresponding to the vector addition results are used to determine the superimposed features. The search text-title interaction features, search text-summary interaction features, search text-author interaction features, search text-role interaction features, and search intent-genre interaction features in the superimposed features each carry the text domain type. The superimposed features are input into the encoding layer 260, which encodes the superimposed features to obtain the multi-domain interaction fusion features. The set features in the fusion features are used as output features, and the relevance score corresponding to the output features is calculated through the activation function in the classification layer 270 to obtain the text relevance between the search request and the candidate documents.

[0054] The technical solution of this disclosure involves inputting each combined feature from the feature set corresponding to the candidate document into a pre-trained language model to obtain the interaction features output by the language model for each combined feature. A fusion feature is then determined based on the interaction feature and domain features corresponding to each combined feature. Finally, the textual relevance between the search request and the candidate document is determined based on the fusion feature. This disclosure first obtains interaction features by independently interacting with each combined feature, and then fuses and encodes the interaction features with the domain features. This separates the encoding and interaction of different domains, breaking down a complex task into multiple simple tasks. This allows the model to focus on performing simple tasks at each stage, which helps the model distinguish the relevance of different domains and output a reasonable relevance score. This addresses the problem that language models cannot provide reasonable relevance scores for search requests and candidate documents.

[0055] Figure 3 This is a schematic diagram of a text relevance determination device provided in an embodiment of this disclosure. This device can execute any of the text relevance determination methods provided in this disclosure. The device can be implemented in software and / or hardware. Optionally, it can be implemented using an electronic device, such as a mobile terminal, a PC, or a server. Figure 3 As shown, the device includes: an input feature determination module 310, an interaction feature determination module 320, and a correlation determination module 330.

[0056] The input feature determination module 310 is used to determine the model input features based on each combined feature in the feature set corresponding to the candidate document, wherein the feature set includes a first combined feature composed of a first feature of the search request about the text content and a second feature of the candidate document about the text content, and a second combined feature composed of a third feature of the search request about the search intent and a fourth feature of the candidate document about the genre.

[0057] The interaction feature determination module 320 is used to input the model input features corresponding to each combined feature into the pre-trained language model respectively, and obtain the interaction features output by the language model for each combined feature corresponding to the model input features, wherein the interaction features characterize the correlation between the two features included in each combined feature;

[0058] The relevance determination module 330 is used to determine a fusion feature based on the interaction feature and domain feature corresponding to each combined feature, and to determine the text relevance between the search request and the candidate document based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0059] Optionally, the device further includes:

[0060] The feature set determination module is used to, before determining the model input features based on each combined feature in the feature set corresponding to the candidate document, combine the search text corresponding to the search request with the title, abstract, author, or role of the candidate document to obtain a first combined feature; combine the search intent of the search request with the genre of the candidate document to obtain a second combined feature; and determine the feature set corresponding to the candidate document based on the first and second combined features of the candidate document.

[0061] Optionally, the input feature determination module 310 is specifically used for:

[0062] For each candidate document, obtain the first combination of features corresponding to the title, abstract, author, or role in the feature set corresponding to the candidate document; obtain the second combination of features corresponding to the genre in the feature set corresponding to the candidate document;

[0063] The location features are superimposed on each of the first or second combined features to obtain the model input features, wherein the location features represent the location embedding corresponding to each combined feature.

[0064] Optionally, the interaction feature determination module 320 is specifically used for:

[0065] For the first combination of features corresponding to the title, the language model outputs the interactive features corresponding to the title based on the first combination of features corresponding to the title.

[0066] Alternatively, for the first combined feature corresponding to the summary, the language model outputs the interaction feature corresponding to the summary based on the first combined feature corresponding to the summary;

[0067] Alternatively, for the first combination of features corresponding to the author, the language model outputs the interaction features corresponding to the author based on the first combination of features corresponding to the author;

[0068] Alternatively, for the first combination of features corresponding to a role, the language model can be used to output the interaction features corresponding to the role based on the first combination of features corresponding to the role.

[0069] Alternatively, for the second combination feature corresponding to the genre, the language model can output the interaction feature corresponding to the genre based on the second combination feature corresponding to the genre.

[0070] Optionally, the correlation determination module 330 is specifically used for:

[0071] The domain features are superimposed on the interactive features corresponding to the title, the abstract, the author, the role, and the genre, respectively, to obtain the superimposed features corresponding to each combined feature;

[0072] The superimposed features are input into the encoding layer to obtain the fused features output by the encoding layer.

[0073] Optionally, the correlation determination module 330 is also specifically used for:

[0074] The fused features are input into the classification layer to obtain the textual relevance between the search request and the candidate document output by the classification layer.

[0075] Optionally, obtaining the textual relevance between the search request output by the classification layer and the candidate documents includes:

[0076] The relevance score corresponding to the fusion feature is calculated using the activation function corresponding to the classification layer, and the relevance score is used as the text relevance between the search request and the candidate document.

[0077] The text relevance determination apparatus provided in this disclosure can execute the text relevance determination method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0078] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0079] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 4 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 4 The diagram below shows the structure of the terminal device or server 400. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0080] like Figure 4As shown, electronic device 400 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. An edit / output (I / O) interface 405 is also connected to bus 404.

[0081] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0082] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0083] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0084] The electronic device provided in this embodiment and the text relevance determination method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0085] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the text relevance determination method provided in the above embodiments.

[0086] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0087] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0088] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0089] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0090] The model input features are determined based on each combined feature in the feature set corresponding to the candidate document, wherein the feature set includes a first combined feature consisting of a first feature of the search request regarding the text content and a second feature of the candidate document regarding the text content, and a second combined feature consisting of a third feature of the search request regarding the search intent and a fourth feature of the candidate document regarding the genre.

[0091] The model input features corresponding to each combined feature are respectively input into the pre-trained language model to obtain the interaction features output by the language model for each combined feature, wherein the interaction features represent the correlation between the two features included in each combined feature.

[0092] A fusion feature is determined based on the interaction feature and domain feature corresponding to each combined feature, and the textual relevance between the search request and the candidate document is determined based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0093] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0096] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0097] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0098] According to one or more embodiments of this disclosure, Example 1 provides a method for determining text relevance, including:

[0099] The model input features are determined based on each combined feature in the feature set corresponding to the candidate document, wherein the feature set includes a first combined feature consisting of a first feature of the search request regarding the text content and a second feature of the candidate document regarding the text content, and a second combined feature consisting of a third feature of the search request regarding the search intent and a fourth feature of the candidate document regarding the genre.

[0100] The model input features corresponding to each combined feature are respectively input into the pre-trained language model to obtain the interaction features output by the language model for each combined feature, wherein the interaction features represent the correlation between the two features included in each combined feature.

[0101] A fusion feature is determined based on the interaction feature and domain feature corresponding to each combined feature, and the textual relevance between the search request and the candidate document is determined based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0102] According to one or more embodiments of this disclosure, Example 2, based on the method of Example 1, further includes, before determining the model input features based on each combined feature in the feature set corresponding to the candidate document:

[0103] For each candidate document, the search text corresponding to the search request is combined with the title, abstract, author, or role of the candidate document to obtain a first combined feature; the search intent of the search request is combined with the genre of the candidate document to obtain a second combined feature; based on the first and second combined features of the candidate document, the feature set corresponding to the candidate document is determined.

[0104] According to one or more embodiments of this disclosure, Example 3, based on the method described in Example 2, includes determining the model input features based on each combined feature in the feature set corresponding to the candidate document, comprising:

[0105] For each candidate document, obtain the first combination of features corresponding to the title, abstract, author, or role in the feature set corresponding to the candidate document; obtain the second combination of features corresponding to the genre in the feature set corresponding to the candidate document;

[0106] The location features are superimposed on each of the first or second combined features to obtain the model input features, wherein the location features represent the location embedding corresponding to each combined feature.

[0107] According to one or more embodiments of this disclosure, Example 4, based on the method described in Example 3, involves obtaining the interaction features output by the language model for each combined feature corresponding to the model input features, including:

[0108] For the first combination of features corresponding to the title, the language model outputs the interactive features corresponding to the title based on the first combination of features corresponding to the title.

[0109] Alternatively, for the first combined feature corresponding to the summary, the language model outputs the interaction feature corresponding to the summary based on the first combined feature corresponding to the summary;

[0110] Alternatively, for the first combination of features corresponding to the author, the language model outputs the interaction features corresponding to the author based on the first combination of features corresponding to the author;

[0111] Alternatively, for the first combination of features corresponding to a role, the language model can be used to output the interaction features corresponding to the role based on the first combination of features corresponding to the role.

[0112] Alternatively, for the second combination feature corresponding to the genre, the language model can output the interaction feature corresponding to the genre based on the second combination feature corresponding to the genre.

[0113] According to one or more embodiments of this disclosure, Example 5 describes the method described in Example 4, wherein determining the fusion feature based on the interaction feature and domain feature corresponding to each combined feature includes:

[0114] The domain features are superimposed on the interactive features corresponding to the title, the abstract, the author, the role, and the genre, respectively, to obtain the superimposed features corresponding to each combined feature;

[0115] The superimposed features are input into the encoding layer to obtain the fused features output by the encoding layer.

[0116] According to one or more embodiments of this disclosure, Example 6 describes the method of Example 1, wherein determining the textual relevance of the search request to the candidate document based on the fusion features includes:

[0117] The fused features are input into the classification layer to obtain the textual relevance between the search request and the candidate document output by the classification layer.

[0118] According to one or more embodiments of this disclosure, Example 7, based on the method described in Example 6, includes obtaining the textual relevance of the search request output by the classification layer to the candidate documents, comprising:

[0119] The relevance score corresponding to the fusion feature is calculated using the activation function corresponding to the classification layer, and the relevance score is used as the text relevance between the search request and the candidate document.

[0120] According to one or more embodiments of this disclosure, Example 8 provides a text relevance determination apparatus, comprising:

[0121] The input feature determination module is used to determine the model input features based on each combined feature in the feature set corresponding to the candidate document. The feature set includes a first combined feature composed of a first feature of the search request about the text content and a second feature of the candidate document about the text content, and a second combined feature composed of a third feature of the search request about the search intent and a fourth feature of the candidate document about the genre.

[0122] The interaction feature determination module is used to input the model input features corresponding to each combined feature into the pre-trained language model, and obtain the interaction features output by the language model for each combined feature corresponding to the model input features, wherein the interaction features characterize the correlation between the two features included in each combined feature;

[0123] The relevance determination module is used to determine a fusion feature based on the interaction feature and domain feature corresponding to each combined feature, and to determine the text relevance between the search request and the candidate document based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

[0124] According to one or more embodiments of this disclosure, Example 9 provides an electronic device, the electronic device comprising:

[0125] One or more processors;

[0126] Storage device for storing one or more programs.

[0127] When the one or more programs are executed by the one or more processors, the one or more processors implement the text relevance determination method as described in any of Examples 1-7.

[0128] According to one or more embodiments of the present disclosure, Example 10 provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a text relevance determination method as described in any of Examples 1-7.

[0129] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0130] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0131] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method of text relevance determination, characterized by, include: The model input features are determined based on each combined feature in the feature set corresponding to the candidate document. The feature set includes a first combined feature formed by combining the search text corresponding to the search request with the title, abstract, author or role of the candidate document, and a second combined feature formed by combining the search intent of the search request with the candidate document about genre. The model input features corresponding to each combined feature are respectively input into the pre-trained language model to obtain the interaction features output by the language model for each combined feature, wherein the interaction features represent the correlation between the two features included in each combined feature. A fusion feature is determined based on the interaction feature and domain feature corresponding to each combined feature, and the textual relevance between the search request and the candidate document is determined based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

2. The method according to claim 1, characterized in that, The step of determining the model input features based on each combined feature in the feature set corresponding to the candidate document includes: For each candidate document, obtain the first combination of features corresponding to the title, abstract, author, or role in the feature set corresponding to the candidate document; obtain the second combination of features corresponding to the genre in the feature set corresponding to the candidate document; The location features are superimposed on each of the first or second combined features to obtain the model input features, wherein the location features represent the location embedding corresponding to each combined feature.

3. The method according to claim 2, characterized in that, The step of obtaining the interaction features output by the language model for each combined feature corresponding to the model input features includes: For the first combination of features corresponding to the title, the language model outputs the interactive features corresponding to the title based on the first combination of features corresponding to the title. Alternatively, for the first combined feature corresponding to the summary, the language model outputs the interaction feature corresponding to the summary based on the first combined feature corresponding to the summary; Alternatively, for the first combination of features corresponding to the author, the language model outputs the interaction features corresponding to the author based on the first combination of features corresponding to the author; Alternatively, for the first combination of features corresponding to a role, the language model can be used to output the interaction features corresponding to the role based on the first combination of features corresponding to the role. Alternatively, for the second combination feature corresponding to the genre, the language model can output the interaction feature corresponding to the genre based on the second combination feature corresponding to the genre.

4. The method according to claim 3, characterized in that, The step of determining the fusion feature based on the interaction feature and domain feature corresponding to each combined feature includes: The domain features are superimposed on the interactive features corresponding to the title, the abstract, the author, the role, and the genre, respectively, to obtain the superimposed features corresponding to each combined feature; The superimposed features are input into the encoding layer to obtain the fused features output by the encoding layer.

5. The method according to claim 1, characterized in that, Determining the textual relevance between the search request and the candidate documents based on the fusion features includes: The fused features are input into the classification layer to obtain the textual relevance between the search request and the candidate document output by the classification layer.

6. The method according to claim 5, characterized in that, The step of obtaining the textual relevance between the search request output by the classification layer and the candidate documents includes: The relevance score corresponding to the fusion feature is calculated using the activation function corresponding to the classification layer, and the relevance score is used as the text relevance between the search request and the candidate document.

7. A text relevance determination device, characterized in that, include: The input feature determination module is used to determine the model input features based on each combined feature in the feature set corresponding to the candidate document. The feature set includes a first combined feature formed by combining the search text corresponding to the search request with the title, abstract, author or role of the candidate document, and a second combined feature formed by combining the search intent of the search request with the genre of the candidate document. The interaction feature determination module is used to input the model input features corresponding to each combined feature into the pre-trained language model, and obtain the interaction features output by the language model for each combined feature corresponding to the model input features, wherein the interaction features characterize the correlation between the two features included in each combined feature; The relevance determination module is used to determine a fusion feature based on the interaction feature and domain feature corresponding to each combined feature, and to determine the text relevance between the search request and the candidate document based on the fusion feature, wherein the domain feature represents the text domain corresponding to each interaction feature.

8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the text relevance determination method as described in any one of claims 1-6.

9. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the text relevance determination method as described in any one of claims 1-6.