Dialogue backflow data processing method and training method based on large model and related device

By introducing dialogue reflow data processing methods into the big model and dynamically adjusting the message queue, the problem that it is difficult for the big model to efficiently collect and store dialogue data, the efficient processing of dialogue data and the automated training of the big model are realized, and the data flywheel is formed. Improves processing efficiency and stability.

CN119166388APending Publication Date: 2024-12-20BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411321271.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

When providing intelligent customer service, intelligent marketing or intelligent question-and-answer services, it is difficult to efficiently collect, store and utilize conversational data with users, and cannot form an effective data flywheel.

Method used

By introducing dialogue reflow data processing methods into the big model, dynamically adjusting the number and binding relationship of candidate message queues, efficient collection and storage of dialogue data is achieved, and the large model is trained and optimized using dialogue reflow data.

Benefits of technology

It realizes efficient collection and storage of dialogue data, dynamically adjusts message queue resources, improves processing efficiency and stability, forms an automated data reflow and model training closed loop, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166388A_ABST
    Figure CN119166388A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue backflow data processing method based on a large model, and relates to the technical field of artificial intelligence. The specific implementation scheme is as follows: in response to a dialogue backflow data processing request for a target large model, selecting a target message queue from a plurality of candidate message queues bound with the target large model; adding a backflow message to the target message queue, wherein the backflow message is obtained by packaging dialogue data between the target large model and a target interaction object in the plurality of interaction objects; analyzing the backflow message in the target message queue to obtain dialogue backflow data, and storing the dialogue backflow data to a preset backflow position; matching a plurality of candidate message queues bound with the target large model with the data volume of the dialogue data among the plurality of interaction objects by executing at least one of the following operations: dynamically adjusting the number of the plurality of candidate message queues; at least one of the plurality of candidate message queues is dynamically altered. A training method, agent, apparatus, device, medium and program product are also provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to large language models, intelligent agents, human-computer interaction, data reflow and other technical fields, and can be applied to dialogue data processing, large model training, intelligent agent question and answer, and intelligent agent customer service. More specifically, the present disclosure provides a dialogue reflow data processing method, training method, intelligent agent, device, electronic device, storage medium and program product based on a large model. Background Art

[0002] As big model technology continues to mature and improve, various big model-based applications have sprung up. When using big model-based applications, a large amount of request data is usually input, and a large amount of response data is also obtained. For example, when an intelligent conversational robot application based on a big model provides services such as intelligent customer service, intelligent marketing, or intelligent question and answer, a large number of conversations will occur between the intelligent conversational robot and the user. However, the current big model can only use the trained knowledge and materials to serve users, and the conversation data between users is difficult to collect, store, and use efficiently, and it is impossible to effectively form a data flywheel. Summary of the invention

[0003] The present disclosure provides a large-model-based dialogue reflow data processing method, training method, intelligent agent, device, electronic device, storage medium and program product.

[0004] According to one aspect of the present disclosure, a method for processing conversation reflow data based on a large model is provided, the method comprising: in response to a conversation reflow data processing request for a target large model, selecting a target message queue from a plurality of candidate message queues bound to the target large model; adding a reflow message to the target message queue, the reflow message being obtained by encapsulating conversation data between the target large model and a target interactive object among a plurality of interactive objects; parsing the reflow message in the target message queue to obtain conversation reflow data, so as to store the conversation reflow data in a preset reflow location; adapting the data volume of the conversation data between the plurality of candidate message queues bound to the target large model and the plurality of interactive objects by performing at least one of the following operations: dynamically adjusting the number of the plurality of candidate message queues; dynamically changing at least one of the plurality of candidate message queues.

[0005] According to another aspect of the present disclosure, a training method for a large model is provided, the method comprising: in response to a training request for a target large model, obtaining a training sample based on the conversation reflow data of the target large model, wherein the conversation reflow data is obtained by processing according to the conversation reflow data processing method based on the large model as described above; and using the training sample to train the target large model.

[0006] According to another aspect of the present disclosure, an intelligent agent is provided, which includes a target large model obtained according to the above training method.

[0007] According to another aspect of the present disclosure, a conversation reflow data processing device based on a large model is provided, comprising: a queue management service unit, for responding to a conversation reflow data processing request for a target large model, and selecting a target message queue from a plurality of candidate message queues bound to the target large model; a message sending service unit, for adding a reflow message to the target message queue, the reflow message being obtained by encapsulating conversation data between the target large model and a target interactive object among a plurality of interactive objects; a message processing service unit, for parsing the reflow message in the target message queue to obtain conversation reflow data, so as to store the conversation reflow data in a preset reflow position; wherein, by performing at least one of the following operations, the data volume of the conversation data between the plurality of candidate message queues bound to the target large model and the plurality of interactive objects is adapted: dynamically adjusting the number of the plurality of candidate message queues; dynamically changing at least one of the plurality of candidate message queues.

[0008] According to another aspect of the present disclosure, a training device for a large model is provided, comprising: a first training service unit, for responding to a training request for a target large model, and obtaining a training sample based on the conversation reflow data of the target large model, wherein the conversation reflow data is obtained by processing according to the conversation reflow data processing device based on the large model as described above; and a second training service unit, for training the target large model using the training sample.

[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.

[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.

[0011] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0014] Figure 1 is a schematic diagram of an exemplary system architecture in which various methods and devices described herein may be implemented according to an embodiment of the present disclosure;

[0015] Figure 2 is a flowchart of a method for processing conversation reflow data based on a large model according to an embodiment of the present disclosure;

[0016] Figure 3 is a flow chart of obtaining a return flow message according to an embodiment of the present disclosure;

[0017] Figure 4 is a flowchart of dynamically adjusting the number of multiple candidate message queues according to an embodiment of the present disclosure;

[0018] Figure 5 is a flowchart of dynamically changing at least one of a plurality of candidate message queues according to an embodiment of the present disclosure;

[0019] Figure 6 is a flowchart of a method for training a large model according to an embodiment of the present disclosure;

[0020] Figure 7 is a diagram of a serverless service architecture according to an embodiment of the present disclosure;

[0021] Figure 8 is a structural block diagram of an intelligent agent according to an embodiment of the present disclosure;

[0022] Fig. 9 is a block diagram of a conversation reflow data processing device based on a large model according to an embodiment of the present disclosure;

[0023] Fig.10 is a block diagram of a training apparatus for a large model according to an embodiment of the present disclosure;

[0024] Fig.11 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0026] In the technical solutions disclosed in this disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved are in compliance with the relevant laws and regulations, necessary confidentiality measures are taken, and they do not violate public order and good morals. In the technical solutions disclosed in this disclosure, the user's authorization or consent is obtained before obtaining or collecting user personal information.

