Data processing method and apparatus, and device and readable storage medium

By generating semantically relevant update query statements, the problem of low relevance and accuracy of retrieval results in existing technologies is solved, achieving efficient content retrieval and improved user experience.

WO2026031951A1PCT designated stage Publication Date: 2026-02-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2025/108109
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-05
Filing Date
2025-07-11
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

Existing retrieval technologies lack semantic understanding capabilities when handling complex queries, resulting in low relevance and accuracy of search results. Users need to adjust keywords multiple times to obtain the information they need, leading to low retrieval efficiency.

Method used

By generating contextual content vectors of historical interaction information, combining the initial query statement and historical query statements, the updated query statement is optimized. Using cross-attention processing and feature extraction techniques, semantically relevant updated query statements are generated and displayed in the search prompt box to guide users to search again.

Benefits of technology

It improves the accuracy and efficiency of content retrieval, reduces the number of times users need to adjust keywords, and enhances user experience and the relevance of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025108109_12022026_PF_FP_ABST
    Figure CN2025108109_12022026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a data processing method and apparatus, and a device and a readable storage medium. The method comprises: obtaining M candidate results which are sorted and displayed on a page, wherein the M candidate results are retrieved on the basis of an initial query statement; if an interaction operation meets a re-retrieval condition, acquiring historical interaction information, which comprises N historical query statements and a set of historical interaction results, wherein the N historical query statements comprise the initial query statement, and the set of historical interaction results comprises a candidate result which is included in an interaction record corresponding to an object; and generating context content vectors corresponding to the historical interaction results in the historical interaction information, and generating an updated query statement by means of the context content vectors and the N historical query statements, wherein the updated query statement is used for being displayed in a retrieval prompt box, and the retrieval prompt box is used for guiding the object to perform re-retrieval by means of the updated query statement. By means of the present application, the accuracy and efficiency of content retrieval can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device and equipment and readable storage medium

[0001] The present application claims priority to the Chinese patent application No. 202411067875.3, filed on August 5, 2024, entitled "Data processing method, device and equipment and readable storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of computer, in particular to a data processing method, device, equipment and readable storage medium. BACKGROUND

[0003] When a user searches for a certain problem, the user often does not understand the key words of the problem well. The existing retrieval technology is mainly based on key word matching, and has weak semantic understanding ability for queries. If the key words input by the user are inaccurate or not comprehensive, for example, the user inputs part of the key words of the problem or the synonyms of the key words in the problem, the key word matching cannot understand the structure of the phrase or sentence, and it is difficult to process some complex query expressions such as natural language queries and long-tail queries, which may lead to the inability to find relevant information, low relevance and accuracy of the retrieval results, and the inability to accurately capture the real intention of the user. At the same time, the search results of the existing technology often contain a large amount of information, and the user needs to spend time to screen and evaluate the content one by one, adjust the key words and perform multiple retrievals, which is low in retrieval efficiency. SUMMARY

[0004] The embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the accuracy and efficiency of content retrieval.

[0005] The embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the accuracy and efficiency of content retrieval.

[0006] M candidate results displayed in the page are obtained, the M candidate results are obtained based on the initial query statement, and M is a positive integer;

[0007] If the interactive operation for the page meets the candidate re-retrieval condition, historical interaction information is obtained; the historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements respectively; the N historical query statements include the initial query statement, the historical interaction results in the historical interaction result sets include interactive candidate results, the interactive candidate results are candidate results contained in the interactive records corresponding to the objects in the M candidate results, and N is a positive integer;

[0008] The context content vector corresponding to the historical interaction result in the historical interaction information is generated, the content text prompt corresponding to each historical query statement is generated through the context content vector and the N historical query statements, and the update query statement is generated based on the N content text prompts; the update query statement is used to be displayed in the retrieval prompt box in the page; and the retrieval prompt box is used to guide the object to re-retrieve through the update query statement.

[0009] The method further comprises the following steps:

[0010] The service time range is generated based on the query time of the initial query statement, and S service query statements in the service time range except the initial query statement are obtained; S is a positive integer;

[0011] The initial query statement is subjected to feature extraction to obtain an initial query vector, the S service query statements are subjected to feature extraction respectively to obtain S service query vectors, the initial query vector and the S service query vectors are subjected to cross-attention processing to obtain attention scores corresponding to the S service query vectors respectively, and the service query vector with an attention score greater than or equal to a score threshold is determined as a target service query vector, and the service query statement corresponding to the target service query vector is determined as a historical query statement.

[0012] The cross-attention processing of the initial query vector and the S service query vectors to obtain the attention scores corresponding to the S service query vectors comprises the following steps:

[0013] The S service query vectors are subjected to dot multiplication operation with a query parameter matrix to obtain a query vector, the S service query vectors are subjected to dot multiplication operation with a key parameter matrix to obtain a key vector, and the initial query vector is subjected to dot multiplication operation with a value parameter matrix to obtain a value vector;

[0014] The attention score vector is generated based on the query vector and the key vector, the attention score vector is subjected to dimension reduction processing based on the dimension of the key vector, the reduced attention score vector is subjected to normalization processing to obtain a normalized vector, the normalized vector is subjected to dot multiplication operation with the value vector to obtain the attention scores corresponding to the S service query vectors respectively.

[0015] The context content vector corresponding to the historical interaction result in the historical interaction information is generated, the content text prompt corresponding to each historical query statement is generated through the context content vector and the N historical query statements, and the update query statement is generated based on the N content text prompts; the update query statement is used to be displayed in the retrieval prompt box in the page; and the retrieval prompt box is used to guide the object to re-retrieve through the update query statement.

[0016] The interaction weight corresponding to the historical interaction result is generated based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, the content feature vector is obtained by feature extraction on the historical interaction result; the content feature vector is used to represent the context information of the historical interaction result;

[0017] The context content vector corresponding to the historical interaction result is generated based on the interaction weight and the content feature vector.

[0018] The interaction operation information includes T historical interaction results, and the T historical interaction results include a historical interaction result A i The interaction operation information includes a historical interaction result A i The interaction operation information includes a historical interaction result A i i is a positive integer less than or equal to T; and the interaction weight corresponding to the historical interaction result is generated based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, and includes:

[0019] The interaction operation type and the interaction operation duration of each unit interaction information in the interaction operation information B i The interaction score corresponding to the historical interaction result A i is determined;

[0020] When the interaction scores corresponding to the T historical interaction results are obtained, the sum of the interaction scores of the T historical interaction results is determined as an interaction total score, and the interaction weight corresponding to the historical interaction result A i is generated based on the interaction total score and the interaction score corresponding to the historical interaction result A i .

[0021] The content feature vector is obtained by performing feature extraction on the historical interaction result, and includes:

[0022] The word sequence corresponding to the historical interaction result is obtained by performing text splitting on the historical interaction result; one word in the word sequence is the smallest basic unit obtained after text information is processed by text splitting;

[0023] The word frequency embedding vector is obtained by performing feature extraction on the keyword frequency in the historical interaction result, the semantic embedding vector is obtained by respectively encoding the semantic information of each word in the historical interaction result, the position embedding vector is obtained by respectively encoding the position information of each word in the historical interaction result, and the paragraph embedding vector is obtained by respectively encoding the paragraph information of each word in the historical interaction result; the keyword frequency is the word frequency of the query keyword in the historical interaction result;

[0024] The content feature vector corresponding to the historical interaction result is generated based on the word frequency embedding vector, the semantic embedding vector, the position embedding vector and the paragraph embedding vector.

[0025] The number of context content vectors is T, and T is a positive integer; the N historical query sentences include a historical query sentence C i The T context content vectors include a historical query sentence C iQ corresponding context content vectors, Q being a positive integer less than or equal to T; generating a content text prompt corresponding to each of the historical query sentences respectively by using the context content vectors and the N historical query sentences, generating an updated query sentence based on the N content text prompts, comprising:

[0026] corresponding to the historical query sentence C i vector splicing on the Q corresponding context content vectors to obtain a historical query sentence C i corresponding to the historical query sentence C i corresponding to the historical query sentence C i generating a historical query sentence C i corresponding to the content text prompt;

[0027] When the N content text prompts corresponding to the N historical query sentences are obtained, generating an updated query sentence based on the N content text prompts.

[0028] The generating an updated query sentence based on the N content text prompts comprises:

[0029] generating a text prompt weight corresponding to each of the N content text prompts based on a query time sequence among the N historical query sentences;

[0030] generating an updated query sentence based on the N text prompt weights and the N content text prompts.

[0031] corresponding to the historical query sentence C i corresponding to the historical query sentence C i generating a historical query sentence C i corresponding to the content text prompt, comprising:

[0032] feature extraction on the historical query sentence C i to obtain a historical query sentence C i corresponding to the historical query feature vector D i self-attention processing on the historical query feature vector D i to obtain a historical query feature vector D i corresponding to the token score vector; the token score vector contains an attention score corresponding to each token in the historical query sentence C i ;

[0033] cross-attention processing on the historical query sentence C i corresponding to the global content vector and the historical query sentence C i corresponding to the token score vector to obtain a query prompt vector, and text decoding on the query prompt vector to obtain a historical query sentence C i corresponding to the content text prompt.

[0034] The retrieval prompt box is also used to display retrieval explanation text; the method further comprises:

[0035] based on the historical query statement C i corresponding Q context content vectors and the historical query statement C i corresponding content text prompts, the historical query statement C is generated i corresponding unit explanation text;

[0036] When the N unit explanation texts corresponding to the N historical query statements are obtained, retrieval explanation text for the updated query statement is generated based on the N unit explanation texts.

[0037] The method further comprises:

[0038] The interaction scores corresponding to the candidate results interacted by the object in the M candidate results are obtained; the interaction score is determined based on the interaction operation type and the interaction operation duration;

[0039] If the number of the candidate results interacted by the object is greater than or equal to the content quantity threshold value, and the interaction scores corresponding to the candidate results interacted by the object are all lower than the interaction score threshold value, it is determined that the interaction operation of the object on the page meets the re-retrieval condition.

[0040] The method further comprises:

[0041] The unit word frequency corresponding to each word element in the M candidate results is obtained, and the document weight corresponding to each of the M candidate results is generated based on the unit word frequency;

[0042] The retrieval score corresponding to each of the candidate results is generated based on the M document weights, and the M candidate results are displayed in the page based on the retrieval score.

[0043] The method further comprises:

[0044] The query keyword in the initial query statement is obtained, the keyword frequency corresponding to each of the M candidate results is obtained by performing word frequency statistics on the M candidate results based on the query keyword, and the relevance score corresponding to each of the M candidate results is generated based on the M keyword frequencies; the keyword frequency is the word frequency of the query keyword in the candidate result;

[0045] The inverse document frequency corresponding to the query keyword is obtained, the retrieval score corresponding to each of the candidate results is generated based on the inverse document frequency and the M relevance scores, and the M candidate results are displayed in the page based on the retrieval score.

[0046] The M candidate results include a target candidate result; the relevance score corresponding to each of the M candidate results is generated based on the M keyword frequencies, which comprises:

[0047] generate the adjustment factor based on the target document length of the target candidate result and the average document length of the M candidate results, and generate the relevance score corresponding to the target candidate result based on the adjustment factor and the keyword frequency corresponding to the target candidate result.

[0048] Further comprising:

[0049] obtain an object question text, perform feature extraction on the object question text to obtain an object question vector, and obtain N global content vectors respectively corresponding to N historical query statements corresponding to the update query statement; the object question text is input by the object in a search prompt box in the page for the update query statement, and the global content vector is generated based on a historical interaction result corresponding to the historical query statement;

[0050] perform cross-attention processing on the object question vector and the global content vector to obtain a question result vector, and generate a question result text based on the question result vector; the question result text is used to be displayed in the search prompt box in the page.

[0051] Embodiments of the present application provide a data processing apparatus, comprising:

[0052] An initial search module is configured to obtain M candidate results displayed in a page in a ranked manner, wherein the M candidate results are obtained based on an initial query statement, and M is a positive integer.

