Request processing method and device, equipment and medium

By introducing the user feature information matching mechanism of the requester in the big model, using near-line cache to process successful matching requests, and calling the online generation model when the matching fails, the problem that the big model cannot meet the needs in high-concurrency Internet scenarios is solved, and efficient request processing and resource conservation are achieved.

CN119829976APending Publication Date: 2025-04-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411824646.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Large models cannot meet high concurrency requirements in Internet scenarios, and are limited by computing power costs.

Method used

When receiving the request, the user feature information of the requester is matched with the user feature information corresponding to the response template in the nearline cache. If the match is successful, the response template in the nearline cache will be used to process the request, otherwise the online generation model is called to process the request.

Benefits of technology

On the basis of ensuring real-time request response, the number of calls generated online by the natural language generation model is reduced to effectively respond to high-concurrent request scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829976A_ABST
    Figure CN119829976A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a request processing method and device, equipment and a medium. According to one or more embodiments of the invention, under the condition that a to-be-processed request from a requester is received, first user feature information of the requester is matched with multiple pieces of second user feature information suitable for processing the request by using a response template in a near-line cache; and if the first user feature information exists in a plurality of pieces of second user feature information and the second user feature information matched with the first user feature information exists in the plurality of pieces of second user feature information, processing the to-be-processed request based on a response template in the near-line cache, otherwise, calling an online generation model to process the to-be-processed request so as to ensure that the request can be responded in real time. And the call amount of online generation of the natural language generation model is reduced, so that a request processing mode based on the online generation model can effectively cope with a scene of high-concurrency requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the fields of computer technology and artificial intelligence technology, and in particular, to a request processing method, apparatus, device, and medium. Background Art

[0002] With the surge in Internet data and the diversification of Internet application needs, large models have become an important tool for dealing with complex tasks and massive data with their powerful database processing capabilities and efficient self-learning mechanisms. Large models can deeply understand and analyze user behavior with their advantages in natural language processing and provide users with accurate personalized services, making them a key technology for improving Internet service performance and user experience. However, large models are limited by computing power costs and cannot meet the high concurrency requirements of Internet scenarios. Summary of the invention

[0003] In view of this, one or more embodiments of the present specification provide a request processing method, apparatus, device, and medium.

[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a request processing method is proposed, the method comprising:

[0006] In response to receiving a pending request from a requester, matching, based on the first user characteristic information of the requester, a plurality of second user characteristic information suitable for processing the request using a response template in the nearline cache;

[0007] If there is second user characteristic information matching the first user characteristic information among the multiple second user characteristic information, the pending request is processed based on the response template in the near-line cache; otherwise, the online generation model is called to process the pending request.

[0008] According to a second aspect of one or more embodiments of this specification, a request processing device is provided, the device comprising:

[0009] a matching module, configured to, in response to receiving a pending request from a requester, match, based on the first user characteristic information of the requester, a plurality of second user characteristic information suitable for processing the request using a response template in the nearline cache;

[0010] A processing module is used to process the pending request based on a response template in a near-line cache if there is second user characteristic information matching the first user characteristic information among the multiple second user characteristic information; otherwise, call an online generation model to process the pending request.

[0011] According to a third aspect of one or more embodiments of this specification, a computing device is provided, including:

[0012] processor;

[0013] a memory for storing processor-executable instructions;

[0014] The processor implements the method described in the first aspect above by running the executable instructions.

[0015] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0016] According to a fifth aspect of one or more embodiments of the present specification, a computer program product is provided, including a computer program, which implements the method described in the first aspect when executed by a processor of a computing device.

[0017] In one or more embodiments of the present specification, when a pending request is received from a requester, the requester's first user feature information is matched with multiple second user feature information suitable for processing the request using a response template in a near-line cache, so that if there is second user feature information matching the first user feature information among the multiple second user feature information, the pending request is processed based on the response template in the near-line cache; otherwise, the online generation model is called to process the pending request, so as to reduce the amount of online generation calls of the natural language generation model while ensuring that the request can be responded to in real time, so that the request processing method based on the online generation model can effectively cope with the scenario of high concurrent requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of an application scenario of a request processing method provided by an exemplary embodiment.

[0019] Figure 2 It is a flowchart of a request processing method provided by an exemplary embodiment.

[0020] Figure 3 It is a flowchart of a request processing method provided by an exemplary embodiment.

