Data processing method and device, equipment and medium

By analyzing the historical search data and characteristics of the query information, combining document and event search, analyzing the association relationship, and generating search results with high matching and timeliness, the problem of low matching of query statements in the prior art is solved.

CN120492486APending Publication Date: 2025-08-15BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510570449.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the existing information retrieval system, short query statements cannot fully express the real needs of the object, resulting in low matching between the search results and the query statements and lack timeliness, especially in breaking news scenarios, which are difficult to obtain the latest information.

Method used

By obtaining the historical search data of the query information, determining its search change characteristics, performing document and event search, combining the search prompt text to analyze the association relationship, output predicted events and their association strength parameters, and generating search results.

Benefits of technology

It improves the matching degree between query information and predicted events, enhances the timeliness of search results, and ensures that the information that the object really needs is obtained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492486A_ABST
    Figure CN120492486A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, equipment and a medium, and the method comprises the steps: obtaining first query information and historical search data of the first query information, and determining a first search change feature of the first query information according to the historical search data; obtaining a first document set and a first candidate event set of the first query information; screening out a second candidate event set from the first candidate event set according to the first query information and the first search change feature; according to the retrieval prompt text and the first search change feature, analyzing an association relationship among the first query information, the first document set and the second candidate event set, and outputting a first prediction event and a first association strength parameter; the first prediction event and the first association strength parameter are used for generating a retrieval result of the first query information. By implementing the embodiment of the invention, the matching degree between the query information and the prediction event can be improved, and the timeliness of the retrieval result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and medium. Background Art

[0002] In current information retrieval systems, information can usually be obtained through short query statements. However, these short query statements may not fully express the real needs of the subject. In this case, the results retrieved through the query statement are often not what the subject needs. The subject may need to constantly adjust the query statement and perform multiple searches to obtain the information the subject really wants. For example, in a news or breaking news scenario, the subject may enter a vague keyword (for example, "person A") as a query statement. The results retrieved through "person A" may be basic information about "person A", while the subject's real need may be to obtain the latest activities of person A, resulting in a low match between the retrieval results and the query statement, and a lack of timeliness. Summary of the Invention

[0003] The embodiments of the present application provide a data processing method, apparatus, device, and medium that can improve the matching degree between query information and predicted events, and improve the timeliness of retrieval results.

[0004] On the one hand, an embodiment of the present application provides a data processing method, including:

[0005] Obtaining first query information and historical search data of the first query information, and determining a first search change feature of the first query information based on the historical search data;

[0006] Performing document retrieval on the first query information to obtain a first document set corresponding to the first query information, and performing event retrieval on the first query information to obtain a first candidate event set corresponding to the first query information;

[0007] Performing event filtering on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set;

[0008] Obtain a retrieval hint text, parse the association relationship between the first query information, the first document set, and the second candidate event set based on the retrieval hint text and the first search change feature, and output a first predicted event and a first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate a retrieval result for the first query information.

[0009] In one aspect, an embodiment of the present application provides a data processing device, including:

[0010] a data acquisition module, configured to acquire first query information and historical search data of the first query information, and determine a first search change feature of the first query information based on the historical search data;

[0011] An event acquisition module is configured to perform document retrieval on the first query information to obtain a first document set corresponding to the first query information, and perform event retrieval on the first query information to obtain a first candidate event set corresponding to the first query information;

[0012] a first screening module, configured to perform event filtering processing on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set;

[0013] The second screening module is used to obtain the retrieval prompt text, parse the association relationship between the first query information, the first document set and the second candidate event set based on the retrieval prompt text and the first search change feature, and output the first predicted event and the first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate the retrieval result of the first query information.

[0014] When the data acquisition module acquires the first query information and the historical search data of the first query information, it is specifically configured to perform the following steps:

[0015] Acquire first query information, understand the content of the first query information, and obtain a query text corresponding to the first query information;

[0016] Determining a search time range for the first query information, and obtaining initial search data within the search time range from a log file of the information retrieval system;

[0017] Historical query information including the query text is obtained from the initial search data, and search record information of the historical query information in the initial search data is determined as historical search data of the first query information.

[0018] When the data acquisition module determines the first search change feature of the first query information based on the historical search data, it is specifically configured to perform the following steps:

[0019] Divide the search time range corresponding to the historical search data into N time intervals, and count the search frequency of the first query information in each time interval in the historical search data; N is a positive integer;

[0020] A first search change feature of the first query information is determined according to the search frequency in each time interval.

[0021] The first search change feature includes a frequency change degree feature and a search suddenness degree feature;

[0022] When the data acquisition module determines the first search change feature of the first query information according to the search frequency in each time interval, it is specifically configured to perform the following steps:

[0023] Determine the frequency mean of N time intervals based on the search frequency in each time interval, and determine the frequency standard deviation of N time intervals based on the frequency mean and the search frequency in each time interval;

[0024] Determining a frequency change characteristic of the first query information based on the frequency mean and the frequency standard deviation;

[0025] According to the search frequency in each time interval, the frequency change rate between two adjacent time intervals in N time intervals is counted, and the average value of the frequency change rate between two adjacent time intervals in N time intervals is determined as the search burstiness feature of the first query information.

[0026] The data acquisition module determines the frequency standard deviation of N time intervals based on the frequency mean and the search frequency in each time interval, and is specifically configured to perform the following steps:

[0027] The square of the difference between the search frequency and the frequency mean in the i-th time interval is determined as the square of the deviation corresponding to the i-th time interval; the i-th time interval belongs to N time intervals, and i is a positive integer less than or equal to N;

[0028] Obtaining the weight of the square of deviation corresponding to each time interval, and performing weighted summation on the square of deviation corresponding to each time interval according to the weight of the square of deviation corresponding to each time interval to obtain a weighted square cumulative value;

[0029] The weights of the squared deviations corresponding to each time interval are accumulated to obtain a weighted cumulative value, and the square root of the ratio between the weighted squared cumulative value and the weighted cumulative value is determined as the frequency standard deviation of the N time intervals.

[0030] The data acquisition module is specifically configured to perform the following steps when determining the frequency change degree characteristics of the first query information based on the frequency mean and the frequency standard deviation:

[0031] Obtaining a balance constant of the frequency mean, and determining the sum of the frequency mean and the balance constant as a candidate statistical value;

[0032] The ratio between the frequency standard deviation and the candidate statistical value is determined as the frequency change degree feature of the first query information.

[0033] The event acquisition module performs document retrieval on the first query information and obtains a first document set corresponding to the first query information, specifically for performing the following steps:

[0034] Obtaining historical prediction events of the first query information, and splicing the first query information and the first query information to obtain a first spliced text;

[0035] Divide the first concatenated text into W unit characters, obtain a word vector for each of the W unit characters, and determine a semantic vector for each unit character based on semantic information of each unit character in the first concatenated text; W is a positive integer;

[0036] Determine a position vector of each unit character according to position information of each unit character in the first concatenated text, and combine the word vector, the semantic vector, and the position vector to obtain a first embedding representation of the first concatenated text;

[0037] Encoding the first embedded representation to obtain a first query vector of the first concatenated text, and determining a first vector similarity between the first query vector and a document vector in a document retrieval library; the document retrieval library is used to store document vectors of each document in the information retrieval system, the document vectors being determined by the second concatenated text, the second concatenated text including a document title and a document summary of a document;

[0038] According to the first vector similarity, each document in the information retrieval system is sorted to obtain a candidate document list, and the first P documents in the candidate document list constitute a first document set corresponding to the first query information; P is a positive integer.

[0039] The event acquisition module performs event retrieval on the first query information and obtains a first candidate event set corresponding to the first query information, specifically for performing the following steps:

[0040] Converting the first query information into a second embedded representation, encoding the second embedded representation, and obtaining a second query vector for the first query information;

[0041] Determining a second vector similarity between the second query vector and an event vector in an event retrieval library; the event retrieval library is used to store event vectors of various events in the information retrieval system;

[0042] According to the second vector similarity, each event in the information retrieval system is sorted to obtain a candidate event list, and the first Q events in the candidate event list constitute a first candidate event set corresponding to the first query information; Q is a positive integer.

[0043] The first screening module performs event filtering on the first candidate event set according to the first query information and the first search change feature, and when obtaining the second candidate event set, is specifically configured to perform the following steps:

[0044] Converting the first query information into a query embedding representation, and converting each candidate event in the first candidate event set into an event embedding representation;

[0045] Obtaining semantic similarity between the query embedding representation and the event embedding representation of each candidate event, and constructing an event feature set for each candidate event based on the first search change feature, the semantic similarity, and the historical search frequency of the first query information;

[0046] Input the event feature set of each candidate event into the tree model, traverse multiple decision trees in the tree model, and determine the leaf nodes that the event feature set of each candidate event hits in the multiple decision trees;

[0047] Accumulate the weights of the hit leaf nodes in multiple decision trees to obtain the event prediction value of each candidate event;

[0048] According to the event prediction value of each candidate event, each candidate event in the first candidate event set is sorted to obtain an event sorting list, and the second candidate event set is determined in the event sorting list.

[0049] The second screening module parses the association relationship between the first query information, the first document set, and the second candidate event set based on the retrieval prompt text and the first search change feature, and outputs the first predicted event and the first association strength parameter between the first query information and the first predicted event, specifically for performing the following steps:

[0050] Constructing the retrieval prompt text, the first search change feature, the first query information, the first document set, and the second candidate event set as model input data of the language model, and converting the model input data into an input embedding feature sequence;

[0051] The input embedded feature sequence is decoded by a decoder in the language model to output a first predicted event in the second candidate event set and a first association strength parameter between the first query information and the first predicted event.

[0052] The data processing device further includes:

[0053] A storage module, configured to store the first query information, the first predicted event, and the first correlation strength parameter in a data storage system;

[0054] a request receiving module, configured to, upon receiving an information retrieval request, obtain second query information carried in the information retrieval request;

[0055] a storage data query module, configured to obtain, from the data storage system, a second predicted event of the second query information and a second correlation strength parameter between the second query information and the second predicted event, if the data storage system contains the second query information;

[0056] The result generation module is used to obtain a set of associated documents of the second predicted event, sort the associated documents in the associated document set according to the second association strength parameter to obtain a document sorting list, and generate a first retrieval result of the information retrieval request according to the document sorting list.

[0057] The data processing device further includes:

[0058] The data acquisition module is further configured to acquire a second search change feature of the second query information, and acquire a second document set and a third candidate event set of the second query information if the data storage system does not contain the second query information;

[0059] The first filtering module is further configured to perform event filtering on the third candidate event set based on the second query information and the second search change feature to obtain a fourth candidate event set; the fourth candidate event set includes at least one associated event and an event association parameter between the at least one associated event and the second query information;

[0060] The first screening module is further configured to determine the associated event corresponding to the largest event association parameter in the fourth candidate event set as the target associated event of the second query information;

[0061] The result generating module is further configured to generate a second search result of the information search request based on the target associated event and the event association parameter between the second query information and the target associated event;

[0062] a model calling module, configured to call the language model and output a second predicted event for the second query information and a second correlation strength parameter between the second query information and the second predicted event based on the retrieval prompt text, the second search change feature, the second query information, the second document set, and the fourth candidate event set;

[0063] The storage module is further configured to store the second query information, the second predicted event, and the second correlation strength parameter in a data storage system.

[0064] The data processing device further includes:

[0065] A duration statistics module, configured to count the storage duration of the first predicted event and the first correlation strength parameter in the data storage system;

[0066] A condition determination module is called to call the language model and update the first predicted event and the first association strength parameter of the first query information in the data storage system if the storage duration is greater than or equal to the duration threshold and the maximum event association parameter associated with the second candidate event set is greater than the parameter threshold.

[0067] The data processing device further includes:

[0068] A sample preprocessing module is used to obtain sample data, obtain sample query information contained in the sample data, and sample search data of the sample query information, and determine a sample search change feature of the sample query information based on the sample search data;

[0069] The sample preprocessing module is further configured to perform document retrieval on the sample query information to obtain a sample document set corresponding to the sample query information, and perform event retrieval on the sample query information to obtain a first sample event set of the sample query information;

[0070] A third screening module is configured to perform event filtering processing on the first sample event set based on the sample query information, the sample search change characteristics, and the sample document set to obtain a second sample event set;

[0071] A fourth screening module is used to construct sample input data for a pre-training model using the search prompt text, the sample search change feature, the sample query information, the sample document set, and the second sample event set;

[0072] The fourth screening module is further configured to parse, in the pre-trained model, the association relationship between the sample query information, the sample document set, and the second sample event set based on the model input data, and output a sample predicted event and a sample association strength parameter between the sample query information and the sample predicted event;

[0073] The parameter correction module is used to correct the network parameters of the pre-trained model according to the sample prediction event, the sample association strength parameter, and the label event and association strength label parameter contained in the sample data to obtain a language model.

[0074] When the sample preprocessing module obtains sample data, it is specifically used to perform the following steps:

[0075] Obtaining historical query information and a historical event set corresponding to the historical query information, wherein the historical event set includes at least one historical event and a historical correlation strength parameter between the historical query information and the at least one historical event;

[0076] Obtaining text semantic features of historical query information, decoding the text semantic features, and generating at least one associated query information;

[0077] Constructing the historical query information, at least one historical event, and a historical correlation strength parameter between the historical query information and each historical event into a first sample;

[0078] At least one associated query information, at least one historical event, and a historical association strength parameter between the historical query information and each historical event are constructed into a second sample, and sample data is determined in the first sample and the second sample.

[0079] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.

[0080] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor, so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.