[0053] An information obtaining module is configured to obtain historical interaction information if an interaction operation with respect to the page meets candidate re-search conditions; the historical interaction information comprises N historical query statements and N historical interaction result sets respectively corresponding to the N historical query statements; the N historical query statements comprise the initial query statement, the historical interaction results in the historical interaction result sets comprise interaction candidate results, the interaction candidate results are candidate results contained in an interaction record corresponding to the object in the M candidate results, and N is a positive integer.

[0054] A statement updating module is configured to generate a context content vector corresponding to a historical interaction result in the historical interaction information, generate a content text prompt respectively corresponding to each historical query statement through the context content vector and the N historical query statements, and generate an update query statement based on the N content text prompts; the update query statement is used to be displayed in a search prompt box in the page; and the search prompt box is used to guide the object to perform re-search through the update query statement.

[0055] In a possible implementation manner, the initial query module is further configured to perform the following operation:

[0056] generate a business time range based on a query time of the initial query statement, and obtain S business query statements in the business time range except the initial query statement; S is a positive integer.

[0057] The initial query statement is subjected to feature extraction to obtain an initial query vector, S service query statements are subjected to feature extraction to obtain S service query vectors, cross-attention processing is performed on the initial query vector and the S service query vectors to obtain attention scores corresponding to the S service query vectors respectively, a service query vector with an attention score greater than or equal to a score threshold is determined as a target service query vector, and a service query statement corresponding to the target service query vector is determined as a historical query statement.

[0058] In a possible implementation, when the initial query module is used to perform cross-attention processing on the initial query vector and the S service query vectors to obtain attention scores corresponding to the S service query vectors respectively, the initial query module is specifically configured to perform the following operations:

[0059] The S service query vectors are subjected to dot multiplication operation with a query parameter matrix to obtain a query vector, the S service query vectors are subjected to dot multiplication operation with a key parameter matrix to obtain a key vector, and the initial query vector is subjected to dot multiplication operation with a value parameter matrix to obtain a value vector;

[0060] An attention score vector is generated based on the query vector and the key vector, the attention score vector is subjected to dimension reduction processing based on the dimension of the key vector, the dimension-reduced attention score vector is subjected to normalization processing to obtain a normalized vector, and the normalized vector is subjected to dot multiplication operation with the value vector to obtain the attention scores corresponding to the S service query vectors respectively.

[0061] In a possible implementation, when the statement updating module is used to generate the context content vector corresponding to the historical interaction result in the historical interaction information, the statement updating module is specifically configured to perform the following operations:

[0062] Based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, an interaction weight corresponding to the historical interaction result is generated, and the historical interaction result is subjected to feature extraction to obtain a content feature vector; the content feature vector is used to represent the context information of the historical interaction result.

[0063] The context content vector corresponding to the historical interaction result is generated based on the interaction weight and the content feature vector.

[0064] In a possible implementation, the interaction operation information includes H types of unit interaction information that are different from each other, the number of historical interaction results is T, and the T historical interaction results include a historical interaction result A i The interaction operation information includes interaction operation information B i corresponding to the historical interaction result A i, i is a positive integer less than or equal to T; the statement updating module is configured to, when generating the interaction weight corresponding to the historical interaction result based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, perform the following operations:

[0065] based on the interaction operation information B i interaction operation type and interaction operation duration of each unit interaction information, determine the interaction score corresponding to the historical interaction result A i ;

[0066] When the interaction scores corresponding to the T historical interaction results are obtained, the sum of the interaction scores of the T historical interaction results is determined as the interaction total score, and based on the interaction total score and the interaction score corresponding to the historical interaction result A i , the interaction weight corresponding to the historical interaction result A i is generated.

[0067] In a possible implementation, the statement updating module is configured to, when performing feature extraction on the historical interaction result to obtain the content feature vector, perform the following operations:

[0068] text splitting on the historical interaction result to obtain a word sequence corresponding to the historical interaction result; one word in the word sequence refers to the smallest basic unit obtained after text information is subjected to text splitting processing;

[0069] performing feature extraction on the keyword frequency in the historical interaction result to obtain a word frequency embedding vector, respectively encoding the semantic information of each word in the historical interaction result to obtain a semantic embedding vector, respectively encoding the position information of each word in the historical interaction result to obtain a position embedding vector, and respectively encoding the paragraph information of each word in the historical interaction result to obtain a paragraph embedding vector; the keyword frequency is the word frequency of the query keyword in the historical interaction result;

[0070] generating the content feature vector corresponding to the historical interaction result based on the word frequency embedding vector, the semantic embedding vector, the position embedding vector and the paragraph embedding vector.

[0071] In a possible implementation, the number of context content vectors is T, and T is a positive integer; the N historical query statements include the historical query statement C i , and the T context content vectors include the Q context content vectors corresponding to the historical query statement C i ; the statement updating module is configured to generate a content text prompt corresponding to each historical query statement through the context content vector and the N historical query statements, and generate an updated query statement based on the N content text prompts, and specifically perform the following operations:

[0072] The historical query sentence C i Vector splicing is performed on the corresponding Q context content vectors to obtain the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i And the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i The corresponding content text prompt;

[0073] When the N content text prompts corresponding to the N historical query sentences are obtained, the update query sentence is generated based on the N content text prompts.

[0074] In a possible implementation, when the sentence update module is used to generate the update query sentence based on the N content text prompts, the following operations are specifically performed:

[0075] Based on the query time sequence between the N historical query sentences, the text prompt weight corresponding to each of the N content text prompts is generated;

[0076] The update query sentence is generated based on the N text prompt weights and the N content text prompts.

[0077] In a possible implementation, when the sentence update module is used to generate the update query sentence based on the historical query sentence C i And the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i The corresponding content text prompt, the following operations are specifically performed:

[0078] Feature extraction is performed on the historical query sentence C i The historical query sentence C i The corresponding historical query feature vector D i Self-attention processing is performed on the historical query feature vector D i The historical query feature vector D i The corresponding token score vector; the token score vector includes an attention score corresponding to each token in the historical query sentence C i ;

[0079] Cross-attention processing is performed on the historical query sentence C i The corresponding global content vector and the historical query sentence C i The corresponding token score vector to obtain a query prompt vector, and text decoding is performed on the query prompt vector to obtain the historical query sentence C i The corresponding content text prompt.

[0080] In a possible implementation, the retrieval prompt box is further configured to display a retrieval explanation text; and the sentence updating module is further configured to perform the following operations:

[0081] based on the historical query sentences C i corresponding Q context content vectors and the historical query sentences C i corresponding content text prompts, generate the historical query sentences C i corresponding unit explanation texts.

[0082] When the N unit explanation texts corresponding to the N historical query sentences are obtained, the retrieval explanation text for the updated query sentence is generated based on the N unit explanation texts.

[0083] In a possible implementation, the content obtaining module is further configured to perform the following operations:

[0084] obtain an interaction score corresponding to each candidate result interacted by the object in the M candidate results; the interaction score is determined based on an interaction operation type and an interaction operation duration;

[0085] If the number of the candidate results interacted by the object is greater than or equal to the content quantity threshold value, and the interaction scores corresponding to the candidate results interacted by the object are all lower than the interaction score threshold value, it is determined that the interaction operation of the object on the page meets the re-retrieval condition.

[0086] In a possible implementation, the initial query module is further configured to perform the following operations:

[0087] obtain a unit word frequency corresponding to each word unit in the M candidate results, and generate a document weight corresponding to each candidate result based on the unit word frequency;

[0088] generate a retrieval score corresponding to each candidate result based on the M document weights, and display the M candidate results in the page based on the retrieval scores.

[0089] In a possible implementation, the initial query module is further configured to perform the following operations:

[0090] obtain a query keyword in the initial query sentence, perform word frequency statistics on the M candidate results based on the query keyword, obtain a keyword frequency corresponding to each candidate result, and generate a relevance score corresponding to each candidate result based on the M keyword frequencies; the keyword frequency is a word frequency of the query keyword in the candidate result.

[0091] obtain an inverse document frequency corresponding to the query keyword, generate a retrieval score corresponding to each candidate result based on the inverse document frequency and the M relevance scores, and display the M candidate results in the page based on the retrieval scores.

[0092] In a possible implementation, the M candidate results include a target candidate result; when the initial query module is used to generate the relevance scores corresponding to the M candidate results based on the M keyword frequencies, the initial query module is specifically configured to perform the following operations:

[0093] In a possible implementation, the sentence updating module is further configured to perform the following operations:

[0094] The object question text is input by the object in a search prompt box in the page for the update query sentence, and the global content vector is generated based on a historical interaction result corresponding to the historical query sentence;

[0095] The object question vector and the global content vector are cross-attention processed to obtain a question result vector, and a question result text is generated based on the question result vector; the question result text is displayed in the search prompt box in the page.

[0096] An embodiment of the present application provides a computer device, which comprises a processor, a memory and a network interface.

[0097] The processor is connected with the memory and the network interface, wherein the network interface is configured to provide a data communication function, the memory is configured to store a computer program, and the computer program is executed by the processor, so that the computer device executes the method provided in the embodiment of the present application.

[0098] An embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is adapted to be loaded and executed by a processor, so that a computer device having the processor executes the method provided in the embodiment of the present application.

[0099] An embodiment of the present application provides a computer program product, which comprises a computer program 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 executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.

[0100] The embodiment of the application performs content retrieval through an initial query statement, displays M candidate results in a page in a sorted manner, and obtains historical interaction information if the interaction operation of the object on the page meets the re-retrieval condition, wherein the historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements, the N historical query statements include the initial query statement, and the historical interaction result in the historical interaction result set includes a candidate result interacted by the object in the M candidate results. A context content vector corresponding to the historical interaction result in the historical interaction information is generated, an updated query statement is generated through the context content vector and the N historical query statements, a context content vector representing context information in each historical interaction result is generated through semantic understanding, the interaction history and query expression of the object are learned and understood through the N historical query statements, the N historical query statements are rewritten and optimized based on the context content vector, the real intention of the user can be better understood, and a semantic related updated query statement is obtained, therefore, the accuracy of content retrieval can be improved through the updated query statement for retrieval. When the interaction operation of the object on the page meets the re-retrieval condition, the system can actively display the updated query statement obtained through the rewriting method in the retrieval prompt box in the page, guide the object to re-retrieve through the updated query statement through the retrieval prompt box, and the object does not need to understand all the results and adjust the keywords to actively re-retrieve, thereby greatly improving the efficiency of content screening and content retrieval. BRIEF DESCRIPTION OF DRAWINGS

[0101] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0102] FIG. 1 is a network architecture diagram provided by an embodiment of the present application;

[0103] FIG. 2 is a data processing scene diagram one provided by an embodiment of the present application;

[0104] FIG. 3 is a flow diagram of a data processing method provided by an embodiment of the present application;

[0105] FIG. 4 is a data processing scene diagram two provided by an embodiment of the present application;

[0106] FIG. 5 is a flow diagram of a data processing method provided by an embodiment of the present application;

[0107] FIG. 6 is a structural diagram of a data processing device provided by an embodiment of the present application;

[0108] FIG. 7 is a structural schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0109] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0110] It can be understood that, in the specific embodiments of the present application, the user (object or player) data involved needs to be permitted or agreed by the user when the above and below embodiments of the present application are applied to specific products or technologies, and the collection, use and processing of the related data need to comply with the relevant laws, regulations and standards in the relevant region.

[0111] If the data of the object (such as the user) needs to be collected in the present application, a prompt interface or a pop-up window is displayed before and during the collection, the prompt interface or the pop-up window is used to prompt the user that some data is being collected at present, and only after the user issues a confirmation operation on the prompt interface or the pop-up window, the related steps of data acquisition are started to be executed, otherwise, it is ended. Moreover, the user data obtained is used in a reasonable and legal scenario or purpose. Optionally, in some scenarios where the user data needs to be used but has not been authorized by the user, the user can be requested to authorize, and the user data is used again when the authorization is passed.

[0112] Please refer to FIG. 1, which is a network architecture schematic diagram provided by an embodiment of the present application. As shown in FIG. 1, the network architecture can include a service server 100 and a terminal device cluster, which can include a terminal device 10a, a terminal device 10b, …, and a terminal device 10n. Any terminal device in the terminal device cluster can have a communication connection with the service server 100, for example, the terminal device 10a has a communication connection with the service server 100, and the terminal device 10b has a communication connection with the service server 100. The above communication connection is not limited to the connection mode, which can be directly or indirectly connected through a wired communication mode, or directly or indirectly connected through a wireless communication mode, or through other modes, which are not limited in the present application.

