Task processing method and device, equipment, medium and program product
By using a multi-model set and dynamic load distribution method in the AI system, combined with end-to-end risk control, the contradiction between response speed and intent understanding is resolved, and the scalability and security of the system are improved.
Patent Information
- Application Number
- CN202511421103.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-13
AI Technical Summary
Existing AI systems suffer from a trade-off between response speed and depth of intent understanding. Static routing strategies result in poor scalability, and post-implementation risk control poses security risks.
At least two model sets are used to dynamically allocate tasks based on system load rate and task priority. Intent recognition is performed by combining a multi-model collaboration mechanism and a full-process risk control pipeline is introduced.
It achieves a balance between response speed and intent understanding in high-concurrency scenarios, improves system scalability and security, and avoids resource waste and delayed risk identification.
Smart Images

Figure CN121326569A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of artificial intelligence, and particularly relates to a task processing method and device, equipment, medium and program product. BACKGROUND
[0002] In a modern artificial intelligence (AI) system, a model is usually relied on to recognize and respond to user input information. With the complication and diversification of AI interaction scenarios, how to accurately understand the task intent while ensuring response efficiency becomes a key technical problem in the design of a processing system. Current processing systems mostly use a single model architecture for task processing, and there is a significant contradiction between the performance and understanding ability of the single model architecture. SUMMARY
[0003] Embodiments of the present application provide a task processing method, device, equipment, medium and program product.
[0004] Embodiments of the present application provide a task processing method applied to a processing system, wherein the processing system is deployed with at least two model sets, and the method comprises:
[0005] obtaining a first load rate of the processing system, and distributing a to-be-processed task to a first model set in the at least two model sets based on the first load rate; the first model set comprises at least two models;
[0006] identifying an intent of the to-be-processed task by a target model; wherein the target model is one of the at least two models of the first model set.
[0007] Embodiments of the present application also provide a task processing device applied to a processing system, wherein the processing system is deployed with at least two model sets, and the device comprises:
[0008] a processing module, configured to obtain a first load rate of the processing system, and distribute a to-be-processed task to a first model set in the at least two model sets based on the first load rate; the first model set comprises at least two models;
[0009] an identifying module, configured to identify an intent of the to-be-processed task by a target model; wherein the target model is one of the at least two models of the first model set.
[0010] Embodiments of the present application provide an electronic device, comprising a processor and a memory for storing a computer program capable of running on the processor; wherein
[0011] the processor is configured to run the computer program to perform any of the above task processing methods.
[0012] The embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement any one of the task processing methods.
[0013] The embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement any one of the task processing methods.
[0014] The embodiment of the present application provides a task processing method, device, equipment, medium and program product. Firstly, the real-time load condition of a processing system is acquired, and a routing path of a to-be-processed task is dynamically determined, that is, a first model set used for identifying an intention of the to-be-processed task is dynamically determined, which is beneficial to avoiding overload or resource waste of the processing system. Secondly, a target model is selected from the first model set for intention identification, which is beneficial to flexibly deploying computing resources while ensuring identification accuracy, and improving overall processing efficiency of the to-be-processed task. Compared with fixed use of a single model or a static routing strategy, the method of the embodiment of the present application balances the response speed and intention understanding depth, and makes the processing system have stronger expansibility. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A method flowchart for intention identification by using a single BERT model is provided for the embodiment of the present application.
[0016] Figure 2 A task processing method flowchart is provided for the embodiment of the present application.
[0017] Figure 3 A task processing method flowchart based on confidence is provided for the embodiment of the present application.
[0018] Figure 4 Another task processing method flowchart based on confidence is provided for the embodiment of the present application.
[0019] Figure 5 A risk level identification method flowchart is provided for the embodiment of the present application.
[0020] Figure 6 Another task processing method flowchart is provided for the embodiment of the present application.
[0021] Figure 7 A task processing general flowchart is provided for the embodiment of the present application.
[0022] Figure 8 A processing system architecture schematic diagram is provided for the embodiment of the present application.
[0023] Figure 9A task processing device structure schematic diagram provided for an embodiment of the present application;
[0024] Figure 10 A component structure schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0025] The current personal consumer (C) end processing system (such as an AI system) faces three major technical challenges in engineering practice: first, the contradiction between response performance and understanding depth: the single model architecture of the processing system is difficult to meet the real-time response requirement of less than 100 ms and the deep understanding requirement of complex intent at the same time; second, the expansion bottleneck of static routing processing method: the fixed routing strategy leads to the need to restructure the overall processing system architecture when the business expands; third, the security risk of post-control: only in the output stage does the content audit identify the risk, which may exist the risk of illegal information leakage.
[0026] For example, when a single bidirectional encoder representation from transformers (BERT) model is used for intent recognition, the measured data shows that its misjudgment rate exceeds 15% in an open domain scenario, and it lacks a dynamic model switching mechanism, which cannot adapt to the performance requirements of a high-concurrency interaction scenario. Figure 1 A method flowchart for intent recognition by a single BERT model is shown, including:
[0027] Step 101: a user inputs a task to be processed.
[0028] Here, the task to be processed input by the user can be a query request, which can specifically include a query statement. The BERT model can perform intent recognition on the query statement input by the user.
[0029] Step 102: a single BERT model is processed.
[0030] The query statement input by the user is identified by the single BERT model, and an intent label and a corresponding confidence are generated. Here, the BERT model can be a BERT classifier.
[0031] Step 103: confidence judgment is performed.
[0032] The confidence of the BERT model is judged, and static routing is performed based on the confidence. When the confidence is greater than 0.7, step 104 is performed; otherwise, step 105 is performed.
[0033] Step 104: processing is performed by a business module 1.
[0034] When the confidence of the intent recognition is greater than 0.7, the query statement of the user is processed by the business module 1 based on the result of the intent recognition to obtain a corresponding query result or reply statement. Then, step 106 is performed.
[0035] Step 105: processing by the processing module.
[0036] When the confidence of the intent recognition is less than or equal to 0.7, the query statement input by the user is distributed to a fixed processing module (such as manual review) for processing.
[0037] Step 106: outputting a response.
[0038] Based on the result of step 104 or step 105, the query request is responded to, and a response result is output, that is, a corresponding query result or reply statement is output.
[0039] Based on Figure 1 The method shown can only implement full calculation through a single model, cannot implement shunt processing of high-frequency and complex intents, and has disadvantages such as high response delay, poor business scalability, and lagging risk control mechanism in a high-concurrency scenario. The response time of the processing method in the high-concurrency scenario can be more than 300 ms. Through Figure 1 The processing method shown in the static routing strategy and the business logic are strongly coupled, lack dynamic adaptation capability, and when different intent recognition methods need to be added, the overall model needs to be retrained, for example, the BERT model needs to be retrained, resulting in poor business scalability. Finally, the above method usually only performs content review and risk assessment in the output stage of step 106, resulting in insufficient risk identification in the whole task processing process.
[0040] To solve the above problems, the embodiments of the present application give a task processing method, device, equipment, medium and program product, which can break through the performance contradiction between response speed (≤100 ms) and intent understanding depth of the traditional single model architecture, give a business strategy dynamic expansion mechanism, can implement no-reconstruction access of new intents, and at the same time give a whole-process risk control pipeline throughout the task processing, implement whole-process risk assessment, and solve the security risks of post-position risk control.
[0041] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the embodiments of the present application and not to limit the embodiments of the present application. In addition, the embodiments provided below are used to implement some embodiments of the present application, and the technical solutions described in the embodiments of the present application can be implemented in any combined manner without conflict.
[0042] It should be noted that in the embodiments of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or device including a series of elements not only includes the elements explicitly listed, but also includes other elements not explicitly listed or inherent elements for implementing the method or device. Without more limitations, the elements defined by the statement "comprising" do not exclude the presence of other related elements (for example, steps in the method or units in the device, such as units in the device, which can be part of a circuit, part of a processor, part of a program or software, etc.) in the method or device including the elements.
[0043] The task processing method provided by the embodiments of the present application includes a series of steps, but the task processing method provided by the embodiments of the present application is not limited to the steps described, and similarly, the task processing device provided by the embodiments of the present application includes a series of modules, but the device provided by the embodiments of the present application is not limited to including the modules explicitly described, and can also include modules required to be set when obtaining related information or processing based on information.
[0044] The embodiments of the present application provide a task processing method, applied to a processing system, the processing system is deployed with at least two model sets, for dynamically allocating tasks to different model sets for processing according to system load conditions, realizing high concurrency, low delay and high accuracy of intent recognition, which can be applied to intelligent customer service, voice assistant and other scenes.
[0045] Figure 2 A task processing method flowchart is shown, Figure 2 The task processing method in the figure is scheduled based on the running state of the processing system, as shown in Figure 2 Figure 2 The task processing method shown includes:
[0046] Step 201: Obtain the first load rate of the processing system, and allocate the to-be-processed task to the first model set in the at least two model sets based on the first load rate.
[0047] The first model set includes at least two models.
[0048] The first load rate is used to reflect the load condition of the processing system, and the first load rate can be determined based on Transactions Per Second (TPS), Operations Per Second (OPS), concurrent connection number, Queries Per Second (QPS) and the like, and is used to measure the load pressure of the processing system.
[0049] When the initial load rate is high, the processing system can prioritize lightweight models for rapid response to ensure the overall availability and responsiveness of the system. When the initial load rate is low, the system can select more complex models to improve the accuracy of intent recognition. For example, during peak task processing periods, the system may assign tasks to a lightweight model set including distilled BERT models and Text Convolutional Neural Network (TextCNN) models, while during off-peak periods, it may assign tasks to a medium-sized or large model set including the fine-tuned Qwen0.6B model and the large language model Qwen72B model.
[0050] In this embodiment, the first model set is a set of models specifically designed to handle high-concurrency scenarios. The first model set can consist of lightweight models that consume less computational resources, have fast inference speeds, but slightly lower recognition accuracy. These models can quickly complete tasks under resource constraints, thereby ensuring the basic service capabilities of the processing system. For example, the first model set can include distilled BERT models, TextCNN models, FastText fast text classification models, BAAI General Embedding (BGE) models, and Simple Contrastive Learning of Sentence Embeddings (SimCSE) models, etc.
[0051] In this embodiment, the model parameter magnitude is used to represent the number of trainable parameters in a deep learning model, and can be used to measure the model's complexity and computational cost. For example, the model parameter magnitude of the TextCNN model may be in the millions, while that of the distilled BERT model may be in the tens of millions, and that of the Qwen72B large model can reach billions. Under the same input conditions, models with smaller model parameter magnitudes have shorter inference times and lower hardware resource requirements. In this embodiment, models can be divided into lightweight models, medium-sized models, and large models based on the model parameter magnitude range and the model parameter magnitude of each model. The model parameter magnitude of a lightweight model is less than the minimum value of the model parameter magnitude range, the model parameter magnitude of a medium-sized model falls within the range, and the model parameter magnitude of a large model is greater than the maximum value of the range.
[0052] The first model ensemble can contain multiple lightweight models with different performance and parameters. For example, a typical lightweight model ensemble might include distilled BERT models, BGE models, and TextCNN models. Distilled BERT, BGE, and TextCNN models have different computational overhead and recognition capabilities, and can work together under different load conditions. For example, in high-concurrency scenarios, TextCNN will be automatically activated as a degradation model so that the processing system can maintain basic service capabilities under resource constraints.
[0053] In practical implementation, dynamically determining the load rate of the processing system and rationally allocating tasks to be processed to appropriate model sets can effectively avoid performance bottlenecks in a single-model architecture, while improving the flexibility and scalability of the processing system. For example, when the processing system detects that the current operating load (first load rate) exceeds 80%, the processing system will automatically send the tasks to be processed to the first model set, thereby reducing resource consumption by using models in the first model set.
[0054] Step 202: Identify the intent of the task to be processed through the target model; wherein the target model is one of at least two models in the first model set.
[0055] In practical applications, the target model is selected from the first set of models to perform the current task. The selection criteria for the target model include, but are not limited to, the task type, initial load factor, and priority of the task. For example, in a first set of models including distilled BERT, BGE, and TextCNN, if the user input is a simple and frequently asked question, the TextCNN model can be selected for fast processing; while for more complex questions, the distilled BERT or BGE model can be selected for intent recognition.
[0056] To improve the intent recognition performance of the task to be processed, embodiments of this application may also employ a multi-model collaborative mechanism, that is, to recognize the intent of the task to be processed in parallel across multiple models and then fuse the intent recognition results. In practical applications, by selecting an appropriate target model for intent recognition, the trade-off between response speed and recognition accuracy can be further effectively balanced.
[0057] The task processing method provided in this application obtains the first load rate of the processing system and dynamically allocates the tasks to be processed to the corresponding model set based on the first load rate. Then, it dynamically selects the target model from the model set for intent recognition, realizing an efficient and flexible dynamic routing task processing mechanism. The task processing method provided in this application can automatically switch to a lightweight model in high-concurrency scenarios, thereby reducing the resource consumption of the processing system and improving response speed. Under low load conditions, it can fully utilize medium or large models to improve the accuracy of intent recognition. Furthermore, by introducing a multi-model collaboration mechanism, it can have stronger robustness and adaptability, and can cope with diverse user requests and business needs.
[0058] In practical applications, steps 201 to 202 can be implemented based on a processor, which can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor.
[0059] Based on the above embodiments, in order to further improve the processing efficiency of the task to be processed, in some embodiments, the above-mentioned allocation of the task to be processed to a first model set in at least two model sets based on a first load rate includes: allocating the task to be processed to a first model set in at least two model sets when the first load rate is greater than or equal to a first threshold and less than or equal to a second threshold; before the above-mentioned identification of the intent of the task to be processed through the target model, the above method further includes: determining a target model in the first model set based on the priority of the task to be processed and the second load rate of each model in the first model set.
[0060] In this embodiment, the load level of the processing system can be divided using a first threshold and a second threshold. When the first load rate is greater than or equal to the first threshold and less than or equal to the second threshold, the processing system is considered to be at a moderate load level, indicating that the processing system currently has spare computing resources to identify the intent of the task to be processed. In this case, the task to be processed is assigned to the first model set.
[0061] When the first load rate exceeds the second threshold, the processing system is considered overloaded. In this case, the availability of the processing system can be determined by using the model with the lowest computational cost, such as the TextCNN model, to identify the intent of the task to be processed. When the first load rate is less than the first threshold, the processing system is considered to have sufficient idle computing resources, and a medium-sized or large model can be used to process the task.
[0062] Furthermore, in order to achieve differentiated processing methods for different tasks to be processed, after determining the first model set based on the first load rate of the processing system, the target model can be determined by combining the priority of the tasks to be processed and the second load rate of each model in the first model set.
[0063] For example, when the priority of the task to be processed is higher than the first priority threshold, the second load rate of each model in the first model set can be determined, and the intent of the task to be processed can be identified through models with a second load rate lower than the second load rate threshold. When the priority of the task to be processed is less than or equal to the first priority threshold, the intent of the task to be processed can be identified through models with a second load rate higher than the second load rate threshold.
[0064] In other embodiments, if the first load rate is greater than or equal to a first threshold and less than or equal to a second threshold, the task to be processed is assigned to a first model set in at least two model sets; before the above-mentioned intention of identifying the task to be processed through the target model, the method further includes: determining the model call weight based on the third load rate of the processing system and the priority of the task to be processed; determining the target model in the first model set based on the model call weight; wherein the third load rate is determined based on the first load rate and the second threshold.
[0065] For example, when the first load rate is greater than or equal to a first threshold and less than or equal to a second threshold, a first set of models is determined to identify the intent of the task to be processed. Then, a third load rate is determined using the first load rate and the second threshold; for example, the load of the first model set is determined by dividing the first load rate by the second threshold. Specifically, when the first load rate is determined based on QPS, the third load rate can be obtained by dividing the first QPS corresponding to the first load rate by the second QPS corresponding to the second threshold. Then, the model call weight is determined by combining the third load rate and the priority of the task to be processed. It can be seen that a higher third load rate indicates a larger task load for the first model set. In this case, the intent of the task to be processed can be identified using models with smaller parameter sizes within the first model set.
[0066] The priority of pending tasks can be assigned based on actual business needs. For example, high-priority pending tasks can be set to a priority of 1, medium-priority pending tasks can be set to a priority of 0.6, and low-priority pending tasks can be set to a priority of 0.3. Specifically, high-priority pending tasks could be inquiries from high-value customers of financial institutions, urgent risk control inquiries, etc.
[0067] The model call weight can be determined by combining the third load rate, the first proportion of the third load rate, the priority of the pending task, and the second proportion of the priority of the pending task. For example, the model call weight can be determined by the value of the third load rate × 0.7 + the priority of the pending task × 0.3.
[0068] After obtaining the model call weights, the target model can be determined based on a preset weight threshold and the model call weights. For example, the weight threshold can be set to 0.85. That is, when the model call weight is greater than 0.85, the intent of the task to be processed can be identified by the first lightweight model in the first model set (such as the TextCNN model). When the model call weight is less than or equal to 0.85, the intent of the task to be processed can be identified by the second lightweight model in the first model set (such as the distilled BERT model).
[0069] By determining the target model through the method of determining the model call weight, even if the first load rate is greater than or equal to the first threshold and less than or equal to the second threshold, the processing system can provide a more intelligent and flexible scheduling method based on the priority of the task to be processed and the load fluctuation of the processing system, so as to ensure the response speed of the processing system while taking into account the actual needs and resource costs of the task to be processed.
[0070] Based on the method given in the above embodiments, in some embodiments, the above-mentioned allocation of the task to be processed to the first model set in at least two model sets based on the first load rate includes: when the first load rate is greater than the second threshold, allocating the task to be processed to the first model with the smallest number of model parameters in the first model set, and using the first model as the target model.
[0071] Taking the determination of the first load rate based on QPS as an example, a case where the first load rate is greater than the second threshold can also be defined as the first QPS corresponding to the first load rate being greater than the second QPS corresponding to the second threshold. For example, if the first QPS is greater than 2000, it indicates that the processing system is currently operating under high pressure. To ensure the response efficiency and stability of the processing system, the first model with the smallest number of model parameters in the first model set can be prioritized to identify the intent of the task to be processed. It can be seen that the first model has the smallest number of model parameters, meaning that the first model has the lowest computational overhead and faster inference speed.
[0072] The first model set in this embodiment can be a set of multiple lightweight models. For example, it can be a set of models whose parameter magnitude is smaller than the minimum value of the parameter magnitude range. Each model in the first model set can have different functions or features, but all are suitable for low-latency scenarios. For example, the first model set may include TextCNN models, distilled BERT models, BGE models, etc. TextCNN models, distilled BERT models, and BGE models make different trade-offs between performance and accuracy, which can adapt to different business needs.
[0073] When the load rate of the processing system is low, i.e., the first load rate is low, in some embodiments, the above-mentioned at least two model sets further include a second model set; the second model set includes one or more models; the above method further includes: when the first load rate is less than a first threshold, identifying the intent of the task to be processed based on each model in the first model set to obtain a first identification result corresponding to each model in the first model set; when the first confidence level is less than a first confidence threshold, identifying the intent of the task to be processed based on the models in the second model set; wherein, the first confidence level is the highest confidence level among the confidence levels of the first identification results corresponding to each model in the first model set.
[0074] When the first load rate is detected to be less than the first threshold, for example, when the first QPS is less than the third QPS corresponding to the first threshold, it indicates that the computing resources of the processing system are sufficient, and the intent of the task to be processed can be identified through more refined processing methods.
[0075] In this scenario, each lightweight model in the first model set can be invoked in parallel, including the distilled BERT model, BGE model, and TextCNN model, to perform intent recognition for the task at hand. Each model in the first model set will output a first recognition result (i.e., intent recognition result, such as intent label) and its corresponding confidence score (such as confidence score). Due to differences in training data, feature extraction methods, etc., among the models in the first model set, the first recognition result output by each model may differ.
[0076] In order to obtain accurate intent recognition results for the task to be processed, this embodiment combines the confidence of the first recognition result output by each model in the first model set to determine the first confidence level corresponding to the first model set. For example, the maximum value of the confidence level corresponding to each model in the first model set can be determined as the first confidence level corresponding to the first model set, that is, the first confidence level corresponding to the first model set = Max(Confidence1, Confidence2, Confidence3, ...), where Confidence1, Confidence2, and Confidence3 represent the confidence levels of the first recognition results corresponding to different models in the first model set.
[0077] Specifically, confidence levels can be determined based on probability distribution models (such as Softmax in classification tasks). Alternatively, for distilled BERT models, the confidence level of the first recognition result corresponding to the distilled BERT model can be determined based on the difference in output before and after distillation. For BGE models, a similarity threshold (such as cosine similarity > 0.8) can be set to determine the confidence level of the corresponding first recognition result. For TextCNN models, the confidence level of the corresponding first recognition result can be calculated by combining the convolutional outputs of different window sizes.
[0078] When the first confidence level is greater than or equal to the first confidence level threshold, the first recognition result corresponding to the first confidence level is taken as the intent recognition result of the task to be processed. For example, the first confidence level threshold can be 0.9, that is, when the first confidence level is greater than or equal to 0.9, the intent recognition result of the task to be processed is determined based on the first recognition result corresponding to the first confidence level.
[0079] When the first confidence level is less than the first confidence threshold, the intent of the task to be processed can be identified based on the models in the second model set. Here, the second model set can include medium-sized and large models. For example, the second model set can include fine-tuned Qwen0.6B models, Qwen72B, and agents, etc. The number of model parameters in each model in the second model set is greater than the number of model parameters in each model in the first model set.
[0080] Based on the above method, in order to further determine the model for identifying the intent of the task to be processed in the second model set, in some embodiments, the second model set includes at least a second model and a third model; the number of model parameters of the second model is smaller than the number of model parameters of the third model; the above-mentioned identification of the intent of the task to be processed based on the models in the second model set when the first confidence level is less than the first confidence level threshold includes: identifying the intent of the task to be processed based on the second model when the first confidence level is less than the first confidence level threshold and greater than or equal to the second confidence level threshold; and identifying the intent of the task to be processed based on the third model when the first confidence level is less than the second confidence level threshold.
[0081] In this embodiment, the second model can be a medium-sized model and the third model can be a large model. For example, the second model can be a fine-tuned Qwen0.6B model and the third model can be an intelligent processing architecture that integrates the Qwen72B model and the agent.
[0082] When the first confidence level is less than the first confidence threshold but greater than or equal to the second confidence threshold, for example, when the first confidence level is less than 0.9 but greater than or equal to 0.6, the intent of the task to be processed can be identified based on the fine-tuned Qwen0.6B model. When the first confidence level is less than the second confidence threshold, for example, when the first confidence level is less than 0.6, the intent of the task to be processed can be identified based on the intelligent processing architecture.
[0083] Figure 3 A flowchart of a confidence-based task processing method is shown, such as... Figure 3 As shown, the method includes:
[0084] Step 301: Begin.
[0085] Step 302: Determine whether the confidence level is greater than or equal to 0.9.
[0086] That is, determine whether the first confidence level in the above method is greater than or equal to the first confidence threshold (0.9). If the first confidence level is greater than or equal to 0.9, proceed to step 303; otherwise, proceed to step 304.
[0087] Step 303: Trigger the business strategy.
[0088] The first identification result corresponding to the highest first confidence level is taken as the intent identification result of the task to be processed. Based on the intent identification result, the processing system triggers business policies and automatically activates and executes specific business rules or processes. Then, step 309 is executed.
[0089] Step 304: Determine whether the confidence level is greater than or equal to 0.6 and less than 0.9.
[0090] Specifically, it is determined whether the first confidence level in the above method is greater than or equal to the second confidence threshold (0.6) and less than the first confidence threshold. When the first confidence level is greater than or equal to 0.6 and less than 0.9, step 305 is executed; when the first confidence level is less than 0.6, step 307 is executed.
[0091] Step 305: Call the medium-sized model.
[0092] Call the medium-sized model to identify the intent of the task to be processed. For example, call the fine-tuned Qwen0.6B model to identify the intent of the task to be processed.
[0093] Step 306: Perform context routing.
[0094] The finely tuned Qwen0.6B model uses context-based routing to parse the context information of the task to be processed for intent recognition. It can also determine subsequent processing methods based on the intent recognition results, such as transferring the task to human intervention or switching the dialogue state of the task.
[0095] Next, proceed to step 309.
[0096] Step 307: Call the large model.
[0097] Call upon a large model to identify the intent of the task to be processed; for example, call upon the Qwen72B model or an intelligent processing architecture to identify the intent of the task to be processed.
[0098] Step 308: Perform complex intent routing.
[0099] By identifying the intent of complex tasks to be processed through large models, such as identifying multiple intents that a task may contain, the complex, ambiguous or multi-intent requests of the task to be processed can be accurately assigned to the most appropriate processing module, such as human agents or various sub-services of the processing system.
[0100] Step 309: Routing complete.
[0101] Because the number of model parameters in the third model is larger than that in the second model, the accuracy of intent recognition results from the third model is generally higher than that from the second model. When it is determined, based on the first confidence score, that the intent of the task to be processed should be identified by the second model, it can also be used to determine whether the second model can successfully identify the intent. If the second model successfully identifies the intent of the task to be processed, the intent recognition result for the task to be processed is determined; otherwise, the third model will be called to identify the intent of the task to be processed.
[0102] Based on the above methods, Figure 4A flowchart of another confidence-based task processing method is shown, including:
[0103] Step 401: Receive the task to be processed.
[0104] Specifically, it can receive pending tasks input by the user, such as receiving query requests input by the user.
[0105] Step 402: Process using a lightweight model.
[0106] That is, the intent of the query request is identified through each model in the first model set in the above embodiments.
[0107] Step 403: Confidence analysis.
[0108] Perform a confidence analysis on the first processing result of each model. When the first confidence is greater than or equal to 0.9, it indicates that the intent of the query statement is clear, and proceed to step 404. When the first confidence is greater than or equal to 0.6 and less than 0.9, proceed to step 405. When the first confidence is less than 0.6, proceed to step 408.
[0109] Step 404: Directly route to the business module.
[0110] Based on the intent recognition result corresponding to the first confidence level, the query request is routed to the business model, and the corresponding query result (response statement) is generated. Then, step 410 is executed.
[0111] Step 405: Activate the second model for analysis.
[0112] For example, the intent of the task to be processed can be identified through a finely tuned Qwen0.6B model.
[0113] Step 406: Determine whether the recognition was successful.
[0114] The success of recognition can be determined based on the prompting module of the fine-tuned Qwen0.6B model. The fine-tuned Qwen0.6B model can recognize the intent of the task to be processed based on a preset intent. If the similarity between the intent of the task to be processed and the preset intent is less than the intent similarity threshold, recognition will fail, and step 408 will be executed. If the similarity between the intent of the task to be processed and the preset intent is greater than or equal to the intent similarity threshold, step 407 will be executed.
[0115] Step 407: Routing to the business module.
[0116] Based on the intent recognition results of the fine-tuned Qwen0.6B model, the query request is routed to the business module for processing, generating the corresponding query results, and then step 410 is executed.
[0117] Step 408: Call the third model for analysis.
[0118] Call the large model to identify the intent of the query request.
[0119] Step 409: Generate complex intent responses.
[0120] The large model identifies the intent of a query statement through intent understanding, context management, multi-module collaboration, and natural language generation, and finally obtains the corresponding query results.
[0121] Step 410: Update session state.
[0122] Based on the identified intent, the generated query results are used to update the session state.
[0123] In order to detect the risk level of the task to be processed in real time during the intent recognition process, in some embodiments, the above method further includes: determining the risk level of the task to be processed based on first information and a preset risk knowledge graph; wherein the first information includes the task to be processed and / or the intent of the task to be processed.
[0124] A risk knowledge graph can be a structured semantic network used to represent entities, attributes, and the relationships between them. It can analyze the correlation between user-input tasks and potential risky behaviors or sensitive content. For example, when a user asks a question related to internal company projects, sensitive individuals, or unusual behavior, the system can use the causal chains in the risk knowledge graph to determine if high-risk factors exist and implement risk control measures for the task's processing flow.
[0125] The first piece of information may include the intent of the identified task to be processed and / or the original task to be processed. This first piece of information can be natural language text, speech-to-text results, or other forms of input content. The processing system can use this first piece of information as the starting point for risk assessment and, in conjunction with the content of a risk knowledge graph, perform semantic reasoning to determine whether the current task to be processed has potential risks.
[0126] For example, risk knowledge graphs can provide contextual understanding and causal reasoning capabilities. The construction of a risk knowledge graph can rely on various methods such as historical data, expert annotation, and rule engines. In a specific example, when a user inputs the task "Does project B, mentioned by person A, have detailed information?", the system will retrieve relevant information from the risk knowledge graph, identify that person A is a core technical personnel, project B is an undisclosed project, and, based on the causal relationship between "mentioning an undisclosed project" and "requesting detailed information," determine that the user's input task may involve potential risks.
[0127] Risk levels can be categorized into multiple levels (such as low risk, medium risk, high risk, etc.) to determine subsequent processing strategies. For example, for high-risk tasks, the processing system can directly refuse to execute the processing or initiate a manual review process; for medium-risk tasks, the processing system can initiate de-identification processing or restrict access permissions; for low-risk tasks, the business logic can be executed normally.
[0128] Based on the method given in this embodiment, before determining the risk level of the task to be processed according to the first information and the preset risk knowledge graph, after receiving the task to be processed, the processing system can use a regular expression engine to match the task to be processed with a preset list of risk words, and prioritize determining whether there are risk words in the task to be processed (such as a query statement entered by the user), so as to achieve rapid risk blocking. For example, the circuit breaker output can be implemented based on the task to be processed within 50ms. Here, the circuit breaker output can include not returning the original content of the task to be processed, returning a security prompt, generating a patterned response, switching risk models, etc.
[0129] Furthermore, before determining the risk level of the task to be processed based on the initial information and the preset risk knowledge graph, a user risk profile can be determined based on the user's historical characteristics. When matching the task to be processed with the preset risk word list, the user risk profile can be obtained. Based on the user risk profile and the matching results between the task to be processed and the preset risk word list, the risk level of the task to be processed can be comprehensively determined, and the interception threshold can be dynamically set based on different user risk profiles. For example, for a user with a high-risk user profile, even if the risk level of the corresponding task to be processed is low, the circuit breaker may still be triggered. For a user with a low-risk user profile, the user can be allowed to flexibly send the description of the task to be processed within a preset range, such as allowing the user to use flexible expressions to ask questions.
[0130] In practical applications, while determining the risk level of the task to be processed based on the first information and a preset risk knowledge graph, the risk level can also be jointly determined by combining the intent recognition results of the target model, the second model, or the third model. In this embodiment, by combining the risk knowledge graph with the first information for risk assessment, risk identification of the task to be processed can be achieved throughout the entire intent recognition process. This avoids the lag problem caused by risk control only at the output stage, improves the real-time performance and accuracy of the entire interaction process, and thus enhances the security protection capabilities of the processing system.
[0131] To further accurately determine the risk level, in some embodiments, the above-mentioned determination of the risk level of the task to be processed based on the first information and the preset risk knowledge graph includes: constructing a first prompt based on the first information and the preset risk knowledge graph; and processing the first prompt through a first large model to determine the risk level of the task to be processed.
[0132] By constructing the first prompt, risk identification can be achieved through the first major model, and the risk level of the task to be processed can be determined. Here, the first major model can specifically be the Qwen72B model mentioned above or other models with strong causal reasoning capabilities.
[0133] This embodiment utilizes the reasoning capability of the first major model. When a user inputs a task to be processed, the system can first search for causal chains related to the task in a preset risk knowledge graph using methods such as vector retrieval or keyword matching. For example, the causal or association relationships between entities and attributes. Then, a first prompt is constructed based on the statement of the task to be processed and the retrieved causal chains. The first prompt is then input into the first major model, and the risk level of the task to be processed is determined by the first major model.
[0134] For example, the first prompt could be:
[0135] "Please assess the risk of the query statement in the following user query request: 'During yesterday's meeting, person A mentioned project B. Is there any detailed information available?'"
[0136] "Related information about causal knowledge graphs:"
[0137] Entity: Person A, Attribute: Core technical personnel of the company;
[0138] Entity: Project B, Attribute: Undisclosed Internal Project;
[0139] Causal chain: mentioning undisclosed projects + requesting detailed information → potential leaks
[0140] "Your task: Combine user query statements with relevant information from the causal knowledge graph to assess the risk level."
[0141] The first model, by processing the first prompt mentioned above, can determine that the risk level of the task to be processed is high risk.
[0142] In the specific implementation process, the first model can also work in conjunction with the BERT model. For example, the BERT model can quickly identify explicit sensitive words in the task to be processed, while the first model can process sensitive words that the BERT model cannot identify, as well as subtle questions with potential risks, to determine the risk level of the task to be processed.
[0143] To further enhance the ability to process the risk level of pending tasks, in some embodiments, the above method further includes: obtaining a first risk processing result for the pending task when the risk level is greater than a preset risk level threshold; training a second model based on the first risk processing result, so that the trained second model can process pending tasks with risk levels greater than the preset risk level threshold, and obtaining a second risk processing result; wherein the difference between the second risk processing result and the first risk processing result is less than a difference threshold.
[0144] Risk levels can be represented numerically, for example, between 0 and 1.0, with higher values indicating higher risk. In this embodiment, the risk level can be determined by a multi-dimensional risk control pipeline (such as semantic analysis, causal reasoning, and keyword matching) to determine whether further processing or interception is required.
[0145] When the risk level is less than or equal to a preset threshold, such as low or medium risk, automated processing can be performed by the system. For example, the system can modify the intent of the task or replace keywords in it using a preset model. For instance, the large model Qwen can automatically change the intent of the task or de-identify sensitive words involved in the task to generate a secure version.
[0146] When the risk level exceeds a preset threshold (e.g., a high-risk level), the task can be sent to a human reviewer for processing. The human reviewer will then provide the initial risk assessment result, and based on this result, a corresponding processing result will be fed back to the task. Simultaneously, the initial risk assessment result can be fed back to the second-level model for training. This allows the second-level model to learn from the initial risk assessment result, optimize its parameters, and ultimately enable it to process tasks with risk levels exceeding the preset threshold.
[0147] In addition, for tasks requiring manual review, since manual review takes a long time, the system can first return a response with a risk level below a preset threshold, such as a "processing" message, to avoid long waiting times for the user. If the manual review is successful, the processing result for the task will be sent to the user, improving the user experience.
[0148] Based on the method for determining the risk level of a task to be processed given in the above embodiments, Figure 5 A flowchart of a risk level identification method is shown, using a user-input query request as an example of the task to be processed. Figure 5 The risk level identification methods shown include:
[0149] Step 501: The user sends a query request to the input scanning module through the client.
[0150] In other words, when a user sends a query request, the input scanning module prioritizes risk identification. The query request can specifically include a query statement.
[0151] Step 502: Input the scanning module to perform sensitive word regular expression matching.
[0152] Based on the method described in the above embodiments, the query statement is matched with a preset list of risk words using regular expressions to identify sensitive words in the query request.
[0153] Specifically, based on the regular expression matching results, the risk level is determined. If the risk level is high, step 503 is executed; otherwise, step 504 is executed.
[0154] Step 503: Input scanning module directly blocks.
[0155] When the risk level is high, the input scanning module directly blocks the current query and sends a blocking message to the client, such as ceasing to process the query request or informing the user that the current query request cannot be processed. Afterwards, the following steps can be skipped.
[0156] Step 504: The input scanning module forwards the query request to the routing engine.
[0157] When the risk level is not high, the input scanning module forwards the query request to the routing engine for processing.
[0158] Step 505: The routing engine performs semantic analysis and risk identification.
[0159] After receiving a query request, the routing engine, based on the method described in the above embodiments, performs semantic analysis and intent recognition by processing the system's first load rate and determining a model to identify the intent of the query request. Simultaneously, based on the method described in the above embodiments, it performs risk identification based on a preset risk knowledge graph using first information (the intent of the query request and / or the query request itself) to determine the risk level of the query request.
[0160] Step 506: The routing engine marks a risk label and sends it to the output / circuit breaker module.
[0161] The routing engine marks query requests with corresponding risk tags based on risk levels and sends the corresponding risk tags to the output / circuit breaker module.
[0162] Step 507: The routing engine outputs normally to the output / fuse module.
[0163] The routing engine sends a query request, the intent of the query request, and the risk label of the query request to the output / circuit breaker module.
[0164] Step 508: Perform a final security scan on the output / fuse module.
[0165] The output / circuit breaker module scans and confirms the received query request, the intent of the query request, and the risk label corresponding to the query request. When the risk level corresponding to the risk label is not high risk, step 509 is executed; when the risk level corresponding to the risk label is high risk, step 510 is executed.
[0166] Step 509: Automated processing or intelligent degradation of the output / fuse module.
[0167] The output / circuit breaker module, based on the method described in the above embodiments, rewrites or de-identifies the keywords of the query request to obtain a secure version of the query request. Then, based on the secure version of the query request, it generates the corresponding query results and executes step 512.
[0168] Step 510: Output / Circuit Breaker module settings query request enters manual review.
[0169] Step 511: The output / fuse module sends a delay or security response to the client.
[0170] When the risk level corresponding to the risk label is high-risk, the output / circuit breaker module sends a delay or security response to the client, indicating that the user's current query request result is delayed or poses a security risk. If the manual review determines it to be high-risk, the task can be terminated; otherwise, proceed to step 512.
[0171] Step 512: The output / fuse module returns the result to the client immediately.
[0172] After obtaining the query structure corresponding to the query request, the output / circuit breaker module returns the query result of the query request to the client.
[0173] Based on the task processing method described in the above embodiments, before identifying the intent of the task to be processed through the model in the processing system, a Least Recently Used K (LRU-K) algorithm can be used to manage high-frequency tasks, storing the high-frequency tasks and their corresponding intents. A two-level caching architecture can be used to store high-frequency tasks and their corresponding intents. This two-level caching architecture can include an L1-level memory cache and an L2-level remote dictionary server (Redis) cache. The L1-level memory cache can store the tasks with the highest access frequency (top 1%) and their corresponding intents.
[0174] Before identifying the intent of a task to be processed through a model in the processing system, after receiving a task, a query can be performed in the two-level cache architecture to see if a matching task exists. If a matching task exists, the intent identification result of the received task can be directly determined in the two-level cache architecture. Specifically, a Bloom filter can be used for fast filtering to quickly find the intent of a task matching the received task in the two-level cache architecture. The matching degree between the task to be processed and the tasks stored in the two-level cache architecture can be determined by the formula CacheHit = Hash(Query) ∩ BloomFilter, where CacheHit represents the matching degree and Hash(Query) represents the hash value of the task to be processed. In other words, the Bloom filter performs a bit check on the hash value of the task to be processed.
[0175] Based on the above method, the first load rate can be further divided into more detailed intervals to determine the model for identifying the tasks to be processed. Taking query requests as an example, Figure 6 A flowchart of another task processing method is shown, including:
[0176] Step 601: Receive query request.
[0177] Step 602: Determine if a cache hit has occurred.
[0178] Based on the above method, we can first determine whether the query request is in a two-level cache architecture using the LRU-K caching mechanism. This can be done using the Bloom Filter fast cache filtering algorithm. If it is in a two-level cache architecture, proceed to steps 603 to 606; otherwise, proceed to steps 607 to 613.
[0179] Step 603: Determine the cache location.
[0180] When it is determined that the two-level caching architecture includes a query request, the location of the query request in the cache is determined. If it is determined that the query request is stored in memory, proceed to step 604; if it is determined that the query request is stored in Redis, proceed to step 605.
[0181] Step 604: Read the result from the memory cache.
[0182] Determine the intent or query result corresponding to the query request in the memory cache; then, proceed to step 606.
[0183] Step 605: Read the results from the Redis cache.
[0184] Determine the intent or query result corresponding to the query request in the Redis cache.
[0185] Step 606: Return the recognition result.
[0186] Returns the intent or query result corresponding to the query request.
[0187] Step 607: Obtain QPS.
[0188] This step will be explained using the example of processing the system load status through QPS feedback.
[0189] Step 608: Determine the QPS range.
[0190] Specifically, when QPS is greater than 2000, execute step 609; when QPS is in the range of [1000, 2000], execute step 610; when QPS is in the range of [800, 1000), execute step 611; and when QPS is less than 800, execute step 612.
[0191] Step 609: Process using TextCNN.
[0192] The TextCNN model is used to identify the intent of the query request and further determine the query results.
[0193] Step 610: Use TextCNN+BERT hybrid processing.
[0194] Use the TextCNN model and / or BERT model to identify the intent of the query request and further determine the query results.
[0195] Step 611: Use TextCNN+BERT+BGE hybrid processing.
[0196] Use one or more of the TextCNN, BERT, and BGE models to identify the intent of the query request and further determine the query results.
[0197] Step 612: Use confidence logic for discrimination processing.
[0198] Based on the method given in the above embodiments, the model for identifying the query request intent is determined based on the confidence level of the first identification result corresponding to each model. Specifically, it can be based on... Figure 3 , Figure 4 The given method determines the intent of the query request and the query result.
[0199] Step 613: Return the model recognition results.
[0200] Based on the method described in the above embodiments, a multi-protocol access method can also be used to receive pending tasks sent by users. This multi-protocol access can be implemented through a multi-protocol access gateway, which supports multiple protocols such as Hypertext Transfer Protocol Version 2 (HTTP / 2) and WebSocket. Taking a user-input query request as an example, and using the QPS (Queries Per Second) directly reflecting the first load rate of the processing system, this method utilizes a multi-protocol access gateway. Figure 7 A general flowchart for task processing is shown, including:
[0201] Step 701: Receive query request.
[0202] Step 702: Multi-protocol access gateway processing.
[0203] A multi-protocol access gateway handles query requests from different protocols. By uniformly receiving and processing query requests through a multi-protocol access gateway, the processing system can support access requests from different protocols.
[0204] Then, proceed with steps 703 and 710.
[0205] Step 703: Determine if a cache hit has occurred.
[0206] If the cache is hit, proceed to step 704; otherwise, proceed to step 705.
[0207] Step 704: Return the cached result directly.
[0208] Steps 703 to 704 can be implemented with reference to steps 603 to 606.
[0209] Next, proceed to step 711.
[0210] Step 705: Determine the QPS traffic.
[0211] When the QPS is high, for example, QPS greater than 2000, proceed to step 707; when the QPS is low, for example, QPS less than or equal to 2000, proceed to step 706.
[0212] At the same time, risk control identification is carried out through the full-process risk control in step 710.
[0213] Step 706: Level 3 Intent Recognition Processing.
[0214] Three-level intent recognition is performed based on the QPS value. For example, when the QPS is greater than or equal to 800, step 707 is executed; when the QPS is greater than or equal to the first QPS threshold and less than 800, step 708 is executed; when the QPS is less than the first QPS threshold, step 709 is executed, wherein the first QPS threshold is less than 800.
[0215] Step 707: Process using a lightweight model.
[0216] In this step, when the QPS is greater than 2000, the model with the smallest number of model parameters can be used to identify the intent of the query request. When the QPS is less than or equal to 2000 and greater than or equal to 800, other models in the first model set mentioned above can be used to identify the intent of the query request.
[0217] Step 708: Process using a medium-sized model.
[0218] When the QPS is greater than or equal to the first QPS threshold and less than 800, the intent of the query request can be identified through the medium-sized model.
[0219] Step 709: Processing with a large model.
[0220] When the QPS is less than the first QPS threshold, the intent of the query request can be identified through the large model.
[0221] Steps 707 to 709 above can also be implemented by referring to steps 607 to 612.
[0222] Step 710: Full-process risk control.
[0223] Upon receiving a query request, the entire process of risk control is initiated simultaneously, risk identification is activated, and the data in steps 702, 703, 705, 706, and 711 are identified in real time to obtain the corresponding risk level.
[0224] Step 711: Dynamic route distributor integration.
[0225] The intent recognition results, query results corresponding to the query request, and risk levels obtained from the above steps are aggregated and integrated in the dynamic routing distributor.
[0226] Step 712: Perform session management.
[0227] Manage query requests and results, and maintain the application's context and state during query request processing. Simultaneously, process and control query requests based on their corresponding risk levels.
[0228] Step 713: Business strategy execution.
[0229] Based on the intent recognition results and risk level, specific business logic is executed to respond to the user's query request.
[0230] Based on the task processing method provided in the embodiments of this application, Figure 8 A schematic diagram of a processing system architecture is shown, wherein, Figure 8 The processing system architecture shown includes an input layer 801, a processing layer 802, and an output layer 803. The input layer 801 receives tasks 8011 to be processed and identifies and processes tasks 8011 corresponding to different protocols through a multi-protocol access gateway 8012. The processing layer 802 includes a three-level intent recognition engine 8021 and a full-process risk control pipeline 8022. The three-level intent recognition engine 8021 determines whether to perform intent recognition on the task 8011 through a lightweight model layer, a medium-sized model layer, or a large model layer based on the first load rate (or QPS) of the processing system. Specific recognition methods can be found in [reference needed]. Figure 7 As shown in steps 706 to 709, the lightweight model layer may include a first model set, the medium model layer may include a medium model or a second model, and the large model layer may include a large model or a third model. Simultaneously, the full-process risk control pipeline 8022 performs input scanning, semantic analysis, and circuit breaker output on the task to be processed 8011, and identifies risks throughout the entire processing flow of the task to be processed. The results obtained by the three-level intent recognition engine 8021 and the full-process risk control pipeline 8022 are input to the dynamic routing distributor 8031 in the output layer 803. The dynamic routing distributor 8031 sends the obtained task to be processed and its corresponding processing result to the session state manager 8032 for storage. The session state manager 8032 is also used to manage the identifier (ID) and lifecycle of the task to be processed (session), save the context and routing / policy of the task to be processed (session), and bind the user's corresponding user risk profile, etc. The local encrypted storage 8033 is used to store data from the session state manager 8032, and also to store short-term, necessary data such as session keys / tokens, conversation digest indexes, user preferences, routes, and risk control tags. Sensitive information is encrypted and expired information is periodically cleaned up. The session state manager 8032 can also store pending tasks and their corresponding processing results in a two-level caching architecture.
[0231] The dynamic route distributor 8031 sends the task to be processed and its corresponding intent recognition result to the business strategy module 8034. The business strategy module 8034 obtains the final processing result (such as the query result) of the task to be processed, and finally obtains the response output based on the final processing result.
[0232] This application provides a task processing method that, by adding a three-level intent recognition engine to the processing system, enables collaborative processing of models with different parameter scales, significantly improving the overall response speed of the processing system and reducing the average latency to approximately 85ms. By dynamically scheduling the computing resources of large models, the large model call rate is reduced by 40%, and the resource consumption cost of the processing system is reduced by approximately 35%. Through end-to-end security protection built through full-process risk identification and control, all risky content is intercepted, and risk blocking can be performed in real time within 200ms. By combining the first risk processing result from manual responses with the training of the second large model, the reuse rate of historical task-related processing data is improved.
[0233] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0234] Corresponding to the task processing method given in the above embodiments, based on the task processing method given in the foregoing embodiments, this application also proposes a task processing device, such as... Figure 9 As shown, the task processing device is applied to a processing system that deploys at least two model sets. The task processing device includes:
[0235] The processing module 901 is used to obtain the first load rate of the processing system and, based on the first load rate, allocate the tasks to be processed to the first model set in at least two model sets; the first model set includes at least two models.
[0236] The recognition module 902 is used to recognize the intent of the task to be processed through the target model; wherein the target model is one of at least two models in the first model set.
[0237] In practical applications, the processing module 901 and the identification module 902 can be implemented based on a processor and a communication device.
[0238] In some embodiments, the processing module 901 is specifically configured to, when the first load rate is greater than or equal to a first threshold and less than or equal to a second threshold, assign the task to be processed to a first model set in at least two model sets; before identifying the intent of the task to be processed through the target model, the processing module 901 is further configured to, based on the priority of the task to be processed and the second load rate of each model in the first model set, determine the target model in the first model set.
[0239] In some embodiments, the processing module 901 is specifically configured to, when the first load rate is greater than the second threshold, assign the task to be processed to the first model with the smallest number of model parameters in the first model set, and use the first model as the target model.
[0240] In some embodiments, at least two model sets further include a second model set; the second model set includes one or more models; the processing module 901 is further configured to, when the first load rate is less than a first threshold, identify the intent of the task to be processed based on each model in the first model set to obtain a first identification result corresponding to each model in the first model set; and when the first confidence level is less than a first confidence threshold, identify the intent of the task to be processed based on the models in the second model set; wherein, the first confidence level is the highest confidence level among the confidence levels of the first identification results corresponding to each model in the first model set.
[0241] In some embodiments, the second model set includes at least a second model and a third model; the number of model parameters of the second model is smaller than the number of model parameters of the third model; the processing module 901 is specifically used to identify the intent of the task to be processed based on the second model when the first confidence level is less than the first confidence threshold and greater than or equal to the second confidence threshold; and to identify the intent of the task to be processed based on the third model when the first confidence level is less than the second confidence threshold.
[0242] In some embodiments, the processing module 901 is further configured to determine the risk level of the task to be processed based on the first information and a preset risk knowledge graph; wherein the first information includes the task to be processed and / or the intent of the task to be processed.
[0243] In some embodiments, the processing module 901 is specifically used to construct a first prompt based on the first information and a preset risk knowledge graph; and to process the first prompt using a first big model to determine the risk level of the task to be processed.
[0244] In some embodiments, the processing module 901 is further configured to: obtain a first risk processing result for the task to be processed when the risk level is greater than a preset level threshold; train a second large model based on the first risk processing result, so that the trained second large model can process the task to be processed corresponding to the risk level greater than the preset level threshold, and obtain a second risk processing result; wherein the difference between the second risk processing result and the first risk processing result is less than a difference threshold.
[0245] It should be noted that the descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0246] It should be noted that, in the embodiments of this application, if the above methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a terminal, server, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0247] This application also provides an electronic device. Figure 10 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application, as shown below. Figure 10 As shown, the electronic device 100 may include:
[0248] Memory 1001 is used to store executable instructions.
[0249] The processor 1002 is used to execute any of the above-described task processing methods when executing executable instructions stored in the memory 1001.
[0250] The processor 1002 mentioned above can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.
[0251] The aforementioned computer-readable storage medium or memory 1001 may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it may also be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0252] Accordingly, this application embodiment further provides a computer storage medium storing computer-executable instructions, which are used to implement any of the task processing methods provided in the above embodiments.
[0253] Correspondingly, this application embodiment further provides a computer program product, the computer program product including computer executable instructions, which are used to implement any of the task processing methods provided in this application embodiment.
[0254] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0255] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0256] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.
[0257] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0258] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0259] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0260] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of protection of this application, and these forms are all within the protection scope of this application.
Claims
1. A task processing method, characterized in that, Applied to a processing system that deploys at least two model sets, the method includes: Obtain the first load rate of the processing system, and allocate the tasks to be processed to the first model set among the at least two model sets based on the first load rate; the first model set includes at least two models. The intent of the task to be processed is identified by a target model; wherein the target model is one of at least two models in the first model set.
2. The method according to claim 1, characterized in that, The step of allocating tasks to be processed to the first model set among the at least two model sets based on the first load rate includes: If the first load rate is greater than or equal to the first threshold and less than or equal to the second threshold, the task to be processed is assigned to the first model set among the at least two model sets. Before identifying the intent of the task to be processed through the target model, the method further includes: Based on the priority of the task to be processed and the second load rate of each model in the first model set, the target model is determined in the first model set.
3. The method according to claim 2, characterized in that, The step of allocating tasks to be processed to the first model set among the at least two model sets based on the first load rate includes: If the first load rate is greater than the second threshold, the task to be processed is assigned to the first model with the smallest number of model parameters in the first model set, and the first model is used as the target model.
4. The method according to claim 2, characterized in that, The at least two model sets further include a second model set; the second model set includes one or more models; the method further includes: When the first load rate is less than the first threshold, the intent of the task to be processed is identified based on each model in the first model set, and a first identification result corresponding to each model in the first model set is obtained; If the first confidence level is less than the first confidence threshold, the intent of the task to be processed is identified based on the models in the second model set; wherein, the first confidence level is the highest confidence level among the first identification results corresponding to each model in the first model set.
5. The method according to claim 4, characterized in that, The second model set includes at least a second model and a third model; the number of model parameters in the second model is smaller than the number of model parameters in the third model. When the first confidence level is less than the first confidence threshold, identifying the intent of the task to be processed based on the models in the second model set includes: If the first confidence level is less than the first confidence threshold but greater than or equal to the second confidence threshold, the intent of the task to be processed is identified based on the second model. If the first confidence level is less than the second confidence threshold, the intent of the task to be processed is identified based on the third model.
6. The method according to claim 1, characterized in that, The method further includes: The risk level of the task to be processed is determined based on the first information and a preset risk knowledge graph; wherein, the first information includes the task to be processed and / or the intent of the task to be processed.
7. The method according to claim 6, characterized in that, The step of determining the risk level of the task to be processed based on the first information and a preset risk knowledge graph includes: Based on the initial information and the pre-defined risk knowledge graph, a first prompt word is constructed. The first prompt is processed using the first major model to determine the risk level of the task to be processed.
8. The method according to claim 7, characterized in that, The method further includes: If the risk level is greater than a preset risk level threshold, obtain the first risk processing result for the task to be processed; Based on the first risk processing result, the second model is trained so that the trained second model can process the tasks to be processed corresponding to risk levels greater than the preset level threshold, and obtain the second risk processing result; wherein the difference between the second risk processing result and the first risk processing result is less than the difference threshold.
9. A task processing device, characterized in that, Applied to a processing system, the processing system deploying at least two model sets, the device includes: The processing module is configured to obtain a first load rate of the processing system and, based on the first load rate, allocate the tasks to be processed to a first model set among the at least two model sets; the first model set includes at least two models. The identification module is used to identify the intent of the task to be processed through a target model; wherein the target model is one of at least two models in the first model set.
10. An electronic device, characterized in that, The electronic device includes a processor and a memory for storing computer programs capable of running on the processor; wherein, The processor is used to run the computer program to perform the method according to any one of claims 1 to 8.
11. A computer storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.