Business dynamic compensation method, device, equipment and storage medium

By defining parameter classes and registration information in the client program, determining the target public model and processing the request information, and degrading to the target compensation model when an exception occurs, the problem of poor stability of the model request result in the prior art is solved, and higher stability and reliability are achieved.

CN119149956BActive Publication Date: 2025-06-06HANGZHOU XINZHONGDA ENTERPRISE MANAGEMENT TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411596899.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-06-06
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

When providing model request results to users, the prior art has poor stability and is affected by factors such as network fluctuations and communication interruptions, resulting in the inability to provide request results normally.

Method used

By defining parameter classes in the client program to generate registration information, determine the target public model, and make the target public model process the request information based on the identity identifier. When an exception occurs when the target common model handles the request information, it is degraded to the preset target compensation model, and the request information is continued to be processed to obtain the compensation result.

Benefits of technology

By degrading to the target compensation model, it is possible to continue to process user request information when the target public model cannot provide normal request results, thereby improving the stability of providing model request results to the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149956B_ABST
    Figure CN119149956B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and in particular to a method, apparatus, device and storage medium for dynamic business compensation, wherein the method comprises: generating registration information based on a parameter class defined by a client program, determining a corresponding target public model based on the registration information; obtaining an identity identifier based on the target public model and the registration information, and causing the target public model to process request information based on the identity identifier; in response to an abnormality in the processing of the request information by the target public model, processing the request information based on a preset target compensation model to obtain a target compensation result. The present application facilitates improving the stability of providing model request results to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a service dynamic compensation method, device, equipment and storage medium. Background Art

[0002] With the continuous advancement of information technology, various generative public big models have begun to be widely used in work and life, such as Wenxin Yiyan, Tongyi Qianwen and Pangu Big Model, etc. The above public big models can provide model request results to users according to their requests.

[0003] However, in some cases, public large models are limited by network fluctuations, communication interruptions and other reasons, resulting in the inability to provide model request results to users according to user requests; it can be seen that the stability of providing model request results to users through existing technologies is not good. Summary of the invention

[0004] In order to improve the stability of providing model request results to users, the present application provides a business dynamic compensation method, device, equipment and storage medium.

[0005] In a first aspect, the present application provides a service dynamic compensation method, comprising:

[0006] Generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information;

[0007] obtaining an identity identifier based on the target public model and the registration information, and causing the target public model to process the request information based on the identity identifier;

[0008] In response to an abnormality in the process of processing the request information by the target public model, the request information is processed based on a preset target compensation model to obtain a target compensation result.

[0009] In a second aspect, the present application provides a service dynamic compensation device, including:

[0010] A model determination module, used to generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information;

[0011] An information processing module, configured to obtain an identity identifier based on the target public model and the registration information, and to enable the target public model to process request information based on the identity identifier;

[0012] The result acquisition module is used to process the request information based on a preset target compensation model to obtain a target compensation result in response to an abnormality in the process of processing the request information by the target public model.

[0013] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.

[0015] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0016] The above-mentioned business dynamic compensation method, device, equipment and storage medium generate registration information based on the parameter class defined by the client program, determine the corresponding target public model based on the registration information; obtain an identity identifier based on the target public model and the registration information, and make the target public model process the request information based on the identity identifier; in response to an abnormality in the processing of the request information by the target public model, process the request information based on the preset target compensation model to obtain the target compensation result. Through the above implementation, when the target public model cannot provide a normal request result for the user, the public model can be downgraded to the target compensation model, and the request information sent by the user can continue to be processed through the target compensation model, so as to provide the user with the target compensation result, which is convenient for improving the stability of providing the model request result to the user.

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

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flow chart of a method for dynamic compensation of services provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the structure of a service dynamic compensation device provided in an embodiment of the present application;

[0021] Figure 3A schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0022] Figure 4 This is a diagram of the internal structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0025] In this article, the term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.

[0026] Embodiment 1