[0113] Each terminal device in the terminal device cluster can include a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart voice interaction device, a smart home appliance (e.g., a smart television), a wearable device, a vehicle-mounted terminal, an aircraft, or the like, which is a smart terminal having a data processing function. The vehicle-mounted terminal can be a terminal device in a smart transportation scenario and an auxiliary driving scenario. It should be understood that each terminal device in the terminal device cluster shown in FIG. 1 can be installed with an application client having a data processing function, and when the application client runs in each terminal device, data interaction can be performed between the application client and the service server 100 shown in FIG. 1.

[0114] The application client can specifically include a vehicle-mounted client, a smart home client, an entertainment client (e.g., a game client), a multimedia client (e.g., a video client), a social client, and an information client (e.g., a news client), and the like. The application client in the embodiments of the present application can be integrated in a certain client (e.g., a social client), or can be an independent client (e.g., a news client), and the type of the application client is not limited in the embodiments of the present application.

[0115] The service server 100 can be a server corresponding to the application client, and the service server 100 can be a physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and the like, basic cloud computing services.

[0116] As shown in FIG. 1, any one of the terminal devices in the terminal device cluster can send a content query request to the service server 100. Taking the terminal device 10a as an example, the terminal device 10a can send a content query request to the service server 100. The service server 100 can perform content retrieval based on an initial query statement in the content query request, obtain M candidate results, sort the M candidate results based on retrieval scores, and obtain a candidate result sequence. The initial query statement can be a query word or a query statement input by a user in the application client, which is used to express the information needs of the user. The retrieval score is determined based on the relevance between the candidate result and the initial query statement.

[0117] The business server 100 can send the candidate result sequence to the terminal device 10a, and the terminal device 10a can display the M candidate results in order in a page of an application client. The object can view the candidate results in the page, and if the interaction operation of the object on the page meets the re-search condition, the terminal device 10a can send a re-search request to the business server 100, and the business server 100 can obtain historical interaction information based on the re-search request. The historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements, and the N historical query statements include the initial query statement. The historical interaction result in the historical interaction result set includes a candidate result interacted by the object in the M candidate results. For example, if the number of candidate results interacted by the object reaches a certain number, it is determined that the interaction operation of the object on the page meets the re-search condition.

[0118] The business server 100 can generate a context content vector corresponding to each historical interaction result based on the historical interaction result, generate a content text prompt corresponding to each historical query statement based on the context content vector and the N historical query statements, and the content text prompt can be a prompt. The business server 100 can generate an updated query statement based on the N content text prompts. For example, the historical interaction result set can only include candidate results interacted by the object, and the N historical query statements can only include the initial query statement. The business server 100 can generate a plurality of context content vectors based on the candidate results interacted by the object, generate a content text prompt based on the context content vector, and generate an updated query statement corresponding to the initial query statement based on the content text prompt.

[0119] The business server 100 can send the updated query statement to the terminal device 10a, and the terminal device 10a can display a search prompt box in the page of the application client, display the updated query statement in the search prompt box in the page, and guide the object to perform re-search by the updated query statement through the search prompt box.

[0120] The embodiments of the present application generate an updated query statement based on a context content vector and N historical query statements, generate a context content vector representing context information in each historical interaction result based on semantic understanding, learn and understand the interaction history and query expression of the object based on the N historical query statements, rewrite and optimize the N historical query statements based on the context content vector, can better understand the real intention of the user, and obtain a semantic related updated query statement. Therefore, the accuracy of content search can be improved by searching through the updated query statement.

[0121] Please refer to FIG. 2, which is a schematic diagram of a data processing scenario according to an embodiment of the present application. As shown in FIG. 2, the service server can be the service server 100 shown in FIG. 1, and the terminal device can be any one of the terminal devices in the terminal device cluster shown in FIG. 1, for example, the terminal device 10a. In the terminal device 10a, the object can input an initial query statement for content search. The terminal device 10a can send a content query request to the service server 100. The service server 100 can perform content retrieval based on the initial query statement in the content query request, obtain M candidate results, sort the M candidate results based on retrieval scores, and obtain a candidate result sequence. The initial query statement can be a query word or a query statement input by the object (user) in the application client, which is used to express the information needs of the object. The retrieval score is determined based on the relevance between the candidate result and the initial query statement.

[0122] The service server 100 can send the candidate result sequence to the terminal device 10a. The terminal device 10a can sort and display the M candidate results in the page of the application client. As shown in the page 101, the application client can display the candidate result 1, the candidate result 2, the candidate result 3, and the candidate result 4 in the first page of the page. The object can view the candidate results in the page. As shown in the page 102, the object browses the candidate result 2. The terminal device 10a can record the interaction operation information of the object for the candidate result 2. The interaction operation information can include the interaction operation type and the interaction operation duration. The interaction operation type can be, for example, a browsing operation, a like operation, a comment operation, etc. The embodiments of the present application do not limit this.

[0123] As shown in the page 103, the object continues to view the candidate result 5, the candidate result 6, the candidate result 7, and the candidate result 8 in the second page of the page. The terminal device 10a obtains the interaction scores corresponding to the candidate results interacted by the object in the page. The interaction score is determined based on the interaction operation type and the interaction operation duration of the object. If the number of the candidate results interacted by the object is greater than or equal to the content quantity threshold, and the interaction scores corresponding to the candidate results interacted by the object are all less than the interaction score threshold (a pre-set value), it is determined that the interaction operation of the object for the page meets the re-retrieval condition. The terminal device 10a can send a re-retrieval request to the service server 100. The re-retrieval request can include the interaction operation information of the candidate results interacted by the object. If the number of the candidate results interacted by the object reaches a certain number, it is determined that the interaction operation of the object for the page meets the re-retrieval condition.

[0124] The service server 100 can obtain the historical interaction information based on the re-retrieval request. The historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements, the N historical query statements include the initial query statement, and the historical interaction result in the historical interaction result set includes a candidate result interacted by the object in the M candidate results.

[0125] The service server 100 can generate a context content vector corresponding to each historical interaction result based on the historical interaction result. The context content vector can include context information representing keyword frequency, distribution, and global semantics. The service server 100 can generate a content text prompt corresponding to each historical query statement based on the context content vector and the N historical query statements. The service server 100 can update the query statement based on the N content text prompts. For example, the N historical query statements can only include the initial query statement, and the object only interacts with candidate result 2, candidate result 3, and candidate result 5 in the page corresponding to the initial query statement. The service server 100 can generate context content vector 2 based on the context information corresponding to candidate result 2, generate context content vector 3 based on the context information corresponding to candidate result 3, and generate context content vector 5 based on the context information corresponding to candidate result 5. The service server 100 can generate a content text prompt based on context content vector 2, context content vector 3, and context content vector 5. The content text prompt can be a prompt, and the service server 100 can generate an updated query statement corresponding to the initial query statement based on the content text prompt.

[0126] The service server 100 can send the updated query statement to the terminal device 10a. As shown in page 104, the terminal device 10a can display a retrieval prompt box W in the page of the application client, display the updated query statement in the retrieval prompt box W in the page, and guide the object to re-retrieve through the updated query statement through the retrieval prompt box W. For example, the object can click the "confirm" control in the retrieval prompt box W, and the terminal device 10a can re-retrieve based on the updated query statement and display the candidate result obtained by the updated query statement.

[0127] The embodiment of the application can generate a context content vector corresponding to a historical interaction result in historical interaction information, generate an updated query statement through the context content vector and N historical query statements, and generate a context content vector representing context information in each historical interaction result through semantic understanding. The user's real intention can be better understood, and a semantic related updated query statement is obtained. The updated query statement has a wide range of applications in multiple fields. The updated query statement can be used for re-retrieval or content recommendation. For example, in a social media application, the updated query statement can identify the content preferences of a user according to the user's interests and behaviors, and recommend related videos or articles. In an automatic customer service system, the updated query statement can generate more accurate problem expressions according to the user's usage habits and consultation history information, improve the processing efficiency of artificial customer service, enhance the user experience, and make the service more personalized and intelligent.

[0128] Please refer to FIG. 3, which is a flowchart of a data processing method provided by an embodiment of the application. The data processing method can be executed by a computer device, which can be a business server 100 or any terminal device in a terminal device cluster as shown in FIG. 1, for example, a terminal device 10a. The following will be described by taking the data processing method executed by the computer device as an example. The data processing method can at least include the following steps S101-S103:

[0129] Step S101, obtaining M candidate results displayed in a page in a sequence, the M candidate results being retrieved based on an initial query statement, M being a positive integer;

[0130] Specifically, the computer device can perform content retrieval based on the initial query statement to obtain M candidate results, and sort the M candidate results based on retrieval scores to obtain the M candidate results displayed in the page in a sequence. The computer device can determine the M candidate results with a sorting relationship as a candidate result sequence. The initial query statement can be a query word or query statement input by an object (user) in an application client, used to express the information needs of the object. The retrieval score is determined based on the association degree between the candidate result and the initial query statement. The candidate result can be multimedia data, which can be a combination of multiple types of media information, such as documents, images, audio, video, etc.

[0131] The content sorting can be based on Term Frequency-Inverse Document Frequency (TF-IDF), Best Matching 25 (BM25), Embedding, etc., which is not limited in the embodiment of the application.

[0132] In step S102, if the interaction operation of the object on the page meets the candidate re-search condition, historical interaction information is obtained; the historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements; the N historical query statements include the initial query statement, and the historical interaction results in the historical interaction result sets include interaction candidate results, the interaction candidate results are candidate results contained in interaction records of the object corresponding to M candidate results, and N is a positive integer.

[0133] Specifically, the object can view the candidate results in the page, the object can interact with each candidate result in the page, and the computer device can detect whether the interaction operation of the object meets the re-search condition in the process of the interaction of the object. If the interaction operation of the object on the page meets the re-search condition, the computer device can obtain the historical interaction information based on the re-search request. The historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements, the N historical query statements include the initial query statement, and the historical interaction results in the historical interaction result sets include interaction candidate results. The interaction candidate results are candidate results contained in interaction records of the object corresponding to M candidate results, i.e., candidate results interacted by the object in the M candidate results. The interaction records can be browsing records, like records, collection records, and comment records of the object. The historical query statements can be other query statements associated with the initial query statement input by the object within a business time range determined by the initial query statement. The historical interaction result sets include results interacted by the object under the N historical query statements. The re-search condition can be a condition for prompting the object to re-search. If the number of candidate results interacted by the object reaches a certain number, it is determined that the interaction operation of the object on the page meets the re-search condition.

[0134] In step S103, a context content vector corresponding to the historical interaction result in the historical interaction information is generated, a content text prompt corresponding to each historical query statement is generated through the context content vector and the N historical query statements, and an updated query statement is generated based on the N content text prompts. The updated query statement is used to be displayed in a search prompt box in the page. The search prompt box is used to guide the object to re-search through the updated query statement.

[0135] Specifically, please also refer to FIG. 4, which is a schematic diagram of a data processing scenario according to an embodiment of the present application. As shown in FIG. 4, the computer device can obtain N historical query statements and a historical interaction result set from historical interaction information. The N historical query statements can include historical query statement 1, historical query statement 2, …, and historical query statement N. The computer device can generate a context content vector corresponding to each historical interaction result based on the historical interaction result. The context content vector can include context information representing keyword frequency, theme distribution, and global semantics. The computer device can generate a content text prompt corresponding to each historical query statement based on the context content vector and the N historical query statements. The content text prompt can be a prompt. An updated query statement can be generated based on N content text prompts. The N content text prompts can include content text prompt 1 corresponding to historical query statement 1, content text prompt 2 corresponding to historical query statement 2, …, and content text prompt N corresponding to historical query statement N. For example, the computer device can generate content text prompt 1 corresponding to historical query statement 1 based on historical query statement 1 and the context content vector corresponding to historical query statement 1.