[0021] Figure 4 It is a schematic structural diagram of a computing device provided by an exemplary embodiment.

[0022] Figure 5 It is a block diagram of a request processing device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0023] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0024] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0025] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0026] This specification provides a request processing method for helping online generation models cope with high-concurrency request scenarios. Through the solution provided in this specification, two parallel processing links can be provided, namely, a processing link based on a response template and a processing link based on an online generation model, so that the processing link can be adaptively selected according to the user characteristics of the requester to reduce the number of online generation calls of the online generation model and maintain the diversity of the response content as much as possible.

[0027] See also Figure 1 , Figure 1 This is a schematic diagram of an application scenario of a request processing method provided by an exemplary embodiment. Multiple terminals can act as requesters to initiate requests to a computing device. The terminals can be smart phones, tablet computers, desktop computers, laptop computers, smart watches, etc., but are not limited thereto. Figure 1As shown, the smart phone 111, the laptop computer 112, and the desktop computer 113 can all act as requesters to initiate requests to the computing device 120. The computing device 120 can process the requests initiated by each terminal through the solution provided by one or more embodiments of this specification to obtain corresponding response data, and then return the processed response data to the corresponding terminal.

[0028] Optionally, the request initiated by the terminal may be a recommendation request, a question and answer request, a task execution request, etc., but is not limited thereto. It should be noted that a recommendation request may be used to request the computing device 120 to provide personalized content, goods or services for the user; a question and answer request may be used to request the computing device 120 to provide corresponding answers based on the questions asked by the user; a task execution request may be used to request the computing device 120 to perform a specific task, including but not limited to booking air tickets, arranging schedules, setting schedule reminders, etc.

[0029] It should be noted that Figure 1 This is only an exemplary application scenario and does not constitute a limitation of this specification. In more possible implementations, the request processing method provided in this specification can also be applied to scenarios including more or fewer terminals and more computing devices, and this specification does not limit this.

[0030] Optionally, the computing device may be a server, such as one server, multiple servers, a server cluster, a cloud computing platform, etc., which is not limited in this specification.

[0031] Optionally, the request processing method provided in this specification can be used to implement the processing of requests in multiple fields such as finance, education, medical care, law, e-commerce, industry, content generation and creation, etc., and this specification does not limit this.

[0032] After introducing the application scenarios of this specification, the optional implementation process of this specification is introduced next.

[0033] See also Figure 2 , Figure 2 is a flowchart of a request processing method provided by an exemplary embodiment. Figure 2 As shown, the method includes:

[0034] Step 201: In response to receiving a request to be processed from a requester, matching is performed based on first user characteristic information of the requester with a plurality of second user characteristic information suitable for processing the request using a response template in a nearline cache.

[0035] Optionally, the request to be processed may carry user information of the requester, so that the first user characteristic information of the requester may be determined based on the user information of the requester.

[0036] Optionally, the first user characteristic information may include user characteristics in multiple dimensions. For example, the first user characteristic information may include user characteristics in multiple dimensions such as gender, age, occupation, etc., and may also include user characteristic dimensions corresponding to specific fields. Taking the financial field as an example, the first user characteristic information may also include purchased financial products, but is not limited to this.

[0037] It should be noted that near-line cache is a cache technology between online cache and offline storage. It is a layer of cache close to the main storage system, used to store infrequently accessed but still important data, so that cached data can be retrieved more quickly when needed, improving data access efficiency and reducing data access latency. Generally speaking, near-line cache can have a faster access speed to the main storage system, and the access frequency and latency of near-line cache are between online cache and offline storage.

[0038] Optionally, the response template stored in the near-line cache may be pre-generated and stored therein, so that the response template may be obtained from the near-line cache to implement request processing when request processing is required.

[0039] Optionally, each response template cached in the near-line cache may correspond to a second user characteristic information, and the second user characteristic information corresponding to different response templates may be the same or different.

[0040] In a possible implementation, a comparison can be made between the first user characteristic information of the requester and the second user characteristic information corresponding to the response template stored in the near-line cache to determine whether the second user characteristic information corresponding to the response template stored in the near-line cache stores second user characteristic information that matches the first user characteristic information, thereby selecting a processing link based on the matching result.

[0041] Step 202: If there is second user characteristic information matching the first user characteristic information among the plurality of second user characteristic information, the request to be processed is processed based on the response template in the near-line cache; otherwise, the online generation model is called to process the request to be processed.

