Multi-model collaborative service method, device, equipment and storage medium
By analyzing the difficulty and matching the current question data in the target dialogue and dynamically selecting the task processing model, the problem of resource allocation imbalance in large language models is solved, and the optimization of resource allocation and improvement of computing power utilization is achieved.
Patent Information
- Application Number
- CN202510797403.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-16
AI Technical Summary
In the prior art, there is a serious imbalance in resource allocation of large language models, high-performance computing resources are over-occupied, while small and medium-sized computing resources are idle, and it is difficult for the static allocation mechanism to achieve optimal resource allocation.
By analyzing the difficulty of the current question data in the target dialogue, identifying the task difficulty with historical question data, and performing performance matching in task processing models with different computing power requirements, dynamically selecting the optimal model for content generation, and adjusting the output results using feedback results to avoid resource mismatch.
The maximum utilization of computing resources is achieved, the average computing cost is reduced, the resource allocation optimization rate is improved, and the answer quality and accuracy are ensured.
Smart Images

Figure CN120297428B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model services, and in particular to multi-model collaborative service methods, devices, equipment and storage media. Background Art
[0002] With the rapid development of large language model technology, the inference costs of models of different sizes have shown significant differences. From small models deployed on a single graphics card to very large models requiring multi-machine cluster support, their resource requirements span a wide range. Taking the series of models released by DeepSeek as an example, its distillation model Qwen1.5B only requires 3GB of video memory for stable deployment, while the R1 model requires up to 1.4TB of video memory resources. In actual application scenarios, users generally tend to choose the most powerful models to handle all types of tasks. This usage pattern leads to a serious imbalance in resource allocation: high-performance computing resources are over-utilized, while small and medium-sized computing resources are idle.
[0003] To address this issue, related technologies primarily analyze large amounts of user behavior data to identify intent and, based on this data, deploy large models of corresponding scale to execute the corresponding tasks. However, this static allocation mechanism prevents dynamic adjustments once the model is selected, making it difficult to achieve optimal resource allocation and, consequently, achieving optimal computing resource allocation. Summary of the Invention
[0004] The main purpose of the embodiments of the present application is to propose a multi-model collaborative service method, device, equipment and storage medium to improve the resource allocation optimization rate of large language models.
[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a multi-model collaborative service method, including:
[0006] Input the current question data in the target dialogue into the task difficulty judgment model, and perform difficulty analysis on the current question data based on the historical question data of the target dialogue to obtain the task difficulty;
[0007] According to the task difficulty, a performance match is performed in at least one task processing model to obtain a target task processing model, wherein at least two of the task processing models have different computing power requirements, and different computing power requirements indicate matching with different task difficulties;
[0008] The current question data is sent to the target task processing model for content generation to obtain answer data, and a feedback result corresponding to the answer data is obtained, and an output result for the current question data is obtained based on the feedback result and the answer data.
[0009] In some embodiments, performing difficulty analysis on the current question data based on the historical question data of the target dialogue to obtain the task difficulty includes:
[0010] Parsing the current question data to obtain a parsing result;
[0011] If the analysis result indicates that the current question data includes at least one continuous action identifier, obtain the previous sentence of the current question data in the historical question data as the current question data, until the current question data does not include the continuous action identifier, and use the task difficulty judgment model to perform difficulty analysis on the final current question data to obtain the task difficulty.
[0012] In some embodiments, the at least one task processing model is divided into model groups corresponding to different preset difficulties, each of the model groups includes at least one task processing model, and the performance matching is performed in the at least one task processing model according to the task difficulty to obtain the target task processing model, including:
[0013] Select the preset difficulty that is consistent with the difficulty of the task, and use the corresponding model group as the target model group;
[0014] One of the task processing models is selected from the target model group as the target task processing model according to a preset selection strategy.
[0015] In some embodiments, obtaining an output result for the current question data based on the feedback result and the answer data includes:
[0016] If the feedback result is positive feedback, taking the answer data as the output result;
[0017] If the feedback result is negative feedback, the task difficulty and the corresponding answer data are updated until the output result is obtained.
[0018] In some embodiments, updating the task difficulty and the corresponding answer data until the output result is obtained includes:
[0019] Updating the difficulty of the task to the next level of difficulty;
[0020] The target task processing model is re-determined based on the next level of difficulty, and the corresponding answer data and the feedback result are updated until the next level of difficulty is the highest difficulty or the feedback result is the positive feedback, and the final answer data is used as the output result.
[0021] In some embodiments, after obtaining the feedback result corresponding to the answer data, the method further includes:
[0022] Obtaining the task difficulty, the feedback result, and the final current question data as fine-tuning sample data;
[0023] The fine-tuning sample data is used to fine-tune the parameters of the task difficulty judgment model, and the task difficulty judgment model is updated.
[0024] In some embodiments, selecting one of the task processing models from the target model group as the target task processing model according to a preset selection strategy includes:
[0025] Obtaining a model interface corresponding to each of the task processing models in the target model group;
[0026] The model interface is selected using a random selection strategy or a polling selection strategy, and the model interface is called to obtain the corresponding target task processing model.
[0027] To achieve the above objectives, a second aspect of an embodiment of the present application proposes a multi-model collaborative service device, including:
[0028] Task difficulty acquisition module: used to input the current question data in the target dialogue into the task difficulty judgment model, and perform difficulty analysis on the current question data based on the historical question data of the target dialogue to obtain the task difficulty;
[0029] A task model selection module is configured to perform performance matching in at least one task processing model according to the task difficulty to obtain a target task processing model, wherein at least two task processing models have different computing power requirements, and different computing power requirements indicate matching with different task difficulties;
[0030] Feedback update module: used to send the current question data to the target task processing model for content generation, obtain answer data, and obtain the feedback result corresponding to the answer data, and obtain the output result for the current question data based on the feedback result and the answer data.
[0031] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0032] To achieve the above-mentioned purpose, the fourth aspect of the embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0033] The multi-model collaborative service method, apparatus, device and storage medium proposed in the embodiment of the present application input the current question data in the target dialogue into the task difficulty judgment model, and perform difficulty analysis on the current question data based on the historical question data of the target dialogue to obtain the task difficulty. According to the task difficulty, performance matching is performed in at least one task processing model to obtain a target task processing model, wherein the computing power requirements of at least two task processing models are different, and different computing power requirements indicate matching different task difficulties. The current question data is then sent to the target task processing model for content generation to obtain answer data, and the feedback result corresponding to the answer data is obtained, and the output result for the current question data is obtained based on the feedback result and the answer data. The embodiment of the present application judges the difficulty of the current question data, and analyzes the current task difficulty in combination with the contextual relationship of the historical question data in the dialogue, thereby identifying the real computing requirements of the problem and avoiding resource mismatch. In addition, task processing models with different computing power requirements are pre-deployed, and the optimal model is dynamically matched according to the task difficulty assessed in real time, so as to achieve on-demand and precise calling and maximize the utilization of computing power resources. At the same time, the output results are dynamically adjusted based on the feedback results of the answer data to avoid the problem of low result accuracy caused by misjudgment. While ensuring the quality of the answer, the average computing cost is significantly reduced, achieving the goal of improving the resource allocation optimization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a flowchart of the multi-model collaborative service method provided in an embodiment of the present application.
[0035] Figure 2 This is a flowchart of an embodiment of the present application that analyzes the difficulty of current question data based on historical question data of the target dialogue to obtain the task difficulty.
[0036] Figure 3 This is a schematic diagram of the process of forward tracing of current question data provided by an embodiment of the present application.
[0037] Figure 4 This is a flowchart provided by an embodiment of the present application for performing performance matching in at least one task processing model based on task difficulty to obtain a target task processing model.
[0038] Figure 5 This is a flowchart provided by an embodiment of the present application for selecting a task processing model from a target model group as a target task processing model according to a preset selection strategy.
[0039] Figure 6 It is a schematic diagram of a target task processing model selected according to an embodiment of the present application.
[0040] Figure 7This is a flowchart of obtaining an output result for current question data based on feedback results and answer data provided by an embodiment of the present application.
[0041] Figure 8 This is a flowchart of updating the task difficulty and corresponding answer data provided by an embodiment of the present application until the output result is obtained.
[0042] Figure 9 This is a flowchart for fine-tuning the large model for judging task difficulty provided in an embodiment of the present application.
[0043] Figure 10 This is an example of fine-tuning sample data provided in an embodiment of the present application.
[0044] Figure 11 This is an overall flow chart of the multi-model collaborative service method provided in the embodiment of the present application.
[0045] Figure 12 This is a structural block diagram of a multi-model collaborative service device provided in another embodiment of the present application.
[0046] Figure 13 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0048] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0050] First, let’s analyze some of the terms used in this application:
[0051] Artificial Intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0052] With the rapid development of large language model technology, the inference costs of models of different sizes have shown significant differences. From small models deployed on a single graphics card to very large models requiring multi-machine cluster support, their resource requirements span a wide range. Taking the series of models released by DeepSeek as an example, its distillation model Qwen1.5B only requires 3GB of video memory for stable deployment, while the R1 model requires up to 1.4TB of video memory resources. In actual application scenarios, users generally tend to choose the most powerful models to handle all types of tasks. This usage pattern leads to a serious imbalance in resource allocation: high-performance computing resources are over-utilized, while small and medium-sized computing resources are idle.
[0053] To address this issue, related technologies primarily analyze large amounts of user behavior data to identify intent and, based on this data, deploy large models of appropriate scale to perform the corresponding tasks. However, this static allocation mechanism prevents dynamic adjustments once the model is selected, making it difficult to achieve optimal resource allocation. This inability to dynamically adjust large models after deployment makes it difficult to optimize computing resource allocation.
[0054] Based on this, the embodiments of the present application provide a multi-model collaborative service method, apparatus, device and storage medium to judge the difficulty of the current question data, and analyze the current task difficulty in combination with the contextual relationship of the historical question data in the conversation, so as to identify the real computing requirements of the problem and avoid resource mismatch. In addition, task processing models with different computing power requirements are pre-deployed, and the optimal model is dynamically matched according to the task difficulty assessed in real time to achieve on-demand precise calling and maximize the utilization of computing power resources. At the same time, the output results are dynamically adjusted based on the feedback results of the answer data to avoid the problem of low result accuracy caused by misjudgment. Under the premise of ensuring the quality of the answer, the average computing cost is significantly reduced, and the purpose of improving the resource allocation optimization rate is achieved.
[0055] The embodiments of the present application provide a multi-model collaborative service method, apparatus, device, and storage medium, which are specifically illustrated by the following embodiments. First, the multi-model collaborative service method in the embodiments of the present application is described.
[0056] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI is the study of the design principles and implementation methods of various intelligent machines, enabling them to have the capabilities of perception, reasoning, and decision-making.
[0057] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0058] The multi-model collaborative service method provided in the embodiment of the present application relates to the field of model services. The multi-model collaborative service method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, and can also be a computer program running in a terminal or a server side. For example, a computer program can be a native program or software module in an operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run, such as a client that supports multi-model collaborative services, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in. Among them, the terminal communicates with the server through a network. The multi-model collaborative service method can be executed by the terminal or the server, or by the terminal and the server in collaboration.
[0059] In some embodiments, the terminal can be a smartphone, tablet computer, laptop computer, desktop computer, or smartwatch. Furthermore, the terminal can also be an intelligent in-vehicle device. This intelligent in-vehicle device applies the multi-model collaborative service method of this embodiment to provide related services and enhance the driving experience. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It can also be a service node in a blockchain system, where each service node in the blockchain system forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). The terminal and server can be connected via Bluetooth, Universal Serial Bus (USB), or a network connection, etc., which is not limited in this embodiment.
[0060] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0061] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0062] The following describes the multi-model collaborative service method in an embodiment of the present application.
[0063] Figure 1 This is an optional flowchart of the multi-model collaborative service method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps 110 to 130. It is also understood that this embodiment is for Figure 1 The order of step 110 to step 130 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0064] Step 110: Input the current question data in the target dialogue into the task difficulty judgment model, perform difficulty analysis on the current question data based on the historical question data of the target dialogue, and obtain the task difficulty.
[0065] In one embodiment, when a user uses the large language model service, the specific form of interaction is a conversational interaction. Questions are asked in a conversational manner, and the large language model generates corresponding answers based on the user's questions. During the entire interaction process, at least one round of question-answering process will be generated. In this embodiment of the application, a user's conversation process is referred to as a target conversation, and each round of questions is referred to as question data. All question data before the current round constitutes historical question data. At this time, the question data of the current round is referred to as current question data. It can be understood that the current question data can be the question data of the first round, or it can be the question data of an intermediate round with context. In addition, if the current round is the first round of conversation, the historical question data is the current question data itself.
[0066] Once the current question data from the target conversation is available, it is fed into the task difficulty assessment model. This model then analyzes the historical question data from the target conversation and uses this historical data to analyze the difficulty of the current question data to determine the task difficulty. This historical data refers to all questions from before the current turn. This process demonstrates that the difficulty analysis of the current question data isn't limited to the current question data itself; rather, it integrates it into the overall target conversation for a comprehensive analysis, resulting in a more accurate task difficulty.
[0067] In one embodiment, referring to Figure 2 , Figure 2 This is a flowchart of performing difficulty analysis on current question data based on historical question data of a target conversation to obtain task difficulty, provided by an embodiment of the present application, specifically including the following steps:
[0068] Step 210: Analyze the current question data to obtain analysis results.
[0069] In one embodiment, the purpose of parsing the current question data is to analyze whether the question data is a continuation of the previous question. Therefore, the parsing here is to parse the current question data for continuous action identification words. Among them, the continuous action identification words can be words containing the meaning of continuous action, such as "continue", "continue the previous statement", "continue the answer", etc. The parsing result of the current question data is obtained through the process of semantic analysis. In addition, all the continuous action identification words can be composed into a special word list for storage.
[0070] For example, in the target dialogue, the user's first question is "Write a 5,000-word scientific paper." After receiving the answer, the user is not satisfied and wants to increase the word count, so a second round of questions is asked. The second question is "Continue." The purpose is to let the large language model continue writing. Therefore, when "Continue" is used as the current question data, its parsing result includes a continuous action identifier.
[0071] Step 220: If the analysis result indicates that the current question data includes at least one continuous action identifier, obtain the previous sentence of the current question data in the historical question data as the current question data, until the current question data does not include continuous action identifiers, use the task difficulty judgment model to perform difficulty analysis on the final current question data to obtain the task difficulty.
[0072] In one embodiment, if the parsing result indicates that the current question data includes at least one continuous action identifier, it means that the current question data is a continuation of the questioning process of the previous round. At this time, trace back and select the previous sentence of the current question data in the historical question data as the current question data, continue the parsing process, and judge whether the parsing result still contains continuous action identifiers. If it does, continue to trace back until the selected current question data does not include continuous action identifiers, perform difficulty analysis on the last current question data, and obtain the task difficulty.
[0073] In one embodiment, a multi-round dialogue parser is set to update the current question data. Figure 3 , Figure 3 This is a schematic diagram of the process of tracing back the current question data provided by an embodiment of the present application. First, the target dialogue is disassembled, and a list of question data for each round is obtained based on the historical question data. For the current question data, after obtaining the parsing result, it is matched one by one in the special word list. After the matching is completed, it is determined whether it contains at least one continuous action identification word. If it does not contain the continuous action identification word, the difficulty is analyzed for the current question data to obtain the task difficulty. If it contains the continuous action identification word, it moves forward one along the historical question data, obtains the previous question data as the current question data for judgment, until the question data that does not contain the continuous action identification word is selected as the latest current question data. In this process, it is determined whether the list overflows. If it does not overflow, it means that it can continue to trace forward, otherwise the question data corresponding to the overflow state is selected.
[0074] After selecting the current question data that does not contain continuous action identifiers, it is input into the task difficulty judgment model for difficulty analysis. At this time, multiple difficulty levels can be set according to actual needs. According to the input current question data, the task difficulty judgment model can directly give the task difficulty. For example, the difficulty is divided into 7 levels in total, and the difficulty of the task of "writing a 5,000-word scientific paper" can be set to level 6. If the continuous action identifier is not recognized, the task difficulty of "continue" may only be level 1. At this time, directly generating further answers based on "continue" cannot meet the actual needs of the user. At this time, after using the multi-round dialogue parser to fall back, the question data of "continue" must be fallen back to "help me write a scientific paper", so that the difficulty of the question can be judged more accurately.
[0075] Step 120: Perform performance matching in at least one task processing model according to the task difficulty to obtain a target task processing model.
[0076] In one embodiment, the computing network typically includes different computing chips, such as Ascend 910A, Ascend 910B, A100, etc. These computing chips have different computing capabilities and can carry different large language model services. In this embodiment of the application, large language models with different computing power requirements can be deployed on different computing chips as task processing models based on the computing power of the computing chips. At least two task processing models have different computing power requirements, and different computing power requirements indicate different matching task difficulties.
[0077] For example, a high-performance task processing model can be deployed on a high-computing power chip to handle difficult tasks, while a low-performance task processing model can be deployed on a low-computing power chip to handle easy tasks. Task processing models of varying performance can also be deployed on the same computing power chip. At least one task processing model corresponding to the same task difficulty is considered a model group, with as many model groups as there are task difficulties. The same model group can be located on the same computing power chip or on different computing power chips; the specific deployment of the model group is not limited here.
[0078] For example, suppose there are 20 task processing models used to match different task difficulties, and there are 7 task difficulties in total. At this time, these 20 task processing models are divided into 7 different model groups, and each model group corresponds to one task difficulty.
[0079] In one embodiment, referring to Figure 4 , Figure 4 This is a flowchart of performing performance matching in at least one task processing model according to task difficulty to obtain a target task processing model, provided in an embodiment of the present application, which specifically includes the following steps:
[0080] Step 410: Select a preset difficulty that is consistent with the task difficulty, and use the corresponding model group as the target model group.
[0081] In one embodiment, the preset difficulty refers to all levels of task difficulty, for example, 7 preset difficulty levels. The difficulty obtained based on the current question data is called the task difficulty. For example, if the task difficulty is level 6, the preset difficulty representing level 6 is selected, and the model group corresponding to the preset difficulty is used as the target model group.
[0082] Step 420: Select a task processing model from the target model group as the target task processing model according to a preset selection strategy.
[0083] In one embodiment, a model group may include more than one task processing model, so it is necessary to select from the target model group according to a preset selection strategy. Figure 5 , Figure 5This is a flowchart of selecting a task processing model from a target model group as a target task processing model according to a preset selection strategy provided by an embodiment of the present application, which specifically includes the following steps:
[0084] Step 510: Obtain the model interface corresponding to each task processing model in the target model group.
[0085] In one embodiment, each task processing model in the target model group has a corresponding model interface for calling. By encapsulating each task processing model in the form of a model interface, standardized management can be achieved, and calling flexibility and switching efficiency can be improved.
[0086] Step 520: Select a model interface using a random selection strategy or a round-robin selection strategy, and call the model interface to obtain the corresponding target task processing model.
[0087] In one embodiment, random selection or polling selection can be performed to select an interface from at least one model interface, and the corresponding task processing model can be accessed by calling the model interface and used as the target task processing model.
[0088] In one embodiment, referring to Figure 6 , Figure 6 This is a schematic diagram of selecting a target task processing model provided by an embodiment of the present application. First, each preset difficulty level indicates a different difficulty level. Each difficulty level corresponds to a model group. Each model group includes at least one task processing model. A task processing model can be selected from the model group as the target task processing model through random scheduling or polling scheduling.
[0089] Step 130: Send the current question data to the target task processing model for content generation, obtain answer data, and obtain feedback results corresponding to the answer data, and obtain output results for the current question data based on the feedback results and the answer data.
[0090] In one embodiment, once a target task processing model is established for processing the current question data, the current question data is sent to the target task processing model for content generation, resulting in answer data. Once the answer data is generated, the quality of the generated answer data can be evaluated using user feedback or other artificial intelligence analysis methods, with the evaluation results serving as feedback corresponding to the answer data. With this feedback, subsequent fine-tuning can begin.
[0091] In one embodiment, referring to Figure 7 , Figure 7 This is a flowchart of obtaining an output result for the current question data based on the feedback result and answer data provided by an embodiment of the present application, which specifically includes the following steps:
[0092] Step 710: If the feedback result is positive feedback, the answer data is used as the output result.
[0093] In one embodiment, if the feedback result is positive feedback, that is, according to the evaluation result, the answer data has a high degree of matching with the current question data and the generated result is accurate, the answer data can be directly used as the final output result.
[0094] Step 720: If the feedback result is negative feedback, update the task difficulty and the corresponding answer data until the output result is obtained.
[0095] In one embodiment, if the feedback result is negative, meaning the answer data is not what the user intended for the current question data, the user can provide negative feedback by "regenerating" or other means. If the feedback result is negative, it indicates that the task difficulty needs to be updated, and new answer data is obtained based on the updated task difficulty until the answer data corresponds to positive feedback, resulting in the final output result.
[0096] In one embodiment, referring to Figure 8 , Figure 8 This is a flowchart of updating the task difficulty and the corresponding answer data provided by an embodiment of the present application until the output result is obtained, which specifically includes the following steps:
[0097] Step 810: Update the task difficulty to the next level of difficulty.
[0098] Step 820: Re-determine the target task processing model based on the next level of difficulty, update the corresponding answer data and feedback results, until the next level of difficulty is the highest difficulty or the feedback result is positive feedback, and use the final answer data as the output result.
[0099] In one embodiment, if the user is dissatisfied with the generated answer data, it can be considered that there is a problem with the task difficulty judgment model's difficulty judgment of the current question data. Therefore, the task difficulty is increased and updated to the next level of difficulty. For example, if the original task difficulty is level 6, it is increased to level 7. It is understood that the maximum value of the next level of difficulty is the maximum value of the preset difficulty.
[0100] Next, based on the new task difficulty, a new target processing task model is selected for content generation, the corresponding answer data is updated, and feedback on the new answer data is obtained. This feedback is analyzed to determine whether to stop increasing the task difficulty. This continues until the next level reaches the highest difficulty level, meaning the difficulty ceiling is reached, or the answer data feedback is positive, meaning the answer meets the requirements. In either case, the final answer data is used as the output.
[0101] The embodiment of the present application uses the above steps to judge the difficulty of the current question data, and analyzes the current task difficulty in combination with the contextual relationship of the historical question data in the conversation, thereby identifying the real computing requirements of the problem and avoiding resource mismatch. In addition, task processing models with different computing power requirements are pre-deployed, and the optimal model is dynamically matched according to the task difficulty assessed in real time, so as to achieve on-demand precise calling and maximize the utilization of computing power resources. At the same time, the output results are dynamically adjusted based on the feedback results of the answer data to avoid the problem of low result accuracy caused by misjudgment. Under the premise of ensuring the quality of the answer, the average computing cost is significantly reduced, and the purpose of improving the resource allocation optimization rate is achieved.
[0102] In one embodiment, after obtaining the feedback results corresponding to the answer data, the task difficulty judgment model can be fine-tuned accordingly. Figure 9 , Figure 9 This is a flowchart of fine-tuning the task difficulty judgment model provided by an embodiment of the present application, which specifically includes the following steps:
[0103] Step 910: Obtain task difficulty, feedback results, and the final current question data as fine-tuning sample data.
[0104] In one embodiment, the task difficulty judgment model is an instruction fine-tuning model, and its system instruction is expressed as:
[0105] system_prompts="You are an expert in judging the difficulty of a question. The difficulty level of a question ranges from 1 to 7, with difficulty levels from low to high being 1, 2, 3, 4, 5, 6, and 7. You only need to directly provide the difficulty level of the question." The input current question data is: prompts=prompts+"What is the difficulty level of this question?" The output result is the task difficulty: The task difficulty of this question is level 7.
[0106] According to the above format, the final current question data, task difficulty and feedback results together constitute the fine-tuning sample data. The specific format is as follows:
[0107] "Write a 5,000-word scientific paper", task difficulty = 6, feedback result = False (negative feedback);
[0108] "Write a 5,000-word scientific paper", task difficulty = 7, feedback result = True (positive feedback).
[0109] Step 920: Use the fine-tuning sample data to fine-tune the parameters of the task difficulty judgment model and update the task difficulty judgment model.
[0110] In one embodiment, after obtaining the fine-tuning sample data, the fine-tuning sample data can be used to fine-tune the parameters of the task difficulty judgment model and update the task difficulty judgment model. Figure 10 , Figure 10 This is an example of fine-tuning sample data provided by an embodiment of the present application. Assuming that there are 7 task processing models corresponding to different task difficulties, the current question data of each task processing model is input into the task processing model corresponding to the task difficulty for processing to obtain the corresponding answer data. If the feedback result is positive feedback, the task difficulty is used as the correct output of the task difficulty judgment model. If the feedback result is negative feedback, the task difficulty is increased one by one, and the current question data is sent to the task processing model corresponding to the higher difficulty level for processing, and the feedback result is obtained again until the task difficulty corresponding to the positive feedback is obtained. The task difficulty is matched with the current question data, and the task difficulty judgment model is fine-tuned accordingly so that it can correctly output the task difficulty corresponding to the question data and improve the accuracy of the judgment.
[0111] In one embodiment, referring to Figure 11 , Figure 11 This is an overall flow chart of the multi-model collaborative service method provided in the embodiment of the present application.
[0112] First, the target conversation is acquired and each question data from the target conversation is broken down into a task. A multi-turn conversation parser is used to determine the actual question data corresponding to the current question data, allowing for more accurate difficulty judgments for individual tasks. This question data can be the current question data itself or a historical question data from the target conversation. The updated current question data is then input into the task difficulty judgment model for difficulty analysis, resulting in the task difficulty. The task difficulty is then input into the task distributor to select the target task processing model. From multiple task processing models, one corresponding to the task difficulty is selected and used to generate the corresponding answer data.
[0113] The answer data is then fed into the user feedback module to obtain the user's feedback results for the answer data. If the feedback result is positive, the answer data is used as the output result. If the feedback result is negative, the task difficulty is updated to the next level of difficulty. Based on the next level of difficulty, the target task processing model is redefined, and the corresponding answer data and feedback results are updated until the next level of difficulty reaches the highest difficulty or the feedback result is positive. The final answer data is used as the output result. Based on the feedback result and the answer data, the output result for the current question data is obtained.
[0114] Finally, the task difficulty, feedback results and the final current question data are obtained as fine-tuning sample data, and data processing is performed on them. Based on this, the task difficulty judgment model is fine-tuned so that it can correctly output the task difficulty corresponding to the question data.
[0115] The above process realizes multi-model collaborative services through multi-round dialogue parsers, task difficulty judgment expert big models, task distributors, etc. Users can make corresponding feedback based on the answer data, and then based on the feedback results, the task difficulty judgment expert big model is adaptively updated to make the judgment results more accurate, ensuring the stable and accurate operation of the entire multi-model collaborative system, solving the model service concurrency problem, greatly reducing concurrency pressure, and making the use of computing power resources more balanced.
[0116] According to Moore's Law of computing chip development, chip processing power doubles every 18 months. Every 18 months, users acquire more powerful high-end computing chips, leaving low-end chips unused due to obsolescence. The multi-model collaborative service method provided in the embodiments of this application can utilize both low-end and high-end computing chips, maximizing resource utilization while ensuring service quality.
[0117] The technical solution provided by the embodiments of the present application inputs the current question data in the target conversation into a large task difficulty judgment model, and then analyzes the difficulty of the current question data based on the historical question data of the target conversation to obtain the task difficulty. Based on the task difficulty, performance matching is performed in at least one task processing model to obtain a target task processing model, wherein at least two task processing models have different computing power requirements, and different computing power requirements indicate matching different task difficulties. The current question data is then sent to the target task processing model for content generation to obtain answer data, and feedback results corresponding to the answer data are obtained. Based on the feedback results and the answer data, an output result for the current question data is obtained. The embodiments of the present application judge the difficulty of the current question data and analyze the current task difficulty based on the contextual relationship of the historical question data in the conversation, thereby identifying the actual computing requirements of the problem and avoiding resource mismatch. In addition, task processing models with different computing power requirements are pre-deployed, and the optimal model is dynamically matched based on the real-time assessed task difficulty, achieving on-demand and precise call, maximizing computing power resource utilization. At the same time, the output result is dynamically adjusted based on the feedback results of the answer data to avoid the problem of low result accuracy caused by misjudgment. While ensuring the quality of the answer, the average computing cost is significantly reduced, achieving the goal of improving the resource allocation optimization rate.
[0118] The embodiment of the present application also provides a multi-model collaborative service device, which can implement the multi-model collaborative service method mentioned above. Figure 12 , the device comprises:
[0119] Task difficulty acquisition module 1210: used to input the current question data in the target dialogue into the task difficulty judgment model, perform difficulty analysis on the current question data based on the historical question data of the target dialogue, and obtain the task difficulty.
[0120] Task model selection module 1220: used to perform performance matching in at least one task processing model according to task difficulty to obtain a target task processing model. At least two task processing models have different computing power requirements, and different computing power requirements indicate matching different task difficulties.
[0121] Feedback update module 1230: used to send the current question data to the target task processing model for content generation, obtain answer data, and obtain the feedback result corresponding to the answer data, and obtain the output result for the current question data based on the feedback result and the answer data.
[0122] The specific implementation of the multi-model collaborative service device of this embodiment is basically the same as the specific implementation of the multi-model collaborative service method described above, and will not be repeated here.
[0123] An embodiment of the present application further provides an electronic device, including:
[0124] at least one memory;
[0125] at least one processor;
[0126] at least one program;
[0127] The program is stored in the memory, and the processor executes the at least one program to implement the multi-model collaborative service method described above. The electronic device can be any smart terminal including a mobile phone, tablet computer, personal digital assistant (PDA), car computer, etc.
[0128] See also Figure 13 , Figure 13 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0129] The processor 1301 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0130] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1302 and is called by the processor 1301 to execute the multi-model collaborative service method of the embodiments of this application.
[0131] Input / output interface 1303, used to implement information input and output;
[0132] Communication interface 1304, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0133] Bus 1305 , which transmits information between various components of the device (e.g., processor 1301 , memory 1302 , input / output interface 1303 , and communication interface 1304 );
[0134] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .
[0135] An embodiment of the present application also provides a storage medium, which is a storage medium that stores a computer program. When the computer program is executed by a processor, the above-mentioned multi-model collaborative service method is implemented.
[0136] The memory, as a non-transient storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0137] The multi-model collaborative service method, apparatus, device and storage medium proposed in the embodiment of the present application input the current question data in the target dialogue into the task difficulty judgment model, and perform difficulty analysis on the current question data based on the historical question data of the target dialogue to obtain the task difficulty. According to the task difficulty, performance matching is performed in at least one task processing model to obtain a target task processing model, wherein the computing power requirements of at least two task processing models are different, and different computing power requirements indicate matching different task difficulties. The current question data is then sent to the target task processing model for content generation to obtain answer data, and the feedback result corresponding to the answer data is obtained, and the output result for the current question data is obtained based on the feedback result and the answer data. The embodiment of the present application judges the difficulty of the current question data, and analyzes the current task difficulty in combination with the contextual relationship of the historical question data in the dialogue, thereby identifying the real computing requirements of the problem and avoiding resource mismatch. In addition, task processing models with different computing power requirements are pre-deployed, and the optimal model is dynamically matched according to the task difficulty assessed in real time, so as to achieve on-demand and precise calling and maximize the utilization of computing power resources. At the same time, the output results are dynamically adjusted based on the feedback results of the answer data to avoid the problem of low result accuracy caused by misjudgment. While ensuring the quality of the answer, the average computing cost is significantly reduced, achieving the goal of improving the resource allocation optimization rate.
[0138] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0139] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0140] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0141] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0142] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0143] It should be understood that in this application, "at least one (item)" means one or more, and "more" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.
[0144] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store programs.
[0148] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A multi-model collaborative service method, characterized in that: include: Inputting current question data in the target dialogue into the task difficulty judgment macromodel, parsing the current question data to obtain a parsing result, and if the parsing result indicates that the current question data includes at least one continuous action identifier, obtaining the sentence preceding the current question data in the historical question data as the current question data, until the current question data no longer includes the continuous action identifier, and performing difficulty parsing on the final current question data using the task difficulty judgment macromodel to obtain the task difficulty; Select a preset difficulty that is consistent with the difficulty of the task, use the corresponding model group as the target model group, obtain the model interface corresponding to each task processing model in the target model group, select the model interface using a random selection strategy or a polling selection strategy, call the model interface to obtain the corresponding target task processing model, at least one task processing model is divided into model groups corresponding to different preset difficulties, each model group includes at least one task processing model, and at least two of the task processing models have different computing power requirements, and different computing power requirements indicate matching of different task difficulties; The current question data is sent to the target task processing model for content generation to obtain answer data, and a feedback result corresponding to the answer data is obtained, and an output result for the current question data is obtained based on the feedback result and the answer data.
2. The multi-model collaborative service method according to claim 1, characterized in that: The obtaining of an output result for the current question data based on the feedback result and the answer data includes: If the feedback result is positive feedback, taking the answer data as the output result; If the feedback result is negative feedback, the task difficulty and the corresponding answer data are updated until the output result is obtained.
3. The multi-model collaborative service method according to claim 2, characterized in that: The updating of the task difficulty and the corresponding answer data until the output result is obtained includes: Updating the difficulty of the task to the next level of difficulty; The target task processing model is re-determined based on the next level of difficulty, and the corresponding answer data and the feedback result are updated until the next level of difficulty is the highest difficulty or the feedback result is the positive feedback, and the final answer data is used as the output result.
4. The multi-model collaborative service method according to claim 1, characterized in that: After obtaining the feedback result corresponding to the answer data, the method further includes: Obtaining the task difficulty, the feedback result, and the final current question data as fine-tuning sample data; The fine-tuning sample data is used to fine-tune the parameters of the task difficulty judgment model, and the task difficulty judgment model is updated.
5. A multi-model collaborative service device, characterized in that: include: A task difficulty acquisition module is configured to input the current question data in the target dialogue into a task difficulty judgment macromodel, parse the current question data to obtain a parsing result, and if the parsing result indicates that the current question data includes at least one continuous action identifier, obtain the sentence preceding the current question data in the historical question data as the current question data, until the current question data no longer includes the continuous action identifier, and then use the task difficulty judgment macromodel to perform difficulty parsing on the final current question data to obtain the task difficulty; Task model selection module: used to select a preset difficulty consistent with the task difficulty, take the corresponding model group as the target model group, obtain the model interface corresponding to each task processing model in the target model group, select the model interface with a random selection strategy or a polling selection strategy, call the model interface to obtain the corresponding target task processing model, at least one task processing model is divided into model groups corresponding to different preset difficulties, each model group includes at least one task processing model, at least two of the task processing models have different computing power requirements, and different computing power requirements indicate matching different task difficulties; Feedback update module: used to send the current question data to the target task processing model for content generation, obtain answer data, and obtain the feedback result corresponding to the answer data, and obtain the output result for the current question data based on the feedback result and the answer data.
6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the multi-model collaborative service method according to any one of claims 1 to 4 when executing the computer program.
7. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the multi-model collaborative service method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Answer matching method and system of artificial intelligence large model
CN119311843A
Digital human question and answer method and device, electronic equipment and storage medium
CN119474320A
Cited By
Multi-model dynamic collaborative interpretable strategy generation and evaluation method and system, electronic equipment and storage medium
CN122088669A