[0136] The computer device can generate an updated query statement based on content text prompt 1, content text prompt 2, …, and content text prompt N. The updated query statement can be generated by a pre-trained large language model based on semantic understanding and rewriting of the N content text prompts. The large language model can be, for example, BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pretrained Transformer), etc. The updated query statement is displayed in a search prompt box in the page, which guides the user to re-search by using the updated query statement.

[0137] The embodiments of the present application can rewrite and optimize the context content vector and the N historical query statements by using a pre-trained large language model. When the user clicks on some search results (historical interaction results), the system can organize the content of the search results into a context, such as a context content vector, and input the large language model based on the context content vector. The large language model can rewrite the initial query statement or the N historical query statements according to the prompt to generate a more accurate and user-intended query expression. The process of generating an updated query statement can be a real-time feedback mechanism, which can enable the system to dynamically adjust the search strategy and continuously optimize the query and the results, thereby improving the relevance of the search and the user satisfaction.

[0138] It can be understood that the updated query statement can be recommended to the object in the form of a suggestion for the object to select and refer to. The object can directly use the rewritten query, or can further modify and improve it. The updated query statement can be used for the next round of retrieval to obtain more accurate and relevant results. The computer device can continuously record the interactive operation information of the object and the corresponding historical interaction results, repeatedly extract the context content vector corresponding to the historical interaction results, and realize dynamic optimization of the query and the results.

[0139] The embodiment of the application performs content retrieval through an initial query statement, displays M candidate results in a page in a sorted manner, and obtains historical interaction information if the interactive operation of the object on the page meets the re-retrieval condition. The historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements. The N historical query statements include the initial query statement, and the historical interaction results in the historical interaction result set include candidate results in the M candidate results that have been interacted with by the object. A context content vector corresponding to the historical interaction results in the historical interaction information is generated, an updated query statement is generated through the context content vector and the N historical query statements, a context content vector representing context information in each historical interaction result is generated through semantic understanding, the interactive history and query expression of the object are learned and understood through the N historical query statements, the N historical query statements are rewritten and optimized based on the context content vector, the real intention of the user can be better understood, and a semantically relevant updated query statement is obtained. Therefore, the accuracy of content retrieval can be improved through retrieval with the updated query statement. When the interactive operation of the object on the page meets the re-retrieval condition, the system can actively display the updated query statement obtained through the above method in a retrieval prompt box in the page, guide the object to re-retrieve through the updated query statement through the retrieval prompt box, and the object does not need to understand all the results and adjust the keywords to actively re-retrieve, greatly improving the efficiency of content screening and content retrieval.

[0140] Please refer to FIG. 5, which is a flowchart of a data processing method provided by an embodiment of the application. The data processing method can be executed by a computer device, which can be the business server 100 or any one of the terminal devices in the terminal device cluster shown in FIG. 1, for example, the terminal device 10a. The following will be described by taking the data processing method executed by the computer device as an example. The data processing method can at least include the following steps S201-S205:

[0141] In step S201, M candidate results displayed in a page are obtained. The M candidate results are obtained based on an initial query statement, and M is a positive integer.

[0142] Specifically, the computer device can perform content retrieval based on the initial query statement to obtain M candidate results, sort the M candidate results based on retrieval scores to obtain M candidate results for display in a page in a sorted manner, and determine the M candidate results with the sorted relationship as a candidate result sequence. The initial query statement can be a query word or query statement input by an object (user) in an application client to express information needs of the object. The retrieval score is determined based on the relevance of the candidate result to the initial query statement. The candidate result can be multimedia data, and can be a combination of multiple types of media information, such as documents, images, audio, video, and the like.

[0143] Optionally, the M candidate results can be obtained based on document frequency sorting, and the process can be: obtaining a unit term frequency corresponding to each term in the M candidate results, generating a document weight corresponding to each candidate result based on the unit term frequency, generating a retrieval score corresponding to each candidate result based on the M document weights, and displaying the M candidate results in the page based on the retrieval scores.

[0144] Specifically, the computer device can obtain a unit term frequency (Term Frequency) corresponding to each term in the M candidate results, and generate a document weight corresponding to each candidate result based on the unit term frequency. The document weight w i,j of the term i in the document j can be determined based on the unit term frequency and the inverse document frequency, and the calculation process can be as shown in formula (1): i,j

[0145] wherein the term i can be any term in the document (candidate result), tf i,j is the unit term frequency of the term i in the document j, M represents the total number of documents, df i represents the number of documents containing the term i in the document set, represents the inverse document frequency of the term i, and the inverse document frequency of the term i can also be represented as IDF(i).

[0146] The computer device can generate a retrieval score corresponding to each candidate result based on the M document weights w i,j , and the retrieval score can be generated based on the score of different terms i and the document weight w i,j . The computer device can display the M candidate results in the page based on the retrieval scores.

[0147] It can be understood that for the document j, a certain term only appears in this document, and the higher the importance, the higher the document weight w i,j ​The larger the document weight w i,j is, the lower the document weight w

[0148] Optionally, the M candidate results can be ranked based on the relevance probability, and the process can be: obtaining query keywords in the initial query statement, performing term frequency statistics on the M candidate results based on the query keywords to obtain keyword frequencies corresponding to the M candidate results respectively, generating relevance scores corresponding to the M candidate results respectively based on the M keyword frequencies, obtaining inverse document frequencies corresponding to the query keywords, generating retrieval scores corresponding to each candidate result respectively based on the inverse document frequencies and the M relevance scores, and displaying the M candidate results in the page based on the retrieval scores.

[0149] Specifically, for the initial query statement Q, the initial query statement Q can include query keywords q i , the computer device can perform term frequency statistics on the M candidate results (documents D) based on the query keywords to obtain keyword frequencies f(q i , D) corresponding to the M candidate results respectively, generate relevance scores corresponding to the M candidate results respectively based on the M keyword frequencies f(q i , D), obtain inverse document frequencies IDF(q i ) corresponding to each query keyword respectively, and the inverse document frequency IDF(q i ) can refer to the calculation method of the formula (1) above, and the embodiments of the present application will not be repeated here.

[0150] The computer device can generate retrieval scores score(D, Q) corresponding to each candidate result respectively based on the inverse document frequency IDF(q i ) and the M relevance scores, and display the M candidate results in the page based on the retrieval scores, and the calculation process can be as shown in formula (2):

[0151] Wherein, D represents a document, i.e. the M candidate results, |D| represents the length of the document D, avgdl represents the average length of the document set, and k1 and b are adjustment factors. k1 is used to adjust the influence of term frequency on the retrieval score, and the usual value range is 0.1 to 2.0. b is used to adjust the influence of the document length on the retrieval score, and the usual value range is 0.0 to 1.0.

[0152] It can be understood that the embodiments of the present application can input the initial query statement into a large language model, which can be, for example, a BERT model, a GPT model, etc., to improve the semantic understanding ability of the initial query, rather than directly using keyword matching to perform content retrieval. The large language model rewrites and expands the initial query statement to generate a semantically related query expression. This semantic level matching makes the retrieval result more accurate and comprehensive, makes up for the shortcomings of keyword matching, and improves the accuracy of content retrieval.

[0153] In step S202, if the interaction operation on the page meets the candidate re-search condition, historical interaction information is obtained; the historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements; the N historical query statements include the initial query statement, the historical interaction results in the historical interaction result set include interaction candidate results, the interaction candidate results are candidate results contained in the interaction records corresponding to the object in the M candidate results, and N is a positive integer;

[0154] Specifically, the object can view the candidate results in the page, the object can interact with each candidate result in the page, and the computer device can detect whether the interaction operation of the object meets the re-search condition in the process of the object interaction. If the interaction operation of the object on the page meets the re-search condition, the computer device can obtain the historical interaction information based on the re-search request. The historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements, the N historical query statements include the initial query statement, the historical interaction results in the historical interaction result set include interaction candidate results, and the interaction candidate results are candidate results contained in the interaction records corresponding to the object in the M candidate results, i.e., candidate results interacted by the object in the M candidate results. The interaction record can be the browsing record, the like record, the collection record, and the comment record of the object. The historical query statement can be another query statement associated with the initial query statement input by the object within the business time range determined by the initial query statement. The historical interaction result set includes results interacted by the object under the N historical query statements. The re-search condition can be a condition for prompting the object to re-search. If the number of candidate results interacted by the object reaches a certain number, it is determined that the interaction operation of the object on the page meets the re-search condition.

[0155] The process that the computer device determines whether the re-search condition is met can be: obtaining interaction scores respectively corresponding to candidate results interacted by the object in the M candidate results; the interaction score is determined based on the interaction operation type and the interaction operation duration; if the number of candidate results interacted by the object is greater than or equal to the content quantity threshold, and the interaction scores respectively corresponding to the candidate results interacted by the object are all lower than the interaction score threshold, it is determined that the interaction operation of the object on the page meets the re-search condition.

[0156] Specifically, the computer device can obtain interaction scores respectively corresponding to candidate results interacted by the object in the page, and the interaction score is determined based on the interaction operation type and the interaction operation duration corresponding to the object. In addition to explicit behaviors such as clicking, the interaction operation information can also integrate implicit behavior data such as mouse movement, scrolling, and staying.

[0157] Optionally, when the object switches the display page of the candidate result in the page, for example, when the next page is clicked, it can also be determined that the interaction operation of the object on the page meets the re-search condition, and when the object clicks the search box of the page to input or modify the initial query statement, it can also be determined that the interaction operation of the object on the page meets the re-search condition. The specific content of the re-search condition is not limited in the present application embodiment.

[0158] The determination method of the historical query statement is: generating a business time range based on the query time of the initial query statement, obtaining S business query statements in the business time range except the initial query statement; S is a positive integer; performing feature extraction on the initial query statement to obtain an initial query vector, performing feature extraction on the S business query statements to obtain S business query vectors, performing cross-attention processing on the initial query vector and the S business query vectors to obtain attention scores respectively corresponding to the S business query vectors, and determining a business query vector with an attention score greater than or equal to a score threshold as a target business query vector, and determining a business query statement corresponding to the target business query vector as the historical query statement.

[0159] Specifically, the computer device can generate a business time range based on the query time of the initial query statement, for example, the business time range can be the query time of the initial query statement to the time range one hour ago, the computer device can obtain S business query statements in the business time range except the initial query statement, perform feature extraction on the initial query statement to obtain an initial query vector, perform feature extraction on the S business query statements respectively to obtain S business query vectors, and perform cross-attention processing on the initial query vector and the S business query vectors to obtain attention scores corresponding to the S business query vectors respectively. The process of cross-attention processing on the initial query vector and the S business query vectors can be: performing dot product operation on the S business query vectors and the query parameter matrix to obtain a query vector, performing dot product operation on the S business query vectors and the key parameter matrix to obtain a key vector, and performing dot product operation on the initial query vector and the value parameter matrix to obtain a value vector; generating an attention score vector based on the query vector and the key vector, performing dimension reduction processing on the attention score vector based on the dimension of the key vector, performing normalization processing on the dimension-reduced attention score vector to obtain a normalized vector, and performing dot product operation on the normalized vector and the value vector to obtain the attention scores corresponding to the S business query vectors respectively.

[0160] Specifically, the computer device can perform dot product operation on the S business query vectors and the query parameter matrix W Q to obtain a query vector Q, perform dot product operation on the S business query vectors and the key parameter matrix W K to obtain a key vector K, and perform dot product operation on the initial query vector and the value parameter matrix W V to obtain a value vector V. The computer device can perform dot product operation on the transpose operation result K T of the query vector Q and the key vector K to obtain an attention score vector. Based on the dimension value d K of the key vector K, the square root of d Perform dimension reduction processing on the attention score matrix, perform normalization processing softmax on the dimension-reduced attention score vector to obtain a normalized vector, and perform dot product operation on the normalized vector and the value vector V to obtain the attention scores corresponding to the S business query vectors respectively, which can be as shown in formula (3):

[0161] In step S203, based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, an interaction weight corresponding to the historical interaction result is generated, feature extraction is performed on the historical interaction result to obtain a content feature vector, the content feature vector is used to represent the context information of the historical interaction result, and a context content vector corresponding to the historical interaction result is generated based on the interaction weight and the content feature vector.