[0042] By processing the pending request based on the response template in the near-line cache when there is second user feature information matching the first user feature information among multiple second user feature information, the request corresponding to the user feature information with the existing response template can be directly processed by calling the near-line cache without calling the online generation model. For the first user feature information for which there is no second user feature information matching it, the natural language model is called to process the corresponding pending request, thereby ensuring that requests with different user feature information can be processed.

[0043] After introducing the basic implementation of this specification, several optional embodiments of this specification are introduced below.

[0044] First, the generation process of response templates in nearline cache is introduced.

[0045] In some embodiments, the generation process of the response template in the nearline cache may include the following steps:

[0046] Step 1: Obtain historical user feature information of multiple historical requests and historical response data obtained by processing multiple historical requests through an online generation model.

[0047] Optionally, the multiple historical requests may be requests received in the early stage of the online generation model being launched, and the historical user feature information and historical response data of the multiple historical requests may be obtained by processing the received requests through the online generation model in the early stage of the online generation model being launched.

[0048] That is, in the early stage of the online generation model, the received requests can be processed online through the natural language model to obtain response data for these requests, so as to use the user feature information and response data of these requests as historical user feature information and historical response data for generating response templates.

[0049] Optionally, in order to ensure the response speed and response efficiency in the initial stage of the online generation model, a small-traffic online request mode can be enabled to ensure that the request processing volume in the initial stage of the online generation model does not exceed the processing capacity of the natural language model.

[0050] Step 2: clustering is performed based on the multiple historical user characteristic information and the multiple historical response data to obtain multiple second user characteristic information and multiple response data groups corresponding to each second user characteristic information, each response data group including multiple historical response data.

[0051] In some embodiments, the above step 2 can be implemented by the following steps:

[0052] Step 1: Perform clustering processing based on multiple historical user feature information to obtain multiple first cluster groups, where the cluster center of each first cluster group is a historical user feature information, and each first cluster group includes the historical user feature information as the cluster center and multiple historical user feature information similar to the historical user feature information as the cluster center.

[0053] In a possible implementation, a first number of historical user feature information can be selected from multiple historical user feature information as cluster centers, so as to perform grouping and iterative update of cluster centers based on the remaining historical user feature information. In each iteration, the historical user feature information processed in the current iteration can be allocated to the cluster group corresponding to the cluster center with the highest similarity based on the similarity between the historical user feature information processed in the current iteration and each cluster center, and the cluster center of the allocated cluster group is updated, and so on, until the allocation of all historical user feature information is completed, thereby obtaining multiple first cluster groups.

[0054] The first quantity may be any positive integer value. Optionally, the value of the first quantity may be set as required. This specification does not limit the specific value of the first quantity.

[0055] Optionally, when determining the similarity between each historical user feature information and each cluster center, the distance between each historical user feature information and each cluster center may be determined as the similarity between each historical user feature information and each cluster center.

[0056] The distance may be Euclidean distance, or Manhattan distance, etc., but is not limited thereto.

[0057] It should be noted that after the division of each first cluster group is completed, the historical response data corresponding to each historical user characteristic information will also be divided into corresponding groups accordingly.

[0058] Optionally, after the allocation of multiple historical user feature information is completed to obtain multiple first cluster groups, historical user feature information with a low contribution degree may be removed from each first cluster group.

[0059] Optionally, for any first cluster grouping, historical user characteristic information whose similarity with the historical user characteristic information serving as the cluster center does not meet a first threshold may be eliminated from the first cluster grouping to obtain the historical user characteristic information serving as the second user characteristic information.

[0060] The first threshold may be any positive value. Optionally, the value of the first threshold may be set as required. This specification does not limit the specific value of the first threshold.

[0061] It should be noted that after the historical user characteristic information whose similarity with the historical user characteristic information serving as the cluster center does not meet the first threshold is removed from the first cluster group, the historical response data corresponding to the removed historical user characteristic information will also be removed accordingly.

[0062] Step 2: For any first cluster grouping, cluster processing is performed on the historical response data corresponding to the multiple historical user feature information included in the first cluster grouping to obtain multiple second cluster groups, the cluster center of each second cluster grouping is a historical response data, and each second cluster grouping includes the historical response data as the cluster center and multiple historical response data similar to the historical response data as the cluster center.