[0027] Figure 1 is a schematic diagram of an exemplary system architecture in which various methods and devices described herein may be implemented according to an embodiment of the present disclosure. It should be noted that Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0028] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0029] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptops, desktop computers, etc.

[0030] Server 105 can be a server that provides various services, such as a background management server that provides support for websites browsed by users using terminal devices 101, 102, and 103 (only as an example). The background management server can analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device. Server 105 can also be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system. Server 105 can also be a server of a distributed system, or a server combined with a blockchain.

[0031] It should be noted that the conversation reflow data processing method and training method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the intelligent agent, conversation reflow data processing device and training device provided in the embodiments of the present disclosure can generally be set in the server 105. The conversation reflow data processing method and training method provided in the embodiments of the present disclosure can also be executed by a server or a server group that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the intelligent agent, conversation reflow data processing device and training device provided in the embodiments of the present disclosure can also be set in a server or a server group that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0032] Alternatively, when the terminal devices 101, 102, and 103 also have computing capabilities and computing resources that meet the requirements, the dialogue reflow data processing method and training method provided in the embodiments of the present disclosure can generally be executed by the terminal devices 101, 102, and 103. Accordingly, the intelligent agent, dialogue reflow data processing device, and training device provided in the embodiments of the present disclosure can generally be set in the terminal devices 101, 102, and 103.

[0033] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0034] Figure 2 The present invention is a flowchart of a method for processing dialog reflow data based on a large model according to an embodiment of the present invention.

[0035] like Figure 2 As shown, the method 200 may include operations S210 to S230.

[0036] In operation S210, in response to a dialog reflow data processing request for a target large model, a target message queue is selected from a plurality of candidate message queues bound to the target large model.

[0037] Exemplarily, the dialog reflow data processing request may be generated based on manual interaction on the front-end page of the dialog reflow data processing application. The interaction operation may include any type of operation, for example, gesture interaction operations such as click operations, but is not limited thereto. Alternatively, the dialog reflow data processing request may be automatically issued to another software or another service after being triggered by a software or a service according to a pre-set condition. The embodiments of the present disclosure are not specifically limited thereto.

[0038] A large model may refer to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. Large models may include large-scale language models (LLM), GPT (Generative Pre-trained Transformer), large visual models, multimodal large models, and the like. The large model involved in the embodiments of the present disclosure may be a general large model, or it may be an expert large model obtained after fine-tuning (Fine Tune) based on demand, and the embodiments of the present disclosure are not limited to this.

[0039] A message queue is a container that stores messages during their transmission. Binding relationships between multiple candidate message queues and a target big model can be predetermined, so that the conversation between the target big model and any interactive object can be stored in the form of messages in multiple candidate message queues.

[0040] In operation S220, the return flow message is added to the target message queue. The return flow message is obtained by encapsulating the dialog data between the target macro model and the target interactive object among the multiple interactive objects.

[0041] For example, after the target interactive object (such as the target user who initiates the chat) opens the conversation interface, a conversation ID is generated. Subsequent multiple rounds of conversations conducted in the current conversation interface will maintain the same conversation ID. During the chat process, after the target interactive object inputs content, the target big model is called to output a reply as a round of conversation, and the rounds are recorded. One or more rounds of conversations under the same conversation ID between the target interactive object and the target big model can be encapsulated into a reflow message. Conversations under multiple conversation IDs between the target interactive object and the target big model can also be encapsulated into a reflow message.

[0042] Taking the example of encapsulating a round of dialogue under the same session ID between the target interactive object and the target large model into a return flow message, the session ID, dialogue turn, object ID, model ID, object input content and model output content of the dialogue can be obtained and encapsulated into a return flow message. The return flow message can be sent to the target message queue, and the target message queue returns a confirmation response, indicating that the return flow message has been received and added to the queue.

[0043] In operation S230, the reflow message in the target message queue is parsed to obtain the dialog reflow data, so as to store the dialog reflow data in a preset reflow location.

[0044] For example, the return message is stored in the target message queue in JSON format. An unprocessed return message is pulled from the target message queue, and then the return message in JSON format is deserialized and converted into conversation return data with the target data structure. The fields of the target data structure are shown in Table 1.

[0045] Table 1

[0046]

[0047]

[0048] The preset reflow location includes a preset storage location of the conversation reflow data, such as a target database, or a target database table in the target database. The preset reflow location can be preset according to the target large model, for example, different large models have different preset reflow locations. The preset reflow location can also be preset according to the business involved in the conversation data. The embodiments of the present disclosure are not specifically limited.

[0049] In the process of processing the dialogue reflow data, the data volume of the dialogue data between the multiple candidate message queues bound to the target large model and the multiple interactive objects is adapted by performing at least one of the following operations:

[0050] Dynamically adjust the number of multiple candidate message queues.

[0051] Dynamically change at least one of the plurality of candidate message queues.

[0052] The target large model may provide conversation services for multiple interactive objects at the same time. However, the number of interactive objects and the conversation volume are difficult to determine, so the total conversation data flow (such as the data volume of real-time conversation data) corresponding to the target large model is difficult to determine. If the candidate message queues bound to the target large model are always fixed, one or more candidate message queues will be idle when the conversation data flow is low, and when the conversation data flow is high, the currently bound candidate message queues may be blocked and difficult to handle high-flow return messages.