[0162] Specifically, computer devices can generate interaction weights corresponding to historical interaction results based on the interaction operation information corresponding to historical interaction results in historical interaction information. Here, the interaction operation information includes H different types of unit interaction information, and the number of historical interaction results is T, where T historical interaction results include historical interaction result A. i Interactive operation information includes historical interaction results A i Corresponding interactive operation information B i , where i is a positive integer less than or equal to T.

[0163] The process by which a computer device generates interaction weights corresponding to historical interaction results based on interaction operation information corresponding to historical interaction results in historical interaction information can be as follows: Based on interaction operation information B i The interaction type and duration of each unit's interactive information are used to determine the historical interaction result A. i The corresponding interaction score; when the interaction scores corresponding to T historical interaction results are obtained, the sum of the interaction scores of the T historical interaction results is determined as the total interaction score, based on the total interaction score and the historical interaction results A. i The corresponding interaction score generates historical interaction result A. i The corresponding interaction weights.

[0164] Specifically, object A represents the historical interaction result. i All interactive operations can correspond to one interactive operation information, and each interactive operation can correspond to one unit of interactive information. Each interactive operation can include an interactive operation type and an interactive operation duration. The interactive operation type can be, for example, a browsing operation, a liking operation, a commenting operation, etc., and this embodiment of the application does not impose any limitations.

[0165] It's understandable that interactive operation information, in addition to explicit behaviors like clicking, can also incorporate implicit behavioral data such as mouse movement, scrolling, and hovering to comprehensively understand user intent. Computer devices can also utilize computer vision technology to analyze multimedia information such as images and videos viewed by the user, extract visual features, and perform auxiliary intent recognition, thereby generating interaction weights that better match the user's intent.

[0166] Computer devices can be based on interactive operation information B i The interaction type and duration of each unit's interactive information are used to determine the historical interaction result A. i The corresponding interaction score. For example, browsing for 1 minute or less can be worth 10 points, while browsing for more than 1 minute can be worth 20 points. A "like" action on a viewed document can be worth 20 points, while a "like" or "comment" action can be worth 10 points. (Historical interaction result A) i The corresponding interaction score can be the sum of the scores of all interactive operations.

[0167] When the interaction scores corresponding to the T historical interaction results are obtained, the computer device can determine the sum of the interaction scores of the T historical interaction results as an interaction total score, and determine the interaction score of the historical interaction result A i corresponding to the interaction score based on the interaction total score and the historical interaction result A i corresponding to the interaction score, the higher the interaction weight, the more interactions the object has with the historical interaction result.

[0168] The computer device can perform feature extraction on the historical interaction result to obtain a content feature vector, wherein the content feature vector is used to represent the context information of the historical interaction result. The process of feature extraction on the historical interaction result can be: performing text splitting on the historical interaction result to obtain a word sequence corresponding to the historical interaction result; a word in the word sequence is the smallest basic unit obtained after text splitting of the text information; performing feature extraction on the keyword frequency in the historical interaction result to obtain a word frequency embedding vector, respectively encoding the semantic information of each word in the historical interaction result to obtain a semantic embedding vector, respectively encoding the position information of each word in the historical interaction result to obtain a position embedding vector, respectively encoding the paragraph information of each word in the historical interaction result to obtain a paragraph embedding vector; the keyword frequency is the word frequency of the query keyword in the historical interaction result; and generating the content feature vector corresponding to the historical interaction result based on the word frequency embedding vector, the semantic embedding vector, the position embedding vector and the paragraph embedding vector.

[0169] Specifically, the computer device can perform text splitting on the historical interaction result to obtain a word sequence corresponding to the historical interaction result. The text splitting can be to split and encode the text information into tokens by a Tokenizer tokenizer, for example, a certain text information A in the historical interaction result is “Let’s do tokenization!”, the word sequence corresponding to the text information A can be represented as [Let,’s, do, token, ization]. Among them, [Let,’s], [do], [token] and [ization] are tokens. A token in the word sequence is the smallest basic unit obtained after splitting of the text information. The method of text splitting can be based on word splitting (word-based), character-based splitting (character-based), subword-based splitting (subword-based), which is not limited in the embodiment of the application.

[0170] The computer device can perform feature extraction on the keyword frequency in the historical interaction result to obtain a word frequency embedding vector. Taking the text information A containing word 1, word 2, word 3 and word 4 as an example, the word frequency embedding can embed the text information A into E TF1 , ETF2 , E TF3 and E TF4 , the word frequency embedding can represent the word frequency of each token in the text information A respectively, wherein the key word frequency is the word frequency of the query keyword in the historical interaction result. The computer device can respectively encode the semantic information of each token in the historical interaction result to obtain a semantic embedding vector, and the semantic embedding can embed the text information A into E 词元1 , E 词元2 , E 词元3 and E 词元4 . The semantic embedding can represent the semantic encoding of each token in the text information A respectively.

[0171] The computer device can respectively encode the position information of each token in the historical interaction result to obtain a position embedding vector, and the position embedding can embed the text information A into E1, E2, E3and E4, which is used to capture the position order of each token in the text information A and understand the semantic structure. The computer device can respectively encode the paragraph information of each token in the historical interaction result to obtain a paragraph embedding vector, and the paragraph embedding can embed the text information A into E A , E A , E A and E A , which is used to distinguish different paragraphs and sentences in the text information A. If the embedding of each token is continuous and same, it is the same sentence. If the paragraph embedding of the text information A is E A , E A , E B and E B , E A and E A part represents a sentence, E B and E B part represents another sentence.

[0172] The computer device performs vector splicing based on the word frequency embedding vector, the semantic embedding vector, the position embedding vector and the paragraph embedding vector to obtain a content feature vector corresponding to the historical interaction result. The text feature encoding can be realized by the BERT model, which is not limited in the embodiments of the present application.

[0173] Step S204, generating an updated query statement through the context content vector and the N historical query statements;

[0174] Specifically, the number of context content vectors can be T, T is a positive integer, and the N historical query statements can include historical query statements C i , the T context content vectors include Q context content vectors corresponding to the historical query statement C i The computer device can respectively encode the position information of each token in the historical interaction result to obtain a position embedding vector, and the position embedding can embed the text information A into E1, E2, E3and E4, which is used to capture the position order of each token in the text information A and understand the semantic structure. The computer device can respectively encode the paragraph information of each token in the historical interaction result to obtain a paragraph embedding vector, and the paragraph embedding can embed the text information A into Ei The corresponding Q context content vectors are vector spliced to obtain a historical query statement C i The corresponding global content vector is based on the historical query statement C i And the historical query statement C i The process of the corresponding global content vector can be: performing feature extraction on the historical query statement C i to obtain the historical query statement C i The corresponding historical query feature vector D i , the historical query feature vector D i is self-attention processed to obtain the historical query feature vector D i The corresponding token score vector; the token score vector contains each token in the historical query statement C i corresponding attention score; the historical query statement C i The corresponding global content vector and the historical query statement C i The corresponding token score vector is cross-attention processed to obtain a query prompt vector, and the query prompt vector is text decoded to obtain a historical query statement C i The corresponding content text prompt.

[0175] Specifically, the computer device can generate a context content vector corresponding to each historical interaction result based on the historical interaction result. The context content vector can include context information representing keyword frequency, theme distribution, and global semantics. The computer device can generate a content text prompt corresponding to each historical query statement through the context content vector and N historical query statements. The content text prompt can be a prompt. An updated query statement is generated based on N content text prompts. The N content text prompts can include a content text prompt 1 corresponding to a historical query statement 1, a content text prompt 2 corresponding to a historical query statement 2, …, and a content text prompt N corresponding to a historical query statement N. For example, the computer device can generate a content text prompt 1 corresponding to a historical query statement 1 through the historical query statement 1 and the context content vector corresponding to the historical query statement 1.

[0176] Taking a historical query statement C i in N historical query statements as an example, the computer device can perform feature extraction on the historical query statement C i to obtain the historical query statement C i corresponding historical query feature vector D i , the historical query feature vector D i is self-attention processed to obtain the historical query feature vector D i The corresponding token score vector. The token score vector contains each token in the historical query statement C iThe attention score corresponding to each word element.

[0177] Computer devices can process historical query statements C i The corresponding global content vector and historical query statement C i The corresponding word segment score vectors are subjected to cross-attention processing to obtain the query suggestion vector. The query suggestion vector is then decoded to obtain the historical query statement C. i The corresponding content text prompts generate historical query statements C. i The corresponding text prompt i The process can be shown in formula (4): prompt i =f(Q,D) Ci = [Q; A1; A2; ...; A n ] Formula (4)

[0178] Among them, D Ci In the historical query statement C i The following retrieves the historical interaction results, where Q represents the initial query statement and C represents the historical query statements. i The retrieved historical interaction results include historical interaction result A1, historical interaction result A2, ..., historical interaction result A n f represents the prompt constructor, and [;] represents the vector concatenation operation.

[0179] Computer devices can process historical query statements C i The following retrieved historical interaction results are A1, A2, ..., A1. n Perform vector concatenation to obtain the historical query statement C. i The corresponding global content vector, for historical query statement C i Feature extraction is performed to obtain historical query statement C. i The corresponding historical query feature vector D i For the historical query feature vector D i Perform self-attention processing to obtain the historical query feature vector D. i The corresponding lexical score vector. Cross-attention processing is performed on the global content vector and the lexical score vector to obtain each historical interaction result and historical query statement C. i The attention score corresponding to each word element is used to identify word elements with attention scores greater than or equal to a certain threshold as prompt keywords.

[0180] The prompt constructor function can be a natural language template, which can be "Please explain [Q] in detail, [x1] of [Q], [x2] of [Q], …". Wherein, Q is an initial query statement, x1, x2 are prompt keywords, for example, Q can be "What is ESG data", the computer device can generate a prompt keyword x1 based on the historical query statement C i The generated prompt keyword x1 can be "E refers to Environmental, S refers to Social, and G refers to Governance", and the prompt keyword x2 can be "ESG data is data used to measure the impact of organizations on the environment and society". Then based on the historical query statement C i The constructed content text prompt can be "Please explain in detail what ESG data is, E in ESG data refers to Environmental, S refers to Social, and G refers to Governance, and ESG data is data used to measure the impact of organizations on the environment and society", and the specific content of the prompt constructor function is not limited in this embodiment.

[0181] When the N content text prompts corresponding to the N historical query statements are obtained, the computer device can generate an updated query statement Q' based on the N content text prompts, which can be inputting multiple prompts into a LM (Language Model) model to obtain an output result, and determining the output result as the updated query statement Q', the process can be as shown in formula (5): Q' = LM (prompt1, prompt2, …, prompt n ) Formula (5)

[0182] Wherein, LM represents a language generation function of a large language model.

[0183] The large language model can receive multiple prompts, and the multiple prompts can be used to guide the large language model to generate text that rewrites the initial query statement Q. The large language model can parse the keywords and phrases in the prompt, understand their semantics and context, and convert the prompt into semantic representations such as word embeddings, respectively. The large language model can perform cross-attention processing on the word embeddings of each prompt to obtain fusion features of the multiple prompts, and decode the fusion features to generate an updated query statement Q'. The updated query statement can be generated by a pre-trained large language model based on context content vectors and N historical query statements for semantic understanding and rewriting. The large language model can be a BERT model, a GPT model, etc., wherein the updated query statement is displayed in a search prompt box in the page, and the search prompt box is used to guide the object to re-search through the updated query statement.

[0184] The embodiment of the application can rewrite and optimize the context content vector and the N historical query sentences through the pre-trained large language model. When the object clicks some search results (historical interaction results), the system can organize the content of the search results into a context, which can be a context content vector for example, and form a prompt input large language model based on the context content vector. The large language model can rewrite the initial query sentence or the N historical query sentences according to the prompt to generate a more accurate and user-intended query expression. The process of generating an updated query local area can be a real-time feedback mechanism, which can enable the system to dynamically adjust the retrieval strategy and continuously optimize the query and the result, thereby improving the relevance of the retrieval and the user satisfaction.

[0185] The large language model can customize the query rewriting according to the historical behavior (interaction operation information) of the user and the context information (context content vector). Different users can have different intentions and preferences under the same query, and the large language model can learn the characteristics of the object and the interaction history to perform personalized rewriting and optimization of the query and more accurate understanding and rewriting. This personalized and context-aware retrieval method can provide the user with a more considerate and intelligent search experience.