[0063] Each first cluster group includes a plurality of historical user characteristic information, and each historical user characteristic information corresponds to a historical response sample.

[0064] In one possible implementation, a second number of historical response data can be selected from multiple historical response data as cluster centers, so as to perform grouping and iterative update of cluster centers based on the remaining historical response data. In each iteration, the historical response data processed by the current iteration can be assigned to the cluster grouping corresponding to the cluster center with the highest similarity based on the similarity between the historical response data processed by the current iteration and each cluster center, and the cluster center of the assigned cluster grouping can be updated, and so on, until the assignment of all historical response data is completed, thereby obtaining multiple second cluster groups.

[0065] The second number may be any positive integer value. Optionally, the value of the second number may be set as needed. Moreover, the value of the second number may be the same as or different from the first number. This specification does not limit the specific value of the second number.

[0066] Optionally, when determining the similarity between each historical response data and each cluster center, the distance between each historical response data and each cluster center may be determined as the similarity between each historical response data and each cluster center.

[0067] The distance may be Euclidean distance, or Manhattan distance, etc., but is not limited thereto.

[0068] Optionally, after the multiple historical response data are allocated to obtain multiple second cluster groups, the historical response data with a lower contribution degree may be removed from each second cluster group.

[0069] Optionally, for any second cluster grouping, historical response data whose similarity with the historical response data serving as the cluster center does not meet a second threshold may be removed from the second cluster grouping, so that the second cluster grouping after removing the historical response data is used as the response data group.

[0070] The second threshold value may be any positive value. Optionally, the value of the second threshold value may be set as needed. Furthermore, the value of the second threshold value may be the same as or different from the first threshold value. This specification does not limit the specific value of the second threshold value.

[0071] Step 3: Determine the second user characteristic information based on the historical user characteristic information included in each first cluster grouping, and determine multiple response data groups corresponding to each second user characteristic information based on multiple second cluster groups corresponding to each second user characteristic information.

[0072] In a possible implementation, for any first cluster grouping, all historical user characteristic information included in the first cluster grouping can be used as second user characteristic information, so that multiple second cluster groups obtained by dividing the first cluster grouping can be used as multiple response data groups corresponding to each second user characteristic information.

[0073] In another possible implementation, for any first cluster grouping, the historical user characteristic information of the cluster center of the first cluster grouping can be used as the second user characteristic information, so that the multiple second cluster groups obtained by dividing the first cluster grouping can be used as the multiple response data groups corresponding to the second user characteristic information.

[0074] In another possible implementation, for any first cluster grouping, the historical user feature information as the cluster center of the first cluster grouping and the historical user feature information whose similarity with the historical user feature information as the cluster center meets the third threshold value can be used as the second user feature information, so that the multiple second cluster groups obtained by dividing the first cluster grouping are used as the multiple response data groups corresponding to each second user feature information.

[0075] The third threshold value may be any positive value. Optionally, the value of the third threshold value may be set as required, and it is necessary to ensure that the value of the third threshold value is greater than the first threshold value. This specification does not limit the specific value of the third threshold value.

[0076] It should be noted that, through the above embodiment, multiple response data groups can be obtained, each response data group includes multiple historical response data, and each response data group corresponds to multiple historical user feature information. For any response data group, the multiple historical user feature information corresponding to the response data group is the multiple historical user feature information included in the first cluster grouping to which the response data group belongs.

[0077] Step three: for any second user characteristic information, based on the multiple response data groups corresponding to the second user characteristic information, generate multiple response templates corresponding to the second user characteristic information, wherein each response data group corresponds to a response template.

[0078] In one possible implementation, for any response data group, the historical response data included in the response data group can be rewritten by a large language model (LLM), and the user dynamic data in the historical response data can be replaced with dynamic placeholders to obtain a response template corresponding to the response data group.

[0079] For example, for any response data group, the historical response data included in the response data group can be integrated through a large language model, and the user dynamic data in the historical response data can be replaced with dynamic placeholders by rewriting to obtain a general response template summarized based on the historical response data in the response data group.