[0081] According to one aspect of the present application, a computer program product is provided, which may include a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in the above aspect.

[0082] In an embodiment of the present application, the first query information and the historical search data of the first query information can be obtained, and the first search change feature of the first query information can be determined based on the historical search data. The first search change feature can reflect the change in the search frequency of the first query information, and the needs of the first query information can be more accurately understood. The first document set and the first candidate event set of the first query information can be recalled, and the first candidate event set can be preliminarily screened based on the first query information and the first search change feature to obtain the second candidate event set. Based on the retrieval prompt text and the first search change feature, the association relationship between the first query information, the first document set and the second candidate event set is deeply analyzed, and the first predicted event and the first association strength parameter between the first query information and the first predicted event are output. By introducing the retrieval prompt text and the first document set, the matching degree between the first query information and the first predicted event can be improved. The first predicted event is the optimal event of the first query information in the second candidate event set, and the retrieval result of the first query information is generated based on the first predicted event and the first association strength parameter, which can improve the timeliness of the retrieval result. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0084] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0085] Figure 2 This is a schematic diagram of an information retrieval scenario provided by an embodiment of the present application;

[0086] Figure 3 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 1 ;

[0087] Figure 4 is a schematic diagram of recalling a first document set based on first query information provided by an embodiment of the present application;

[0088] Figure 5 This is a schematic diagram of the network structure of a language model provided in an embodiment of the present application;

[0089] Figure 6 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 2 ;

[0090] Figure 7 This is a schematic diagram of a query information processing flow provided by an embodiment of the present application;

[0091] Figure 8 This is a schematic diagram of an information retrieval process based on a language model provided in an embodiment of the present application;

[0092] Figure 9 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 3 ;

[0093] Figure 10 is a structural diagram of a data processing device provided in an embodiment of the present application;

[0094] Figure 11 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0096] See Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application; the network architecture may include a server 10d and a terminal cluster, the terminal cluster may include one or more terminal devices, and the number of terminal devices included in the terminal cluster is not limited here. Figure 1 As shown, the terminal cluster may specifically include terminal device 10a, terminal device 10b, and terminal device 10c, etc.; all terminal devices in the terminal cluster (for example, terminal device 10a, terminal device 10b, and terminal device 10c, etc.) may be connected to the server 10d through a network connection, so that each terminal device may exchange data with the server 10d through the network connection.

[0097] in, Figure 1 The terminal devices in the terminal cluster shown may include but are not limited to: smart phones, tablets, laptops, PDAs, desktop computers, wearable devices (such as smart watches, smart bracelets, etc.), smart voice interaction devices, smart home appliances (such as smart TVs, etc.), vehicle-mounted devices, aircraft and other electronic devices. This application does not limit the type of terminal devices.

[0098] Figure 1 The server 10d shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. This application does not limit the type of server.

[0099] In the embodiment of this application, Figure 1Each terminal device in the terminal cluster shown can run a browser or client. The browser or client can serve as an interface for the object to interact with the information retrieval system, providing a convenient search interface for the object, so that the object can enter query keywords or sentences and display the search results returned by the information retrieval system. The object involved in this application can refer to a user who uses a client or browser. The client can be any client with a search function (for example, providing a search interface). This application does not limit the type of client. When the client runs in each terminal device, it can communicate with Figure 1 The server 10d shown in FIG. 10a is used for data exchange, and the server 10d can be a backend server corresponding to the client. The client running in each terminal device can be an independent client or an embedded sub-client integrated in an independent client, which is not limited in this application.

[0100] Among them, an information retrieval system (e.g., a search engine) can be used to collect, organize, index, and store a large amount of information resources, and use algorithms and models to obtain retrieval results associated with the query keywords or statements entered by the subject from the large amount of information resources, and sort the retrieval results according to relevance. The retrieval result can refer to the information content related to the query keywords or statements found by the information retrieval system through analysis and matching based on the query keywords or statements entered by the subject. For example, after the subject enters the query keywords or statements in a client or browser, the client can package the query keywords or statements into a request in a specific format (which can be a request format pre-set by the information retrieval system, and this application does not limit this) and send it to the information retrieval system via the network. After receiving the request, the information retrieval system can perform information retrieval based on the query keywords or statements to obtain retrieval results, and return the retrieval results to the client or browser in a format such as JSON (JavaScript Object Notation, JavaScript is a scripting language) or XML (eXtensible Markup Language). After receiving the retrieval results, the client or browser presents the retrieval results to the subject.

[0101] See Figure 2 , Figure 2 This is a schematic diagram of an information retrieval scenario provided by an embodiment of the present application. Figure 2 As shown, Figure 2The terminal device 20a shown can be the terminal device used by object u1. The terminal device 20a can run a client or browser with a search function (for ease of understanding, the browser is used as an example below). When object u1 launches the browser in the terminal device 20a, the browser's search page 20b can be displayed in the terminal device 20a. The search page 20b can include a search area 20c, and the search area 20c can include an audio entry 20d, an image entry 20f, and a search control 20e. The audio entry 20d can be used to input the audio to be queried. If object u1 inputs the audio to be queried through the audio entry 20d, then information retrieval can be performed in the information retrieval system based on the audio input by object u1. The image entry 20f can be used to input the image to be queried. If object u1 inputs the image to be queried through the image entry 20f, then information search can be performed in the information retrieval system based on the image input by object u1.

[0102] like Figure 2 As shown, assuming that object u1 enters the text "Xiao A, please have dinner" in search area 20c, the text displayed in search area 20c can serve as query information 20g. When object u1 triggers a search control 20e in search area 20c, terminal device 20a can respond to the triggering operation on search control 20e and display a results page 20h for query information 20g. The results page 20h can still display search area 20c, and the search area 20c can display the current query information 20g (e.g., "Xiao A, please have dinner").

[0103] The result page 20h may also display a tab bar 20i, which may include multiple different tabs. Different tabs may correspond to different channel pages. For example, the tab bar 20i may include, but is not limited to, tabs such as "All," "Video," "Information," "Encyclopedia," and "Mini Program." When the result page 20h is displayed in the browser of the terminal device 20a, the result page 20h displayed by default is the channel page corresponding to the "All" tab. At this time, the "All" tab in the tab bar 20i may be marked, such as by underlining the "All" tab or making the font of the "All" tab bold, etc. This application does not limit this.

[0104] It is understandable that when the object u1 triggers the search control 20e in the search area 20c, the terminal device 20a can send an information retrieval request to the information retrieval system, and the information retrieval request can request the information retrieval system to retrieve the retrieval results of the query information 20g. After receiving the information retrieval request sent by the terminal device 20a, the information retrieval system can use the algorithms and models in the information retrieval system to obtain the information resources associated with the query information 20g; the information resources at this time can be returned to the terminal device 20a as the retrieval results of the query information 20g, and the retrieval results of the query information 20g can be displayed on the result page 20h of the terminal device 20a. Figure 2 As shown, the search result may include document 20j and document 20k associated with query information 20g.

[0105] It is understood that when the search results for query information 20g include multiple documents, the multiple documents included in the search results can be presented on result page 20h in descending order of relevance. In other words, document 20j can be the document with the highest relevance to query information 20g, and document 20k can be the document with the second highest relevance after document 20j. For the multiple documents included in query information 20g, the higher the relevance, the higher the presentation position on result page 20h. The process of obtaining search results by performing information retrieval on query information 20g in the information retrieval system will be described in detail later.

[0106] See Figure 3 , Figure 3 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 1 It can be understood that the data processing method can be executed by a computer device, which can be a terminal device, such as Figure 1 Any terminal device in the terminal cluster shown, or it can be a server, such as Figure 1 The server 10d shown in the figure is not limited in this application. Figure 3 As shown, the data processing method may include the following steps S101 to S104:

[0107] Step S101: Acquire first query information and historical search data of the first query information, and determine a first search change feature of the first query information based on the historical search data.

[0108] The query information may refer to a search request expression input by an object in an information retrieval system, and the query information may be recorded as query. The query information may be text (words, phrases, sentences, etc.), or may be an image, or may be audio. This application does not limit the data type of the query information. The first query information may refer to a query that is being processed or is about to be processed in the information retrieval system.

[0109] Historical search data may refer to a set of records of interactive information related to the first query information within a period of time (for example, within a week, within three days, within a day, etc., which is not limited in this application); the historical search data may include historical search records of the first query information within a period of time. For example, the historical search data may include the first query information, search time, search frequency, object identification, retrieval results and other information. This application does not limit the information content in the historical search data. Search time may refer to the time when the object enters the first query information to perform the query operation; search frequency may refer to the number of times the first query information is searched by the same object or different objects; object identification may refer to identification information used to represent the identity of the object, such as the account number, nickname, number and other information of the object in the client or browser.

[0110] The first search change feature may refer to a numerical feature related to changes in search popularity for the first query information. The first search change feature may be considered a dynamic feature of the first query information. The first search change feature may include at least one of a frequency change feature and a search burst feature. The frequency change feature may be referred to as a query burst coefficient, and the search burst feature may be referred to as a burst feature. The frequency change feature may refer to the degree of change in the search frequency of a query information (query information), and is used to indicate fluctuations in the query search frequency over a period of time. The frequency change feature may be an arbitrary value greater than or equal to 0. A larger value of the frequency change feature indicates greater fluctuations in the query search volume, while a smaller value indicates a more stable query search volume. The search burst feature may refer to the degree of burstiness of a query information (query information). The value range of the search burst feature may be [0, 1). For example, the search burst feature may be used to indicate the tendency of demand for breaking news in a query; a larger value of the search burst feature indicates a higher demand for breaking news in the query.

[0111] Specifically, when a client or browser with a search function is integrated into a computer device, it represents that the object can interact with the information retrieval system through the client or browser, search for content related to the query information input by the object in the information retrieval system, and present the found information content to the object in a certain order and format (which can be pre-set during the development of the result page).

[0112] When a user enters a first query into a browser or client, the computer device can retrieve the first query, perform content understanding on the first query, and obtain the query text corresponding to the first query. Content understanding can refer to accurately interpreting and analyzing the first query using technologies such as computer vision, speech processing, and natural language processing. The implementation method for content understanding can vary depending on the data type of the first query.

[0113] For example, when the first query information is a picture, content understanding may refer to the process of translating the picture content into a query text described in natural language. The picture at this time may be a photo taken in real time by a computer device, or may be a picture selected from a local gallery of the computer device, or may be a picture downloaded from the Internet, etc. This application does not limit the source of the picture; Figure 2 As shown, the picture to be searched can be input through the picture entry 20f in the search area 20c.

[0114] When the first query information is audio data, content understanding may refer to the process of extracting audio features from the audio data and converting the audio features into query text. The audio data at this time may be real-time collected speech, or may be a recording selected from a local database, etc. This application does not limit the source of the audio; Figure 2 As shown, audio to be searched can be input through the audio entry 20d in the search area 20c. When the first query information is text data, content understanding can refer to the process of extracting key text from the first query information and using the key text as the query text; the key text can refer to the text of the first query information after operations such as correcting typos, removing redundant characters, and removing meaningless characters have been performed.

[0115] After obtaining the query text corresponding to the first query information, the historical search data of the first query information can be obtained according to the query text. Among them. The method of obtaining the historical search data may include but is not limited to: ① Using database records to obtain the historical search data of the first query information. For example, a specific table can be created in the database to store the search records in the information retrieval system. The table structure may include fields such as object identifier, query information (query), search time, search frequency, and retrieval results. For each search of the same object or different objects, the relevant information indicated by the above fields can be inserted into the table. The database query statement can be written according to conditions such as query text and search time range to query the historical search data of the first query information in the table. Among them, the search time range can be used to limit the acquisition scope of the historical search data. The search time range can be set to one week, three days, one day, etc., and this application does not limit this. If the search time range is three days, then the search records whose search time falls within the search time range and whose query information contains the above query text can be filtered out from the table.

[0116] ② Use the log file of the information retrieval system to obtain the historical search data of the first query information. For example, the search time range of the first query information can be determined, and the initial search data within the search time range can be obtained from the log file of the information retrieval system. The historical query information containing the above-mentioned query text can be obtained from the initial search data, and the search record information of the historical query information in the initial search data can be determined as the historical search data of the first query information. It is understandable that the information retrieval system can be configured with a log recording function to record each search operation of the object in a log file. The log content recorded in the log file may include but is not limited to information such as object identification, query information (query), search time, search frequency, and retrieval results. The log file can be a text file or a log database, and this application does not limit this. When obtaining the historical search data of the first query information in the log file, two filtering conditions, namely the search time range and the query text, can be set. The two filtering conditions can be entered simultaneously in the log file to obtain the historical search data; or the two filtering conditions can be entered in sequence to obtain the historical search data. This application does not limit the order in which the two filtering conditions are entered.

[0117] ③ The historical search data of the first query information can be obtained by using a cache mechanism. In an information retrieval system, a cache can be used to store recent search records (for example, one week, 10 days, etc.). For example, a memory cache database such as Redis can be used to cache object identifiers, query information (query), search time, search frequency, and retrieval results into a memory cache database, and the historical search data of the first query information can be obtained from the memory cache database. Redis is an open source, memory-based data structure storage system that can be used as a database, cache, or message middleware.

[0118] In one or more embodiments, after obtaining historical search data for the first query information, the search time range corresponding to the historical search data can be divided into N time intervals. Within the historical search data, the search frequency of the first query information within each time interval is counted, where N is a positive integer, such as 1, 2, ..., and this application does not limit the value of N. A first search change feature of the first query information can be calculated based on the search frequency within each time interval; the calculation method for the first search change feature can be pre-set, and this application does not limit the calculation method for the first search change feature.