[0186] Optionally, the computer device can assign different text prompt weights to the historical query sentences of different query times, generate an updated query sentence Q' based on the N content text prompts and the corresponding weights, and the process can be: based on the query time sequence between the N historical query sentences, generate N content text prompts respectively corresponding to the text prompt weights; based on the N text prompt weights and the N content text prompts, generate an updated query sentence.

[0187] Specifically, the computer device can generate N content text prompts respectively corresponding to the text prompt weights coef i based on the query time sequence between the N historical query sentences. i The prompt and guide the attention of the LM model to the N content text prompts, thereby generating an updated query sentence based on the N text prompt weights and the N content text prompts.

[0188] The computer device can display the updated query sentence in the retrieval prompt box in the page, and guide the object to re-retrieve through the updated query sentence through the retrieval prompt box. For example, the retrieval prompt box can display "Do you want to search the updated query sentence: Confirm / Cancel", and the object can click the "Confirm" control in the retrieval prompt box, and the computer device can re-retrieve based on the updated query sentence and display the candidate results obtained by the updated query sentence retrieval.

[0189] Optionally, the search prompt box is further configured to display a search explanation text, and a process of displaying the search explanation text can be: based on the historical query statement C i corresponding to the Q context content vectors and the historical query statement C i corresponding to the content text prompt, the historical query statement C i corresponding to the unit explanation text; when the N unit explanation texts corresponding to the N historical query statements are obtained, the search explanation text for the updated query statement is generated based on the N unit explanation texts.

[0190] Specifically, the computer device can generate the search explanation text based on the historical query statement C i corresponding to the Q context content vectors and the historical query statement C i corresponding to the content text prompt, the historical query statement C i corresponding to the unit explanation text, the unit explanation text can explain the historical query statement C i corresponding to the content text prompt is generated based on what information in the historical interaction result.

[0191] When the N unit explanation texts corresponding to the N historical query statements are obtained, the search explanation text for the updated query statement is generated based on the N unit explanation texts. The search explanation text can explain what information in the historical interaction result is used to generate the updated query statement. For example, the search explanation text can be “You just collected the historical interaction result A, the content related to the initial query statement in the historical interaction result A is the keyword B, do you want to search the keyword B through the updated query statement?”.

[0192] Optionally, if the computer device detects a frequently co-occurring query combination in the N historical query statements, for example, the keyword A is included in the N historical query statements, and other objects searching for the keyword A generally also search for the keyword B, the computer device can actively recommend the object to search for the keyword B.

[0193] It can be understood that the embodiments of the present application can show the key factors and weights in the query rewriting, result sorting and other processes through the search explanation text, and improve the transparency of the system. The search result can be improved in interpretability, and the object can be shown why a certain result is considered relevant, which can enhance the object's trust and understanding of the system.

[0194] In step S205, the object question text is obtained, feature extraction is performed on the object question text to obtain an object question vector, and N global content vectors corresponding to the N historical query statements corresponding to the update query statement are obtained. The object question text is input by the object in the search prompt box in the page for the update query statement. The global content vector is generated based on the historical interaction result corresponding to the historical query statement. Cross-attention processing is performed on the object question vector and the global content vector to obtain a question result vector, and a question result text is generated based on the question result vector. The question result text is displayed in the search prompt box in the page.

[0195] Specifically, the search prompt box can also be used for question and answer dialogue. The computer device can obtain an object question text, perform feature extraction on the object question text, and obtain an object question vector. The object question text is input by the object in the search prompt box in the page for the update query statement.

[0196] The computer device can obtain N global content vectors corresponding to N historical query statements corresponding to the update query statement. The global content vector is generated based on the historical interaction result corresponding to the historical query statement. The computer device can perform cross-attention processing on the object question vector and the global content vector to obtain a question result vector, generate a question result text based on the question result vector, and display the question result text in the search prompt box in the page. For example, the object can input a question through the search prompt box, such as “What are the keywords related to {initial query statement}?” The computer device can answer the question input by the object through the question result text, such as “The keywords related to {initial query statement} include keyword A and keyword B. Keyword A refers to …, and keyword B refers to …”

[0197] It can be understood that the embodiments of the present application provide a user interface that is intuitive and friendly through the search prompt box, and can provide diversified interaction modes such as natural language query, multi-round dialogue, and visual feedback, so that users can more conveniently and naturally express search requirements. By introducing an intelligent question and answer and dialogue system, users can interact with the system in the form of dialogue to obtain smooth and coherent replies, and provide a more personalized and intelligent search experience. Users can not only search by inputting simple keywords, but also express their requirements in natural language and interact with the system in multiple rounds of dialogue. A large language model can understand the user's questions and feedback, provide intelligent query rewriting and result optimization suggestions, and guide the user to find the required information. This intelligent and interactive user experience makes the search process more natural and efficient. The embodiments of the present application can also achieve search control through the object question text, allowing users to customize and adjust search strategies such as setting filtering conditions and adjusting relevance weights, giving users more control and improving the feasibility of the embodiments of the present application.

[0198] To evaluate the effectiveness of the embodiments of the present application, we conducted experiments on multiple domain datasets and compared them with traditional retrieval methods. The experimental results show that the present application has achieved significant improvement in retrieval accuracy, user satisfaction and other indicators. In terms of retrieval accuracy: use MAP (Mean Average Precision), NDCG (Normalized Discounted Cumulative Gain) and other indicators to evaluate the relevance of the retrieval results. The present application method improves the MAP and NDCG indicators by an average of 10%-20% on different datasets. In terms of user satisfaction: through user research and feedback collection, the satisfaction degree of users to the retrieval results is counted. The user satisfaction of the present application method is improved by an average of 15%-25%, and the user feedback is more positive and positive. In terms of query rewriting quality: manually evaluate the relevance and intention consistency of the rewritten query and the original query. The rewritten query generated by the present application method has an average of 80%-90% in relevance and intention consistency.

[0199] The embodiment of the application performs content retrieval through an initial query statement, sorts and displays M candidate results in a page, and can input the initial query statement into a large language model. The large language model can be, for example, a BERT model, a GPT model, etc. The semantic understanding ability of the initial query is improved, and the content retrieval is not directly performed by using the keyword matching method. The large language model rewrites and expands the initial query statement to generate a semantically related query expression. This semantic level matching makes the retrieval result more accurate and comprehensive, makes up for the shortcomings of keyword matching, and improves the accuracy of content retrieval. If the interaction operation of the object on the page meets the re-retrieval condition, the historical interaction information is obtained, the historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements, the N historical query statements include the initial query statement, and the historical interaction result in the historical interaction result set includes a candidate result interacted by the object in the M candidate results. A context content vector corresponding to the historical interaction result in the historical interaction information is generated, an updated query statement is generated through the context content vector and the N historical query statements, a context content vector representing context information in each historical interaction result is generated through semantic understanding, the interaction history and query expression of the object are learned and understood through the N historical query statements, the N historical query statements are rewritten and optimized based on the context content vector, the real intention of the user can be better understood, and a semantically related updated query statement is obtained. Therefore, the accuracy of content retrieval can be improved through the updated query statement, the context content vector and the N historical query statements are rewritten and optimized through the pre-trained large language model. When the object clicks some search results (historical interaction results), the system can organize the content of the search results into a context, for example, a context content vector, and form a prompt to input the large language model based on the context content vector. The large language model can rewrite the initial query statement or the N historical query statements according to the prompt to generate a more accurate and user-intended query expression. The process of generating an updated query can be a real-time feedback mechanism, which can enable the system to dynamically adjust the retrieval strategy and continuously optimize the query and the result, thereby improving the relevance of the retrieval and the user satisfaction.

[0200] The embodiment of the present application provides a design intuitive and friendly user interface through the search prompt box, can provide diversified interactive modes such as natural language query, multi-round dialogue, visual feedback, etc., so that the user can more conveniently and naturally express the search requirement. When the interactive operation of the object to the page meets the re-search condition, the system can actively display the updated query statement obtained by rewriting through the above method in the search prompt box in the page, and guide the object to re-search through the updated query statement through the search prompt box, without the object understanding all the results and adjusting the keywords to actively re-search, greatly improving the efficiency of content screening and content search. By introducing the intelligent question and answer and dialogue system, the user can interact with the system in the form of dialogue, obtain smooth and coherent replies, and provide a more personalized and intelligent search experience. The user can not only search through simple keyword input, but also express the requirement by using natural language, and carry out multi-round dialogue and interaction with the system. The large language model can understand the problem and feedback of the user, provide intelligent query rewriting and result optimization suggestions, and guide the user to find the required information. Such intelligent and interactive user experience makes the search process more natural and efficient. The embodiment of the present application can also realize search control through the object problem text, allow the user to customize and adjust the search strategy, such as setting the filtering condition, adjusting the relevance weight, etc., give the user more control, and improve the feasibility of the embodiment of the present application.

[0201] Please refer to FIG. 6, which is a structural schematic diagram of a data processing apparatus according to an embodiment of the present application. As shown in FIG. 6, the data processing apparatus 1 comprises an initial search module 510, an information acquisition module 520 and a statement updating module 530.

[0202] The initial search module 510 is configured to obtain M candidate results displayed in a sequence in a page, wherein the M candidate results are obtained based on an initial query statement, and M is a positive integer.

[0203] The information acquisition module 520 is configured to acquire historical interaction information if the interactive operation to the page meets candidate re-search conditions, wherein the historical interaction information comprises N historical query statements and historical interaction result sets corresponding to the N historical query statements respectively, the N historical query statements comprise the initial query statement, the historical interaction results in the historical interaction result sets comprise interactive candidate results, the interactive candidate results are candidate results contained in interactive records corresponding to the object in the M candidate results, and N is a positive integer.

[0204] The sentence updating module 530 is configured to generate a context content vector corresponding to a historical interaction result in the historical interaction information, generate a content text prompt corresponding to each historical query sentence respectively by using the context content vector and the N historical query sentences, and generate an updated query sentence based on the N content text prompts; the updated query sentence is used to be displayed in a search prompt box in the page; and the search prompt box is used to guide the object to perform re-search by using the updated query sentence.

[0205] In a possible implementation, the initial query module is further configured to perform the following operation:

[0206] generate a business time range based on a query time of the initial query sentence, and obtain S business query sentences in the business time range except the initial query sentence; S is a positive integer;

[0207] perform feature extraction on the initial query sentence to obtain an initial query vector, perform feature extraction on the S business query sentences respectively to obtain S business query vectors, perform cross-attention processing on the initial query vector and the S business query vectors to obtain attention scores corresponding to the S business query vectors respectively, determine a business query vector with an attention score greater than or equal to a score threshold as a target business query vector, and determine a business query sentence corresponding to the target business query vector as a historical query sentence.

[0208] In a possible implementation, when the initial query module is configured to perform cross-attention processing on the initial query vector and the S business query vectors to obtain attention scores corresponding to the S business query vectors respectively, the initial query module is specifically configured to perform the following operation:

[0209] perform dot multiplication operation on the S business query vectors and a query parameter matrix to obtain a query vector, perform dot multiplication operation on the S business query vectors and a key parameter matrix to obtain a key vector, and perform dot multiplication operation on the initial query vector and a value parameter matrix to obtain a value vector;

[0210] generate an attention score vector based on the query vector and the key vector, perform dimension reduction processing on the attention score vector based on a dimension of the key vector, perform normalization processing on the dimension-reduced attention score vector to obtain a normalized vector, and perform dot multiplication operation on the normalized vector and the value vector to obtain the attention scores corresponding to the S business query vectors respectively.

[0211] In a possible implementation, when the sentence updating module 530 is configured to generate a context content vector corresponding to a historical interaction result in the historical interaction information, the sentence updating module 530 is specifically configured to perform the following operation:

[0212] The content feature vector is used to represent context information of the historical interaction result.

[0213] The context content vector corresponding to the historical interaction result is generated based on the interaction weight and the content feature vector.