[0080] Taking the application of the solution provided in this specification to financial scenarios as an example, a user can inquire about his or her income yesterday through a request, and the response data returned to the user can be "your income yesterday was -1.23 yuan", "your loss yesterday was 1.23 yuan", "yesterday, the financial product you held lost 1.23 yuan", etc., so that the generation of response templates can be realized based on these response data. For example, based on response data such as "your income yesterday was -1.23 yuan" and "your loss yesterday was 1.23 yuan", a response template such as "your income at {$time} was {$profit}" can be obtained. For another example, based on response data such as "yesterday, the financial product you held lost 1.23 yuan", a response template such as "{$time}, the income of the financial product you held was {$profit}" can be obtained. Among them, user dynamic data such as "yesterday" is replaced with the dynamic placeholder {$time}, and user dynamic data such as "-1.23 yuan" is replaced with the dynamic placeholder {$profit}.

[0081] Each response template consists of template text and dynamic placeholders. Take the response template "Your profit for {$time} is {$profit}" as an example, where "Your profit for × is ×" is the template text, and {$time} and {$profit} are dynamic placeholders.

[0082] After the response template is generated through the above embodiment, the generated response template can be associated with the corresponding second user feature information and stored in the nearline cache, so that part of the request can be processed based on the response template stored in the nearline cache later.

[0083] In more possible implementations, the response template in the near-line cache can also be adaptively updated. For example, user feature information and response data of requests processed by the online generation model can be continuously collected, so as to update the response template in the near-line cache based on the subsequently collected user feature information and response data.

[0084] Optionally, the response template in the near-line cache may be updated at regular intervals based on user feature information and response data collected in a previous period, so as to implement periodic updating of the response template in the near-line cache.

[0085] The following describes the process of implementing request processing based on two parallel links.

[0086] In some embodiments, for step 201, when matching the first user characteristic information of the requesting party with a plurality of second user characteristic information applicable to processing the request using the response template in the nearline cache, the following steps may be used:

[0087] Step 2011: Determine the similarity between the first user characteristic information and each second user characteristic information.

[0088] In a possible implementation manner, the distance between the first user characteristic information and each second user characteristic information may be determined as the similarity between the first user characteristic information and each second user characteristic information.

[0089] The distance may be Euclidean distance, or Manhattan distance, etc., but is not limited thereto.

[0090] Step 2012: Based on the similarity between the first user characteristic information and each piece of second user characteristic information, match the first user characteristic information in the plurality of second user characteristic information.

[0091] In a possible implementation, the similarity between the first user feature information and each second user feature information may be compared based on a preset fourth threshold value to determine whether there is second user feature information among the multiple second user feature information whose similarity with the first user feature information is greater than the fourth threshold value, thereby achieving matching between the first user information and each second user feature information.

[0092] Optionally, if there is second user feature information among multiple second user feature information whose similarity with the first user feature information is greater than a fourth threshold, it is considered that the first user feature information matches the similar second user feature information, that is, there is second user feature information matching the first user feature information among the multiple second user feature information; conversely, if there is no second user feature information among the multiple second user feature information whose similarity with the first user feature information is greater than the fourth threshold, it is considered that the first user feature information does not match the similar second user feature information, that is, there is no second user feature information matching the first user feature information among the multiple second user feature information.

[0093] Optionally, if there are multiple pieces of second user characteristic information whose similarities to the first user characteristic information are all greater than a fourth threshold, then these multiple pieces of second user characteristic information can all be used as second user characteristic information matching the first user characteristic information, or, the second user characteristic information with the highest similarity to the first user characteristic information among the multiple pieces of second user characteristic information can be used as the second user characteristic information matching the first user characteristic information, and so on, but not limited to this.

[0094] After completing the matching of the first user feature information with each second user feature information through the above embodiment, a processing link can be selected from the processing link based on the response template in the near-line cache and the processing link based on the online generation model according to the matching result to implement the processing of the pending request.

[0095] In some embodiments, if there is second user characteristic information matching the first user characteristic information among the plurality of second user characteristic information, the request to be processed may be processed based on the response template in the near-line cache.

[0096] Optionally, each second user characteristic information corresponds to multiple response templates. When processing the pending request based on the response template in the near-line cache, a response template can be selected as the target response template from the multiple response templates corresponding to the second user characteristic information matching the first user characteristic information, thereby generating response data for the pending request based on the target response template, so as to feed back the response data to the requester of the pending request.

[0097] Optionally, when selecting a template response template, a response template may be randomly selected from multiple response templates corresponding to the second user characteristic information matching the first user characteristic information as the target response template, but this is not limited thereto, and other methods may be used to select the target response template.