[0119] The search frequency, also known as the query volume (QV), represents the number of searches for the first query information within a period of time (e.g., a time interval). This frequency can be used as an important indicator to measure the level of attention paid to the first query information in the information retrieval system. For example, the search time range can be set to three days, and the time interval can be set to 12 hours. In this case, the search time range can be divided into six time intervals, with N being 6. The search frequency of the first query information within each time interval (e.g., 12 hours) can be obtained from the historical search data.

[0120] Step S102: perform document retrieval on the first query information to obtain a first document set corresponding to the first query information, and perform event retrieval on the first query information to obtain a first candidate event set corresponding to the first query information.

[0121] Among them, the first document (doc) set may refer to a set of documents associated with the first query information, and a document may refer to a single document entity in the information retrieval system. For example, a news report or an article may be referred to as a document entity in the information retrieval system. Document retrieval may refer to the process of retrieving document-type data in an information retrieval system; document-type data may include but is not limited to text files, PDF (a text format) files, Word (a text format) files and other data. The first candidate event set may refer to a set of events associated with the first query information, and an event may refer to a short expression extracted from a document containing a subject, an object, and a trigger word. Event retrieval may refer to the process of retrieving event-related information in an information retrieval system; events here may be various types of events, such as news events, sports events, conference activities, dynamics in social networks, etc.

[0122] In one or more embodiments, document retrieval can be performed using a vector retrieval method. When performing document retrieval on the first query information, it can be queried whether the data storage system stores the optimal event generated by the language model when the first query information was last retrieved. If the optimal event of the first query information is read in the data storage system, the read optimal event can be called a historical prediction event, and the first query information and the historical prediction event are text-spliced to obtain a first spliced text. If the optimal event of the first query information is not read in the data storage system, such as the returned optimal event is empty, the first query information at this time may be the first retrieval, and the first query information can be used as the content to fill in the historical prediction event, and the first query information and the first query information are spliced to obtain a first spliced text.

[0123] Among them, the data storage system can be used to store the calculation results of the language model for each query information in the information retrieval system. The calculation results may include the optimal events generated for the query information, such as the events most relevant to the current query information; the specific form of the language model calculation results and its implementation process will be described in detail in the subsequent content. The language model can be a model obtained after fine-tuning (training) a large-scale parameter generation model based on transformer. The fine-tuning (training) process will be described in the subsequent content. The language model can also be called a large language model (Large Language Model, LLM). The data storage system can be redis, or Caffeine (a high-performance cache library), or it can be Memcached (a distributed memory object cache system), etc., and this application does not limit this.

[0124] A pre-trained language model can be used to extract features from the first concatenated text to obtain a first query vector for the first concatenated text. The pre-trained language model may refer to a model that performs unsupervised or self-supervised learning on large-scale text data to learn the general patterns, semantics, and syntactic knowledge of the language, thereby being able to understand and generate natural language text. The pre-trained language model may include but is not limited to: BERT (Bidirectional Encoder Representations from Transformers, a bidirectional encoder representation model based on self-transformers), ELMo (Embeddings from Language Models, a deep contextualization model), XLNet (eXtreme Language Modeling, an autoregressive language model based on self-transformers), RoBERTa (Robustly Optimized BERTPretraining Approach, a robustly optimized BERT pretraining method), etc.

[0125] For ease of understanding, the embodiment of the present application takes the BERT model as an example of a pre-trained language model to describe the vectorized representation of the first concatenated text conversion. The first concatenated text can be used as the input data of the BERT model. In the embedding layer of the BERT model, the first concatenated text can be divided into W unit characters, and the word vectors (Token Embeddings) corresponding to the W unit characters are obtained; W is a positive integer, such as W can take the value of 1, 2, .... According to the semantic information of the W unit characters in the first concatenated text, the semantic vectors (SegmentEmbeddings) corresponding to the W unit characters can be determined. According to the position information of the W unit characters in the first concatenated text, the position vectors (Position Embeddings) corresponding to the W unit characters can be determined. The word vector, the semantic vector and the position vector are combined (for example, added) to obtain the first embedding representation of the first concatenated text. That is, the output result of the embedding layer of the BERT model is the sum of three embedding representations, which are word vectors, semantic vectors and position vectors. The first embedding representation is input into the encoder of the BERT model, which may be an encoder of Transformers (a deep learning model based on an attention mechanism). The first embedding representation is bidirectionally encoded by the encoder to obtain a first query vector of the first concatenated text.

[0126] Among them, the computer device can convert each unit character in the first spliced text into a word vector by querying the word vector table, wherein the word vector table can contain vector representations corresponding to all commonly used characters, and the word vector table can be understood as a "dictionary" containing vector representations of all commonly used characters. The unit character can refer to a token in the first spliced text, which can be a single word, phrase, character, etc., and this application does not limit this. The semantic vector can be used to characterize the global semantic information of the first spliced text. Since the semantic information carried by the unit characters appearing at different positions in the first spliced text is different (for example, the semantic information carried by "I wait for you" and "You wait for me" is different), a different position vector can be attached to each unit character in the first spliced text to make a distinction. The word vector, semantic vector and position vector can then be added together as the first embedding representation of the first spliced text.

[0127] The encoder of the BERT model may include one or more chain-connected encoding block structures, such as 12 encoding block structures. The output data of the previous encoding block structure can be used as the input data of the next encoding block structure, and the input data of the first encoding block structure can be the first embedding representation. Each encoding block structure can include a self-attention mechanism, a normalization layer, a multi-layer perceptron (or a feedforward network), and other structures. The process of converting the first embedding representation into the first query vector using the encoder of the BERT model can refer to the calculation process of each encoding block structure in the BERT model, and will not be described one by one here.

[0128] After calculating the first query vector using the BERT model, the first vector similarity between the first query vector and each document vector in the document retrieval library can be calculated. All documents in the information retrieval system are sorted in descending order of first vector similarity to obtain a candidate document list. The first P documents in the candidate document list constitute the first document set corresponding to the first query information; P can be a positive integer, such as 10, 5, or any other arbitrary value, which is not limited in this application.

[0129] The document retrieval library may include document identifiers and corresponding document vectors for all documents in the information retrieval system. The document identifier may refer to an ID (identity document) used to uniquely represent a document. Each document vector in the document retrieval library may be calculated using the BERT model. Methods for calculating the first vector similarity may include, but are not limited to, Euclidean distance, Manhattan distance, Minkowski distance, cosine similarity, and the like.

[0130] See Figure 4 , Figure 4 This is a schematic diagram of a method for recalling a first document set based on first query information provided by an embodiment of the present application. Figure 4 As shown, the document retrieval library can be used to store the document vectors corresponding to all documents in the information retrieval system; for example, the document identifier of each document and its corresponding document vector can be stored in a key-value pair data structure, such as using the document identifier as the key and the document vector as the value. When the information retrieval library includes document 1, document 2, document 3, and document 4, the document identifier 1 and document vector 1 of document 1 can be stored in the form of a key-value pair, the document identifier 2 and document vector 2 of document 2 can be stored in the form of a key-value pair, the document identifier 3 and document vector 3 of document 3 can be stored in the form of a key-value pair, and the document identifier 4 and document vector 4 of document 4 can be stored in the form of a key-value pair, etc. Optionally, the document identifier and document vector of each document can also be stored in other data structures, such as in the form of a table, etc. This application does not limit the storage method of the document vectors in the document retrieval library.

[0131] The calculation process for each document vector in the document retrieval library is similar. For ease of understanding, the calculation process of any document vector is described below as an example. For any document in the information retrieval system, the document title and document summary of the document can be obtained, and the document title and document summary of the same document can be spliced to obtain a second spliced text. The second spliced text can be calculated using a pre-trained language model (for example, a BERT model) to obtain the document vector of the current document; the document identifier of the current document is obtained, and the document identifier and the document vector calculated by the BERT model are stored in the document retrieval library as a key-value pair data structure.

[0132] Among them, the document title can be directly obtained from the document content. When the document content contains a document summary, the document summary can be directly obtained from the document content. When the document content does not contain a document summary, the document content can be abstracted to obtain the document summary of the document; for example, any generative language model can be used to generate the document summary of each document; or the frequency of occurrence of words can be used to determine the importance of each word in the document, and then important words in the document can be selected, and the document summary of the document can be generated from these important words; this application does not limit the method of obtaining the summary text.

[0133] When the computer device obtains the first query information, it can obtain the historical prediction events of the first query information. The historical prediction events here can be the optimal event of the first query information stored in the data storage system (the case where the data storage system returns the optimal event of the first query information), or can be the first query information itself (the case where the optimal event returned by the data storage system is empty). After the first query information and the historical prediction events are spliced into a first spliced text, a pre-trained language model (for example, a BERT model) can be used to calculate the first query vector of the first spliced text. The first vector similarity between the first query vector and each document vector in the document retrieval library is calculated, and then the documents indicated by each document identifier in the document retrieval library can be sorted in descending order according to the first vector similarity to obtain a candidate document list. The first P documents in the candidate document list constitute the first document set corresponding to the first query information.

[0134] The present embodiment uses a pre-trained language model (e.g., a BERT model) to calculate the document vector corresponding to each document in the information retrieval system and stores it in a document retrieval library. In an information retrieval scenario, after using the BERT model to calculate the first query vector for the first query information, the first document set can be quickly recalled by calculating vector similarity, thereby improving document retrieval efficiency.

[0135] In one or more embodiments, event retrieval can be performed using a vector retrieval method. When performing event retrieval on the first query information, the same pre-trained language model as the above-mentioned document retrieval (for example, a BERT model) can be used to convert the first query information into a second query vector. For example, the second query information can be converted into a second embedding representation based on the embedding layer of the pre-trained language model; the second embedding representation is bidirectionally encoded using the encoder in the pre-trained language model to obtain the second query vector of the first query information. The second vector similarity between the second query vector and the event vector in the event retrieval library can be calculated, and all events in the information retrieval system can be sorted according to the second vector similarity to obtain a list of candidate events. The first Q events in the candidate event list can constitute the first candidate event set corresponding to the first query information; Q can be a positive integer, such as Q can be set to 60, or can be set to 50, or can be set to any other numerical value, and this application does not limit this.

[0136] Among them, the event retrieval library may include the event identifiers and corresponding event vectors of all events in the information retrieval system. The event identifier may refer to an ID used to uniquely represent an event. Each event vector in the event retrieval library may be calculated using a pre-trained language model (such as a BERT model). When calculating the event vector of an event, the event can be used as input data for the BERT model. At this time, the output data of the BERT model is the event vector; optionally, the input data may also include features such as event time and event heat, which are not limited in this application. When calculating the second query vector of the first query information, the first query information can be used as input data for the BERT model. At this time, the output data of the BERT model is the second query vector.

[0137] Among them, the calculation method of the second vector similarity is the same as the calculation method of the first vector similarity, or it can be different, and this application does not limit this; the calculation process of the first query information and event in the BERT model can refer to the calculation process of the first spliced text in the BERT model, which will not be repeated here.

[0138] The present embodiment uses a pre-trained language model (e.g., BERT model) to calculate the event vector corresponding to each event in the information retrieval system and store it in the event retrieval library. In the information retrieval scenario, after using the BERT model to calculate the second query vector of the first query information, the first candidate event set can be quickly recalled by calculating vector similarity, which can improve event retrieval efficiency.

[0139] Optionally, in one or more embodiments, the computer device may extract at least one query keyword from the first query information, and obtain an inverted list corresponding to the at least one query keyword; in the inverted list, obtain an initial event set containing the at least one query keyword, and obtain the positional relationship of the at least one query keyword in each initial event of the initial event set; if the positional relationship of the at least one query keyword in the first query information is the same as the positional relationship of the at least one query keyword in the initial event a, the initial event a is added to the first candidate event set; the initial event a may be any initial event in the initial event set, all events in the initial event set may be called initial events, and all events in the first candidate event set may be called candidate events.

[0140] Among them, the inverted list (Inverted List), which can also be called the inverted index (Inverted Index), is a data structure in the information retrieval system. In the inverted list, with the word (or term, keyword, phrase, etc.) as the center, the event identifier (for example, event number) containing the word and the position information of the word in the event are stored. After the computer device performs word segmentation processing on the first query information, a plurality of unit characters can be obtained; then, the unit characters without substantial semantics in the plurality of unit characters can be filtered out to obtain at least one query keyword. The number of query keywords is less than or equal to the number of unit characters. The query keyword can be a unit character, or a word or phrase composed of two or more unit characters, etc. This application does not limit this.

[0141] The inverted list corresponding to each query keyword in at least one query keyword can be obtained. For example, if at least one query keyword in the first query information includes keyword c1 and keyword c2, then the inverted list b1 corresponding to keyword c1 and the inverted list b2 corresponding to keyword c2 can be obtained. The event list L1 of keyword c1 is obtained in the inverted list b1, and the event list L2 of keyword c2 is obtained in the inverted list b2. The union between the event list L1 and the event list L2 is determined as the initial event set containing at least one query keyword. For example, if both the event list L1 and the event list L2 contain event e1 and event e2, then event e1 and event e2 can be combined into an initial event set, and at this time, event e1 and event e2 can be called initial events. If the positional relationship (such as adjacent relationship) between keyword c1 and keyword c2 in the first query information is the same as the positional relationship between keyword c1 and keyword c2 in event e1, then event e1 can be added to the first candidate event set of the first query information, and at this time, event e1 can be the above-mentioned initial event a. If the position relationship (such as adjacent relationship) between keywords c1 and c2 in the first query information is different from the position relationship between keywords c1 and c2 in event e2, then event e2 can be filtered out without being added to the first candidate event set.