[0214] In a possible implementation, the interaction operation information includes T unit interaction information of T different interaction operation types, and the number of historical interaction results is T, and the T historical interaction results include a historical interaction result A i The interaction operation information includes historical interaction result A i corresponding interaction operation information B i , i is a positive integer less than or equal to T; when the statement updating module 530 is used to generate the interaction weight corresponding to the historical interaction result based on the interaction operation information corresponding to the historical interaction result in the historical interaction information, the following operations are specifically performed:

[0215] Based on the interaction operation type and the interaction operation duration of each unit interaction information in the interaction operation information B i , the interaction score corresponding to the historical interaction result A i is determined;

[0216] When the interaction scores corresponding to the T historical interaction results are obtained, the sum of the interaction scores of the T historical interaction results is determined as an interaction total score, and based on the interaction total score and the interaction score corresponding to the historical interaction result A i , the interaction weight corresponding to the historical interaction result A i is generated.

[0217] In a possible implementation, when the statement updating module 530 is used to extract features from the historical interaction result to obtain a content feature vector, the following operations are specifically performed:

[0218] Text splitting is performed on the historical interaction result to obtain a word sequence corresponding to the historical interaction result; one word in the word sequence is a smallest basic unit obtained after text splitting processing on text information;

[0219] Feature extraction is performed on keyword frequency in the historical interaction result to obtain a word frequency embedding vector, semantic information of each word in the historical interaction result is encoded respectively to obtain a semantic embedding vector, position information of each word in the historical interaction result is encoded respectively to obtain a position embedding vector, and paragraph information of each word in the historical interaction result is encoded respectively to obtain a paragraph embedding vector; the keyword frequency is the word frequency of a query keyword in the historical interaction result;

[0220] Content feature vectors corresponding to historical interaction results are generated based on word frequency embedding vectors, semantic embedding vectors, positional embedding vectors, and paragraph embedding vectors.

[0221] In one possible implementation, the number of context content vectors is T, where T is a positive integer; N historical query statements include historical query statement C. i The T context content vectors include historical query statements C i The corresponding Q context content vectors, where Q is a positive integer less than or equal to T; the statement update module 530 is used to generate content text prompts for each historical query statement based on the context content vectors and N historical query statements. When generating the update query statement based on the N content text prompts, it is specifically used to perform the following operations:

[0222] For historical query statement C i The corresponding Q context content vectors are concatenated to obtain the historical query statement C. i The corresponding global content vector is based on the historical query statement C. i And historical query statement C i The corresponding global content vector generates the historical query statement C. i Corresponding text prompts;

[0223] When the content text hints corresponding to N historical query statements are obtained, an update query statement is generated based on the N content text hints.

[0224] In one possible implementation, when the statement update module 530 generates an update query statement based on N content text prompts, it specifically performs the following operations:

[0225] Based on the query time order among N historical query statements, generate N content text prompts and corresponding text prompt weights;

[0226] An update query statement is generated based on N text hint weights and N content text hints.

[0227] In one possible implementation, the statement update module 530 is used to update the historical query statement C. i And historical query statement C i The corresponding global content vector generates the historical query statement C. i When the corresponding content text prompt is displayed, it is specifically used to perform the following operations:

[0228] For historical query statement C i Feature extraction is performed to obtain historical query statement C. i The corresponding historical query feature vector D i For the historical query feature vector Di The self-attention processing is performed to obtain a historical query feature vector D i A corresponding token score vector; the token score vector comprises the historical query sentence C i An attention score corresponding to each token in the historical query sentence C

[0229] The historical query sentence C i A corresponding global content vector and the historical query sentence C i The corresponding token score vector is subjected to cross-attention processing to obtain a query prompt vector, and the query prompt vector is subjected to text decoding to obtain the historical query sentence C i A corresponding content text prompt.

[0230] In a possible implementation, the retrieval prompt box is further configured to display retrieval explanation text; and the sentence updating module 530 is further configured to perform the following operation:

[0231] Based on the historical query sentence C i A corresponding Q context content vectors and the historical query sentence C i A corresponding content text prompt, and the historical query sentence C i A corresponding unit explanation text;

[0232] When the N unit explanation texts corresponding to the N historical query sentences are obtained, the retrieval explanation text for the updated query sentence is generated based on the N unit explanation texts.

[0233] In a possible implementation, the content obtaining module is further configured to perform the following operation:

[0234] Interaction scores corresponding to candidate results interacted by the object in the M candidate results are obtained; the interaction score is determined based on an interaction operation type and an interaction operation duration;

[0235] If the number of the candidate results interacted by the object is greater than or equal to a content quantity threshold value, and the interaction scores corresponding to the candidate results interacted by the object are all lower than an interaction score threshold value, it is determined that the interaction operation of the object on the page meets the re-retrieval condition.

[0236] In a possible implementation, the initial query module is further configured to perform the following operation:

[0237] A unit word frequency corresponding to each token in the M candidate results is obtained, and a document weight corresponding to each of the M candidate results is generated based on the unit word frequency;

[0238] A retrieval score corresponding to each candidate result is generated based on the M document weights, and the M candidate results are displayed in the page based on the retrieval scores.

[0239] In a possible implementation, the initial query module is further configured to perform the following operations:

[0240] The query keywords in the initial query statement are obtained, term frequency statistics are performed on the M candidate results based on the query keywords, keyword frequencies corresponding to the M candidate results are obtained, and relevance scores corresponding to the M candidate results are generated based on the M keyword frequencies; the keyword frequency is the term frequency of the query keyword in the candidate result;

[0241] The inverse document frequency corresponding to the query keyword is obtained, a retrieval score corresponding to each candidate result is generated based on the inverse document frequency and the M relevance scores, and the M candidate results are sorted and displayed in the page based on the retrieval scores.

[0242] In a possible implementation, the M candidate results include a target candidate result; when the initial query module is configured to generate the relevance scores corresponding to the M candidate results based on the M keyword frequencies, the initial query module is specifically configured to perform the following operations:

[0243] In a possible implementation, the statement updating module 530 is further configured to perform the following operations:

[0244] The object question text is obtained, feature extraction is performed on the object question text to obtain an object question vector, and N global content vectors corresponding to the historical query statements corresponding to the update query statement are obtained; the object question text is input by the object in the retrieval prompt box in the page for the update query statement, and the global content vector is generated based on the historical interaction results corresponding to the historical query statement;

[0245] The object question vector and the global content vector are subjected to cross-attention processing to obtain a question result vector, and a question result text is generated based on the question result vector; the question result text is used to be displayed in the retrieval prompt box in the page.

[0246] The embodiment of the application performs content retrieval through an initial query statement, sorts and displays M candidate results in a page, and can input the initial query statement into a large language model. The large language model can be, for example, a BERT model, a GPT model, etc. The semantic understanding ability of the initial query is improved, and the content retrieval is not directly performed by using a keyword matching method. The large language model rewrites and expands the initial query statement to generate a semantically related query expression. This semantic level matching makes the retrieval result more accurate and comprehensive, makes up for the shortcomings of keyword matching, and improves the accuracy of content retrieval. If the interaction operation of the object with respect to the page meets the re-retrieval condition, historical interaction information is obtained, the historical interaction information includes N historical query statements and a historical interaction result set corresponding to the N historical query statements, the N historical query statements include the initial query statement, and the historical interaction result in the historical interaction result set includes a candidate result interacted by the object in the M candidate results. A context content vector corresponding to the historical interaction result in the historical interaction information is generated, an updated query statement is generated through the context content vector and the N historical query statements, a context content vector representing context information in each historical interaction result is generated through semantic understanding, the interaction history and query expression of the object are learned through the N historical query statements, the N historical query statements are rewritten and optimized based on the context content vector, the real intention of the user can be better understood, and a semantically related updated query statement is obtained. Therefore, the accuracy of content retrieval can be improved through the updated query statement, the context content vector and the N historical query statements are rewritten and optimized through the pre-trained large language model. When the object clicks some search results (historical interaction results), the system can organize the content of the search results into a context, for example, a context content vector, and form a prompt to input the large language model based on the context content vector. The large language model can rewrite the initial query statement or the N historical query statements according to the prompt to generate a more accurate and user-intended query expression. The process of generating an updated query can be a real-time feedback mechanism, which can enable the system to dynamically adjust the retrieval strategy and continuously optimize the query and the result, thereby improving the relevance of the retrieval and the user satisfaction.

[0247] The embodiments of the present application provide a design intuitive and friendly user interface through the search prompt box, can provide diversified interactive modes such as natural language query, multi-round dialogue, visual feedback, etc., so that the user can more conveniently and naturally express the search requirement. When the interactive operation of the object to the page meets the re-search condition, the system can actively display the updated query statement obtained by rewriting the above method in the search prompt box in the page, and guide the object to re-search through the updated query statement through the search prompt box, without the object understanding all the results and adjusting the keywords to actively re-search, greatly improving the efficiency of content screening and content search. By introducing the intelligent question and answer and dialogue system, the user can interact with the system in the form of dialogue, obtain smooth and coherent answers, and provide a more personalized and intelligent search experience. The user can not only search through simple keyword input, but also express the requirement in natural language, and carry out multi-round dialogue and interaction with the system. The large language model can understand the user's question and feedback, provide intelligent query rewriting and result optimization suggestions, and guide the user to find the required information. Such intelligent and interactive user experience makes the search process more natural and efficient. The embodiments of the present application can also realize search control through the object question text, allow the user to customize and adjust the search strategy, such as setting the filtering condition, adjusting the relevance weight, etc., give the user more control, and improve the feasibility of the embodiments of the present application.

[0248] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one 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 a part of an integral module or unit that includes the functions of the module or unit.

[0249] Please refer to FIG. 7, which is a structural schematic diagram of a computer device provided in an embodiment of the present application. As shown in FIG. 7, the computer device 1000 can include a processor 1001, a network interface 1004 and a memory 1005, and in addition, the computer device 1000 can further include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication among the components. The user interface 1003 can include a display, a keyboard, and optionally the user interface 1003 can further include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a non-volatile memory such as at least one disk memory. The memory 1005 can be optionally at least one storage device located away from the aforementioned processor 1001. As shown in FIG. 7, the memory 1005 as a computer readable storage medium can include an operating system, a network communication module, a user interface module and a device control application.

[0250] In the computer device 1000 as shown in FIG. 7, the network interface 1004 can provide a network communication network element; the user interface 1003 is mainly used to provide an input interface for a user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to realize the following functions.

[0251] Obtaining M candidate results displayed in a sequence in a page, the M candidate results being retrieved based on an initial query statement, M being a positive integer;

[0252] If the interactive operation for the page satisfies a candidate re-retrieval condition, obtaining historical interaction information; the historical interaction information including N historical query statements and a historical interaction result set corresponding to each of the N historical query statements; the N historical query statements including the initial query statement, and the historical interaction results in the historical interaction result set including interactive candidate results, the interactive candidate results being candidate results contained in interactive records corresponding to objects in the M candidate results, N being a positive integer;

[0253] Generating a context content vector corresponding to the historical interaction results in the historical interaction information, generating a content text prompt corresponding to each of the N historical query statements through the context content vector and the N historical query statements, and generating an updated query statement based on the N content text prompts; the updated query statement being used to be displayed in a retrieval prompt box in the page; and the retrieval prompt box being used to guide the objects to re-retrieve through the updated query statement.

[0254] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the description of the data processing method in any one of the embodiments corresponding to the preceding FIG. 3 and FIG. 5, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will also not be repeated.

[0255] In addition, it should be noted here that the embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the processor executes the computer program, the computer program can execute the description of the data processing method in any one of the embodiments corresponding to the preceding FIG. 3 and FIG. 5, and therefore, the description will not be repeated here. In addition, the description of the beneficial effects of using the same method will also not be repeated. For technical details of the computer readable storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application.

[0256] The computer readable storage medium can be an internal storage unit of the data processing apparatus or the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the computer device. The computer readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer readable storage medium can also be used to temporarily store data that has been displayed or will be displayed.

[0257] In addition, it should be noted here that the embodiments of the present application also provide a computer program product, which includes a computer program 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 executes the computer program, so that the computer device executes the method provided by any one of the embodiments corresponding to the preceding FIG. 3 and FIG. 5.

[0258] The terms "first", "second", etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or units is not limited to the listed steps or units, but can optionally further include steps or units not listed, or can optionally further include other steps or units inherent to the process, method, device, product or equipment.