[0053] Therefore, by dynamically adjusting the number of queues, fewer queues can be bound when the flow of conversation data is at a low level, which is conducive to saving resources and avoiding unnecessary overhead. When the flow of conversation data is at a high level, the messages can be dispersed by increasing the number of queues to avoid overloading the currently bound message queue, thereby improving the overall processing efficiency and stability. In addition, by dynamically replacing at least one of the multiple candidate message queues, when the flow of conversation data is at a low level, the queue with a small number of stored messages can be switched to a queue with a large number of stored messages, so that the queue with a small number of stored messages can take over messages from other sources (such as other large models), so as to achieve overall reasonable allocation of resources. When the flow of conversation data is at a high level, the queue with a large number of stored messages can be switched to a queue with a small number of stored messages to avoid overload.

[0054] According to the conversation reflow data processing method of the embodiment of the present disclosure, the effect of efficiently collecting and storing conversation data can be achieved. Moreover, by dynamically adjusting the number of candidate message queues and changing candidate message queues, it is possible to flexibly adapt to the dynamic changes in the amount of conversation data between the target large model and multiple interactive objects, which can not only process conversation data of different scales, but also save message queue resources, thereby improving the efficiency and stability of conversation reflow data processing.

[0055] Figure 3 The present invention is a flowchart of obtaining a return flow message according to an embodiment of the present disclosure.

[0056] like Figure 3 As shown, before performing operation S220 to add the return flow message to the target message queue, the conversation return flow data processing method of this embodiment may further include operations S310 to S330.

[0057] In operation S310, in response to an inference request from a target interactive object, a target large model is called to perform inference to obtain dialog data.

[0058] For example, in a chat interface, when a user inputs information and sends it, the server will encapsulate the user input to generate an HTTP (Hypertext Transfer Protocol) request, called an inference request. The inference request includes the user's input content, and the server can call the large model for inference in response to the inference request. The purpose of inference is to understand the user's intentions and needs and generate an appropriate response. The inference result is then displayed on the chat interface to complete a round of dialogue, that is, the dialogue data containing this round of dialogue is obtained.

[0059] In operation S320, the reflow identifier of the target large model is queried.

[0060] In operation S330, when the return flow identifier is the target identifier, the dialog data is encapsulated to obtain a return flow message.

[0061] The reflow identifier is used to indicate whether the conversation data of the target large model needs to be reflowed. The data after reflow processing can be used to further optimize the target large model in a timely manner. For example, the reflow identifier includes "0" and "1" (for example only). The reflow identifier can be configured as "1" for the target large model in advance, and "1" is defined as the target identifier, indicating that the conversation data of the target large model needs to be reflowed, so the conversation data is encapsulated to obtain a reflow message. In the case where the reflow identifier is configured as "0" for the target large model in advance, it is not a target identifier, indicating that there is no need to reflow the conversation data of the target large model, so the conversation data is no longer encapsulated.

[0062] For example, whether the reflow identifier is a target identifier can be dynamically configured in real time, thereby dynamically determining in real time whether the dialog data of the target large model needs to be reflowed.

[0063] For example, dynamically configure whether the return flow indicator is a target indicator based on time factors. Business needs and user behavior may change over time, so the configuration of the return flow indicator can be adjusted according to time periods or specific time points. For example, some businesses may need to collect and process user interaction data more frequently during promotions in order to quickly respond to market changes.

[0064] For example, dynamically configure whether the return flow identifier is the target identifier based on business needs. For example, there are different requirements for the dialogue capabilities of the target big model for different business scenarios. For high-demand business scenarios that require more intelligent dialogue capabilities, a large amount of dialogue data for the business scenario can be obtained to optimize the performance of the target big model. Therefore, the dialogue data can be checked first. If the dialogue data involves keywords of the target business scenario, the return flow identifier can be dynamically configured as the target identifier, otherwise it is a non-target identifier.

[0065] For example, whether the reflux identifier is the target identifier is configured according to the load capacity of multiple bound candidate message queues. On the basis of the above dynamic adjustment of the number of queues and / or dynamic change of queues, the reflux identifier can also be used as a flow regulating valve. For example, the load of each candidate message queue can be monitored in real time, including queue length, consumer processing speed, and system response time. When it is detected that the load capacity of a specific queue or all message queues reaches the threshold, the configuration of the reflux identifier is dynamically adjusted. This allows time to dynamically adjust the number of queues and / or dynamically change queues, or instead of dynamically adjusting the number of queues and / or dynamically changing queues, the message queue resources are allocated to other message sources.

[0066] According to the embodiments of the present disclosure, the reflow identifier is used to accurately control the dialogue reflow data processing of the target large model, thereby improving the efficiency and accuracy of the dialogue reflow data processing. For example, the reflow identifier can be used to control one or more large models for dialogue reflow data processing, and it can also avoid processing all dialogue data of a large model, but only focus on those important dialogue data, thereby saving storage space and computing resources and improving overall efficiency.

[0067] Figure 4 The present invention is a flowchart of dynamically adjusting the number of multiple candidate message queues according to an embodiment of the present disclosure.

[0068] In some embodiments, reference Figure 4 , dynamically adjusting the number of multiple candidate message queues includes operations S410 to S440.

[0069] like Figure 4 As shown, the target interaction object includes user 401. Multiple users 401 have a dialogue with a target intelligent dialogue robot 402, and each user 401 can have multiple rounds of dialogue with the target intelligent dialogue robot 402. The target intelligent dialogue robot 402 is an application based on the target large model, so the dialogue data between it and multiple users 401 is the dialogue data between the target large model and multiple users 401.

[0070] In operation S410 , it is determined whether the amount of conversation data between the target macro model and the plurality of users 401 is greater than or equal to a first threshold.

[0071] In operation S420 , in response to the data volume being greater than or equal to the first threshold, a serverless computing resource is called to deploy a newly added candidate message queue bound to the target large model.

[0072] In operation S430, it is determined whether the amount of the conversation data between the target large model and the plurality of users 401 is less than or equal to a second threshold. If it is less than the first threshold and greater than the second threshold, no adjustment is made.