[0142] Optionally, in one or more embodiments, the first candidate event set of the first query information can be obtained based on the knowledge graph. For example, the entity in the first query information can be linked to the corresponding node in the knowledge graph, and then the connection relationship between the nodes in the knowledge graph can be used to obtain event information associated with the entity in the first query information, and then these event information can be added to the first candidate event set. It is understandable that when obtaining the first candidate event set, a time range (such as the above-mentioned search event range) can be set as an event filtering condition, and events related to the entity in the first query information within the search time range are obtained and added to the first candidate event set. Among them, in the knowledge graph, an entity can refer to a thing or concept that is distinguishable and exists independently, and an entity can represent a node in the knowledge graph.

[0143] It can be understood that the methods of obtaining the first candidate event set through vector retrieval, inverted list, knowledge graph, etc. described in the embodiments of the present application are merely examples of the embodiments of the present application, and the present application does not limit the method of obtaining the first candidate event set.

[0144] It should be noted that in an information retrieval system, document retrieval and event retrieval can be processed serially. For example, after obtaining the first query information, event retrieval is prioritized to retrieve the first set of candidate events, and then document retrieval can be performed to retrieve the first set of documents. When calculating the first query vector in the document retrieval process, if the optimal event returned by the data storage system is empty, the event with the greatest similarity to the second vector in the first set of candidate events can be used as the historical predicted event, which can improve the accuracy of event retrieval during the initial retrieval of the query information. Optionally, document retrieval and event retrieval can be processed in parallel, which can reduce the time consumed by event retrieval and document retrieval in the information retrieval system.

[0145] Step S103: performing event filtering processing on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set.

[0146] Specifically, the computer device may use a lightweight model and, in combination with the first query information and the first search change feature, select D candidate events that are most relevant to the first query information from the first candidate event set, and form the D candidate events into a second candidate event set corresponding to the first query information, where D is a positive integer less than or equal to Q. In other words, the candidate events in the second candidate event set are initially screened from the first candidate event set; alternatively, the second candidate event set can be considered the result of filtering out a portion of candidate events that are not very relevant to the first query information from the first candidate event set.

[0147] For example, a lightweight model can be used to calculate the event association parameters between each candidate event in the first candidate event set and the first query information, and the event association parameters can be sorted in descending order, and the first D candidate events after sorting can be formed into a second candidate event set. Among them, the event association parameter can be used to represent the correlation between the first query information and a candidate event in the first candidate event set. The larger the event association parameter, the higher the correlation between the first query information and the candidate event, and the more the candidate event meets the requirements of the first query information. The lightweight model can be a tree model such as xgboost (eXtreme Gradient Boosting, gradient boosting tree model), random forest, LightGBM (a fast and efficient gradient boosting framework), and this application does not limit the type of lightweight model.

[0148] In one or more embodiments, XGBoost is used as an example for ease of understanding. XGBoost is a decision tree ensemble model that iterates a series of weak decision trees and combines them into a strong prediction model. In each iteration, a new decision tree is trained to fit the residuals of the previous model, thereby gradually reducing the prediction error.

[0149] In one or more embodiments, the first query information can be converted into a query embedding representation, and each candidate event in the first candidate event set can be converted into an event embedding representation; the semantic similarity between the query embedding representation and the event embedding representation of each candidate event is obtained. Based on the first search change feature, the semantic similarity, and the historical search frequency of the first query information, an event feature set for each candidate event is constructed, the event feature set for each candidate event is input into a tree model, multiple decision trees in the tree model are traversed, and the event feature set of each candidate event in the multiple decision trees is determined to hit the leaf node; the weights of the hit leaf nodes in the multiple decision trees are accumulated to obtain the event prediction value of each candidate event; each candidate event in the first candidate event set is sorted according to the event prediction value of each candidate event to obtain an event sorting list, and the second candidate event set is determined in the event sorting list.

[0150] Among them, the historical search frequency may refer to the total number of searches for the first query information within the search time range. The query embedding representation may refer to the data representation of the first query information converted into a certain vector space. The query embedding representation may be the same as the aforementioned second embedding representation, or it may be different (for example, a vector representation obtained in a different manner), which is not limited in this application. The event embedding representation may refer to the data representation of each candidate event in the first candidate event set converted into a certain vector space.

[0151] The event feature set for each candidate event can be input into each decision tree in the tree model. Each decision tree in the tree model processes the input event feature set and outputs a prediction result, which can be expressed as a predicted probability. The prediction results of all decision trees in the tree model can be combined, such as by adding the prediction results of all decision trees or performing a weighted sum, to obtain the event prediction value for each candidate event.

[0152] For the candidate event e3 in the first candidate event set, the event feature set of the candidate event e3 can be input into each decision tree of the tree model. When each decision tree in the tree model processes the event feature set of the candidate event e3, the hit leaf node of the event feature set of the candidate event e3 in each decision tree can be determined. For example, the hit leaf node of the event feature set of the candidate event e3 in the decision tree s1 is the leaf node n1, then the weight of the leaf node n1 can be used as the prediction result output by the decision tree s1 for the event feature set of the candidate event e3. Among them, the decision tree s1 can be any decision tree in the tree model. Based on the same processing method, the prediction result output by each decision tree in the tree model for the event feature set of the candidate event e3 can be obtained. By accumulating the prediction results of each decision tree in the tree model, the event prediction value of the candidate event e3 can be obtained. The event prediction value here can be used as an event association parameter between the first query information and the candidate event e3, used to indicate the correlation between the first query information and the candidate event e3; the larger the event association parameter (event prediction value), the higher the correlation between the first query information and the candidate event e3, and the more the candidate event e3 meets the requirements of the first query information.

[0153] After obtaining the event prediction value of each candidate event in the first candidate event set, all candidate events in the first candidate event set can be sorted in descending order of the event prediction value to obtain an event sorting list. The first D candidate events in the event sorting list can be combined into a second candidate event set, and the event prediction value is used as the event association parameter between the first query information output by the tree model and the candidate events in the second candidate event set.

[0154] Step S104, obtain the search prompt text, parse the association relationship between the first query information, the first document set and the second candidate event set based on the search prompt text and the first search change feature, and output the first predicted event and the first association strength parameter between the first query information and the first predicted event.

[0155] Among them, the retrieval prompt text can be a prompt (Prompt) designed in advance for the language model, and the retrieval prompt text can be used as the input of the language model to improve the text generation ability of the language model. The first predicted event can refer to the optimal event selected by the language model from the second candidate event set, and the first association strength parameter can be used to represent the correlation between the first query information and the candidate events in the second candidate event set. The first association strength parameter has the same physical meaning as the aforementioned event association parameter. The difference between the first association strength parameter and the event association parameter is that the first association strength parameter is output by the language model, and the event association parameter is output by the tree model.

[0156] The language model can employ Retrieval-Augmented Generation (RAG) to output, based on the retrieval prompt text, the first document set, the first query information, and the first search variation feature, the event that best satisfies the first query information from the second candidate event set, i.e., the first predicted event, and provide a first correlation strength parameter between the first query information and the first predicted event. RAG is a technique that combines information retrieval with text generation. It can leverage external knowledge sources (e.g., the first document set) to improve the accuracy and quality of text generated by a generative model (e.g., a language model).

[0157] For example, the form of the retrieval prompt text can be expressed as follows: "As an information retrieval system, a query information, as well as the frequency change degree characteristics and search suddenness degree characteristics of the query information are input. The frequency change degree characteristics represent the fluctuation of the frequency of searching the query information in a short period of time, and the search suddenness degree characteristics represent the tendency of the query information to have demand for breaking news. The larger the value, the higher the demand for breaking news. The maximum value is 0.999. The query information recalls the relevant document titles in the information retrieval system, as well as a candidate event set containing up to 10 events and the importance of the events, 1 is important and 0 is unimportant. Please first determine whether these document titles are Point to a certain news event. If it points to the same specific news event and meets the main needs of the query information, then the document title will be used as the reference answer to the query information, and the event that best meets the query information needs will be selected from the candidate event set. In combination with the needs of the query information, the satisfaction level of this event will be given. The higher the sudden tendency, the higher the gear. Gear description: 3 means that the query information is a major need for breaking news and the event is fully satisfied, 2 means that the query has a secondary need for news and the event is partially satisfied, 1 means that the news is weakly needed and the event is only marginally satisfied, and 0 means that the query has no news needs and the event is completely unsatisfied". The above retrieval prompt text is only an example in the embodiment of the present application, and the present application does not limit the form of the retrieval prompt text.

[0158] Specifically, the retrieval prompt text, the first search change feature, the first query information, the first document set and the second candidate event set can be constructed as the model input data of the language model; the model input data is converted into an input embedded feature sequence, and the input embedded feature sequence is decoded by the decoder in the language model to output the first predicted event in the second candidate event set and the first association strength parameter between the first query information and the first predicted event.

[0159] The first predicted event and first association strength parameter output by the language model can be associated with the first query information and stored in the data storage system. The data storage system can cache the output results of the language model, such as the predicted events and association strength parameters (e.g., the first predicted event and the first association strength parameter) for each query information. These output results can be directly retrieved for subsequent searches, thereby improving information retrieval efficiency.

[0160] See Figure 5 , Figure 5 This is a schematic diagram of the network structure of a language model provided in an embodiment of the present application. Figure 5 As shown, the language model may include an embedding layer (Embeddings) and a decoder. The decoder may include M chain-connected decoding blocks (Block), a normalization layer 3, a linear layer (Linear) and an output layer; M is a positive integer. Each decoding block may include but is not limited to a normalization layer 1, a self-attention mechanism, a normalization layer 2, a feedforward network (Feed Forward), etc. Among them, the decoder in the language model can be a decoder structure in a transformer model, and the normalization layer 1, the normalization layer 2 and the normalization layer 3 can be RMS Norm (Root Mean Square Normalization, root mean square normalization), or can be other normalization technologies, which are not limited in this application. The output layer can be a softmax layer, which can convert the output result of the previous network layer into a probability distribution, so that the sum of all output values is 1, and each output value represents the predicted probability of the corresponding category.

[0161] The retrieval prompt text, the first search change feature, the first query information, the first document set, and the second candidate event set can be spliced together to form the model input data of the language model. The model input data is used as the input data of the embedding layer in the language model. The model input data can be converted into an input embedded feature sequence through the embedding layer. The input embedded feature sequence can refer to a sequence composed of embedded representations converted from the model input data. The input embedded feature sequence is decoded by the decoder in the language model to output the first predicted event of the first query information and the first association strength parameter between the first predicted event and the first query information. For example, the input embedded feature sequence output by the embedding layer can be used as the input data of the first decoding block in the language model. The input embedded feature sequence is decoded by the first decoding block in the language model to obtain the output data of the first decoding block. The output data of the first decoding block can be input into the second decoding block of the language model. The output data of the first decoding block can be decoded by the second decoding block to obtain the output data of the second decoding block. Similarly, the output data of the Mth decoding block in the language model can be obtained, that is, the output data of the last decoding block in the language model.

[0162] Each decoding block in the language model processes input data similarly. The data processing process of the first decoding block is described below as an example. The input embedded feature sequence is input into the first decoding block. It can be normalized (e.g., root mean square normalization) using normalization layer 1 to obtain a first normalized feature sequence. This first normalized feature sequence can serve as input data for the self-attention mechanism in the first decoding block. This self-attention mechanism can be unidirectional. For example, the current predicted position can reference information about the previously predicted position to determine the correlation between the current predicted position and the previously predicted position, thereby better understanding the model input data. The calculation process of the self-attention mechanism includes subjecting the first normalized feature sequence to three linear transformations: query (Q), key (K), and value (V). The dot product between the query and key is calculated. After normalization (e.g., softmax), attention weights are obtained. The attention weights can then be weighted summed with the value to obtain the output data of the self-attention mechanism. The output data of the self-attention mechanism can be added to the input data of the normalization layer 1 (such as the input embedded feature sequence output by the embedding layer) to obtain a first fused feature sequence.

[0163] Using normalization layer 2 in the first decoding block, the first fused feature sequence is root mean square normalized to obtain a second normalized feature sequence. This second normalized feature sequence can be passed through a feedforward network to further extract and transform the second normalized feature sequence to generate a more expressive feature representation. The output data of the feedforward network can be called the first transformed feature sequence. The first fused feature sequence and the first transformed feature sequence are added together to serve as the output data of the first decoding block. The output data of the first decoding block is used as the input data of the second decoding block, and the above operation is repeated until the output data of the Nth decoding block is obtained.

[0164] Furthermore, the output data of the Mth decoding block can be input into the normalization layer 3 of the language model, and the normalization layer 3 in the language model is used to perform root mean square normalization on the output data of the Mth decoding block to obtain a third normalized feature sequence. The third normalized feature sequence is subjected to feature transformation processing using the linear layer in the language model to obtain a second transformed feature sequence, and the linear layer can be a fully connected layer. Using the output layer in the language model (such as the softmax layer), the transformed features output by the linear layer can be converted into a probability distribution, and the text corresponding to the largest predicted probability in the probability distribution is used as the predicted text generated at the current time step. The predicted text generated at the current time step can be added to the output sequence of the previous time step until the end marker (such as the end marker) is generated. <eos>) or reaches a preset text length limit (which can be flexibly set according to specific needs). At this time, the output sequence finally generated by the language model can be used as the optimal event (first predicted event) of the first query information. The language model can also output a first correlation strength parameter between the first query information and the first predicted event.