[0027] Figure 1 A flow chart of a method for dynamic compensation of services provided in Example 1 of the present application, see Figure 1 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:

[0028] S110 , generating registration information based on the parameter class defined by the client program, and determining a corresponding target public model based on the registration information.

[0029] Among them, the client program is used to define the parameter class. In this embodiment, the parameter class at least includes: a large model name, an API-KEY and an Ollama address, wherein the large model name is the name of multiple public models, and the public models include Wenxin Yiyan, Tongyi Qianwen and Pangu large model, etc.; API-KEY is used to verify the identity of the developer or application in Spring AI, so as to safely access and use the API interface provided by the AI ​​service provider, wherein Spring AI is used to simplify the development of Java AI applications; Ollama address is the address of the open source framework Ollama, and Ollama is used to run the language model on the local machine; Spring AI has a container for storing data, that is, a Spring container, and the parameter class and the client program class NGChatClient defined above can be dynamically registered in the Spring container, and the registration information is also the parameter class and the client program class NGChatClient dynamically registered in the Spring container, and the registration information includes the large model name, and the target public model is also the public model corresponding to the large model name. Exemplarily, if the name of the large model included in the registration information is Wenxin Yiyan, then the target public model is also Wenxin Yiyan.

[0030] Specifically, a parameter class is defined through the client program, and the parameter class includes the big model name, API-KEY and Ollama address, and the client program class NGChatClient corresponding to the client program is obtained; further, the parameter class and the client program class NGChatClient are dynamically registered in the preset Spring container to obtain registration information; then, the big model name contained in the registration information is determined, and the public model corresponding to the big model name is further determined, thereby determining the target public model.

[0031] S120: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0032] Among them, the identity identifier is recorded as tocken, tocken is a token or identifier. When the user calls the target public big model, a corresponding tocken will be generated, and the server can verify the identity and authority of the user through the tocken; the user can call the target public model based on the API-KEY in the registration information, and a corresponding identity identifier tocken can be generated when calling the target public big model; the request information is the request issued by the user to the target public big model. For example, the request issued by the user is "generate a test score table for a class", and the user can make the target public model process the request issued by the user according to the identity identifier tocken.

[0033] Specifically, the API-KEY in the registration information is determined, and the target public model is called based on the API-KEY, thereby obtaining the identity identifier tocken generated when the target public model is called; further, the target public model processes the user's request information through the identity identifier tocken.

[0034] S130: In response to an exception in the process of processing the request information by the target public model, the request information is processed based on a preset target compensation model to obtain a target compensation result.

[0035] It should be noted that when the target public model processes request information, there may be abnormalities in the processing process, where the abnormal phenomena include: the target public model does not output the request result corresponding to the request information, or the target public model takes a long time to feedback the request result corresponding to the request information, etc.; the preset target compensation model is also the downgraded target public model. The downgraded target public model can be understood as a large model used to replace the target public model to process the request information when an abnormality occurs in the target public model, so that compensation for the request information can be achieved. It should be noted that the performance of the target compensation model is weaker than that of the target public model. The above-mentioned degradation is also a degradation in model performance. In addition, the target compensation model is generally set to run on a local machine; the target compensation result is the processing result output by the target compensation model when processing the request information.

[0036] Specifically, when it is determined that an abnormality occurs in the processing of the target public model processing request information, the above request information is immediately processed through the preset target compensation model, and the corresponding processing result, that is, the target compensation result, is output.

[0037] It should be noted that this embodiment generates registration information based on the parameter class defined by the client program, determines the corresponding target public model based on the registration information, obtains an identity identifier based on the target public model and the registration information, and enables the target public model to process the request information based on the identity identifier; in response to an abnormality in the processing of the request information by the target public model, processes the request information based on the preset target compensation model to obtain the target compensation result. Through the above implementation, when the target public model cannot provide a normal request result for the user, the public model can be downgraded to a target compensation model, and the request information issued by the user can continue to be processed through the target compensation model, thereby providing the user with the target compensation result, which facilitates improving the stability of providing the model request result to the user.