[0073] In operation S440 , in response to the data volume being less than or equal to a second threshold, a serverless computing resource is called to deregister at least one queue among the plurality of candidate message queues, the second threshold being less than the first threshold.

[0074] Exemplarily, the amount of conversation data refers to the total number of conversations exchanged between the target large model and multiple users within a certain period of time. For example, user input events and intelligent conversation robot output events are monitored by embedding points, and the amount of logarithmic data is determined by the number of events within a certain period of time. Alternatively, the conversation data within a certain period of time is stored in a database, and the amount of data can be obtained by executing SQL queries. Alternatively, the amount of data is calculated by the number of inference requests within a certain period of time. The embodiments of this disclosure do not limit how to monitor the size of the data volume.

[0075] The first threshold and the second threshold are preset conditions for determining when resources need to be expanded or reduced. The first threshold and the second threshold can be predetermined based on the total load of multiple candidate message queues currently bound to the target large model. The total load refers to the sum of the loads of all candidate message queues, including the number of messages in the queue, the speed of message processing, and the capacity of the queue, etc. It can also be determined by analyzing the amount of conversation data between the target intelligent conversation robot 402 and multiple users 401 in different time periods, thereby setting reasonable thresholds to facilitate the reasonable allocation of message queues.

[0076] As you can understand, serverless is a cloud computing technology that enables the deployment and operation of applications without the need to manage servers. Serverless services can take advantage of serverless deployment and are tools and frameworks used to build and manage serverless applications.

[0077] Serverless services can include message queue management services deployed in the serverless environment. The message queue management service is used to register new and unregister message queues and provide information query of candidate message queues so as to select the target message queue.

[0078] In operation S420 or operation S440, calling the serverless computing resource may be calling a message queue management service to perform an operation of adding a candidate message queue or canceling a candidate message queue.

[0079] The serverless architecture allows applications to quickly scale computing resources according to real-time needs. According to the embodiments of the present disclosure, combined with the characteristics of the serverless architecture to quickly adjust the allocation of computing resources, the number of message queues can be smoothly adjusted, thereby flexibly adapting to the dynamic changes in the amount of conversation data between the target large model and multiple interactive objects, and reducing resource consumption.

[0080] It should be noted that operation S410 and operation S430 may be performed in parallel. Operation S410 may be performed first, and then operation S420 may be performed when the data volume is less than the first threshold. Operation S420 may be performed first, and then operation S410 may be performed when the data volume is greater than the second threshold.

[0081] Figure 5 The present invention is a flowchart of dynamically changing at least one of a plurality of candidate message queues according to an embodiment of the present disclosure.

[0082] In some embodiments, the target large model is any one of a plurality of large models, the plurality of large models including at least two large models bound to the same common message queue, wherein the common message queue is used as a candidate message queue for each of the at least two large models.

[0083] like Figure 5 As shown, the target interaction object includes user 501. Any user among multiple users 501 can have a conversation with any robot among multiple intelligent dialogue robots 502, and each user 501 can have multiple rounds of conversations with the selected target intelligent dialogue robot 502. Each intelligent dialogue robot 502 is an application based on a large model. Therefore, the conversation data between the target intelligent dialogue robot 502 and multiple users 501 is the conversation data between the target large model and multiple users 501.

[0084] In some embodiments, when the target large model is bound to at least one common message queue, dynamically changing at least one of the plurality of candidate message queues includes:

[0085] In operation S510, it is determined whether the amount of conversation data between the target macro model and the plurality of users 501 is greater than or equal to a third threshold.

[0086] In operation S520, in response to the data volume being greater than or equal to a third threshold, a binding between at least one of the common message queues and the target large model is released.

[0087] In operation S530, the target large model is bound to at least one non-shared message queue, wherein each non-shared message queue is used only as a candidate message queue of the target large model.

[0088] Non-shared message queues and shared message queues are defined based on the number of large models bound to the message queue. If a message queue is bound to more than two large models at the same time and can store return messages from more than two large models, then it is a shared message queue. If a message queue is bound to one large model and can only store return messages from the large model, then the message queue is a non-shared message queue.

[0089] According to an embodiment of the present disclosure, when the data volume is greater than or equal to the third threshold, more message queue resources can be allocated by releasing the binding relationship of the shared message queue and binding at least one non-shared message queue, thereby improving the efficiency of conversation reflow data processing.

[0090] In some embodiments, when the target large model is bound to at least one non-shared message queue, dynamically changing at least one of the plurality of candidate message queues further comprises:

[0091] In operation S540, it is determined whether the amount of the conversation data between the target macro model and the plurality of users 501 is less than or equal to a fourth threshold. If it is less than the fourth threshold and greater than the third threshold, no change is made.

[0092] In operation S550, in response to the data volume being less than or equal to a fourth threshold, the binding between at least one of the non-shared message queues and the target large model is released, and the fourth threshold is less than the third threshold.

[0093] In operation S560, the target large model is bound to at least one common message queue.

[0094] For example, some large models previously had a lot of returned data, but after a period of time, a new large model was released and more traffic was migrated to the new large model. At this time, the non-shared message queue that was originally applied for separately must be released and the shared message queue must be allocated to the large model with a sharp drop in traffic.

[0095] For example, this embodiment can also determine the amount of conversation data by tracking points, event quantity statistics, SQL queries, or reasoning request quantity statistics as described above, which will not be repeated here.

[0096] The third threshold and the fourth threshold are also preset conditions for determining when resources need to be expanded or reduced. The third threshold and the fourth threshold can be predetermined based on the total load of multiple candidate message queues currently bound to the target large model. Alternatively, the peak and trough of the data volume can be determined by analyzing the data volume of the conversation data between the target intelligent conversation robot 502 and multiple users 501 in different time periods, thereby setting reasonable thresholds to facilitate the reasonable allocation of message queues.