[0098] Among them, the target response template consists of template text and dynamic placeholders. In some embodiments, when generating response data for a request to be processed based on the target response template, the user dynamic data of the requesting party can be obtained, so that the dynamic placeholders in the target response template are replaced based on the user dynamic data of the requesting party to obtain response data including template text and user dynamic data.

[0099] Optionally, when acquiring the user dynamic data of the requesting party, the user dynamic data matching the request target of the request to be processed may be acquired according to the user information (such as user identification) of the requesting party and the target requested by the request to be processed.

[0100] Optionally, each time a pending request is processed, the processed pending request can be stored as a historical request, so that the response template in the near-line cache can be updated later based on the stored historical request. The method of generating the response template during the update process can be found in the previous article and will not be repeated here.

[0101] In some embodiments, if there is no second user characteristic information matching the first user characteristic information among the plurality of second user characteristic information, the online generation model may be called to process the request to be processed.

[0102] Optionally, the online generation model may include a natural language processing (NLP) model and a large language model.

[0103] In one possible implementation, the request to be processed can be rewritten through a natural language processing model to obtain a query statement that can be understood by the computing device, thereby acquiring user dynamic data based on the query statement, and then generating final response data based on the acquired user dynamic data through a large language model.

[0104] See also Figure 3 , Figure 3 is a flowchart of a request processing method provided by an exemplary embodiment. Figure 3As shown, two processing links can be provided, namely, online generation of response data (i.e., a processing link based on an online generation model) and near-line adaptive caching (i.e., a processing link based on a response template in a near-line cache), so that the computing device can select the processing link according to whether the first user feature information of the requester hits the second user feature information corresponding to the response template in the near-line cache when receiving a request to be processed. If it hits, the processing of the request to be processed can be realized directly through the response template in the near-line cache; if it does not hit, the online generation link of the response data can be used to rewrite the request to be processed through the online generation model to obtain a query statement that the computing device can understand, thereby realizing recall processing based on the query statement to obtain the user dynamic data required by the requester, thereby realizing the generation of response data based on the acquired user dynamic data through the large language model. In addition, the response data generated by the online generation link of the response data can also be reflowed in quasi-real time, so that it can be used as the basic data for generating the response data, and clustered based on multiple reflowed response data and their corresponding user feature information to obtain multiple response data groups, thereby rewriting multiple response data groups through the large language model to obtain the response template.

[0105] Through the solutions provided by one or more embodiments of this specification, request processing based on near-line cache can be implemented in some cases, and the response results can be directly rendered using near-line variable templates. After hitting the cache, no model generation request is required, which greatly reduces the processing pressure of the computing device and reduces the waste of resources of the computing device. In addition, response templates can be dynamically generated through near-line data reflux and clustering, providing better diversity and real-time performance than offline templates.

[0106] Corresponding to the aforementioned method embodiments, this specification also provides corresponding equipment embodiments and device embodiments.

[0107] Figure 4 is a schematic structural diagram of a computing device provided by an exemplary embodiment. Figure 4 At the hardware level, the computing device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and may also include hardware required for other tasks. One or more embodiments of this specification may be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0108] This specification also provides a request processing device, please refer to Figure 5 , Figure 5 is a block diagram of a request processing device provided by an exemplary embodiment. The request processing device can be applied to Figure 4 The computing device shown in the figure is used to implement the technical solution of this specification. The request processing interaction device may include:

[0109] A matching module 501 is configured to match, in response to receiving a request to be processed from a requester, a plurality of second user characteristic information suitable for processing the request using a response template in a nearline cache based on the first user characteristic information of the requester;

[0110] The processing module 502 is used to process the pending request based on the response template in the near-line cache if there is second user characteristic information matching the first user characteristic information among the multiple second user characteristic information, otherwise, call the online generation model to process the pending request.

[0111] In some embodiments, each second user characteristic information corresponds to a plurality of response templates;

[0112] The processing module 502, when used to process the pending request based on the response template in the nearline cache, is used to:

[0113] Selecting a response template from a plurality of response templates corresponding to the second user characteristic information matching the first user characteristic information as a target response template;

[0114] Generate response data of the request to be processed based on the target response template, so as to feed back the response data to the requester of the request to be processed.

[0115] In some embodiments, the response template includes template text and dynamic placeholders;