[0038] Embodiment 2

[0039] A service dynamic compensation method is provided in the second embodiment of the present application. The method optimizes the "in response to an abnormality in the process of processing the request information by the target public model, processing the request information based on a preset target compensation model to obtain a target compensation result" in the first embodiment; it should be noted that for the part not described in detail in this embodiment, reference can be made to the description of other embodiments. The method includes:

[0040] S210 . Generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information.

[0041] S220: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0042] S231, determining whether the target public model generates a processing result when processing the request information; if not, determining whether an abnormality occurs in the processing of the request information by the target public model.

[0043] Among them, the target public model is subject to the influence of unexpected reasons such as network fluctuations and communication interruptions. After receiving the request information sent by the user, it may be difficult for it to process the request information sent by the user, resulting in the target public model being unable to generate corresponding processing results within a certain period of time. In this case, it means that there is an abnormality in the processing process of the target public model to process the request information. In order to provide timely feedback to the user's request information, it is necessary to determine whether the target public model generates processing results when processing the request information.

[0044] Specifically, after the request information sent by the user is sent to the target public model, it is determined within a preset time whether the target public model generates a corresponding processing result; if the target public model does not generate a corresponding processing result within the preset time, it is determined that an abnormality occurs in the processing process of the target public model processing the request information at this time.

[0045] S232: Determine whether a local model is included locally; if so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0046] Among them, local specifically refers to a local machine that can run a local model, and the local machine includes but is not limited to a computer and a local server; the local model is a large model that runs locally, similar to the target public model, but compared to the target public model, firstly, it not only runs locally, and secondly, its training data volume is lower than that of the target public model, so its performance is lower than that of the target public model; when it is determined that the target public model does not generate a processing result when processing the request information, and the local machine includes the local model, the local model can be loaded through the Ollama framework corresponding to the Ollama address in the registration information, and the request information can be input into the local model for processing, so as to obtain the target compensation result corresponding to the request information.

[0047] Specifically, it is determined whether the local machine has a local model. If so, the local model is used as the target compensation model, and the request information is input into the target compensation model for processing, and the target compensation result is output.

[0048] It should be noted that when an exception occurs in the target public model while processing request information, if a local model is locally recorded, the local model can be further used to replace the target public model to process the request information. This will help improve the stability of providing users with processing results corresponding to the request information.

[0049] Embodiment 3

[0050] A service dynamic compensation method provided in Embodiment 3 of the present application is optimized for the method provided in Embodiment 2. It should be noted that, for the parts not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0051] S310 , generating registration information based on the parameter class defined by the client program, and determining a corresponding target public model based on the registration information.

[0052] S320: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0053] S331, determining whether the target public model generates a processing result when processing the request information; if not, determining whether an abnormality occurs in the processing of the request information by the target public model.

[0054] S332: Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0055] S333: If it is determined that no local model is included locally, a preset vector database is used as a target compensation model, and the request information is processed based on the target compensation model to obtain a target compensation result.

[0056] It should be noted that the local machine may not include the local model, but the local machine is generally equipped with a vector database, in which the function of the vector database is the same as that of the local model. The vector database can process the request information and output the processing result corresponding to the request information, which is also the target compensation result.

[0057] Specifically, if it is determined that the local machine does not include the local model, the preset vector database is further used to continue processing the request information, and the corresponding target compensation result is output to the user.

[0058] It should be noted that when processing the request information sent by the user, the target public model is first used to process the request information. If an exception occurs in the processing process, the local model is further used to process the request information. If the local model is not included locally, the vector database is used to continue processing the request information. In this way, three layers of processing carriers are redundantly set up for the request information sent by the user, namely the target public model, the local model and the vector database, so as to ensure that the user's request information receives stable feedback, thereby improving the user's request processing experience.

[0059] Embodiment 4