[0097] The unbinding and untying in operations S520 to S530, and the unbinding and untying in operations S550 to S560 can be performed by calling serverless computing resources. For example, calling a message queue management service deployed in a serverless server to perform the unbinding and untying. Alternatively, the unbinding and untying in operations S520 to S530, and the unbinding and untying in operations S550 to S560 can be performed by calling computing resources of a microservice architecture, for example, calling a message queue management microservice deployed in a microservice architecture to perform the unbinding and untying.

[0098] It should be noted that operation S510 and operation S540 may be performed in parallel. Operation S510 may be performed first, and then operation S540 may be performed when the data volume is less than the third threshold. Operation S540 may be performed first, and then operation S510 may be performed when the data volume is greater than the fourth threshold.

[0099] According to an embodiment of the present disclosure, when the data volume is less than or equal to the fourth threshold, the occupancy of message queue resources can be reduced by releasing the binding relationship of non-shared message queues and binding at least one shared message queue, thereby saving computing resources while maintaining the stability and efficiency of conversation reflow data processing.

[0100] In some embodiments, in addition to the unbinding and untying in operations S520 to S530, and the unbinding and untying in operations S550 to S560, the message queue resources allocated to the target large model can be expanded or reduced by adjusting whether the remaining large models and the target large model are bound to the same message queue.

[0101] For example, in the case where the target large model is bound to at least one shared message queue, in response to the amount of data being greater than or equal to the third threshold, at least one target shared message queue is determined. For each target shared message queue, the binding relationship with the remaining large models other than the target large model is gradually released. That is, when the amount of data is large, under the premise of retaining the bound target large model, the number of large models bound to each target shared message queue is reduced until it becomes a non-shared message queue. In this way, each target shared message queue can provide more message queue resources for the target large model to process the return messages.

[0102] For example, in the case where the target large model is bound to at least one non-shared message queue, in response to the amount of data being less than or equal to the fourth threshold, at least one target non-shared message queue is determined. Then, for each target non-shared message queue, binding relationships with the remaining large models other than the target large model are gradually added. That is, when the amount of data is small, the number of large models bound to the target non-shared message queue is increased and then converted into a shared message queue. In this way, the message queue resources of the target large model for processing backflow messages can be reduced, and the reasonable allocation of message queue resources can be achieved.

[0103] In some embodiments, selecting a target message queue from at least one candidate message queue bound to a target large model includes: selecting a message queue in an available state from multiple candidate message queues in a polling manner as the target message queue. Or, selecting a queue with the least number of message accumulations from multiple candidate message queues as the target message queue, where the number of message accumulations includes the number of unparsed return messages.

[0104] Exemplarily, the polling method is used to distribute tasks or requests among multiple candidate message queues in a certain order. For example, first maintain a polling order list, which contains all candidate message queues. This list is arranged in a certain order. Secondly, query the available status of each candidate message queue in turn according to the order in the list. Once a message queue in an available state is found, it will be selected as the target message queue to store the return message this time. Then, update the polling order and move the target message queue to the end of the list so that all candidate message queues have a chance to be selected, thereby avoiding the situation where some queues are overloaded and other queues are idle. The available status of a message queue refers to the ability to receive and process new messages, which can be determined by storage space, message services, network connections, permissions and security, computing resources and performance indicators.

[0105] Exemplarily, in response to a dialog reflow data processing request, the message accumulation in each candidate message queue may be queried. The queue with the least message accumulation is selected as the target message queue. Because the queue with less accumulation is more likely to process new messages quickly, thereby reducing message delays and improving the overall response speed. In addition, load balancing is achieved by selecting the queue with the least message accumulation, which helps to avoid the situation where some queues are overloaded while other queues are idle, ensuring that the resources of all queues are reasonably utilized.

[0106] Figure 6 It is a flowchart of a method for training a large model according to an embodiment of the present disclosure.

[0107] like Figure 6 As shown, the method 600 may include operations S610 to S620.

[0108] In operation S610, in response to a training request for a target large model, a training sample is obtained based on the conversation reflow data of the target large model, wherein the conversation reflow data is obtained by executing one or more embodiments of the above conversation reflow data processing method.

[0109] In operation S620, the target large model is trained using the training samples.

[0110] The existing technology requires manual acquisition of historical conversations between the target large model and the user to perform training. For example, manually click to save the historical conversation data between the target large model and the user, and then manually click to publish the data to obtain the training set, and then the published training set can be used to train the target large model.

[0111] According to the embodiments of the present disclosure, the conversation reflow data with the target data structure is obtained by parsing the reflow messages in the target message queue in advance. By automatically realizing data reflow, the conversation data set is automatically updated, and the conversation reflow data can be automatically obtained from the preset reflow position to obtain training samples, thereby realizing automatic training. Therefore, the target large model can be continuously optimized and iterated efficiently under the premise of low labor costs, effectively forming a data flywheel.

[0112] In some embodiments, training is performed periodically. Periodic training can take advantage of data reflow and use newly added, time-sensitive conversation data for optimization and iteration of the target large model. For example, the target large model provides conversation services from 8 am to 12 pm every day. Then the conversation reflow data of the day can be used to train the target large model from midnight to 8 am every day. In some embodiments, the trained target large model can also be automatically deployed, so as to achieve automatic periodic training and deployment on the basis of automatic data reflow, forming an effective data processing closed loop.

[0113] In combination with the above embodiments, the following uses a specific implementation method based on serverless technology as an example to illustrate the process of automated dialogue reflow data processing, large model training and deployment.

[0114] Figure 7 It is a diagram of a serverless service architecture according to an embodiment of the present disclosure.

[0115] like Figure 7 As shown, HTTP trigger 701 is a mechanism that allows the execution of function computing to be triggered through HTTP requests. HTTP requests can instruct Serverless services to complete different requests. Serverless services can receive HTTP requests based on HTTP triggers. For example, inference requests in the form of HTTP requests are received through inference service 702.