[0116] The processing module 502, when used to generate the response data of the request to be processed based on the target response template, is used to:

[0117] Obtaining user dynamic data of the requesting party;

[0118] The dynamic placeholders in the target response template are replaced based on the user dynamic data of the requesting party to obtain response data including the template text and the user dynamic data.

[0119] In some embodiments, the matching module 501, when used to match the first user characteristic information of the requester with a plurality of second user characteristic information applicable to processing the request using the response template in the nearline cache, is used to:

[0120] Determining the similarity between the first user characteristic information and each second user characteristic information;

[0121] Based on the similarity between the first user characteristic information and each piece of second user characteristic information, the first user characteristic information is matched among the plurality of second user characteristic information.

[0122] In some embodiments, the apparatus further comprises:

[0123] The generation module is used to generate the response template in the nearline cache.

[0124] In some embodiments, the generating module, when used to generate a response template in a nearline cache, is used to:

[0125] Obtain historical user feature information of multiple historical requests and historical response data obtained by processing multiple historical requests through an online generation model;

[0126] Perform clustering processing based on multiple historical user feature information and multiple historical response data to obtain multiple second user feature information and multiple response data groups corresponding to each second user feature information, each response data group includes multiple historical response data;

[0127] For any second user characteristic information, multiple response templates corresponding to the second user characteristic information are generated based on multiple response data groups corresponding to the second user characteristic information, wherein each response data group corresponds to one response template.

[0128] In some embodiments, the generating module, when used to perform clustering processing based on multiple historical user characteristic information and multiple historical response data to obtain multiple second user characteristic information and multiple response data groups corresponding to each second user characteristic information, is used to:

[0129] Performing clustering processing based on the multiple historical user feature information to obtain multiple first cluster groups, wherein the cluster center of each first cluster group is a historical user feature information, and each first cluster group includes the historical user feature information as the cluster center and multiple historical user feature information similar to the historical user feature information as the cluster center;

[0130] For any first cluster grouping, clustering processing is performed on the historical response data corresponding to the multiple historical user feature information included in the first cluster grouping to obtain multiple second cluster groups, the cluster center of each second cluster grouping is a historical response data, and each second cluster grouping includes the historical response data as the cluster center and multiple historical response data similar to the historical response data as the cluster center;

[0131] The second user characteristic information is determined based on the historical user characteristic information included in each first cluster grouping, and the multiple response data groups corresponding to each second user characteristic information are determined based on the multiple second cluster groups corresponding to each second user characteristic information.

[0132] In some embodiments, the apparatus further comprises:

[0133] The elimination module is used to eliminate, for any first cluster grouping, historical user characteristic information whose similarity with the historical user characteristic information serving as the cluster center does not meet a first threshold from the first cluster grouping to obtain the historical user characteristic information as the second user characteristic information.

[0134] In some embodiments, the elimination module is further used to eliminate, from any second cluster grouping, historical response data whose similarity with the historical response data serving as the cluster center does not meet a second threshold, so as to use the second cluster grouping after eliminating the historical response data as the response data group.

[0135] In some embodiments, the generating module, when used to generate at least one response template corresponding to the second user characteristic information based on at least one response data group corresponding to the second user characteristic information, is used to:

[0136] For any response data group, the historical response data included in the response data group is rewritten by the large language model, and the user dynamic data in the historical response data is replaced with a dynamic placeholder to obtain a response template corresponding to the response data group.

[0137] In some embodiments, the multiple historical requests are requests received in the early stage of the online generation model being launched, and the historical user feature information and historical response data of the multiple historical requests are obtained by processing the received requests through the online generation model in the early stage of the online generation model being launched.

[0138] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0139] In a typical configuration, a computer includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0140] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0141] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0142] In some embodiments, the present specification also provides a computer program product, including a computer program, which implements the request processing method provided in any embodiment of the present specification when the computer program is executed by a processor of a computing device.

[0143] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0144] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0145] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0146] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0147] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A request processing method, the method comprising: In response to receiving a pending request from a requester, matching, based on the first user characteristic information of the requester, a plurality of second user characteristic information suitable for processing the request using a response template in the nearline cache; If there is second user characteristic information matching the first user characteristic information among the multiple second user characteristic information, the pending request is processed based on the response template in the near-line cache; otherwise, the online generation model is called to process the pending request.