[0259] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been described in the above description in general terms of network elements. Whether the network elements are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A skilled person can use different methods to implement the described network elements for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0260] The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate an apparatus for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the structural schematic diagram. These computer program instructions can also be stored in a computer readable memory that can cause the computer or other programmable device to work in a specific way, so that the instructions stored in the computer readable memory generate a product including instruction apparatus, which implements the functions specified in one or more flows in the flowchart and / or one or more blocks in the structural schematic diagram. These computer program instructions can also be loaded into a computer or other programmable device, so that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the structural schematic diagram.

[0261] The steps in the method embodiments of the present application can be adjusted, combined and deleted according to actual needs.

[0262] The modules in the device embodiments of the present application can be combined, divided, and deleted according to actual needs.

[0263] The above only discloses the preferred embodiments of the present application, and of course cannot limit the scope of the rights of the present application, so the equivalent changes made according to the claims of the present application still belong to the scope covered by the present application.

Claims

1. A data processing method, characterized by, The method comprises the following steps: M candidate results displayed in a page are obtained, the M candidate results are retrieved based on an initial query statement, and M is a positive integer; if an interactive operation for the page meets a candidate re-retrieval condition, historical interaction information is obtained; the historical interaction information comprises N historical query statements and historical interaction result sets corresponding to the N historical query statements respectively; the N historical query statements comprise the initial query statement, historical interaction results in the historical interaction result sets comprise interactive candidate results, the interactive candidate results are candidate results contained in interactive records corresponding to objects in the M candidate results, and N is a positive integer; a context content vector corresponding to the historical interaction results in the historical interaction information is generated, content text prompts corresponding to each historical query statement are generated based on the context content vector and the N historical query statements, and an updated query statement is generated based on the N content text prompts; the updated query statement is used to be displayed in a retrieval prompt box in the page, and the retrieval prompt box is used to guide the objects to re-retrieve through the updated query statement.

2. The method of claim 1, wherein, The method further comprises the following steps: a business time range is generated based on a query time of the initial query statement, and S business query statements in the business time range and other than the initial query statement are obtained; S is a positive integer; an initial query vector is obtained by performing feature extraction on the initial query statement, S business query vectors are obtained by performing feature extraction on the S business query statements respectively, cross-attention processing is performed on the initial query vector and the S business query vectors, attention scores corresponding to the S business query vectors respectively are obtained, a business query vector with an attention score greater than or equal to a score threshold is determined as a target business query vector, and a business query statement corresponding to the target business query vector is determined as a historical query statement.

3. The method according to claim 1 or 2, characterized in that, The cross-attention processing on the initial query vector and the S business query vectors to obtain the attention scores corresponding to the S business query vectors respectively comprises the following steps: the S business query vectors are multiplied by a query parameter matrix to obtain a query vector, the S business query vectors are multiplied by a key parameter matrix to obtain a key vector, and the initial query vector is multiplied by a value parameter matrix to obtain a value vector; an attention score vector is generated based on the query vector and the key vector, the attention score vector is dimensionally reduced based on a dimension of the key vector, the dimensionally reduced attention score vector is normalized to obtain a normalized vector, and the normalized vector is multiplied by the value vector to obtain the attention scores corresponding to the S business query vectors respectively.

4. The method according to any one of claims 1 to 3, characterized in that, The generation of the context content vector corresponding to the historical interaction results in the historical interaction information comprises the following steps: generate an interaction weight corresponding to the historical interaction result based on interaction operation information corresponding to the historical interaction result in the historical interaction information, perform feature extraction on the historical interaction result to obtain a content feature vector; the content feature vector is used to represent context information of the historical interaction result; generate a context content vector corresponding to the historical interaction result based on the interaction weight and the content feature vector.

5. The method according to any one of claims 1 to 4, characterized in that, The interaction operation information includes H kinds of unit interaction information of different interaction operation types, the number of the historical interaction results is T, and the T historical interaction results include a historical interaction result A i The interaction operation information includes a historical interaction result A i Corresponding interaction operation information B i i is a positive integer less than or equal to T. The generating of the interaction weight corresponding to the historical interaction result based on the interaction operation information corresponding to the historical interaction result in the historical interaction information includes: Based on the interaction information B i The interaction operation type and the interaction operation duration of each unit interaction information in the historical interaction result A i The corresponding interaction score When the interaction scores corresponding to the T historical interaction results are obtained, the sum of the interaction scores of the T historical interaction results is determined as an interaction total score, and the historical interaction result A i corresponding to the interaction score, the historical interaction result A i corresponding to the interaction weight.

6. The method according to any one of claims 1 to 5, characterized in that, The content feature vector is obtained by performing feature extraction on the historical interaction result, including: performing text splitting on the historical interaction result to obtain a word sequence corresponding to the historical interaction result; one word in the word sequence refers to a smallest basic unit obtained after text splitting processing of the text information; performing feature extraction on keyword frequency in the historical interaction result to obtain a word frequency embedding vector, respectively encoding semantic information of each word in the historical interaction result to obtain a semantic embedding vector, respectively encoding position information of each word in the historical interaction result to obtain a position embedding vector, and respectively encoding paragraph information of each word in the historical interaction result to obtain a paragraph embedding vector; the keyword frequency is the word frequency of the query keyword in the historical interaction result; generate the content feature vector corresponding to the historical interaction result based on the word frequency embedding vector, the semantic embedding vector, the position embedding vector and the paragraph embedding vector.

7. The method according to any one of claims 1 to 6, characterized in that, The number of the context content vectors is T, T is a positive integer; the N historical query statements include a historical query statement C i The T context content vectors include a historical query statement C i The corresponding Q context content vectors, Q is a positive integer less than or equal to T; the generating of the content text prompt corresponding to each historical query statement based on the context content vectors and the N historical query statements, the generating of the update query statement based on the N content text prompts, comprises: The historical query sentence C i Vector splicing is performed on the corresponding Q context content vectors to obtain the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i The corresponding global content vector is generated based on the historical query sentence C i The corresponding content text prompt is generated. When the N content text prompts corresponding to the N historical query sentences are obtained, generate an updated query sentence based on the N content text prompts.

8. The method according to any one of claims 1 to 7, characterized in that, The generating of the updated query sentence based on the N content text prompts includes: generate text prompt weights corresponding to the N content text prompts based on a query time sequence between the N historical query sentences; generate the updated query sentence based on the N text prompt weights and the N content text prompts.

9. The method according to any one of claims 1 to 8, characterized in that, The history query sentence C is based on the history query sentence C i The history query sentence C is based on the history query sentence C i The corresponding global content vector, the history query sentence C i The corresponding content text prompt, including: performing feature extraction on the historical query sentence C i to obtain a historical query feature vector D i corresponding to the historical query sentence C i , performing self-attention processing on the historical query feature vector D i to obtain a historical query feature vector D i corresponding to the historical query sentence C i , wherein the token score vector comprises an attention score corresponding to each token in the historical query sentence C The historical query sentence C i The corresponding global content vector and the historical query sentence C i The corresponding word token score vector is cross-attention processed to obtain a query prompt vector, and the query prompt vector is text decoded to obtain the historical query sentence C i The corresponding content text prompt.

10. The method according to any one of claims 1 to 9, characterized in that, The search prompt box is also used to display search explanation text; the method further includes: based on the historical query sentence C i corresponding Q context content vectors and the historical query sentence C i corresponding content text prompts, generating the historical query sentence C i corresponding unit explanation texts; When the N unit explanation texts corresponding to the N historical query sentences are obtained, generate search explanation text for the updated query sentence based on the N unit explanation texts.

11. The method according to any one of claims 1 to 10, characterized in that, Further includes: obtain interaction scores corresponding to candidate results interacted by the object in the M candidate results; The interaction score is determined based on an interaction operation type and an interaction operation duration; If the number of candidate results interacted by the object is greater than or equal to a content quantity threshold, and the interaction scores corresponding to the candidate results interacted by the object are all lower than an interaction score threshold, it is determined that the interaction operation of the object on the page meets the re-search condition.

12. The method according to any one of claims 1 to 11, characterized in that, Further includes: obtain unit word frequencies corresponding to each word in the M candidate results, and generate document weights corresponding to the M candidate results based on the unit word frequencies; The retrieval scores corresponding to the M candidate results respectively are generated based on M document weights, and the M candidate results are sorted and displayed in the page based on the retrieval scores.

13. The method according to any one of claims 1 to 12, characterized in that, Further comprising: Obtaining query keywords in the initial query statement, performing term frequency statistics on the M candidate results based on the query keywords to obtain keyword frequencies corresponding to the M candidate results respectively, and generating relevance scores corresponding to the M candidate results respectively based on M keyword frequencies; The keyword frequency is the term frequency of the query keyword in the candidate result; Obtaining the inverse document frequency corresponding to the query keyword, generating retrieval scores corresponding to each candidate result respectively based on the inverse document frequency and M relevance scores, and sorting and displaying M candidate results in the page based on the retrieval scores.

14. The method according to any one of claims 1 to 13, characterized in that, The M candidate results include a target candidate result; the relevance scores corresponding to the M candidate results respectively are generated based on M keyword frequencies, including: Generating an adjustment factor based on the target document length of the target candidate result and the average document length of the M candidate results, and generating the relevance score corresponding to the target candidate result based on the adjustment factor and the keyword frequency corresponding to the target candidate result.

15. The method according to any one of claims 1 to 14, characterized in that, Further comprising: Obtaining an object problem text, performing feature extraction on the object problem text to obtain an object problem vector, and obtaining N global content vectors corresponding to N historical query statements corresponding to the updated query statement; the object problem text is input by the object in the retrieval prompt box in the page for the updated query statement, and the global content vector is generated based on the historical interaction result corresponding to the historical query statement; Performing cross-attention processing on the object problem vector and the global content vector to obtain a problem result vector, and generating a problem result text based on the problem result vector; The problem result text is used to be displayed in the retrieval prompt box in the page.

16. A data processing apparatus, characterized by Comprising: An initial retrieval module configured to obtain M candidate results sorted and displayed in a page, the M candidate results being retrieved based on an initial query statement, M being a positive integer; An information acquisition module configured to acquire historical interaction information if an interaction operation for the page meets candidate re-retrieval conditions; the historical interaction information includes N historical query statements and historical interaction result sets corresponding to the N historical query statements respectively; The N historical query statements include the initial query statement, the historical interaction result in the historical interaction result set includes an interaction candidate result, the interaction candidate result is a candidate result contained in an interaction record corresponding to the object in the M candidate results, and N is a positive integer; The sentence updating module is configured to generate a context content vector corresponding to the historical interaction result in the historical interaction information, generate a content text prompt corresponding to each historical query sentence respectively based on the context content vector and the N historical query sentences, and generate an updated query sentence based on the N content text prompts; the updated query sentence is used to be displayed in a search prompt box in the page, and the search prompt box is used to guide the object to perform re-search through the updated query sentence.

17. A computer device, comprising: Comprise: a processor, a memory and a network interface; the processor is connected with the memory and the network interface, wherein the network interface is configured to provide data communication function, the memory is configured to store computer program, and the processor is configured to call the computer program to enable the computer equipment to execute the method in any one of claims 1-15.

18. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to enable the computer equipment with the processor to execute the method in any one of claims 1-15.

19. A computer program product, characterised in that, The computer program product comprises a computer program stored in a computer readable storage medium and adapted to be read and executed by a processor to enable a computer equipment with the processor to execute the method in any one of claims 1-15.

Citation Information

Patent Citations

  • Conversational information retrieval method based on pre-training language model

    CN115391500A

  • Data processing method, device and equipment and readable storage medium

    CN119003576A

  • Query expansion

    US20180060421A1

  • User interfaces for search systems using in-line contextual queries

    US7603349B1

  • Man-machine interaction method and system based on artificial intelligence

    WO2017041372A1

Cited By

  • Model reasoning optimization method and electronic equipment

    CN122133816A

  • Text-to-SQL (Structured Query Language) agent collaboration system and method for perceiving potential intention of user in multiple rounds of contexts

    CN122152877A

  • A man-machine collaborative analysis method and platform for intelligent question answering in an industrial scene

    CN122240799A