[0165] It is understood that the data processed by a language model is typically sequential. For example, the characters in the first query information in the model input data, the documents in the first document set, the candidate events in the second candidate event set, and the search prompt text are arranged in sequence. Time steps can be used to distinguish input and output at different times or locations. For example, when a language model uses a character-by-character generation method for text prediction, each time step can generate a character. By arranging the characters generated by all time steps in chronological order, the output sequence of the language model can be obtained.

[0166] In an embodiment of the present application, the first document set recalled by the first query information association can be retrieved, and the real-time context information of the first query information can be injected into the language model, and then the query (query information) -doc (document) -event (event) ternary relationship can be deeply analyzed, and the optimal event (first predicted event) and association strength parameter related to the first query information can be output, so that the association relationship between the first query information and the first predicted event can be more accurately predicted. For example, when the language model determines through analysis that all documents in the first document set point to the same event, the event can be used as the main requirement of the first query information, and the association relationship between the first query information and each candidate event in the first candidate event set can be more accurately determined, thereby improving the matching degree between the first query information and the first predicted event. When the language model determines through analysis that the documents in the first document set point to different events (the first query information may have multiple intentions or there is ambiguity in understanding), the language model can be used to associate with the event that best meets the needs of the first query information, thereby improving the ability to understand the needs of the query information. A hybrid lightweight-heavyweight model is used, such as a lightweight xgboost model, to preliminarily screen the first candidate event set and select the top D candidate events related to the first query information, such as the top 10 events (selecting the top 10 events). A weighted language model can then be used to output the optimal event related to the first query information from the D candidate events (the second candidate event set). This means that the language model is used for actuarial calculations, which can reduce the frequency of language model calls, balance the accuracy of the language model with computational overhead, and optimize resource allocation.

[0167] See Figure 6 , Figure 6 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 2 Understandably, Figure 6 The corresponding embodiment is Figure 3 For a further detailed description of step S101 in the corresponding embodiment, the calculation process of the first search change feature is described in detail below, taking the first search change feature including the frequency change degree feature and the search sudden degree feature as an example. Figure 6 As shown, the calculation process of the first search change feature may include the following steps S1011 to S1015:

[0168] Step S1011: Determine the frequency mean of N time intervals according to the search frequency in each time interval.

[0169] Specifically, the search frequency in each time interval can be accumulated and divided by the number of time intervals N to obtain the frequency mean of N time intervals. The frequency mean can be expressed as formula (1):

[0170]

[0171] Where avg in formula (1) represents the frequency mean of N time intervals, x1, x2, x3, ..., x N It is represented sequentially as the search frequency of the first time interval, the second time interval, the third time interval, ..., the Nth time interval among N time intervals; N represents the number of time intervals.

[0172] Step S1012: determining the frequency standard deviation of N time intervals according to the frequency mean and the search frequency in each time interval.

[0173] In one or more embodiments, the square of the difference between the search frequency and the frequency mean within the i-th time interval can be determined as the deviation square corresponding to the i-th time interval, where the i-th time interval belongs to N time intervals, and i is a positive integer less than or equal to N. The deviation squares corresponding to the N time intervals are accumulated to obtain a cumulative deviation square value, and the square root of the ratio of the cumulative deviation square value to the number of time intervals is determined as the frequency standard deviation of the N time intervals, where the frequency standard deviation can be denoted as sd. The frequency standard deviation sd can be shown as formula (2):

[0174]

[0175] Among them, x in formula (2) i It can be expressed as the search frequency of the i-th time interval, (x i -avg) 2 It can be expressed as the square of the difference between the i-th time interval; (x1-avg) 2 +…+(x i -avg) 2 +…+(x N -avg) 2 It can be expressed as the cumulative value of squared deviations.

[0176] In one or more embodiments, the square of the difference between the search frequency and the frequency mean within the i-th time interval can be determined as the deviation square corresponding to the i-th time interval. The weight of the deviation square corresponding to each time interval is obtained, and the deviation square corresponding to each time interval is weighted and summed according to the weight of the deviation square corresponding to each time interval to obtain a weighted square cumulative value. The weight of the deviation square corresponding to each time interval is accumulated to obtain a weighted cumulative value, and the square root of the ratio between the weighted square cumulative value and the weighted cumulative value is determined as the frequency standard deviation of N time intervals. The frequency standard deviation here can be a weighted standard deviation, recorded as jq_sd. The weighted standard deviation jq_sd can be shown as formula (3):

[0177]

[0178] Among them, (x1-avg) in formula (3) 2 The weight of the square difference corresponding to the first time interval can be 0.94. The 0.94 here is only an example of the embodiment of the present application. In actual application scenarios, the weights of each square difference can be flexibly set according to specific needs. The weight of the square difference corresponding to the second time interval can be 0.94. 2 , and so on, the weight of the square of the difference corresponding to the i-th time interval can be 0.94 i , the weight of the square of the difference corresponding to the Nth time interval can be 0.94 N etc. 0.94+…+0.94 i +…+0.94 N It can represent the cumulative value of weight.

[0179] Step S1013: determining the frequency change characteristics of the first query information according to the frequency mean and the frequency standard deviation.

[0180] Specifically, a balance constant of the frequency mean is obtained, and the sum of the frequency mean and the balance constant is determined as a candidate statistical value; the ratio between the frequency standard deviation and the candidate statistical value is determined as the frequency change degree feature of the first query information. Among them, the balance constant can be a pre-set non-zero constant, which can avoid the denominator being 0 in the calculation process of the frequency change degree feature (query burst coefficient). If the denominator is only the frequency mean, it may cause the result to be divided by zero, or the result tends to infinity and other unreasonable situations. Alternatively, the balance constant can be used to adjust the scaling ratio of the data, such as by adjusting the size of the balance constant, so that the calculation result can be more in line with the needs of the actual application scenario. Alternatively, the balance constant can be used to balance the influence of the frequency mean, avoid excessively amplifying the relative degree of data fluctuation due to the small frequency mean, and improve the stability and rationality of the frequency change degree feature.

[0181] In one or more embodiments, when the frequency standard deviation is the standard deviation sd shown in formula (2), the frequency change degree feature can be calculated as shown in formula (4):

[0182]

[0183] Among them, cv in formula (4) represents the burst coefficient, and cv in this case can be called the frequency change degree feature, sd represents the standard deviation, const represents the balance constant, avg represents the frequency mean, and avg+const represents the candidate statistical value.

[0184] In one or more embodiments, when the frequency standard deviation is the weighted standard deviation jq_sd shown in formula (3), the frequency change degree feature can be calculated as shown in formula (5):

[0185]

[0186] Wherein, jq_cv in formula (5) represents the weighted burst coefficient, jq_cv in this case can be called the frequency change degree feature, and jq_sd represents the weighted standard deviation.

[0187] Step S1014: According to the search frequency in each time interval, the frequency change rate between two adjacent time intervals in the N time intervals is counted.

[0188] Specifically, the search frequency of the first query information can be understood as time series data, which can be the search frequency within N time intervals. The burst degree is measured by analyzing the changes in the search frequency within adjacent time intervals. The burst degree can be called a search burst degree feature (burst).

[0189] The frequency change rate between two adjacent time intervals can be expressed as formula (6):

[0190]

[0191] r in formula (5) i represents the frequency change rate between the i-th time interval and the i-1-th time interval. The above formula (6) can be used to calculate the frequency change rate between all two adjacent time intervals in N time intervals; for example, for N time intervals, N-1 frequency change rates can be calculated.

[0192] Step S1015: Determine the average value of the frequency change rate between two adjacent time intervals in the N time intervals as the search burstiness feature of the first query information.

[0193] Specifically, an average value of the N-1 frequency change rates calculated in step S1014 may be obtained, and the average value may be used as the search burstiness feature of the first query information.

[0194] Optionally, the maximum frequency change rate can be selected from the N-1 calculated frequency change rates as the search burstiness characteristic of the first query information. Alternatively, the frequency change rate between the N-1th time interval and the Nth time interval can be used as the search burstiness characteristic of the first query information. This application does not limit the calculation method of the search burstiness characteristic.

[0195] In one or more embodiments, a deep learning model can be used to calculate the search burstiness feature of the first query information. For example, when the deep learning model is a BERT model, the text content of the first query information can be segmented and the first query information can be converted into an input format supported by the BERT model, such as the first query information can be converted into a token sequence. The BERT model can be improved according to specific business logic and task requirements, such as the representation of the search burstiness feature can be pre-set. For example, the output layer of the BERT model can be replaced with one or more fully connected layers based on the BERT model. The above-mentioned token sequence is input into the improved BERT model, and the token sequence is scored for burstiness by the improved BERT model. Finally, the burstiness score of the first query information can be output, and the burstiness score at this time can be used as the search burstiness feature. In other words, the improved BERT model can be used to calculate the search burstiness feature of the first query information without calculating the number of searches for the first query information, thereby improving the retrieval timeliness of the first query information.

[0196] See Figure 7 , Figure 7 This is a schematic diagram of a query information processing flow provided by an embodiment of the present application. Figure 7 As shown, after the computer device obtains the query information query1, it can recall the document set 30b (such as the first document set) related to the query information query1 from the information retrieval system. The document set 30b can be a set of documents related to the query information query1 in the recent period of time (for example, three days, five days, etc.), such as Figure 7 As shown, the document set 30b may include h documents, such as document t1, document t2, document t3, ..., document th, where h can be a positive integer. A candidate event set 30a (such as the first candidate event set) related to the query information query1 can be recalled in the information retrieval system. The candidate event set 30a may include event information extracted from each document in the document set 30b, or may include hot events in the most recent event period. The candidate event set 30a may include g events, such as event e1, event e2, event e3, event e4, ..., event eg, where g can be a positive integer.

[0197] The computer device can obtain the historical search data of the query information query1, and through the historical search data, the dynamic characteristics of the query information query1 can be comprehensively analyzed, such as the frequency change degree characteristics (query burst coefficient) and the search burst degree characteristics (burst characteristics). The calculation method of the frequency change degree characteristics and the search burst degree characteristics can be referred to the above. Figure 6 The corresponding embodiments will not be described in detail here.

[0198] A pre-trained tree model (such as an xgboost model) can be used, and combined with the query information query1, the frequency change degree feature, and the search burst degree feature, to screen out the Top-10 events from the recalled candidate event set 30a. It can be understood that the tree model can be a lightweight model that can be trained using features such as the frequency change degree feature, the search burst degree feature, the semantic similarity of the candidate events and the query information query1. The trained tree model can be used to perform preliminary screening on the recalled candidate events and return the Top-10 events that are most relevant to the query information query1. The 10 here can be a pre-set value that can be flexibly set according to the specific needs of the actual application scenario. The 10 here can represent D=10.

[0199] like Figure 7 As shown, the event association parameter between query information query1 and event e1 can be output through the tree model as predicted value y1, the event association parameter between query information query1 and event e2 as predicted value y2, the event association parameter between query information query1 and event e3 as predicted value y3, the event association parameter between query information query1 and event e4 as predicted value y4, ..., the event association parameter between query information query1 and event eg as predicted value yg, etc. The g events in candidate event set 30a are sorted in descending order of event association parameters (such as the above-mentioned predicted values y1, ..., predicted values yg, etc.), and the top 10 events (i.e., Top-10 events) are selected from the sorted g events as candidate event set 30c (such as the second candidate event set). The Top-10 events here can be sequentially recorded as event o1, event o2, event o3, event o4, ..., event o10.

[0200] The retrieval prompt text, query information query1, document set 30b, candidate event set 30c, frequency change degree characteristics, and search burst degree characteristics can be used as model input data of the language model. The language model can deeply analyze the relationship between the query information query1, the documents in the document set 30b, and the events in the candidate event set 30c based on the model input data, and output the event most relevant to the query information query1, that is, the optimal event (such as the first predicted event), and the correlation strength parameter between the optimal event and the query information query1 (such as the first correlation strength parameter). The optimal event and its correlation strength parameter are used to guide the information retrieval system to generate retrieval results for the query information query1.

[0201] In this embodiment of the present application, by introducing document set 30b, the query background and context of query information query1 can be more accurately understood, the matching degree between query information query1 and the optimal event can be improved, and the retrieval accuracy of query information query1 can be improved. By introducing the frequency change degree feature and the search suddenness degree feature, the demand for breaking news in query information query1 can be identified and represented by the association strength parameter output by the language model. The larger the association strength parameter, the stronger the demand for immediate events in query information query1 and the higher the timeliness requirement. When generating retrieval results for query information query1 based on the optimal event and its association strength parameter, the timeliness of the retrieval results can be improved, enhancing the user experience.

[0202] In one or more embodiments, the trained language model can be deployed near-line asynchronously in the information retrieval system. The near-line asynchronous deployment can be a deployment method of the system architecture, which can combine the characteristics of near-line storage and asynchronous processing to optimize the performance of the retrieval system and improve resource utilization. Near-line storage can refer to storing data (such as the optimal event output by the language model and its correlation strength parameters, etc.) on a storage medium with performance between online storage and offline storage, which is suitable for data that is not frequently accessed but needs to be quickly obtained. Asynchronous deployment can mean that the computing task based on the language model is not executed immediately, but is placed in a queue and processed by a special processing program in the background according to a certain order or rules, which can improve the response speed and concurrent processing capabilities of the information retrieval system.

[0203] See Figure 8 , Figure 8 This is a flow chart of information retrieval based on a language model provided by an embodiment of the present application; it can be understood that, Figure 8 The corresponding method embodiment can be executed by a computer device, which can be a terminal device or a server running an information retrieval system, and this application does not limit this. Figure 8 As shown, the information retrieval process based on the language model may include the following steps S10 to S19:

[0204] S10: Receive an information retrieval request and obtain second query information.

[0205] Specifically, when the object enters the second query information in the browser or client and performs a search operation on the second query information, an information retrieval request can be sent to the information retrieval system. The computer device running the information retrieval system can receive the information retrieval request and obtain the second query information carried by the information retrieval request. Among them, the information retrieval request may refer to the query intention conveyed by the object to the information retrieval system through a specific input method according to its own needs. The information retrieval request may be a keyword, or a phrase, or a complete sentence, or a complex logical expression, etc., which is not limited in this application. The second query information may refer to the information content of the information retrieval request. The second query information may be the query information obtained by the information retrieval system. The second query information may be the same as the first query information or different, and will not be elaborated here.

[0206] S11, read the data storage system.

[0207] For ease of understanding, the embodiment of the present application is described using redis as an example of a data storage system. After obtaining the second query information, the language model calculation result of the second query information can be read in redis. The language model calculation result may refer to the output result of the language model, such as the second predicted event of the second query information, and the second correlation strength parameter between the second query information and the second predicted event. Among them, the second predicted event may refer to the optimal event output by the language model for the second query information, and the second correlation strength parameter may refer to the correlation strength parameter output by the language model for the second query information, which is used to represent the correlation between the second query information and the second predicted event.

[0208] S12: Whether the second query information is included.

[0209] Specifically, if the language model calculation result of the second query information is read in redis, then steps S13 to S14 may be continued. If the language model calculation result of the second query information is not read in redis, then steps S15 to S19 may be continued.

[0210] S13: Obtain a second predicted event and a second association strength parameter of the second query information.

[0211] S14: Generate a first search result of the information search request according to the second predicted event and the second association strength parameter returned by the data storage system.

[0212] Specifically, if the language model calculation result of the second query information is read in Redis, the second predicted event of the second query information and the second correlation strength parameter between the second query information and the second predicted event can be obtained in Redis, and the associated document set of the second predicted event can be recalled in the information retrieval system. The associated document set may refer to a set of documents in the information retrieval system that are related to the second predicted event. The associated document set may include one or more documents, and the documents in the associated document set may be referred to as associated documents of the second query information.

[0213] The associated documents in the associated document set can be sorted based on the second association strength parameter to obtain a ranked document list, and the first search result of the information search request can be generated based on the ranked document list. The ranking of the associated documents in the associated document set can be based on, but not limited to, multiple dimensional features such as the publication time of the associated documents, the relevance between the associated documents and the second query information (e.g., semantic similarity), and the authority of the associated documents. A comprehensive analysis of these multiple dimensional features can be performed to determine the ranking of the associated documents in the associated document set.

[0214] For example, a weight can be set for each of the above-mentioned dimensional features, and the sum of the weights of all dimensional features is 1. The larger the weight, the greater the proportion of the dimensional feature in the sorting process of each associated document, and the more important the dimensional feature is; the smaller the weight, the smaller the proportion of the dimensional feature in the sorting process of each associated document, and the less important the dimensional feature is. The second association strength parameter can be used to determine the weight of the dimensional feature of release time. The larger the second association strength parameter, the greater the demand of the second query information for breaking news. The weight of the dimensional feature of release time can be increased, and the weights of other dimensional features can be reduced; the smaller the second association strength parameter, the smaller the demand of the second query information for breaking news. The weight of the dimensional feature of release time can be reduced, and the weights of other dimensional features can be increased. Furthermore, a weighted sum can be taken for all dimensional features of each associated document, and the associated documents in the associated document set can be sorted in descending order according to the results of the weighted summation to obtain a document sorting list.

[0215] Furthermore, the document ranking list may be encapsulated according to the information presentation mode of the browser or client, and the encapsulated document ranking list may be returned to the browser or client as the first search result, and the browser or client may display the first search result.

[0216] S15: Recall the second document set, and recall the fourth candidate event set from the third candidate event set.

[0217] S16: Determine a target associated event from the fourth candidate event set.

[0218] S17: Generate a second search result of the information search request according to the target-associated event and the event association parameter between the second query information and the target-associated event.

[0219] Specifically, if the language model calculation result of the second query information is not read in redis, the second search change feature of the second query information can be obtained, and the second document set and the third candidate event set of the second query information can be obtained. According to the second query information and the second search change feature, the third candidate event set can be subjected to event filtering processing to obtain a fourth candidate event set, which may include at least one associated event and an event association parameter between at least one associated event and the second query information. The associated event corresponding to the largest event association parameter in the fourth candidate event set is determined as the target associated event of the second query information, and the second retrieval result of the information retrieval request is generated according to the target associated event and the event association parameter between the second query information and the target associated event.

[0220] The second search change feature may refer to a dynamic feature of the second query information obtained by comprehensively analyzing the historical search data of the second query information; the calculation method of the second search change feature can be found in Figure 6 In the corresponding embodiment, the calculation method of the first search change feature is not described here. The method of obtaining the second document set can be found in Figure 3 The method for obtaining the first document set in step S102 of the corresponding embodiment and the method for obtaining the third candidate event set can be referred to. Figure 3 The method for obtaining the first candidate event set in step S102 of the corresponding embodiment and the process of selecting the fourth candidate event set from the third candidate event set can be found in Figure 3 The process of obtaining the second candidate event set described in step S103 of the corresponding embodiment will not be described in detail here.

[0221] It is understandable that when the candidate events in the fourth candidate event set are screened from the third candidate event set by a tree model (such as xgboost), an event correlation parameter between the second query information and each candidate event in the fourth candidate event set can be output. The event correlation parameter can be an event prediction value output by xgboost, which is used to represent the correlation between the candidate event and the second query information.

[0222] If the language model calculation results for the second query information are not stored in Redis, the retrieval result of this information retrieval request can be directly determined by the output of the tree model (lightweight model). For example, the associated event corresponding to the largest event association parameter in the fourth candidate event set can be determined as the target associated event. Based on the target associated event and the aforementioned largest event association parameter, the retrieval result of this information retrieval request (which can be referred to as the second retrieval result) is generated. The generation process of the second retrieval result can be referred to the generation process of the first retrieval result, and will not be repeated here.

[0223] S18, filter and build model call request.

[0224] S19: Send a model call request.

[0225] Specifically, when the language model calculation result of the second query information is not stored in redis, the second query information, the second document set, the fourth candidate event set, the second search change feature and the retrieval prompt text can be constructed as the initial input data of the language model, and the initial input data can be written to a message queue, such as Kafka, which is a distributed message queue system based on the publish-subscribe model. A model call request is issued through the message queue, and the model call request can be used to request a language model service. The language model is used to process the initial input data in the message queue, and the most relevant second predicted event is output for the second query information in the fourth candidate event set, as well as the second correlation strength parameter between the second query information and the second predicted event. The second query information, the second predicted event and the second correlation strength parameter are then written back to the data storage system (such as redis); for the next information retrieval request for the second query information, the language model calculation result can be directly read in redis. The associative storage here may refer to storing the second query information as a key and the second predicted event and the second association strength parameter as a value in redis; that is, the data storage system may use a key-value pair data structure for data storage.

[0226] In one or more embodiments, the QPS (Queries Per Second) of the information retrieval system can be controlled, and the QPS can be used to measure the data processing capability of the information retrieval system. For example, the storage duration of the first predicted event and the first association strength parameter in the data storage system is counted; if the storage duration is greater than or equal to the duration threshold, and the maximum event association parameter associated with the second candidate event set is greater than the parameter threshold, then a model call request is issued to call the language model to update the first predicted event and the first association strength parameter of the first query information in the data storage system. Among them, the parameter threshold can be flexibly set according to the actual application scenario, such as being set to 1.8, or set to other values, which is not limited in this application. The duration threshold can be called the time to live (TTL) of the data in redis, and the duration threshold can be set to 30 minutes, or set to other values, which is not limited in this application.

[0227] In other words, the calling conditions for the language model can be set in advance, and the calling conditions can be: the maximum event association parameter output by the tree model (lightweight model) is greater than the preset parameter threshold, and the time for writing the language model calculation result of the same query information to redis exceeds the time threshold.

[0228] like Figure 8 As shown, the process of receiving an information retrieval request and generating the retrieval results of the information retrieval request (such as the first retrieval result and the second retrieval result mentioned above) can be implemented by the main calling service in the information retrieval system. The main calling service can initiate a model call request and actively call other services (such as a language model service) to complete a component or module of a specific task. The language model service can be used as a called service in the information retrieval system. The called service can refer to a component or module used to respond to the request of the main calling service (model call request), perform a specific task and return the result. In an embodiment of the present application, redis can be used as a data caching system to store the output results of the language model for each query information through near-line asynchronous deployment. This can reduce the computational burden of the language model and improve the retrieval efficiency of the information retrieval system without increasing the time-consuming burden of the original information retrieval system.

[0229] It is understood that before deploying a language model in an information retrieval system, it needs to be trained. The following describes the language model training process. For ease of understanding, the language model in the training phase can be referred to as a pre-trained model, and after training is completed, it is referred to as a language model.

[0230] See Figure 9 , Figure 9 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 3 It is understandable that the data processing method can be executed by a computer device, which can be a terminal device or a server, and this application does not limit this. Figure 9 As shown, the process may include the following steps S201 to S206:

[0231] Step S201 : acquiring sample data, acquiring sample query information contained in the sample data, and sample search data of the sample query information, and determining a sample search change feature of the sample query information according to the sample search data.

[0232] Specifically, a training data set can be obtained, which refers to a set of sample data used to train a pre-training model. Each sample data can be composed of historical query information itself, label events, and association strength label parameters between the historical query information and the label events. The sample data in the training data set can include difficult samples, simple samples, and enhanced samples obtained through sample enhancement processing. Among them, difficult samples can be sample data that meets at least one of the following conditions: low association strength label parameters (for example, the event association parameter output by the tree model is less than a preset threshold, such as 1.8 or other values), high text content matching between the historical query information and the label event but low semantic relevance between the two (such as text that is almost the same but semantically different), short historical query information (such as one word, two words, a phrase, etc.), historical query information is a single entity, historical query information of the question-and-answer type, etc. For difficult samples, when a historical query information can recall a document set with good relevance and authority, and the number of documents in the document set is greater than 2, the document set can be used as an information supplement to the historical query information and can be called a sample document set. Simple samples can be obtained by uniformly sampling historical query information that correctly predicts events from the log files of the information retrieval system.

[0233] In one or more embodiments, if the proportion of sample data whose association strength label parameters fall within a certain range is too small, for example, the association strength label parameters can be divided into 4 gears. When the sample data corresponding to gear 1 accounts for 10% of all sample data, the sample data corresponding to gear 1 can be subjected to sample enhancement processing. The process of sample enhancement processing may include but is not limited to: obtaining historical query information and a set of historical events corresponding to the historical query information, the set of historical events including at least one historical event, and a historical association strength parameter between the historical query information and at least one historical event. Obtaining text semantic features of the historical query information, decoding the text semantic features, and generating at least one associated query information. Constructing the historical query information, at least one historical event, and the historical association strength parameter between the historical query information and each historical event into a first sample. Constructing at least one associated query information, at least one historical event, and the historical association strength parameter between the historical query information and each historical event into a second sample, and determining sample data in the first sample and the second sample.

[0234] For example, a currently available large language model can be used to rewrite existing historical query information multiple times to obtain at least one associated query information. Each associated query information, along with the label events and association strength label parameters of the original historical query information, can then be added to the training dataset as an enhanced sample. Optionally, the label events and association strength label parameters in the enhanced sample can be manually annotated, or the same label events and association strength label parameters as the original historical query information can be used, although this application does not limit this.

[0235] For any sample data in the sample training set, the sample query information and sample search data of the sample query information can be obtained, and the sample search change feature of the sample query information can be determined based on the sample search data. The calculation method of the sample search change feature can be found in Figure 6 The relevant description of the corresponding embodiments will not be repeated here.

[0236] Step S202 : performing document retrieval on the sample query information to obtain a sample document set corresponding to the sample query information, and performing event retrieval on the sample query information to obtain a first sample event set corresponding to the sample query information.

[0237] Step S203 : performing event filtering processing on the first sample event set according to the sample query information, the sample search change characteristics, and the sample document set to obtain a second sample event set.

[0238] Step S204 , constructing sample input data for a pre-training model using the search prompt text, sample search change features, sample query information, sample document set, and second sample event set.

[0239] Step S205: In the pre-trained model, the association relationship between the sample query information, the sample document set, and the second sample event set is analyzed according to the model input data, and the sample predicted event and the sample association strength parameter between the sample query information and the sample predicted event are output.

[0240] The specific implementation process of steps S202 to S205 can be found in Figure 3 The relevant description of steps S102 to S104 in the corresponding embodiment; that is, the processing process of the sample query information is the same as Figure 3 The processing process of the first query information in the corresponding embodiment is similar and will not be repeated here.

[0241] Step S206 , based on the sample prediction event, the sample association strength parameter, and the label event and association strength label parameter contained in the sample data, the network parameters of the pre-trained model are modified to obtain the language model.

[0242] Specifically, the pre-training model can be trained in a supervised learning manner. The loss value can be calculated by the difference between the sample prediction event output by the pre-training model and the label event in the sample data, as well as the difference between the sample association strength parameter output by the pre-training model and the association strength label parameter in the sample data. By minimizing the loss value, the network parameters of the iterative pre-training model are continuously updated until the pre-set maximum number of iterations is reached, or the convergence condition is reached, the training is stopped, and the pre-training model at this time is determined as the trained language model. It can be understood that the loss function of the pre-training model can adopt the loss function of the currently disclosed large language model, and this application does not limit the form of the loss function of the pre-training model.