2. According to the method of claim 1, each second user characteristic information corresponds to a plurality of response templates; The processing of the pending request based on the response template in the nearline cache includes: Selecting a response template from a plurality of response templates corresponding to the second user characteristic information matching the first user characteristic information as a target response template; Generate response data of the request to be processed based on the target response template, so as to feed back the response data to the requester of the request to be processed.

3. According to the method of claim 2, the response template includes template text and dynamic placeholders; The generating response data of the request to be processed based on the target response template includes: Obtaining user dynamic data of the requesting party; The dynamic placeholders in the target response template are replaced based on the user dynamic data of the requesting party to obtain response data including the template text and the user dynamic data.

4. The method according to claim 1, wherein the first user characteristic information based on the requester is matched with a plurality of second user characteristic information suitable for processing the request using a response template in a near-line cache, comprising: Determining the similarity between the first user characteristic information and each second user characteristic information; Based on the similarity between the first user characteristic information and each piece of second user characteristic information, the first user characteristic information is matched among the plurality of second user characteristic information.

5. According to the method of claim 1, the process of generating the response template in the near-line cache comprises: Obtain historical user feature information of multiple historical requests and historical response data obtained by processing multiple historical requests through an online generation model; Perform clustering processing based on multiple historical user feature information and multiple historical response data to obtain multiple second user feature information and multiple response data groups corresponding to each second user feature information, each response data group includes multiple historical response data; For any second user characteristic information, multiple response templates corresponding to the second user characteristic information are generated based on multiple response data groups corresponding to the second user characteristic information, wherein each response data group corresponds to one response template.

6. The method according to claim 5, wherein the clustering process is performed based on the plurality of historical user characteristic information and the plurality of historical response data to obtain the plurality of second user characteristic information and the plurality of response data groups corresponding to each second user characteristic information, comprising: Performing clustering processing based on the multiple historical user feature information to obtain multiple first cluster groups, wherein the cluster center of each first cluster group is a historical user feature information, and each first cluster group includes the historical user feature information as the cluster center and multiple historical user feature information similar to the historical user feature information as the cluster center; For any first cluster grouping, clustering processing is performed on the historical response data corresponding to the multiple historical user feature information included in the first cluster grouping to obtain multiple second cluster groups, the cluster center of each second cluster grouping is a historical response data, and each second cluster grouping includes the historical response data as the cluster center and multiple historical response data similar to the historical response data as the cluster center; The second user characteristic information is determined based on the historical user characteristic information included in each first cluster grouping, and a plurality of response data groups corresponding to each second user characteristic information are determined based on a plurality of second cluster groups corresponding to each second user characteristic information.

7. The method according to claim 6, after performing clustering based on the plurality of historical user feature information to obtain a plurality of first cluster groups, the method further comprises: For any first cluster grouping, historical user characteristic information whose similarity with the historical user characteristic information serving as the cluster center does not meet a first threshold is removed from the first cluster grouping to obtain historical user characteristic information serving as second user characteristic information.

8. The method according to claim 6, after clustering the historical response data corresponding to the plurality of historical user feature information included in the first cluster grouping to obtain a plurality of second cluster groups, the method further comprises: For any second cluster grouping, historical response data whose similarity with the historical response data serving as the cluster center does not meet a second threshold is removed from the second cluster grouping, so that the second cluster grouping after removing the historical response data is used as the response data group.

9. The method according to claim 5, wherein generating at least one response template corresponding to the second user characteristic information based on at least one response data group corresponding to the second user characteristic information comprises: For any response data group, the historical response data included in the response data group is rewritten by the large language model, and the user dynamic data in the historical response data is replaced with a dynamic placeholder to obtain a response template corresponding to the response data group.

10. According to the method of claim 5, the multiple historical requests are requests received in the early stage of the online generation model going online, and the historical user feature information and historical response data of the multiple historical requests are obtained by processing the received requests through the online generation model in the early stage of the online generation model going online.

11. A request processing device, the device comprising: a matching module, configured to, in response to receiving a pending request from a requester, match, based on the first user characteristic information of the requester, a plurality of second user characteristic information suitable for processing the request using a response template in the nearline cache; A processing module is used to process the pending request based on a response template in a near-line cache if there is second user characteristic information matching the first user characteristic information among the multiple second user characteristic information; otherwise, call an online generation model to process the pending request.

12. A computing device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 10 by running the executable instructions.

13. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.