[0116] Continue to refer to Figure 7, the reasoning service 702 can be a Serverless service, which is used to serve the user's reasoning interaction, load the reflow information, and decide whether the data is reflowed. The sending service 703 can be a Serverless service, which is used to send the conversation between the user and the big model to the target message queue 704. The message queue management service 705 can be a Serverless service, which is used to register and deregister the message queue and provide information query for the message queue. The message processing service 706 can be a Serverless service, which is used to parse the reflow message, distinguish the session to which the conversation belongs, and save it to the Mongo service 707. The Mongo service 707 is implemented based on a non-relational database and is used to store the conversation reflow data between the user and the big model, as well as the reflow configuration information of the target big model. The training service 708 is a resident service, which resides in the server memory, and is used to read the conversation reflow data from the Mongo service 707, load the big model from the Bos service 709 and train it. The Bos service 709 (object storage service, Baidu Object Storage) is used to store original and trained model materials. The deployment service 710 is a resident service that resides in the server memory and is used to load the trained large model from the Bos service 709 and provide an interactive interface with the large model.

[0117] Reference Figure 7 ,The following describes the process of realizing automated data reflow through dialogue reflow data processing.

[0118] First, the user inputs and sends the chat information, generating an HTTP request which is received by HTTP trigger 701 .

[0119] Then, the inference service 702 receives the HTTP request sent by the HTTP trigger 701 , ie, the inference request.

[0120] Then, the inference service 702 calls the target large model through the interface provided by the deployment service 710. The target large model performs inference based on the chat information input by the user and outputs a reply. After the inference service 702 obtains the output of the large model, it queries the reflux configuration information of the target large model in the Mongo service 707, and determines whether the data needs to be refluxed through the reflux identifier. If reflux is not required, the target large model output is directly returned to the user and the call is terminated.

[0121] Then, if reflow is required, the reasoning service 702 sends a reflow message in JSON format composed of user input, large model output, session ID (incrementing over time), session round, etc. to the sending service 703.

[0122] Then, the sending service 703 accesses the message queue management service 705 to query the target message queue 704 available for the target large model.

[0123] Then, the sending service 703 sends the return message to the target message queue 704 .

[0124] Then, the message processing service 706 will subscribe to the target message queue 704, pull the return message, parse the message, extract the session ID, session turn, user input, large model output, user ID, model ID, etc., and obtain the conversation return data.

[0125] Then, the message processing service 706 stores the conversation reflow data in the Mongo service 707 , for example, the preset reflow location is the target database table in the Mongo service 707 .

[0126] Reference Figure 7 ,The process of automatically training the target large model is described below.

[0127] Then, the training service 708 retrieves the conversation reflow data from the Mongo service 707 .

[0128] Then, the training service 708 uses the conversation reflow data to obtain training samples, trains the model materials taken out from the Bos service 709, and puts them into the Bos service 709.

[0129] Specifically, the training service 708 reads the latest model material (the latest version of the model) from the Bos service at 0:00 every day, loads it into the memory, and then reads the conversation data of the previous day from the Mongo service 707, batch by batch, and sends it to the target large model for fine-tuning training according to the conversation ID from small to large (for example, the conversation return data after the message processing service 706 parses the message can be directly used for training). The training time does not exceed a certain time (such as 24 hours, just an example). After that, the data that has not been trained will no longer be trained. After the training is completed, the target large model is saved as the latest model material in the Bos service 709, and new data such as model version, training time and model material address are added to the Mongo service 707.

[0130] Reference Figure 7 ,The following describes the process of dialog reflow data processing and ,realizing the process of automatically deploying large models.

[0131] Then, the deployment service 710 queries the Mongo service 707 whether there is an updated target large model, and deploys it if so.

[0132] For example, the deployment service 710 accesses the Mongo service 707 at 8 o'clock every day to check the latest model version. If the currently deployed target large model is the latest version, no processing is performed. Otherwise, the latest model material address is obtained from the Mongo service 707, and the Bos service 709 is accessed to download the model, and then loaded into the memory. After the loading is completed, the old large model service is closed and the new model continues to provide services.

[0133] Figure 8 1 is a block diagram of an intelligent agent according to an embodiment of the present disclosure. The intelligent agent of this embodiment may include a target large model obtained based on the above training method.

[0134] In the embodiments of the present disclosure, inspired by the von Neumann structure in modern computer theory, such as Figure 8 As shown, the AI ​​agent 800 may include five core modules: an input module 810 , a control module 820 , a storage module 830 , a calculation module 840 and an output module 850 .

[0135] The input module 810 is responsible for receiving or sensing information such as queries, requests, instructions, signals or data from the outside world (such as users or external environment), and converting them into a format that can be understood and processed by the AI ​​agent 800. The input module 810 is the primary link for the AI ​​agent 800 to interact with the outside world. It enables the AI ​​agent 800 to efficiently and accurately obtain the necessary "sensory" information from the outside world and respond to this information.

[0136] In an example, the input module 810 can input the chat information of the user described above.

[0137] In the example, the control module 820 is the core support for the AI ​​agent 800 to handle complex tasks. The control module 820 can execute the large model-based dialogue reflow data processing method described above.

[0138] In the example, the control module 820 will continuously interact with the storage module 830, the computing module 840 and / or the output module 850 during operation. However, it should be noted that in the embodiment of the present disclosure, the control module 820 acts as a single initiator to initiate communication with the storage module 830, the computing module 840 and / or the output module 850, and there is no communication coupling between the storage module 830, the computing module 840 and the output module 850.

[0139] In the example, the performance of the control module 820 may be closely related to the large model on which the AI ​​agent 800 is based. In order to give full play to the capabilities of the large language model, the internal structure of the control module 820 may be designed to be highly configurable and scalable to cope with various types of tasks and requirements in real scenarios.

[0140] The storage module 830 may be responsible for memorizing information such as historical conversations, event streams, etc. The above prompt information and data resources may be included in the storage module 830 .

[0141] In the example, after obtaining user input, the AI ​​agent 800 can retrieve relevant prompt words and data resources from the storage module 830 and feed them back to the control module 820. Then, the control module 820 can use the feedback prompt words and data resources to call the target large model for reasoning, and pass the reasoning results to the output module 850.

[0142] The operation module 840 can be regarded as a predefined tool library. The tools obtained by encapsulating the target large model can be included in the operation module 840.