[0060] A service dynamic compensation method provided in Embodiment 4 of the present application optimizes the method provided in Embodiment 2. It should be noted that, for the parts not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0061] S410 , generating registration information based on the parameter class defined by the client program, and determining a corresponding target public model based on the registration information.

[0062] S420: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0063] S431, determining whether the target public model generates a processing result when processing the request information; if not, determining whether an abnormality occurs in the processing of the request information by the target public model.

[0064] S432: Determine whether a local model is included locally; if so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0065] S433: If it is determined that the target public model processes the request information to generate a processing result, it is further determined whether the processing time for generating the processing result is abnormal. If so, it is determined that an abnormality occurs in the processing process of the target public model processing the request information.

[0066] Among them, the moment when the user sends a request message to the target public model through the client program class in the registration information is the request sending moment, the moment when the target public model generates a processing result and returns the processing result to the user is the result return moment, and the time difference between the result return moment and the corresponding request sending moment is the processing time; the step of judging whether the processing time for generating the processing result is abnormal includes: counting the number of request messages whose processing time exceeds the second preset time within the first preset time to obtain the target number; judging whether the target number is greater than the preset number threshold, and if so, judging that the processing time for generating the processing result is abnormal; in this embodiment, the first preset time is preferably 5 seconds, the second preset time is preferably 1 second, and the number threshold is preferably 50; it should be noted that if it is judged that the target number is greater than the preset number threshold, it means that the corresponding target public model processes the request information sent by the user at a significantly poor speed, and at this time, it is judged that the processing process of the target public model processing the request information is abnormal.

[0067] Specifically, when it is determined that the target public model processes the request information to produce a processing result, the processing time corresponding to each request information issued by the user is further obtained, and the number of request information whose processing time within the first preset time period exceeds the second preset time period is counted to obtain the target number; it is determined whether the target number is greater than the preset number threshold. If so, it is determined that an abnormality occurs in the processing process of the target public model processing request information.

[0068] S434: Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0069] If it is determined that the processing time for generating the processing result is abnormal, it is also determined that the processing process of the target public model processing request information is abnormal, and step S434 is continued to be executed.

[0070] Embodiment 5

[0071] A service dynamic compensation method provided in Embodiment 5 of the present application optimizes the method provided in Embodiment 4. It should be noted that, for the parts not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0072] S510 . Generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information.

[0073] S520: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0074] S531: Determine whether the target public model generates a processing result when processing the request information. If not, determine whether an abnormality occurs in the processing of the request information by the target public model.

[0075] S532: Determine whether a local model is included locally; if so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0076] S533: If it is determined that the target public model processes the request information to generate a processing result, it is further determined whether the processing time for generating the processing result is abnormal. If so, it is determined that an abnormality occurs in the processing process of the target public model processing the request information.

[0077] S534: Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0078] S535: If it is determined that the processing time for generating the processing result is not abnormal, determine whether the processing result exists in a preset vector database.

[0079] Among them, the preset vector database may contain the processing results obtained by processing the request information of the target public model. If the processing result exists in the vector database, it means that the processing result needs to be further optimized through the local model before being returned to the user; for this reason, it is necessary to further determine whether the processing result exists in the preset vector database after determining that the processing time for generating the processing result is not abnormal; in this embodiment, the processing result can be semantically split first to obtain the split result, and then it can be determined whether the split result can be matched from the vector database. If matched, it means that the processing result exists in the preset vector database.

[0080] Specifically, if it is determined that the processing time for generating the processing result is not abnormal, it is further determined whether the processing result exists in the preset vector database.

[0081] S536: If yes, determine whether a local model is included locally; if yes, use the local model as a target compensation model, and process the processing result based on the target compensation model to obtain a target compensation result.

[0082] In which, when a local model is locally included, the local model is used as a target compensation model, and the processing result is processed based on the target compensation model to obtain a target compensation result, that is, the processing result is further optimized through the local model to obtain a target compensation result.