[0243] In the embodiments of the present application, during the training phase, by introducing a sample document set related to historical query information, the pre-trained model can accurately understand the background and context of the historical query information, improve its ability to understand the actual needs of the historical query information, and enhance the performance of the language model. Preliminary screening of the candidate event set using lightweight models such as tree models can reduce the computational overhead of the pre-trained model and save resources.

[0244] It is understandable that in the specific implementation of this application, it may involve relevant information such as the user's login information, search history, etc. in the client or browser. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the permission or consent of the relevant institutions or departments, or the users themselves, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant regions.

[0245] See Figure 10 , Figure 10 This is a structural diagram of a data processing device provided in an embodiment of the present application. Figure 10 As shown, the data processing device 1 may include: a data acquisition module 101, an event acquisition module 102, a first screening module 103, and a second screening module 104;

[0246] The data acquisition module 101 is configured to acquire first query information and historical search data of the first query information, and determine a first search change feature of the first query information based on the historical search data;

[0247] An event acquisition module 102 is configured to perform a document search on the first query information to obtain a first document set corresponding to the first query information, and perform an event search on the first query information to obtain a first candidate event set corresponding to the first query information;

[0248] A first screening module 103 is configured to perform event filtering on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set;

[0249] The second screening module 104 is used to obtain the search prompt text, parse the association relationship between the first query information, the first document set and the second candidate event set based on the search prompt text and the first search change feature, and output the first predicted event and the first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate the search results of the first query information.

[0250] In one or more embodiments, when the data acquisition module 101 acquires the first query information and the historical search data of the first query information, it is specifically configured to perform the following steps:

[0251] Acquire first query information, understand the content of the first query information, and obtain a query text corresponding to the first query information;

[0252] Determining a search time range for the first query information, and obtaining initial search data within the search time range from a log file of the information retrieval system;

[0253] Historical query information including the query text is obtained from the initial search data, and search record information of the historical query information in the initial search data is determined as historical search data of the first query information.

[0254] In one or more embodiments, when the data acquisition module 101 determines the first search change feature of the first query information based on the historical search data, it is specifically configured to perform the following steps:

[0255] Divide the search time range corresponding to the historical search data into N time intervals, and count the search frequency of the first query information in each time interval in the historical search data; N is a positive integer;

[0256] A first search change feature of the first query information is determined according to the search frequency in each time interval.

[0257] In one or more embodiments, the first search change feature includes a frequency change degree feature and a search suddenness degree feature;

[0258] When the data acquisition module 101 determines the first search change feature of the first query information according to the search frequency in each time interval, it is specifically configured to perform the following steps:

[0259] Determine the frequency mean of N time intervals based on the search frequency in each time interval, and determine the frequency standard deviation of N time intervals based on the frequency mean and the search frequency in each time interval;

[0260] Determining a frequency change characteristic of the first query information based on the frequency mean and the frequency standard deviation;

[0261] According to the search frequency in each time interval, the frequency change rate between two adjacent time intervals in N time intervals is counted, and the average value of the frequency change rate between two adjacent time intervals in N time intervals is determined as the search burstiness feature of the first query information.

[0262] In one or more embodiments, when the data acquisition module 101 determines the frequency standard deviation of N time intervals based on the frequency mean and the search frequency in each time interval, it is specifically configured to perform the following steps:

[0263] The square of the difference between the search frequency and the frequency mean in the i-th time interval is determined as the square of the deviation corresponding to the i-th time interval; the i-th time interval belongs to N time intervals, and i is a positive integer less than or equal to N;

[0264] Obtaining the weight of the square of deviation corresponding to each time interval, and performing weighted summation on the square of deviation corresponding to each time interval according to the weight of the square of deviation corresponding to each time interval to obtain a weighted square cumulative value;

[0265] The weights of the squared deviations corresponding to each time interval are accumulated to obtain a weighted cumulative value, and the square root of the ratio between the weighted squared cumulative value and the weighted cumulative value is determined as the frequency standard deviation of the N time intervals.

[0266] In one or more embodiments, when the data acquisition module 101 determines the frequency change degree characteristic of the first query information based on the frequency mean and the frequency standard deviation, it is specifically configured to perform the following steps:

[0267] Obtaining a balance constant of the frequency mean, and determining the sum of the frequency mean and the balance constant as a candidate statistical value;

[0268] The ratio between the frequency standard deviation and the candidate statistical value is determined as the frequency change degree feature of the first query information.

[0269] In one or more embodiments, when the event acquisition module 102 performs document retrieval on the first query information and obtains a first document set corresponding to the first query information, it is specifically configured to perform the following steps:

[0270] Obtaining historical prediction events of the first query information, and splicing the first query information and the first query information to obtain a first spliced text;

[0271] Divide the first concatenated text into W unit characters, obtain a word vector for each of the W unit characters, and determine a semantic vector for each unit character based on semantic information of each unit character in the first concatenated text; W is a positive integer;

[0272] Determine a position vector of each unit character according to position information of each unit character in the first concatenated text, and combine the word vector, the semantic vector, and the position vector to obtain a first embedding representation of the first concatenated text;

[0273] Encoding the first embedded representation to obtain a first query vector of the first concatenated text, and determining a first vector similarity between the first query vector and a document vector in a document retrieval library; the document retrieval library is used to store document vectors of each document in the information retrieval system, the document vectors being determined by the second concatenated text, the second concatenated text including a document title and a document summary of a document;

[0274] According to the first vector similarity, each document in the information retrieval system is sorted to obtain a candidate document list, and the first P documents in the candidate document list constitute a first document set corresponding to the first query information; P is a positive integer.

[0275] In one or more embodiments, when the event acquisition module 102 performs event retrieval on the first query information and obtains a first candidate event set corresponding to the first query information, it is specifically configured to perform the following steps:

[0276] Converting the first query information into a second embedded representation, encoding the second embedded representation, and obtaining a second query vector for the first query information;

[0277] Determining a second vector similarity between the second query vector and an event vector in an event retrieval library; the event retrieval library is used to store event vectors of various events in the information retrieval system;

[0278] According to the second vector similarity, each event in the information retrieval system is sorted to obtain a candidate event list, and the first Q events in the candidate event list constitute a first candidate event set corresponding to the first query information; Q is a positive integer.

[0279] In one or more embodiments, the first screening module 103 performs event filtering on the first candidate event set based on the first query information and the first search change feature, and when obtaining the second candidate event set, is specifically configured to perform the following steps:

[0280] Converting the first query information into a query embedding representation, and converting each candidate event in the first candidate event set into an event embedding representation;

[0281] Obtaining semantic similarity between the query embedding representation and the event embedding representation of each candidate event, and constructing an event feature set for each candidate event based on the first search change feature, the semantic similarity, and the historical search frequency of the first query information;

[0282] Input the event feature set of each candidate event into the tree model, traverse multiple decision trees in the tree model, and determine the leaf nodes that the event feature set of each candidate event hits in the multiple decision trees;

[0283] Accumulate the weights of the hit leaf nodes in multiple decision trees to obtain the event prediction value of each candidate event;

[0284] According to the event prediction value of each candidate event, each candidate event in the first candidate event set is sorted to obtain an event sorting list, and the second candidate event set is determined in the event sorting list.

[0285] In one or more embodiments, the second screening module 104 parses the association relationship between the first query information, the first document set, and the second candidate event set based on the search prompt text and the first search variation feature, and outputs the first predicted event and a first association strength parameter between the first query information and the first predicted event, specifically for performing the following steps:

[0286] Constructing the retrieval prompt text, the first search change feature, the first query information, the first document set, and the second candidate event set as model input data of the language model, and converting the model input data into an input embedding feature sequence;

[0287] The input embedded feature sequence is decoded by a decoder in the language model to output a first predicted event in the second candidate event set and a first association strength parameter between the first query information and the first predicted event.

[0288] In one or more embodiments, the data processing device 1 further includes: a storage module 105 , a request receiving module 106 , a stored data query module 107 , and a result generating module 108 ;

[0289] The storage module 105 is configured to store the first query information, the first predicted event, and the first correlation strength parameter in a data storage system;

[0290] The request receiving module 106 is configured to obtain the second query information carried in the information retrieval request upon receiving the information retrieval request;

[0291] a storage data query module 107 configured to obtain, from the data storage system, a second predicted event of the second query information and a second correlation strength parameter between the second query information and the second predicted event, if the data storage system contains the second query information;

[0292] The result generation module 108 is used to obtain a set of associated documents of the second predicted event, sort the associated documents in the associated document set according to the second association strength parameter to obtain a document sorting list, and generate a first search result of the information retrieval request according to the document sorting list.

[0293] In one or more embodiments, the data processing device 1 further includes: a model calling module 109;

[0294] The data acquisition module 101 is further configured to acquire a second search change feature of the second query information, and acquire a second document set and a third candidate event set of the second query information if the data storage system does not contain the second query information;

[0295] The first filtering module 103 is further configured to perform event filtering on the third candidate event set based on the second query information and the second search change feature to obtain a fourth candidate event set; the fourth candidate event set includes at least one associated event and an event association parameter between the at least one associated event and the second query information;

[0296] The first screening module 103 is further configured to determine the associated event corresponding to the largest event association parameter in the fourth candidate event set as the target associated event of the second query information;

[0297] The result generating module 108 is further configured to generate a second search result of the information search request based on the target associated event and the event association parameter between the second query information and the target associated event;

[0298] A model calling module 109 is configured to call a language model and output a second predicted event for the second query information and a second correlation strength parameter between the second query information and the second predicted event based on the search prompt text, the second search change feature, the second query information, the second document set, and the fourth candidate event set;

[0299] The storage module 105 is further configured to store the second query information, the second predicted event, and the second correlation strength parameter in a data storage system.

[0300] In one or more embodiments, the data processing device 1 further includes: a duration statistics module 110, a calling condition determination module 111;

[0301] A duration statistics module 110, configured to count the storage duration of the first predicted event and the first correlation strength parameter in the data storage system;

[0302] The calling condition judgment module 111 is used to call the language model to update the first predicted event and the first association strength parameter of the first query information in the data storage system if the storage duration is greater than or equal to the duration threshold and the maximum event association parameter associated with the second candidate event set is greater than the parameter threshold.

[0303] In one or more embodiments, the data processing device 1 further includes: a sample preprocessing module 112 , a third screening module 113 , a fourth screening module 114 , and a parameter correction module 115 ;

[0304] The sample preprocessing module 112 is configured to obtain sample data, obtain sample query information contained in the sample data, and sample search data of the sample query information, and determine a sample search change feature of the sample query information based on the sample search data;

[0305] The sample preprocessing module 112 is further configured to perform document retrieval on the sample query information to obtain a sample document set corresponding to the sample query information, and perform event retrieval on the sample query information to obtain a first sample event set of the sample query information;

[0306] The third filtering module 113 is configured to perform event filtering on the first sample event set based on the sample query information, the sample search change characteristics, and the sample document set to obtain a second sample event set;

[0307] The fourth screening module 114 is used to construct sample input data for the pre-training model using the search prompt text, the sample search change feature, the sample query information, the sample document set, and the second sample event set;

[0308] The fourth screening module 114 is further configured to parse, in the pre-trained model, the association relationship between the sample query information, the sample document set, and the second sample event set based on the model input data, and output a sample predicted event and a sample association strength parameter between the sample query information and the sample predicted event;

[0309] The parameter correction module 115 is used to correct the network parameters of the pre-trained model according to the sample prediction event, the sample association strength parameter, and the label event and association strength label parameter contained in the sample data to obtain a language model.

[0310] In one or more embodiments, when the sample preprocessing module 112 obtains sample data, it is specifically configured to perform the following steps:

[0311] Obtaining historical query information and a historical event set corresponding to the historical query information, wherein the historical event set includes at least one historical event and a historical correlation strength parameter between the historical query information and the at least one historical event;

[0312] Obtaining text semantic features of historical query information, decoding the text semantic features, and generating at least one associated query information;

[0313] Constructing the historical query information, at least one historical event, and a historical correlation strength parameter between the historical query information and each historical event into a first sample;

[0314] At least one associated query information, at least one historical event, and a historical association strength parameter between the historical query information and each historical event are constructed into a second sample, and sample data is determined in the first sample and the second sample.

[0315] According to one embodiment of the present application, the above Figure 3 The relevant steps involved in the data processing method shown can be represented by Figure 10 The data processing device 1 shown in FIG. 1 is executed by each module. For example, Figure 3 The step S101 shown can be performed by Figure 10 The data acquisition module 101 shown is used to execute, Figure 3 Step S102 shown can be performed by Figure 10 The event acquisition module 102 shown is executed, Figure 3 Step S103 shown can be performed by Figure 10 The first screening module 103 shown is used to perform, Figure 3 Step S104 shown can be performed by Figure 10 The second screening module 104 shown is used to perform the same.

[0316] According to one embodiment of the present application, Figure 10 The various modules in the data processing device 1 shown can be individually or all combined into one or several modules to constitute, or one (or some) of the modules can be further split into at least two smaller units in function, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one module. In other embodiments of the present application, the data processing device 1 may also include other modules or units. In actual applications, these functions can also be implemented with the assistance of other modules, and can be implemented by the collaboration of at least two modules.