[0143] In the example, when the AI ​​agent 800 needs to respond to user input, it can call the relevant tool that encapsulates the target large model from the operation module 840 and feed it back to the control module 820. Then, the control module 820 can use the called tool to obtain the inference result and pass it to the output module 850. It can be understood that although the large language model has excellent language understanding and generation capabilities, it is like a human being, without the help of any tools, and the tasks it can solve are very limited. When the AI ​​agent 800 is given the ability to call tools, it can achieve more complex tasks.

[0144] The AI ​​agent 800 according to the embodiment of the present disclosure can simply and effectively improve the level of intelligence, and improve flexibility and versatility.

[0145] Based on the above conversation reflow data processing method and training method, a conversation reflow data processing device and training device are also provided.

[0146] Fig. 9 It is a block diagram of a conversation reflow data processing device based on a large model according to an embodiment of the present disclosure.

[0147] like Fig. 9 As shown, the conversation reflow data processing device 900 may include:

[0148] The queue management service unit 910 is used to select a target message queue from multiple candidate message queues bound to the target large model in response to a dialog return flow data processing request for the target large model.

[0149] The message sending service unit 920 is used to add the return flow message to the target message queue, where the return flow message is obtained by encapsulating the dialogue data between the target large model and the target interactive object among the multiple interactive objects.

[0150] The message processing service unit 930 is used to parse the return flow message in the target message queue to obtain the conversation return flow data, so as to store the conversation return flow data in a preset return flow location.

[0151] The data volume of the conversation data between the multiple candidate message queues bound to the target large model and the multiple interactive objects is adapted by performing at least one of the following operations:

[0152] Dynamically adjust the number of multiple candidate message queues.

[0153] Dynamically change at least one of the plurality of candidate message queues.

[0154] For example, the number of multiple candidate message queues can be dynamically adjusted by the queue management service unit 910, and the binding relationship can be stored in the storage service unit. At least one of the multiple candidate message queues can be dynamically changed by the queue management service unit 910, and the binding relationship can be stored in the storage service unit.

[0155] In some embodiments, dynamically adjusting the number of multiple candidate message queues includes: in response to the data volume being greater than or equal to a first threshold, calling a serverless computing resource to deploy a newly added candidate message queue bound to the target large model. In response to the data volume being less than or equal to a second threshold, calling a serverless computing resource to deregister at least one of the multiple candidate message queues, the second threshold being less than the first threshold.

[0156] In some embodiments, the target large model is any one of a plurality of large models, the plurality of large models including at least two large models bound to the same common message queue, wherein the common message queue is used as a candidate message queue for each of the at least two large models.

[0157] In some embodiments, when the target large model is bound to at least one shared message queue, dynamically changing at least one of the plurality of candidate message queues includes: in response to the data volume being greater than or equal to a third threshold, releasing the binding between at least one of the shared message queues and the target large model. And binding the target large model to at least one non-shared message queue, wherein each non-shared message queue is used only as a candidate message queue of the target large model.

[0158] In some embodiments, when the target large model is bound to at least one non-shared message queue, dynamically changing at least one of the plurality of candidate message queues further comprises: in response to the data volume being less than or equal to a fourth threshold, releasing the binding between at least one of the non-shared message queues and the target large model, the fourth threshold being less than the third threshold. And binding the target large model to the at least one shared message queue.

[0159] In some embodiments, the queue management service unit is further used to: select a message queue in an available state from multiple candidate message queues in a polling manner as a target message queue. Or, select a queue with the least message accumulation number among multiple candidate message queues as the target message queue, where the message accumulation number includes the number of unparsed return messages.

[0160] In some embodiments, the conversation reflow data processing device 900 further includes an inference service unit, which is used to, before adding the reflow message to the target message queue, respond to an inference request from the target interactive object, call the target large model for inference to obtain conversation data, and query the reflow identifier of the target large model. When the reflow identifier is the target identifier, encapsulate the conversation data to obtain the reflow message.

[0161] Fig.10 is a block diagram of a training device for a large model according to an embodiment of the present disclosure.

[0162] like Fig.10 As shown, the training device 1000 may include:

[0163] The first training service unit 1010 is used to respond to a training request for a target large model and obtain training samples based on the conversation reflow data of the target large model, wherein the conversation reflow data is obtained by processing according to one or more embodiments of the conversation reflow data processing device.

[0164] The second training service unit 1020 is used to train the target large model using the training samples.

[0165] In some embodiments, training is performed periodically.

[0166] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0167] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0168] like Fig.11As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0169] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc. An output unit 1107, such as various types of displays, speakers, etc. A storage unit 1108, such as a disk, an optical disk, etc. And a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0170] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the conversation reflow data processing method and / or the training method of the large model. For example, in some embodiments, the conversation reflow data processing method and / or the training method of the large model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the method for processing conversation reflow data and / or the method for training a large model described above may be executed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the method for processing conversation reflow data and / or the method for training a large model in any other appropriate manner (e.g., by means of firmware).

[0171] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

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

[0174] To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to the user. As well as a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user. For example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback). And input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0175] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN), and the Internet.

[0176] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0177] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0178] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for processing conversation reflow data based on a large model, comprising: In response to a dialog reflow data processing request for a target large model, selecting a target message queue from a plurality of candidate message queues bound to the target large model; adding a return flow message to the target message queue, wherein the return flow message is obtained by encapsulating the dialog data between the target macro model and a target interactive object among the multiple interactive objects; Parsing the reflow message in the target message queue to obtain conversation reflow data, and storing the conversation reflow data in a preset reflow location; The data volume of the conversation data between the multiple candidate message queues bound to the target large model and the multiple interactive objects is adapted by performing at least one of the following operations: Dynamically adjusting the number of the multiple candidate message queues; Dynamically change at least one of the multiple candidate message queues.