[0083] Specifically, when it is determined that the processing result exists in the preset vector database, it is further determined whether the local model is included in the local machine. If the local model is included, the local model is loaded through the Ollama framework, and the processing result is optimized through the local model to output the target compensation result.

[0084] Embodiment 6

[0085] A service dynamic compensation method provided in Embodiment 6 of the present application is optimized for the method provided in Embodiment 5. It should be noted that, for the parts not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0086] S610: Generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information.

[0087] S620: Obtain an identity identifier based on the target public model and the registration information, and enable the target public model to process request information based on the identity identifier.

[0088] S631: Determine whether the target public model generates a processing result when processing the request information. If not, determine whether an abnormality occurs in the processing of the request information by the target public model.

[0089] S632: Determine whether a local model is included locally; if so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0090] S633: If it is determined that the target public model processes the request information to generate a processing result, it is further determined whether the processing time for generating the processing result is abnormal. If so, it is determined that an abnormality occurs in the processing process of the target public model processing the request information.

[0091] S634: Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0092] S635: If it is determined that the processing time for generating the processing result is not abnormal, determine whether the processing result exists in a preset vector database.

[0093] S636: If yes, determine whether a local model is included locally; if yes, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result.

[0094] S637: If it is determined that the processing result does not exist in the preset vector database, output the processing result.

[0095] If it is determined that the processing result does not exist in the preset vector database, it means that the processing result does not need to be further optimized and can be output and returned to the user.

[0096] Embodiment 7

[0097] A service dynamic compensation method provided in Embodiment 7 of the present application optimizes the method provided in Embodiment 3 or 5; the step of generating a vector database in Embodiment 3 or 5 includes:

[0098] A110. Determine row-level data based on the acquired business data processing statement.

[0099] Among them, business data is data related to the requested information. For example, the business data is the score data of a school's year-end test; business data processing statements are various SQL statements. For example, business data processing statements include insert statements, delete statements, and modify statements, etc.; business data processing statements include row-level data.

[0100] Specifically, a business data processing statement for processing business data is obtained, and the trip-level data is further determined from the business data processing statement.

[0101] A120. Process the row-level data based on the loaded local model to obtain description text.

[0102] Among them, the local model can be loaded through the Ollama framework, and the local model can process the row-level data to output the description text. The description text can be understood as the text data obtained after text optimization (such as text polishing) of the row-level data.

[0103] Specifically, the row-level data is input into the local model loaded by the Ollama framework for processing, and the description text is output.

[0104] A130. Encapsulate the description text to obtain a target class, and process the target class to obtain a vector database.

[0105] The target class is specifically a document class. By encapsulating the description text, the description text can be encapsulated into a document class. Furthermore, a vector database can be generated based on the document class.

[0106] Specifically, the description text is encapsulated to obtain a target class, and then the target class is processed to obtain a vector database.

[0107] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] Embodiment 8

[0109] Based on the same inventive concept, this embodiment also provides a service dynamic compensation device for implementing the service dynamic compensation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more service dynamic compensation device embodiments provided below can refer to the limitations of the service dynamic compensation method above, and will not be repeated here.

[0110] In this embodiment, Figure 2 As shown, a service dynamic compensation device is provided, comprising:

[0111] The model determination module is used to generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information.

[0112] The information processing module is used to obtain an identity identifier based on the target public model and the registration information, and to enable the target public model to process the request information based on the identity identifier.

[0113] The result acquisition module is used to process the request information based on a preset target compensation model to obtain a target compensation result in response to an abnormality in the process of processing the request information by the target public model.

[0114] Each module in the above-mentioned service dynamic compensation device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module above.