[0317] In an embodiment of the present application, the first query information and the historical search data of the first query information can be obtained, and the first search change feature of the first query information can be determined based on the historical search data. The first search change feature can reflect the change in the search frequency of the first query information, and the needs of the first query information can be more accurately understood. The first document set and the first candidate event set of the first query information can be recalled, and the first candidate event set can be preliminarily screened based on the first query information and the first search change feature to obtain the second candidate event set. Based on the retrieval prompt text and the first search change feature, the association relationship between the first query information, the first document set and the second candidate event set is deeply analyzed, and the first predicted event and the first association strength parameter between the first query information and the first predicted event are output. By introducing the retrieval prompt text and the first document set, the matching degree between the first query information and the first predicted event can be improved. The first predicted event is the optimal event of the first query information in the second candidate event set, and the retrieval result of the first query information is generated based on the first predicted event and the first association strength parameter, which can improve the timeliness of the retrieval result.

[0318] See Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 11 As shown, the computer device 1000 may be a terminal device, for example, Figure 1 The terminal device 10a in the corresponding embodiment may also be a server, for example, Figure 1 The server 10d in the corresponding embodiment will not be limited here. For ease of understanding, this application takes a computer device as an example of a terminal device. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to achieve connection and communication between these components. The user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Figure 11 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0319] The network interface 1004 in the computer device 1000 can also provide a network communication function, and the optional user interface 1003 can also include a display screen and a keyboard. Figure 11 In the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an interface for user input; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0320] Obtaining first query information and historical search data of the first query information, and determining a first search change feature of the first query information based on the historical search data;

[0321] Performing document retrieval on the first query information to obtain a first document set corresponding to the first query information, and performing event retrieval on the first query information to obtain a first candidate event set corresponding to the first query information;

[0322] Performing event filtering on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set;

[0323] Obtain a retrieval hint text, parse the association relationship between the first query information, the first document set, and the second candidate event set based on the retrieval hint text and the first search change feature, and output a first predicted event and a first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate a retrieval result for the first query information.

[0324] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 、 Figure 6 、 Figure 8 as well as Figure 9 The description of the data processing method in any embodiment can also be performed as described above. Figure 10 The description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0325] In addition, it should be noted that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 mentioned above, and the computer program includes computer instructions. When the processor executes the computer instructions, it can execute the above-mentioned Figure 3 、 Figure 6 、 Figure 8 as well as Figure 9 The description of the data processing method in any of the embodiments will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computer device for execution, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0326] In addition, it should be noted that: the embodiment of the present application also provides a computer program product, which may include a computer program, and the computer program may be stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor may execute the computer program, so that the computer device performs the above Figure 3 、 Figure 6 、 Figure 8 as well as Figure 9 The description of the data processing method in any of the embodiments herein will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here. For technical details not disclosed in the computer program product or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.

[0327] It can be understood that in the description of the embodiments of the present application, "when", "if" and "if" all mean that under certain objective circumstances, the computer device will perform corresponding processing, which does not limit the time, nor does it require the computer device to perform judgment actions when implementing it, nor does it mean that there are other limitations.

[0328] The terms "first," "second," and the like in the description, claims, and drawings of the embodiments of this application are used to distinguish different media contents, rather than to describe a specific order. Furthermore, the terms "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps and units inherent to such process, method, apparatus, product, or device.

[0329] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0330] The methods and related devices provided by the embodiments of the present application are described with reference to the method flow charts and / or structural diagrams provided by the embodiments of the present application. Specifically, each process and / or block in the method flow charts and / or structural diagrams, as well as the combination of processes and / or blocks in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 The flow or flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.

[0331] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the functions of the module or unit.

[0332] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.< / eos>

Claims

1. A data processing method, characterized in that: include: Acquire first query information and historical search data of the first query information, and determine a first search change feature of the first query information based on the historical search data; Performing a document search on the first query information to obtain a first document set corresponding to the first query information, and performing an event search on the first query information to obtain a first candidate event set corresponding to the first query information; performing event filtering processing on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set; Obtain a retrieval hint text, parse the association relationship between the first query information, the first document set, and the second candidate event set based on the retrieval hint text and the first search change feature, output a first predicted event, and a first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate a retrieval result for the first query information.

2. The method according to claim 1, characterized in that The obtaining of the first query information and the historical search data of the first query information includes: Obtaining the first query information, understanding the content of the first query information, and obtaining a query text corresponding to the first query information; Determining a search time range for the first query information, and obtaining initial search data within the search time range from a log file of an information retrieval system; Historical query information containing the query text is obtained from the initial search data, and search record information of the historical query information in the initial search data is determined as historical search data of the first query information.

3. The method according to claim 1, characterized in that The determining, based on the historical search data, a first search change feature of the first query information includes: Divide the search time range corresponding to the historical search data into N time intervals, and count the search frequency of the first query information in each time interval in the historical search data; N is a positive integer; A first search change feature of the first query information is determined according to the search frequency in each time interval.

4. The method according to claim 3, characterized in that The first search change feature includes a frequency change degree feature and a search suddenness degree feature; The determining, based on the search frequency within each time interval, a first search change feature of the first query information includes: Determining a frequency mean of the N time intervals based on the search frequency in each time interval, and determining a frequency standard deviation of the N time intervals based on the frequency mean and the search frequency in each time interval; determining a frequency change characteristic of the first query information according to the frequency mean and the frequency standard deviation; According to the search frequency within each time interval, the frequency change rate between two adjacent time intervals in the N time intervals is counted, and the average value of the frequency change rate between two adjacent time intervals in the N time intervals is determined as the search burstiness feature of the first query information.

5. The method according to claim 4, characterized in that Determining the frequency standard deviation of the N time intervals according to the frequency mean and the search frequency in each time interval includes: Determine the square of the difference between the search frequency in the i-th time interval and the frequency mean as the square of the deviation corresponding to the i-th time interval; the i-th time interval belongs to the N time intervals, and i is a positive integer less than or equal to N; Obtaining the weight of the square of the deviation corresponding to each time interval, and performing weighted summation on the square of the deviation corresponding to each time interval according to the weight of the square of the deviation corresponding to each time interval to obtain a weighted square cumulative value; The weights of the squared deviations corresponding to each time interval are accumulated to obtain a weighted cumulative value, and the square root of the ratio between the weighted squared cumulative value and the weighted cumulative value is determined as the frequency standard deviation of the N time intervals.

6. The method according to claim 4, characterized in that The determining, based on the frequency mean and the frequency standard deviation, a frequency change characteristic of the first query information includes: obtaining a balance constant of the frequency mean, and determining a sum of the frequency mean and the balance constant as a candidate statistical value; The ratio between the frequency standard deviation and the candidate statistical value is determined as the frequency change degree feature of the first query information.

7. The method according to claim 1, characterized in that The performing document retrieval on the first query information to obtain a first document set corresponding to the first query information includes: Obtaining historical prediction events of the first query information, and concatenating the first query information with the second query information to obtain a first concatenated text; Divide the first concatenated text into W unit characters, obtain a word vector for each of the W unit characters, and determine a semantic vector for each unit character based on semantic information of the unit character in the first concatenated text; W is a positive integer; Determining a position vector of each unit character according to position information of each unit character in the first concatenated text, and combining the word vector, the semantic vector, and the position vector to obtain a first embedded representation of the first concatenated text; encoding the first embedded representation to obtain a first query vector of the first concatenated text, and determining a first vector similarity between the first query vector and a document vector in a document retrieval library; the document retrieval library is used to store document vectors of documents in an information retrieval system, the document vectors being determined based on the second concatenated text, the second concatenated text including a document title and a document summary; According to the first vector similarity, each document in the information retrieval system is sorted to obtain a candidate document list, and the first P documents in the candidate document list constitute a first document set corresponding to the first query information; P is a positive integer.

8. The method according to claim 1, characterized in that The performing event retrieval on the first query information to obtain a first candidate event set corresponding to the first query information includes: Converting the first query information into a second embedded representation, and encoding the second embedded representation to obtain a second query vector for the first query information; Determining a second vector similarity between the second query vector and an event vector in an event retrieval library; the event retrieval library is used to store event vectors of various events in the information retrieval system; According to the second vector similarity, each event in the information retrieval system is sorted to obtain a candidate event list, and the first Q events in the candidate event list constitute a first candidate event set corresponding to the first query information; Q is a positive integer.

9. The method according to claim 1, characterized in that The performing event filtering on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set includes: Converting the first query information into a query embedding representation, and converting each candidate event in the first candidate event set into an event embedding representation; Obtaining semantic similarity between the query embedding representation and the event embedding representation of each candidate event, and constructing an event feature set for each candidate event based on the first search change feature, the semantic similarity, and the historical search frequency of the first query information; Inputting the event feature set of each candidate event into a tree model, traversing multiple decision trees in the tree model, and determining a hit leaf node of the event feature set of each candidate event in the multiple decision trees; Accumulating the weights of the hit leaf nodes in the multiple decision trees to obtain an event prediction value for each candidate event; According to the event prediction value of each candidate event, each candidate event in the first candidate event set is sorted to obtain an event sorting list, and a second candidate event set is determined in the event sorting list.

10. The method according to claim 1, characterized in that The step of parsing the association relationship between the first query information, the first document set, and the second candidate event set based on the retrieval prompt text and the first search change feature, and outputting a first predicted event and a first association strength parameter between the first query information and the first predicted event, includes: constructing the retrieval prompt text, the first search change feature, the first query information, the first document set, and the second candidate event set as model input data of a language model, and converting the model input data into an input embedding feature sequence; The input embedded feature sequence is decoded by a decoder in the language model to output the first predicted event in the second candidate event set and a first association strength parameter between the first query information and the first predicted event.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: storing the first query information, the first predicted event, and the first association strength parameter in a data storage system; When receiving an information retrieval request, obtaining second query information carried in the information retrieval request; If the data storage system includes the second query information, obtaining a second predicted event of the second query information and a second correlation strength parameter between the second query information and the second predicted event in the data storage system; Obtain a set of associated documents of the second predicted event, sort the associated documents in the associated document set according to the second association strength parameter to obtain a document sorting list, and generate a first retrieval result of the information retrieval request according to the document sorting list.

12. The method according to claim 11, characterized in that The method further comprises: If the data storage system does not contain the second query information, obtaining a second search change feature of the second query information, and obtaining a second document set and a third candidate event set of the second query information; performing event filtering on the third candidate event set based on the second query information and the second search change feature to obtain a fourth candidate event set; the fourth candidate event set includes at least one associated event and an event association parameter between the at least one associated event and the second query information; Determining the associated event corresponding to the largest event association parameter in the fourth candidate event set as the target associated event of the second query information; generating a second search result of the information search request according to the target-associated event and an event association parameter between the second query information and the target-associated event; Invoking a language model to output the second predicted event for the second query information and the second association strength parameter between the second query information and the second predicted event based on the search prompt text, the second search change feature, the second query information, the second document set, and the fourth candidate event set; The second query information, the second predicted event, and the second association strength parameter are stored in the data storage system.

13. The method according to claim 11, characterized in that The method further comprises: Counting the storage time of the first predicted event and the first correlation strength parameter in the data storage system; If the storage duration is greater than or equal to the duration threshold, and the maximum event association parameter associated with the second candidate event set is greater than the parameter threshold, the language model is called to update the first predicted event and the first association strength parameter of the first query information in the data storage system.

14. The method according to claim 10, characterized in that The method further comprises: Acquire sample data, acquire sample query information contained in the sample data, and sample search data of the sample query information, and determine a sample search change feature of the sample query information based on the sample search data; Performing document retrieval on the sample query information to obtain a sample document set corresponding to the sample query information, and performing event retrieval on the sample query information to obtain a first sample event set corresponding to the sample query information; performing event filtering processing on the first sample event set according to the sample query information, the sample search change characteristics, and the sample document set to obtain a second sample event set; The retrieval prompt text, the sample search change feature, the sample query information, the sample document set and the second sample event set are used to construct sample input data for a pre-training model; In the pre-trained model, the association relationship between the sample query information, the sample document set, and the second sample event set is parsed according to the model input data, and a sample predicted event and a sample association strength parameter between the sample query information and the sample predicted event are output; According to the sample prediction event, the sample association strength parameter, and the label event and association strength label parameter contained in the sample data, the network parameters of the pre-trained model are modified to obtain the language model.

15. The method according to claim 14, characterized in that The obtaining of sample data includes: Acquire historical query information and a historical event set corresponding to the historical query information, wherein the historical event set includes at least one historical event and a historical correlation strength parameter between the historical query information and the at least one historical event; Acquire text semantic features of the historical query information, decode the text semantic features, and generate at least one associated query information; constructing the historical query information, the at least one historical event, and a historical correlation strength parameter between the historical query information and each historical event into a first sample; The at least one associated query information, the at least one historical event, and the historical association strength parameter between the historical query information and each historical event are constructed into a second sample, and the sample data is determined in the first sample and the second sample.

16. A data processing device, characterized in that: include: a data acquisition module, configured to acquire first query information and historical search data of the first query information, and determine a first search change feature of the first query information based on the historical search data; an event acquisition module, configured to perform a document search on the first query information to obtain a first document set corresponding to the first query information, and perform an event search on the first query information to obtain a first candidate event set corresponding to the first query information; a first screening module, configured to perform event filtering processing on the first candidate event set according to the first query information and the first search change feature to obtain a second candidate event set; The second screening module is used to obtain a retrieval prompt text, parse the association relationship between the first query information, the first document set and the second candidate event set based on the retrieval prompt text and the first search change feature, and output a first predicted event and a first association strength parameter between the first query information and the first predicted event; the first predicted event and the first association strength parameter are used to generate a retrieval result for the first query information.

17. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 15.

19. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 15 when being executed by a processor.