2. The method according to claim 1, wherein: The dynamically adjusting the number of the plurality of candidate message queues comprises: In response to the data volume being greater than or equal to a first threshold, calling a serverless computing resource to deploy a newly added candidate message queue bound to the target large model; In response to the data volume being less than or equal to a second threshold, invoking the serverless computing resource to deregister at least one queue among the plurality of candidate message queues, the second threshold being less than the first threshold.

3. The method according to claim 1, wherein: The target large model is any one of a plurality of large models, The multiple large models include at least two large models bound to a same common message queue, wherein the common message queue is used as a candidate message queue for each of the at least two large models.

4. The method according to claim 3, wherein: In the case where the target large model is bound to at least one of the common message queues, the dynamically changing at least one of the plurality of candidate message queues comprises: In response to the data volume being greater than or equal to a third threshold, releasing the binding between at least one of the common message queues and the target large model; and The target large model is bound to at least one non-shared message queue, wherein each of the non-shared message queues is used only as a candidate message queue for the target large model.

5. The method according to claim 4, wherein: In the case where the target large model is bound to at least one of the non-shared message queues, the dynamically changing at least one of the plurality of candidate message queues further comprises: In response to the data volume being less than or equal to a fourth threshold, releasing the binding between at least one of the non-shared message queues and the target large model, the fourth threshold being less than the third threshold; and The target macro model is bound to at least one of the common message queues.

6. The method according to claim 1, wherein: The selecting a target message queue from at least one candidate message queue bound to the target large model comprises: Selecting a message queue in an available state from a plurality of the candidate message queues as the target message queue in a polling manner; or, A queue with the least message accumulation number among the plurality of candidate message queues is selected as the target message queue, where the message accumulation number includes the number of unparsed return messages.

7. The method according to claim 1, further comprising: Before adding the return message to the target message queue, In response to an inference request from the target interactive object, calling the target large model to perform inference to obtain the dialogue data; Querying the reflux identifier of the target large model; In the case where the reflow identifier is a target identifier, the dialog data is encapsulated to obtain the reflow message.

8. A large model training method, comprising: In response to a training request for a target large model, obtaining a training sample based on the conversation reflow data of the target large model, wherein the conversation reflow data is obtained by processing according to any one of claims 1 to 7; The target large model is trained using the training samples.

9. The method according to claim 8, further comprising: The training is performed periodically.

10. An intelligent agent, comprising a target large model trained according to the method of claim 8 or 9.

11. A conversation reflow data processing device based on a large model, comprising: A queue management service unit, configured to select a target message queue from a plurality of candidate message queues bound to the target large model in response to a dialog return data processing request for the target large model; a sending message service unit, configured to add a return message to the target message queue, wherein the return message is obtained by encapsulating the dialog data between the target macro model and a target interactive object among the multiple interactive objects; A message processing service unit, configured to parse the reflow message in the target message queue to obtain conversation reflow data, so as to store the conversation reflow data in a preset reflow location; The data volume of the conversation data between the multiple candidate message queues bound to the target large model and the multiple interactive objects is adapted by performing at least one of the following operations: Dynamically adjusting the number of the multiple candidate message queues; Dynamically change at least one of the multiple candidate message queues.

12. The device according to claim 11, wherein The dynamically adjusting the number of the plurality of candidate message queues comprises: In response to the data volume being greater than or equal to a first threshold, calling a serverless computing resource to deploy a newly added candidate message queue bound to the target large model; In response to the data volume being less than or equal to a second threshold, invoking the serverless computing resource to deregister at least one queue among the plurality of candidate message queues, the second threshold being less than the first threshold.

13. The device according to claim 11, wherein: The target large model is any one of a plurality of large models, The multiple large models include at least two large models bound to a same common message queue, wherein the common message queue is used as a candidate message queue for each of the at least two large models.

14. The device according to claim 13, wherein: In the case where the target large model is bound to at least one of the common message queues, the dynamically changing at least one of the plurality of candidate message queues comprises: In response to the data volume being greater than or equal to a third threshold, releasing the binding between at least one of the common message queues and the target large model; and The target large model is bound to at least one non-shared message queue, wherein each of the non-shared message queues is used only as a candidate message queue for the target large model.

15. The device according to claim 14, wherein: In the case where the target large model is bound to at least one of the non-shared message queues, the dynamically changing at least one of the plurality of candidate message queues further comprises: In response to the data volume being less than or equal to a fourth threshold, releasing the binding between at least one of the non-shared message queues and the target large model, the fourth threshold being less than the third threshold; and The target macro model is bound to at least one of the common message queues.

16. The device according to claim 11, wherein The queue management service unit is also used for: Selecting a message queue in an available state from a plurality of the candidate message queues as the target message queue in a polling manner; or, A queue with the least message accumulation number among the plurality of candidate message queues is selected as the target message queue, where the message accumulation number includes the number of unparsed return messages.

17. The apparatus according to claim 11, further comprising an inference service unit, wherein the inference service unit is configured to, before adding the return message to the target message queue, In response to an inference request from the target interactive object, calling the target large model to perform inference to obtain the dialogue data; Querying the reflux identifier of the target large model; In the case where the reflow identifier is a target identifier, the dialog data is encapsulated to obtain the reflow message.

18. A large model training device, comprising: A first training service unit, configured to obtain a training sample based on the conversation reflow data of the target large model in response to a training request for the target large model, wherein the conversation reflow data is obtained by processing according to any one of claims 11 to 17; The second training service unit is used to train the target large model using the training samples.

19. The apparatus according to claim 18, further comprising: The training is performed periodically.

20. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the large model-based dialogue reflow method described in any one of claims 1 to 7, or the large model training method described in any one of claims 8 to 9.

21. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the large model-based dialogue reflow method described in any one of claims 1 to 7, or the large model training method described in any one of claims 8 to 9.

22. A computer program product, comprising a computer program, which, when executed by a processor, implements the large model-based dialogue reflow method according to any one of claims 1 to 7, or the large model training method according to any one of claims 8 to 9.

Citation Information

Cited By

  • Construction method of message processing system and message processing method and device

    CN120567814A

  • Streaming output method of model and electronic equipment

    CN121050892A

  • Model streaming output method and electronic device

    CN121050892B