[0115] It should be noted that this embodiment generates registration information based on the parameter class defined by the client program, determines the corresponding target public model based on the registration information, obtains an identity identifier based on the target public model and the registration information, and enables the target public model to process the request information based on the identity identifier; in response to an abnormality in the processing of the request information by the target public model, processes the request information based on the preset target compensation model to obtain the target compensation result. Through the above implementation, when the target public model cannot provide a normal request result for the user, the public model can be downgraded to a target compensation model, and the request information issued by the user can continue to be processed through the target compensation model, thereby providing the user with the target compensation result, which facilitates improving the stability of providing the model request result to the user.

[0116] Embodiment 8

[0117] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for dynamic compensation of business is implemented.

[0118] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0119] Embodiment 9

[0120] In this embodiment, a computer readable storage medium is provided. Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0121] Embodiment 10

[0122] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0123] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0124] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited thereto.

[0125] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A service dynamic compensation method, characterized in that: include: Generate registration information based on the parameter class defined by the client program, and determine the corresponding target public model based on the registration information; wherein the parameter class includes at least: a large model name, an API-KEY, and an Ollama address; obtaining an identity identifier based on the target public model and the registration information, and causing the target public model to process the request information based on the identity identifier; In response to an abnormality in the process of processing the request information by the target public model, processing the request information based on a preset target compensation model to obtain a target compensation result; Wherein, in response to an exception in the process of processing the request information by the target public model, processing the request information based on a preset target compensation model to obtain a target compensation result includes: Determine whether the target public model generates a processing result when processing the request information, and if not, determine that an abnormality occurs in the processing of the request information by the target public model; Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result; wherein the performance of the local model is lower than that of the target public model.

2. The method according to claim 1, characterized in that If it is determined that no local model is included locally, the preset vector database is used as the target compensation model, and the request information is processed based on the target compensation model to obtain the target compensation result.

3. The method according to claim 1, characterized in that: If it is determined that the target public model processes the request information to generate a processing result, it is further determined whether the processing time to generate the processing result is abnormal. If so, it is determined that an abnormality occurs in the processing process of the target public model to process the request information; Determine whether a local model is included locally, and if so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result; Among them, the determination of whether the processing time for generating the processing result is abnormal includes: counting the number of request information whose processing time within the first preset time period exceeds the second preset time period to obtain a target number; and determining whether the target number is greater than a preset number threshold.

4. The method according to claim 3, characterized in that If it is determined that the processing time for generating the processing result is not abnormal, determining whether the processing result exists in a preset vector database; If yes, determine whether a local model is included locally; if yes, use the local model as a target compensation model, and process the processing result based on the target compensation model to obtain a target compensation result.

5. The method according to claim 4, characterized in that If it is determined that the processing result does not exist in the preset vector database, the processing result is output.

6. The method according to any one of claims 2 or 4, characterized in that: The step of generating the vector database comprises: Determine row-level data based on acquired business data processing statements; Processing the row-level data based on the loaded local model to obtain description text; The description text is encapsulated to obtain a target class, and the target class is processed to obtain a vector database.

7. A service dynamic compensation device, characterized in that: The device comprises: A model determination module, used to generate registration information based on a parameter class defined by a client program, and determine a corresponding target public model based on the registration information; wherein the parameter class includes at least: a large model name, an API-KEY, and an Ollama address; An information processing module, configured to obtain an identity identifier based on the target public model and the registration information, and to enable the target public model to process request information based on the identity identifier; A result acquisition module, configured to, in response to an exception in the process of processing the request information by the target public model, process the request information based on a preset target compensation model to obtain a target compensation result; Wherein, in response to an exception in the process of processing the request information by the target public model, processing the request information based on a preset target compensation model to obtain a target compensation result includes: Determine whether the target public model generates a processing result when processing the request information, and if not, determine that an abnormality occurs in the processing of the request information by the target public model; Determine whether a local model is included locally. If so, use the local model as a target compensation model, and process the request information based on the target compensation model to obtain a target compensation result; wherein the performance of the local model is lower than that of the target public model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Model scheduling method, terminal device and server

    CN117453377A

  • Domain model retrieval method and device, equipment and storage medium

    CN117874170A