Model management system and business processing method
Through the model adaptation module and fusion module of the model management system, the dynamic replacement of large language models and the efficient fusion of multi-model output results are realized, which solves the problem of complexity and insufficient accuracy of large language model replacement and improves the processing capacity of the system. and accuracy.
Patent Information
- Application Number
- CN202411885544.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
As the complexity of engineering systems increases, the cost and difficulty of replacing large language models have increased significantly, and it is difficult for the existing technology to achieve dynamic replacement and efficient integration of large language models.
A model management system is provided, including a model adaptation module and a model fusion module. The model adaptation module calls multiple large language models through a unified API interface to achieve dynamic replacement; the model fusion module uses voting mechanisms, confidence weighting, sentence mixing, content fusion and other strategies to fuse the output results of multiple models.
The dynamic replacement of large language models has been achieved, the complexity and cost of replacement are reduced, and the system's processing ability and accuracy is improved through multi -model fusion.
Smart Images

Figure CN119337933A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model management system and a business processing method. Background Art
[0002] With the development of artificial intelligence, the rapid progress of large language models has shown great potential in natural language processing, machine translation, sentiment analysis and other fields. However, in actual engineering applications, as the complexity of engineering systems increases, the cost and difficulty of replacing large language models also increase significantly.
[0003] Therefore, there is an urgent need for an effective model management solution to achieve dynamic replacement of large language models. Summary of the invention
[0004] The present application provides a model management system and a business processing method for realizing dynamic replacement of large language models.
[0005] In a first aspect, the present application provides a model management system, including a model adaptation module and a model fusion module; wherein:
[0006] A model adaptation module is used to match at least one target large language model applicable to the text data to be processed from multiple types of large language models currently applied according to the text data to be processed; and based on the text data to be processed, at least one target large language model is called through a unified API interface to obtain an output result obtained by applying the target large language model to process the text data to be processed;
[0007] The model fusion module is used to perform fusion processing on the output results to obtain the processing results corresponding to the text data to be processed.
[0008] In one possible implementation, the model fusion module includes at least one of a voting mechanism manager, a confidence weighting manager, and a sentence mixing manager, as well as a content fusion manager and a text post-processor, wherein: the voting mechanism manager is used to vote on words or phrases in the output result to obtain a first result, and the first result includes the words or phrases that appear most frequently in the output result; the confidence weighting manager is used to set confidence scores for the words or phrases in the output result; weighting is performed according to the confidence scores to obtain a second result, and the second result includes the words or phrases with the highest confidence after weighting; the sentence mixing manager is used to score the language quality of the sentences in the output result to obtain a third result, and the third result includes the sentences with the highest language quality scores; the content fusion manager is used to merge the first result, the second result, or the third result based on a semantic similarity algorithm to obtain a fourth result; the text post-processor is used to correct the fourth result to obtain a processed result.
[0009] In one possible implementation, the model adaptation module includes an input analyzer, a model selector, and an interface adapter, wherein: the input analyzer is used to determine the type and complexity of the text data to be processed based on natural language processing technology; the model selector is used to match at least one target large language model applicable to the text data to be processed from multiple types of large language models currently applied according to the type and complexity; the interface adapter is used to call at least one target large language model based on a unified API interface to obtain an output result obtained by applying the target large language model to process the text data to be processed.
[0010] In a possible implementation, the model management system further includes a model management module, which is used to detect whether the large language model is a target version among multiple large language models pre-stored locally, and to perform version upgrade on the large language model that is not the target version.
[0011] In a possible implementation, the model management module includes a version controller, an update and replacement manager, a load and unload manager, a health monitor and a metadata manager, wherein: the version controller is used to manage version information of the large language model; the update and replacement manager is used to detect whether the large language model is a target version among multiple large language models pre-stored locally, and when the large language model is not the target version among the multiple large language models pre-stored locally, perform version update or replacement on the large language model that is not the target version; the load and unload manager is used to unload and load the large language model; the health monitor is used to monitor the running status of the large language model; the metadata manager is used to manage the metadata of the large language model and record detailed information of the large language model.
[0012] In a possible implementation, the model management system also includes at least one of a post-processing module, a data synchronization module and a pre-processing module, wherein: the post-processing module is used to optimize and cache the processing results; the data synchronization module is used to ensure the consistency and integrity of the data in the system; the pre-processing module is used to obtain the original data; convert the original data into a format suitable for large language model processing; perform data cleaning, data tokenization and data encoding on the formatted data to obtain the text data to be processed.
[0013] In one possible implementation, the post-processing module includes a result optimizer, a formatting processor, a content verifier, a result enhancer and a result cache, wherein: the result optimizer is used to correct and remove redundancy from the processing result to obtain a fifth result; the formatting processor is used to format the fifth result to obtain a sixth result; the content verifier is used to verify the accuracy and legality of the sixth result to obtain a seventh result; the result enhancer is used to enhance the seventh result to obtain an eighth result; and the result cache is used to cache the eighth result.
[0014] In one possible implementation, the data synchronization module includes a data version controller, a consistency checker, a synchronization processor, a backup and recovery manager, and a permission manager, wherein: the data version controller is used to manage and control the version of the data; the consistency checker is used to verify the consistency of the data and repair inconsistent data; the synchronization processor is used to synchronize data between multiple large language models; the backup and recovery manager is used to back up and restore system data; the permission manager is used to manage data access rights.
[0015] In one possible implementation, the preprocessing module includes an input processor, a text cleaner, a text tokenizer, a text encoder, and a data cache and manager; wherein: the input processor is used to obtain raw data and convert the raw data into a format suitable for processing by a large language model; the text cleaner is used to perform data cleaning on the format-processed data to remove noise and irrelevant data; the text tokenizer is used to segment the cleaned data into words or sub-word units for processing by a large language model; the text encoder is used to convert words or sub-word units into text data to be processed; the data cache and manager is used to cache raw data and text data to be processed, and manage the life cycle of cached data.
[0016] In a second aspect, the present application provides a business processing method, including:
[0017] Obtain business data to be processed;
[0018] The model management system is applied to process the business data to be processed to obtain processing results corresponding to the business data to be processed. The model management system is any one of the model management systems in the first aspect.
[0019] In a third aspect, the present application provides a service processing device, including: an acquisition module and an application module, wherein:
[0020] An acquisition module is used to acquire the business data to be processed;
[0021] An application module is used to apply a model management system to process the business data to be processed and obtain processing results corresponding to the business data to be processed. The model management system is the model management system of any one of the first aspects.
[0022] In a fourth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0023] Memory stores computer-executable instructions;
[0024] The processor executes the computer execution instruction, so that the processor executes the business processing method described in any one of the second aspects.
[0025] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed, they are used to implement the business processing method as described in any one of the second aspects.
[0026] In a sixth aspect, the present application provides a computer program product, including a computer program, which implements the business processing method as described in any one of the second aspects when the computer program is executed.
[0027] The model management system and business processing method provided by the present application, the model management system includes a model adaptation module and a model fusion module, wherein the model adaptation module is used to match at least one target large language model applicable to the text data to be processed among the multiple types of large language models currently applied according to the text data to be processed; and, based on the text data to be processed, at least one target large language model is called through a unified API interface to obtain the output result obtained by applying the target large language model to process the text data to be processed; the fusion module is used to fuse the output results to obtain the processing results corresponding to the text data to be processed. The dynamic replacement of the large language model is realized through the model adaptation module, reducing the complexity and cost of the replacement of the large language model. The outputs of multiple large language models are integrated through the fusion module, making full use of the advantages of each large language model and improving the processing capacity and accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0029] Figure 1 The structure of the model management system provided for the exemplary embodiment of the present application is shown in FIG. Figure 1 ;
[0030] Figure 2 The structure of the model management system provided for the exemplary embodiment of the present application is shown in FIG. Figure 2 ;
[0031] Figure 3 A flowchart of a business processing method provided for an exemplary embodiment of the present application;
[0032] Figure 4 A schematic diagram of a dynamic enhancement process provided for an exemplary embodiment of the present application;
[0033] Figure 5 A schematic diagram of inputting data on a client interface provided for an exemplary embodiment of the present application;
[0034] Figure 6A schematic diagram of the structure of a business processing device provided for an exemplary embodiment of the present application;
[0035] Figure 7 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of the present application.
[0036] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0038] As the complexity of engineering systems increases, the cost and difficulty of replacing large language models also increase significantly. In related technologies, large language models are deployed in engineering systems at one time. When business needs change, the currently deployed large language models may not be able to meet the changed needs. Therefore, the current large language models need to be replaced to adapt to business needs. When replacing the model, the system may need to be shut down, affecting the continuity and stability of the service, and the manual replacement process is prone to errors. In addition, many large language models with superior performance are closed source. Usually, open source large language models are deployed locally for application, resulting in the system being unable to utilize the capabilities of these closed source models. This limitation is particularly evident in application scenarios that require high precision and high performance, affecting the overall performance of the system.
[0039] In response to the above technical problems, the present application provides a model management solution, which provides a unified API interface through a model adaptation module, and enables different large language models to switch seamlessly and work together based on the API interface, thereby reducing the cost and difficulty of model replacement; the output results of the large language model are fused through a model fusion module, making full use of the advantages of open source large language models and closed source large language models to improve the processing power and accuracy of the system.
[0040] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0041] Figure 1 The structure of the model management system provided for the exemplary embodiment of the present application is shown in FIG. Figure 1 .like Figure 1 As shown, the model management system 10 provided by the exemplary embodiment of the present application includes a model adaptation module 11 and a model fusion module 12; wherein:
[0042] The model adaptation module 11 is used to match at least one target large language model applicable to the text data to be processed among multiple types of large language models currently applied according to the text data to be processed; and, based on the text data to be processed, call at least one target large language model through a unified API interface to obtain an output result obtained by applying the target large language model to process the text data to be processed.
[0043] The big language model is an artificial intelligence model based on deep learning technology, which is specifically used to process and generate natural language text. It is usually used in scenarios such as natural language processing, intelligent dialogue systems, content generation, and search engines.
[0044] For example, the model management system 10 is deployed in a local server, and multiple different types of large language models are also deployed in the server, for example, transformer-based models, including GPT (Generative Pre-trained Transformer) series, BERT (Bidirectional Encoder Representations from Transformers), T5 (Text-to-Text Transfer Transformer), RoBERTa, etc.; hybrid architecture models, including ERNIE (Enhanced Representation through kNowledge Integration), XLNet, etc.; multimodal models, including DALL-E, CLIP (Contrastive Language–Image Pretraining), etc.; dialogue models, including DialoGPT, BlenderBot, etc.; task-specific models, including BioBERT, LegalBERT, etc. Different model types demonstrate the diversity and flexibility of large language models in different fields and tasks.
[0045] It should be noted that some closed-source models with better performance are also deployed in the server, such as GPT-3, etc. That is, different types of open-source large language models and closed-source large language models are deployed in the local server.
[0046] The key functions of the model adaptation module 11 include model selection and unified API interface. Model selection includes selecting the most suitable large language model for processing according to the characteristics and requirements of the text data to be processed. Specifically, analyze the type and complexity of the input content, query the information of the currently available large language models in the model management system, and select the most suitable target large language model based on predefined selection strategies (such as model performance, task adaptability, etc.). The unified API interface includes providing a unified API interface so that different large language models can be called through the same interface. Specifically, define standardized input and output formats to ensure that different large language models are compatible with the interface; implement interface adaptation logic to convert the input text data to be processed into the format required by the large language model, and convert the output results of the large language model into the format required by the system.
[0047] For example, according to the text data to be processed input into the model management system, the model adaptation module 11 dynamically determines and manages the matching and use of the deployed large language models. For example, when the text data to be processed is relatively complex, the performance and accuracy requirements of the large language model are relatively high. At this time, a large language model with high matching performance and high accuracy is used as the target large language model, for example, the target large language model is an open source model and a closed source model; when the text data to be processed is relatively simple, the performance and accuracy requirements of the large language model are relatively low. At this time, a large language model with low matching performance and low accuracy is used as the target large language model, for example, the target large language model is two open source models. Optionally, the corresponding type of large language model can also be matched according to the type of the text data to be processed.
[0048] Furthermore, the model adaptation module 11 provides a unified API interface, which defines a standardized input and output format to ensure that all large language models are compatible with the interface. For example, when the target large language model is BERT, XLNet, and GPT-3, BERT, XLNet, and GPT-3 are called through the API interface, and BERT, XLNet, and GPT-3 are used to process the text data to be processed.
[0049] It can be understood that as business needs change, it is only necessary to deploy the large language model that is adapted to the needs on the local server, and call the newly deployed large language model through the unified API interface provided by the model adaptation module 11, so as to realize the dynamic replacement of the large language model and avoid system downtime caused by manual model replacement, which affects the continuity and stability of the service.
[0050] The model fusion module 12 is used to perform fusion processing on the output results to obtain processing results corresponding to the text data to be processed.
[0051] For example, after using BERT, XLNet and GPT-3 to process the text data to be processed, results A, B and C are obtained respectively. It can be understood that each model has its own advantages and disadvantages, and the processing results of a single model may not be ideal, especially for large language models. Applying them for text generation involves natural language processing, and requires a specific fusion strategy to process the output results of a single model. For example, based on the preset fusion strategy, results A, B and C are further fused to obtain the fused processing results.
[0052] In the embodiment of the present application, the output of the target large language model is integrated through the model fusion module, and the advantages of open source and closed source large language models are fully utilized to improve the processing power and accuracy of the system and the overall performance of the system, thereby meeting the requirements of high accuracy and high performance. The model adaptation module provides a unified API interface, so that different large language models can be seamlessly switched and work together, and the dynamic replacement of large language models can be realized.
[0053] Compared with the manual model replacement process in related technologies, calling different large language models through a unified API interface reduces the complexity and cost of model replacement.
[0054] Compared with the related art, in which a closed-source model is used by calling an external API (such as a large language model API provided by a cloud service), the embodiment of the present application deploys the closed-source model locally and calls the closed-source model through a local unified API interface, which is independent of the network, reduces latency and data security issues, and at the same time avoids the high cost of calling an external API.
[0055] In some embodiments, the model fusion module includes at least one of a voting mechanism manager, a confidence weighting manager and a sentence mixing manager, as well as a content fusion manager and a text post-processor, wherein: the voting mechanism manager is used to vote on words or phrases in the output results to obtain a first result, and the first result includes the words or phrases that appear most frequently in the output results; the confidence weighting manager is used to set confidence scores for the words or phrases in the output results; weighting is performed according to the confidence scores to obtain a second result, and the second result includes the words or phrases with the highest confidence after weighting; the sentence mixing manager is used to score the language quality of the sentences in the output results to obtain a third result, and the third result includes the sentences with the highest language quality scores; the content fusion manager is used to merge the first result, the second result, or the third result based on the semantic similarity algorithm to obtain a fourth result; the text post-processor is used to correct the fourth result to obtain a processed result.
[0056] For example, the voting mechanism manager specifically divides the text generated by each target large language model into words or phrases, votes for the words or phrases at the same position in each text, and selects the word or phrase with the highest frequency as the first result. That is, the voting mechanism manager is responsible for fusing the text output based on the voting mechanism.
[0057] The confidence weighting manager is called when each target large language model generates text, and the confidence score of each word or phrase is output at the same time when the text is generated, that is, the output text of each target large language model contains the confidence score of the word or phrase, and the same word or phrase in the output text of different target large language models is weighted according to the confidence score, and the word or phrase with the highest confidence after weighting is selected as the second result. That is, the confidence weighting manager is responsible for fusion text output based on confidence weighting.
[0058] The sentence mixing manager specifically calculates the language quality score (such as fluency and consistency) of each sentence in the text generated by each target large language model, selects the sentence with the highest language quality score, and combines it into the final text as the third result. In one example, the sentence with the highest language quality score is first selected from the output text of each target large language model, and then the sentence with the highest score is selected from the above sentences as the third result; in another example, the sentence with the highest score is directly selected from the output text of all target large language models as the third result. That is, the sentence mixing manager is responsible for selecting the best sentence based on the sentence mixing strategy.
[0059] The content fusion manager specifically uses a semantic similarity algorithm (such as BERT, USE) to calculate the semantic similarity of the generated text, and merges text fragments with similar content based on the semantic similarity to generate text results with higher consistency. For example, the text fragments with similar content in the first result, the second result, or the third result are merged to generate a fourth result with higher consistency. In other words, the content fusion manager is responsible for merging text content based on the content fusion strategy.
[0060] The text post-processor specifically applies language models or grammatical rules to correct grammatical errors in the text, adjust the text structure, and ensure coherence and logic. In other words, the text post-processor is responsible for post-processing the merged text to ensure coherence and correctness.
[0061] It should be noted that the model fusion module includes at least one of a voting mechanism manager, a confidence weighted manager and a sentence mixing manager. In actual application, one of the voting mechanism manager, the confidence weighted manager and the sentence mixing manager can be determined by pre-configured or dynamic parameters to process the output results of the target large language model.
[0062] Optionally, the model fusion module also includes a performance monitor, which is used to monitor the performance of the model fusion module in real time and dynamically adjust the fusion strategy and parameters.
[0063] In the embodiment of the present application, the model fusion module fuses the output results of multiple target large language models through multiple strategies, fully utilizing the advantages of open source and closed source large language models to improve the processing capability, prediction accuracy and flexibility of the system.
[0064] In some embodiments, the model management system further includes a model management module, which is used to detect whether the large language model is a target version among multiple large language models pre-stored locally, and to perform version upgrade on the large language model that is not the target version.
[0065] It can be understood that the model management module is responsible for managing the locally deployed open source and closed source large language models, including version control, updating or replacement of the large language models.
[0066] For example, a plurality of large language models and different version packages of the large language models are pre-stored in the local server, or different versions of the large language models are pre-stored. The model management module maintains a version library, which records the version information of each large language model, and the version information includes the historical version and the latest version. By reading the version of the large language model of the current application and the version information in the version library, it can be determined whether the version of the large language model of the current application is the target version (for example, the latest version). If it is not the target version, the version package corresponding to the target version is obtained from the local server and the large language model is upgraded to the target version; or, the target version of the large language model is obtained from the local server and the large language model of the current application is replaced. The version upgrade of the large language model can also be completed by replacement. It should also be noted that in order to ensure that the model update and replacement process does not interrupt the service, for example, a progressive replacement strategy can be adopted.
[0067] The model management module can also roll back the version of the large language model, and can flexibly roll back the version of the large language model according to business needs. For example, it allows administrators to roll back the version of the large language model according to specific needs.
[0068] In the embodiment of the present application, the model management module is used to automatically detect and obtain the latest large language model version, and the model is updated or replaced without interrupting the service, thereby ensuring that the system always uses the latest large language model and that the system is in the best condition.
[0069] Compared with the related art, in which the large language model is deployed once in the engineering system and is not updated throughout its life cycle, making it impossible to utilize the latest large language model, causing the performance of the large language model to gradually lag behind the latest technology, the present application utilizes the enhanced capabilities of the latest large language model by automatically detecting and updating the large language model to improve the overall performance and efficiency of the system.
[0070] In the related art, the system is kept in the best state by regularly manually checking and updating the large language model. Although this solves the problem of updating the large language model to a certain extent, the update process requires manual intervention, which is time-consuming and error-prone. At the same time, the system may need to be shut down during the manual update process, affecting the continuity and stability of the service. In contrast, the present application completes the update of the large language model through an automated process, which is highly efficient and ensures that the system does not interrupt service.
[0071] In the related art, containerization technology (such as Docker) is used to deploy large language models, making the deployment and update of the model more flexible and easy to manage. The containerization method supports the rapid loading and unloading of the model, which helps to improve the flexibility of the system. However, this method still relies on manual management and cannot achieve fully automated large language model updates. In contrast, this application completes the update of the large language model through an automated process, which is more efficient.
[0072] In some embodiments, the model management module includes a version controller, an update and replacement manager, a load and unload manager, a health monitor and a metadata manager, wherein: the version controller is used to manage the version information of the large language model; the update and replacement manager is used to detect whether the large language model is the target version among multiple large language models pre-stored locally, and when the large language model is not the target version among multiple large language models pre-stored locally, the large language model that is not the target version is updated or replaced; the load and unload manager is used to unload and load the large language model; the health monitor is used to monitor the running status of the large language model; the metadata manager is used to manage the metadata of the large language model and record detailed information of the large language model.
[0073] The version controller manages different versions of the large language model to ensure that you can trace back to any version, for example, upgrade to a new version or roll back to an old version. For example, the version controller maintains a version control database to record the version information, release time, etc. of each large language model.
[0074] The update and replacement manager can update and replace existing large language models according to technological advances or changes in requirements, ensuring that the system uses the latest and best large language models. For example, it automatically checks the version of the large language model regularly, calls the version controller to obtain the latest model version, and automatically updates the large language model to the target version. In addition, the update and replacement manager also provides a manual replacement function, allowing administrators to replace the large language model according to needs, and adopts a progressive replacement strategy to ensure that the large language model update and replacement process does not interrupt service.
[0075] The load and unload manager can dynamically load and unload large language models as needed to optimize the use of system resources. Implement the dynamic loading function of large language models to ensure that large language models can be quickly loaded into memory when needed. Implement the dynamic unloading function of large language models to release system resources that are no longer needed. Furthermore, use intelligent resource management strategies, such as LRU (Least Recently Used) cache management, to optimize memory usage.
[0076] The health monitor can monitor the running status of the large language model to ensure that the large language model remains healthy during operation. For example, the performance indicators of the large language model, such as response time, accuracy, etc., are monitored in real time, abnormal conditions of the large language model are recorded and alarmed, and further, an automatic repair mechanism is provided, such as automatically restarting an abnormal large language model or switching to a backup large language model.
[0077] The metadata manager can manage the metadata related to the large language model, including the description, purpose, performance indicators, etc. of the large language model. For example, a metadata database is maintained to record the detailed information of each large language model. The metadata manager also provides query and update interfaces to facilitate administrators to view and manage the metadata of the model.
[0078] In the embodiments of the present application, the system is ensured to use the optimal model version and respond quickly to technological advances by updating and replacing the manager; the large language model is dynamically loaded and unloaded according to demand by the loading and unloading manager, thereby optimizing the use of system resources, ensuring that the service will not be interrupted when the large language model is replaced, and reducing the replacement cost and risk; the running status of the large language model is monitored by the health monitor to ensure that the large language model remains in a healthy state during operation.
[0079] In some embodiments, the model adaptation module includes an input analyzer, a model selector and an interface adapter, wherein: the input analyzer is used to determine the type and complexity of the text data to be processed based on natural language processing technology; the model selector is used to match at least one target large language model applicable to the text data to be processed from multiple types of large language models currently applied according to the type and complexity; the interface adapter is used to call at least one target large language model based on a unified API interface to obtain the output result obtained by applying the target large language model to process the text data to be processed.
[0080] For example, natural language processing techniques (such as text classification and entity recognition) are used to analyze the type of input content (text data to be processed), evaluate the complexity of the input content, and determine whether a more powerful large language model is needed for processing. That is, the input analyzer is responsible for analyzing the type and complexity of the input content and determining which type of large language model to use.
[0081] Based on the analysis results of the input analyzer, the model management module is queried to obtain information about available large language models, and the most suitable large language model is selected using predefined selection strategies (such as model performance indicators, fitness scores, etc.). That is, the model selector is responsible for selecting the most suitable target large language model based on the analysis results of the input analyzer.
[0082] Define standardized input and output formats to ensure that different large language models are compatible with a unified interface, implement the conversion logic of input and output data formats, and ensure seamless data transmission between major language models. That is, the interface adapter is responsible for providing a unified API interface, and through the API interface, calls the selected target large language model to process the input text data to be processed.
[0083] In the embodiment of the present application, the sub-modules included in the model adaptation module are used to dynamically select and manage the large language model according to the text data to be processed, provide a unified API interface, ensure that different large language models are compatible with the unified interface, achieve seamless switching and collaborative work, and simplify the model replacement process, thereby providing important support for the system to select the most appropriate large language model for reasoning when processing different types of tasks, and optimize the system's resource utilization and response speed.
[0084] In some embodiments, the model management system also includes at least one of a post-processing module, a data synchronization module and a pre-processing module, wherein: the post-processing module is used to optimize and cache the processing results; the data synchronization module is used to ensure the consistency and integrity of the data in the system; the pre-processing module is used to obtain the original data; convert the original data into a format suitable for large language model processing; perform data cleaning, data tokenization and data encoding on the formatted data to obtain the text data to be processed.
[0085] Among them, the post-processing module further optimizes the processing results obtained by the model fusion module to ensure the accuracy, consistency and availability of the results. This module is responsible for optimizing, formatting and verifying the processing results output by the model fusion module to ensure that the output results meet the expected quality standards. In addition, the processed results are cached to improve the response speed of repeated requests.
[0086] The data synchronization module is responsible for managing data version control, consistency checking, and synchronization processing to ensure smooth and error-free data flow between various parts of the system, especially when exchanging and integrating data between multiple large language models, to ensure the consistency and integrity of data in the system.
[0087] The preprocessing module can improve data quality. For example, after obtaining the text data (raw data) input by the user, the raw data is format converted, cleaned, tokenized and encoded in sequence to obtain the text data to be processed, ensuring that the large language model can accurately understand and process the input data.
[0088] Further, in some embodiments, the post-processing module includes a result optimizer, a formatting processor, a content checker, a result enhancer and a result cache, wherein: the result optimizer is used to correct and remove redundancy on the processing result to obtain a fifth result; the formatting processor is used to format the fifth result to obtain a sixth result; the content checker is used to verify the accuracy and legality of the sixth result to obtain a seventh result; the result enhancer is used to enhance the seventh result to obtain an eighth result; and the result cache is used to cache the eighth result.
[0089] For example, when the result optimizer is implemented, a language model (such as GPT, BERT) is applied to perform grammar and spelling correction, natural language processing technology (such as a duplicate detection algorithm) is used to remove redundant content, and the content is adjusted and optimized according to specific optimization rules to obtain the fifth result.
[0090] The formatting processor converts the fifth result into a specific document format (such as JSON, XML, HTML, etc.) to obtain a sixth result, and defines an output format specification to ensure that the sixth result complies with a predefined format.
[0091] The content verifier uses regular expressions or specific rules to verify the legality of the content in the sixth result (such as sensitive word detection) to obtain the seventh result, ensuring that the output seventh result does not contain content that violates business rules or policies.
[0092] The result enhancer can integrate with an external knowledge base or API to add contextual information or relevant background content to enrich the content of the seventh result and improve the practicality of the seventh result.
[0093] The result cache can use a cache system (such as Redis, Memcached) to implement a result cache mechanism, and regularly update and clean the cache to ensure the timeliness and effectiveness of the cached data.
[0094] In the embodiment of the present application, a result optimizer is used to remove redundant information from the processing results obtained through fusion processing by the model fusion module, correct errors, and improve the quality of the processing results; a formatting processor is used to ensure the standardization and consistency of the processing results; a content verifier is used to verify the processing results to ensure the accuracy and legality of the content of the processing results; a result enhancer is used to enhance the processing results to improve the richness and practicality of the processing results; a result cache is used to cache the processed results to improve the response speed of repeated requests.
[0095] In some embodiments, the data synchronization module includes a data version controller, a consistency checker, a synchronization processor, a backup and recovery manager, and a permission manager, wherein: the data version controller is used to manage and control the version of the data; the consistency checker is used to verify the consistency of the data and repair inconsistent data; the synchronization processor is used to synchronize data between multiple large language models; the backup and recovery manager is used to back up and restore system data; the permission manager is used to manage access rights to the data.
[0096] For example, the data version controller maintains a data version control database, records the version information of each data processing, provides a data version control interface, and ensures that a consistent version is used when a large language model processes data. Furthermore, the data version controller can also implement a data version rollback mechanism, allowing rollback to the previous data version when necessary.
[0097] The consistency checker can check the consistency of data when exchanging data between models to ensure that the data is not lost or tampered with. For example, define data consistency check rules, such as using hash value verification, checksum and other algorithms. Real-time monitoring of the consistency of data transmission, detection of whether the data has been tampered with or lost, and automatic repair of inconsistent data to ensure data integrity.
[0098] The synchronization processor can use a distributed database or cache system (such as Redis, Cassandra) to achieve fast synchronization and sharing of data, or, in order to ensure real-time update of data between multiple large language models, use an event-driven architecture or message queue (such as Kafka) to achieve real-time synchronization of data.
[0099] The backup and recovery manager can back up data regularly and provide data recovery functions to deal with data loss or system failure. For example, use scheduled tasks or backup scripts to save data to a safe storage location. Provide a data recovery interface to restore data from backups, ensuring that the system can be quickly restored in the event of data loss or failure.
[0100] The permission manager can define data access permission rules, such as using access control lists (ACLs) or role-based permission models (RBAC) to manage data access permissions, implement data access control, and ensure that only authorized users or modules can access and modify data.
[0101] In the embodiment of the present application, the synergy of the sub-modules in the data synchronization module ensures real-time updating of data between large language models, as well as data integrity and data security, thereby improving the accuracy of the output results of the large language model and thus improving the credibility and reliability of the system.
[0102] In some embodiments, the preprocessing module includes an input processor, a text cleaner, a text tokenizer, a text encoder, and a data cache and manager; wherein: the input processor is used to obtain raw data and convert the raw data into a format suitable for processing by a large language model; the text cleaner is used to perform data cleaning on the formatted data to remove noise and irrelevant data; the text tokenizer is used to segment the cleaned data into words or sub-word units for processing by a large language model; the text encoder is used to convert words or sub-word units into text data to be processed; the data cache and manager is used to cache raw data and text data to be processed, and manage the life cycle of cached data.
[0103] For example, a text cleaner may remove HTML tags, special characters, punctuation marks, etc. It may also handle abbreviations, spelling errors, and emoticons, such as removing stop words (such as "the", "is", etc.).
[0104] The text tokenizer performs tokenization using algorithms such as WordPiece, BPE (Byte Pair Encoding), or SentencePiece, and keeps the tokenization results for words that do not appear in the vocabulary.
[0105] The text encoder converts the tokenized text into the numerical representation (such as a vector) required by the model, for example, using word embeddings (such as GloVe, Word2Vec) or directly using the vocabulary of a large language model for encoding, and handles the sequence length by truncating or padding so that all inputs have the same length.
[0106] The data cache and manager caches commonly used input data (i.e., raw data) and its corresponding preprocessing results (i.e., text data to be processed), manages the life cycle of cached data, and regularly cleans up data that is no longer in use.
[0107] In the embodiment of the present application, a text cleaner is used to remove noise and irrelevant information from data to improve data quality; a text tokenizer is used to segment text data into word or sub-word units to facilitate processing by a large language model; and a data cache and manager is used to manage and cache processed data to improve the efficiency of reusing the same data.
[0108] Based on the above embodiments, Figure 2 Describe the model management system described in this application, Figure 2 The structure of the model management system provided for the exemplary embodiment of the present application is shown in FIG. Figure 2 .like Figure 2 As shown, the model management system 20 includes: a preprocessing module 21, a model adaptation module 22, a model management module 23, a model fusion module 24, a data synchronization module 25 and a post-processing module 26.
[0109] The implementation method of each module and the technical effects produced have been described in the above embodiments and will not be repeated here.
[0110] The above embodiments complete the description of the model management system. Next, the model management system will be explained from the application perspective.
[0111] Figure 3 A flowchart of a business processing method provided for an exemplary embodiment of the present application is shown in FIG. Figure 3 As shown, the business processing method includes:
[0112] S301. Obtain business data to be processed.
[0113] For example, the business data to be processed input by the user is obtained through the client interface.
[0114] S302. Apply the model management system to process the business data to be processed and obtain processing results corresponding to the business data to be processed.
[0115] For example, in response to obtaining user input of business data to be processed, the preprocessing module converts the business data to a format suitable for processing by a large language model; the formatted data is cleaned, tokenized and encoded to obtain the text data to be processed as described in the above embodiment.
[0116] The model management module is called through the model adaptation module to query the locally preset big language model information so as to match at least one target big language model applicable to the text data to be processed among the multiple types of big language models currently applied; and based on the text data to be processed, at least one target big language model is called through a unified API interface to obtain an output result obtained by applying the target big language model to process the text data to be processed.
[0117] The model fusion module fuses the output results of each target large language model based on multiple fusion strategies to obtain the processing results corresponding to the text data to be processed. Finally, the processing results are further optimized and cached based on the post-processing module to obtain the processing results corresponding to the business data to be processed.
[0118] During the data transmission process, the data synchronization module runs through the entire process to ensure the consistency and integrity of the data in the system. The model management module is used to update and replace the large language model, unload and load the large language model, monitor the running status of the large language model, manage the metadata of the large language model, and record the detailed information of the large language model. Among them, the update and replacement of the large language model can be performed before obtaining the business data to be processed, that is, as long as it is detected that the large language model is not the target version among the multiple large language models pre-stored locally, the update or replacement action is triggered; it can also be performed after obtaining the business data to be processed, that is, after determining the target large language model, the target large language model is subjected to version detection, update or replacement.
[0119] In the embodiment of the present application, a model management system is applied to process the business data to be processed, and the capabilities of open source and closed source large language models are fully utilized to improve the accuracy, consistency and availability of processing results, meet the needs of high-quality output, and provide a high user experience.
[0120] In summary, this application has at least the following advantages:
[0121] 1. The model management module implements an automated large language model update process. The system can automatically detect and obtain the latest large language model version, and update and replace the large language model without interrupting the service. The version controller maintains the model version library, records the version information of each large language model, and provides a version switching function, so that the system can flexibly roll back or upgrade the model version to ensure the use of the latest technology, thereby realizing dynamic update and replacement of large language models.
[0122] 2. The model adaptation module provides a unified API interface, so that different large language models can switch seamlessly and work together, reducing the complexity of replacing large language models and reducing the cost of replacing large language models; the loading and unloading manager realizes dynamic loading and unloading of large language models, optimizes the use of system resources, ensures that services are not interrupted when replacing large language models, and further reduces replacement costs and risks.
[0123] 3. The model fusion module combines and fuses the outputs of multiple large language models through various strategies such as voting mechanism, confidence weighting, sentence mixing and content fusion, making full use of the advantages of open source and closed source large language models to improve the processing power and accuracy of the system. By integrating the capabilities of open source and closed source large language models, the system can select the optimal model combination in different scenarios, improve overall performance, and meet the needs of high accuracy and high performance.
[0124] 4. The data synchronization module ensures the consistency and integrity of data during transmission through consistency checks and real-time verification to avoid data loss or tampering. Use a distributed database or cache system to achieve fast data synchronization and sharing, ensure real-time updates of data between multiple large language models, and improve system reliability.
[0125] 5. The post-processing module further processes the results generated by the large language model to ensure the accuracy, consistency and availability of the final output results. Through optimization and processing, the system can provide high-quality output results and enhance user experience and system value.
[0126] Next, the application of the model management system is described in detail through a specific embodiment. The model management system is applied in the user sentiment analysis scenario, that is, the user sentiment analysis system needs to analyze the text data input by the user and determine the user's sentiment (such as positive, negative, neutral). In order to improve the accuracy of sentiment analysis, it is necessary to utilize the latest large language models and closed-source large language models, while ensuring that the system can dynamically update and replace models to adapt to rapidly changing technological advances.
[0127] Figure 4 A schematic diagram of a dynamic enhancement process provided for an exemplary embodiment of the present application, such as Figure 4 As shown in the figure, the dynamic enhancement process includes: input data, preprocessing module, model adaptation layer (module), model management module, model fusion module, data synchronization module, post-processing module and output results. It can be understood that the dynamic enhancement of the output capability of the large language model is achieved through the processing of each module. Specifically:
[0128] 1. Input data.
[0129] For example, Figure 5As shown in the left part of the figure, the text data input by the user is "I am extremely happy with the service I received!", and the text data contains a blank line.
[0130] 2. Preprocessing module.
[0131] 2.1 Preliminary processing of text data.
[0132] The input processor receives text data and performs preliminary processing, including removing blank lines and normalizing line breaks. For example, the input "I am extremely happy with the service I received!" is processed into "I amextremely happy with the service I received!" without blank lines. Figure 5 right part of the .
[0133] 2.2. Text data cleaning.
[0134] The text cleaner removes HTML tags, special characters, and punctuation. For example, if we input "I am extremely happy with the service I received!", we output "I am extremely happy with the service I received" (without special characters). We further process abbreviations, spelling errors, and emoticons, and output "I am extremely happy with the service I received" (without spelling errors). Finally, we remove stop words, and output "I am extremely happy with the service I received" (without "the").
[0135] 2.3. Tokenization of text data.
[0136] The text tokenizer uses algorithms such as WordPiece, BPE, or SentencePiece to split the cleaned text into words or subword units to complete the tokenization. That is, the input: "I am extremely happy with service I received", the output: ["I", "am", "extremely", "happy", "with", "service", "I", "received"].
[0137] 2.4. Encoding of text data.
[0138] For example, the text encoder uses word embeddings (such as GloVe, Word2Vec) or directly uses the vocabulary of a large language model for encoding. Input: ["I", "am", "extremely", "happy", "with", "service", "I", "received"], output: [101, 104, 2025, 5463, 2007, 2326, 104, 2928]. Handle sequence length and make all inputs have the same length by truncating or padding. Input: [101, 104, 2025, 5463, 2007, 2326,104, 2928], output: [101, 104, 2025, 5463, 2007, 2326, 104, 2928] (assuming the length is suitable for the model input, no truncation or padding is required).
[0139] 2.5. Data caching and management.
[0140] The data cache and manager cache commonly used input data and their corresponding preprocessing results. Input: [101, 104, 2025, 5463, 2007, 2326, 104, 2928], cached data: [101, 104, 2025, 5463, 2007, 2326, 104, 2928].
[0141] Manage the life cycle of cached data, regularly check cached data and clean up data that is no longer used to ensure cache efficiency.
[0142] 3. Model adaptation module.
[0143] 3.1. The input analyzer analyzes the input content.
[0144] The input data after the preprocessing module is: [101, 104, 2025, 5463, 2007, 2326, 104,2928]. Natural language processing techniques (such as text classification and entity recognition) are used to analyze the input content. The analysis results are: type is sentiment analysis, and the complexity is medium.
[0145] 3.2. The model selector selects a suitable large language model.
[0146] Based on the analysis results, the model management module is queried to obtain information about available large language models. The query results show that the currently available large language models include BERT and XYZ sentiment analysis model. The most suitable model is selected using predefined selection strategies (such as model accuracy and fitness score), and BERT v2.0 and XYZ sentiment analysis model v1.3 are selected. It should be noted that XYZ sentiment analysis model is a hypothetical name that refers to a sentiment analysis model.
[0147] 3.3. The interface adapter calls the large language model.
[0148] Define standardized input and output formats, with the input being the encoded vector and the output being the sentiment analysis result. Input: [101, 104, 2025, 5463, 2007, 2326, 104, 2928], convert the input data into the format required by the model, call BERT v2.0 and XYZ sentiment analysis model v1.3 through a unified API interface, and process the input data. Convert the sentiment analysis results output by the model into the format required by the system, and output the results: BERT v2.0 output is positive (confidence: 0.95), and XYZ v1.3 model output is positive (confidence: 0.90).
[0149] 4. Model management module.
[0150] 4.1. Manage model version information.
[0151] The version controller maintains a version control database, recording the version information and release time of each large language model, including: BERT v2.0 (release time: 2023-06-01), XYZ v1.3 (release time: 2023-06-15).
[0152] 4.2. Update and replace models.
[0153] The update and replacement manager automatically checks for new versions: BERT v2.1, XYZ v1.4. The administrator decides to update to the new version and uses a progressive replacement strategy to gradually replace the old model to ensure a smooth transition of the system to the new model.
[0154] 4.3. Dynamically load and unload models.
[0155] The loading and unloading manager dynamically loads new version models: BERT v2.1, XYZ v1.4.
[0156] The load and unload manager dynamically unloads old version models: BERT v2.0, XYZ sentiment analysis model v1.3.
[0157] The LRU strategy is used to manage the memory usage of the model.
[0158] 4.4. Monitor the model running status.
[0159] Real-time monitoring model indicators: BERT v2.1 response time 10ms, accuracy 95%; XYZ sentiment analysis model v1.4 response time 12ms, accuracy 90%.
[0160] When it is detected that the response time of XYZ sentiment analysis model v1.4 is abnormal under certain inputs, XYZ sentiment analysis model v1.4 is automatically restarted, and if the problem is not solved, it switches to the backup model.
[0161] 4.5. Manage model metadata.
[0162] Maintain a metadata database that records detailed information for each model, including records: BERT v2.1 (description: suitable for sentiment analysis, accuracy 95%, response time 10ms), XYZ sentiment analysis model v1.4 (description: suitable for sentiment analysis, accuracy 90%, response time 12ms).
[0163] Provides query interface and update interface. Administrators can query detailed information and performance indicators of the model through the query interface; administrators can update the description and usage information of the model through the update interface.
[0164] 5. Model fusion module.
[0165] 5.1. Fusion of text output based on voting mechanism.
[0166] The input data after preprocessing and model adaptation is: [101, 104, 2025, 5463, 2007, 2326,104, 2928]. BERT v2.1 output: positive (confidence: 0.95), XYZ sentiment analysis model v1.4 output: positive (confidence: 0.90).
[0167] The text generated by each model is segmented into words or phrases. The BERT v2.1 output segmentation is: positive; the XYZv1.4 model output segmentation is: positive.
[0168] Voting for words or phrases in the same position, selecting the one with the highest frequency as the final result, voting result: positive (because both models output "positive").
[0169] 5.2. Confidence-based weighted fusion text output.
[0170] When the BERT v2.1 and XYZ v1.4 models generate text, they also output the confidence scores for each word or phrase. BERT confidence: 0.95; XYZ model confidence: 0.90.
[0171] The outputs of different models are weighted according to the confidence scores, and the weighted result is: Positive (weighted average confidence is 0.925).
[0172] 5.3. Select the best sentence based on sentence mixing strategy.
[0173] Calculate the language quality score (such as fluency, consistency) of each sentence. The score of the sentence output by BERT is 95; the score of the sentence output by the XYZ model is 90.
[0174] The sentences with the highest language quality scores are selected and combined into the final text, and finally the sentences output by BERT are selected: positive.
[0175] It should be noted that, when applying, step 5.1, step 5.2, or step 5.3 is executed, and the three strategies support configurable or selectable.
[0176] 5.4. Merge text content based on content fusion strategy.
[0177] According to one of the output results of steps 5.1, 5.2 and 5.3, use a semantic similarity algorithm (such as BERT, USE) to calculate the semantic similarity of the generated text. According to the semantic similarity, merge the text fragments with similar content. The merging result is: positive.
[0178] 5.5. Post-process the fused text.
[0179] Apply language models or grammatical rules to correct grammatical errors in the text (the result obtained in step 5.4), adjust the text structure, and ensure coherence and logic.
[0180] There is no need to modify the results in this embodiment because the output text is a single sentiment word, so the fusion result is: positive.
[0181] 6. Data synchronization module.
[0182] The data synchronization module is used to synchronize the data encoding output by the preprocessing module in the major language models in the system: [101, 104, 2025, 5463, 2007, 2326, 104, 2928], the model selected by the model adaptation layer: BERT v2.1 and XYZ sentiment analysis model v1.4, and the fusion result of the model fusion module: positive. The implementation of the data synchronization module specifically includes:
[0183] 6.1. Manage data version information.
[0184] The data version controller records data version information, which includes the input data version and the model processing result version. For example, the data version output by the preprocessing module in step 2 is recorded as V1.0, and the processing result version output by the model fusion module in step 5 is recorded as v1.0. A data version control mechanism is provided to ensure that BERT v2.1 and XYZ sentiment analysis model v1.4 use consistent versions when processing data.
[0185] 6.2. Check data consistency.
[0186] Check the consistency of data when exchanging data between BERT v2.1 and XYZ sentiment analysis model v1.4. For example, for the data encoding output by the preprocessing module: [101, 104, 2025, 5463, 2007, 2326, 104,2928], check the consistency of the data encoding during transmission based on the hash value, and detect and repair inconsistencies.
[0187] 6.3. Data synchronization processing.
[0188] Based on the Redis database, the data encoding: [101, 104, 2025, 5463, 2007, 2326, 104,2928] is synchronized and shared to BERT v2.1 and XYZ sentiment analysis model v1.4.
[0189] 6.4. Back up and restore data regularly.
[0190] The data encoding: [101, 104, 2025, 5463, 2007, 2326, 104, 2928] and the processing results are regularly backed up to a secure storage location. The processing results include the models selected by the model adaptation layer (BERT v2.1 and XYZ sentiment analysis model v1.4), the output results of BERT v2.1 and XYZ sentiment analysis model v1.4 (positive), and the fusion results obtained by the model fusion module (positive).
[0191] Provides data recovery function to ensure that the system can be quickly restored in the event of data loss or failure.
[0192] 6.5. Manage data access permissions.
[0193] Data access rights are managed based on the role-based permission model (RBAC). Only authorized users or modules can access and modify data, ensuring data security.
[0194] 7. Post-processing module.
[0195] 7.1. Optimize model output results.
[0196] The fusion result (positive) obtained by the model fusion module is optimized, such as removing redundant information and correcting errors. Since the fusion result is a single sentiment word, the optimization result is still positive.
[0197] 7.2. Formatting.
[0198] Format the optimized model output results into the output format required by the system, for example, into JSON format: {"Sentiment analysis result": "Positive"}, and ensure that the formatted results comply with the JSON format specification.
[0199] 7.3. Content verification.
[0200] Based on regular expressions or specific rules, the results of formatting processing: {"Sentiment analysis result": "positive"}, content legitimacy experience is conducted to ensure that the output results do not violate business rules or policies. The results of content verification: {"Sentiment analysis result": "positive"}.
[0201] 7.4. Result enhancement.
[0202] Based on the results obtained from content verification, contextual information or relevant background content is added to obtain {"sentiment analysis result": "positive", "contextual information": "user sentiment analysis based on xxxxxxxx"}.
[0203] 7.5. Result caching.
[0204] Store the enhanced results, i.e. cache the results: {"Sentiment analysis result": "Positive", "Context information": "User sentiment analysis based on xxxxxxxx"}, and regularly check and clean the cache to ensure that the cached data is valid.
[0205] In the embodiment of the present application, a model management system is applied to process user input data, making full use of the capabilities of open source and closed source large language models, improving the accuracy, consistency and usability of processing results, meeting the needs of high-quality output, and providing a high user experience.
[0206] Figure 6 The schematic diagram of the structure of the service processing device provided by the exemplary embodiment of the present application is as follows. Figure 6 As shown, the service processing device 60 includes: an acquisition module 61 and an application module 62, wherein:
[0207] An acquisition module 61 is used to acquire the business data to be processed;
[0208] The application module 62 is used to apply the model management system to process the business data to be processed and obtain the processing results corresponding to the business data to be processed. The model management system is the model management system described in the above embodiment.
[0209] The business processing device provided in the embodiment of the present application can execute the technical solution shown in the above-mentioned business processing method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0210] Figure 7 The schematic diagram of the structure of the electronic device provided by the exemplary embodiment of the present application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the electronic device 70 further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.
[0211] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above method.
[0212] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0213] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0214] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0215] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0216] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0217] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0218] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0219] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0220] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0221] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0222] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0223] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0224] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0225] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A model management system, characterized in that: It includes a model adaptation module and a model fusion module; among which: The model adaptation module is used to match at least one target large language model applicable to the text data to be processed among multiple types of large language models currently applied according to the text data to be processed; and based on the text data to be processed, call the at least one target large language model through a unified API interface to obtain an output result obtained by applying the target large language model to process the text data to be processed; The model fusion module is used to perform fusion processing on the output results to obtain processing results corresponding to the text data to be processed.
2. The model management system according to claim 1, characterized in that: The model fusion module includes at least one of a voting mechanism manager, a confidence weighting manager, and a sentence mixing manager, as well as a content fusion manager and a text post-processor, wherein: The voting mechanism manager is used to vote on the words or phrases in the output result to obtain a first result, wherein the first result includes the words or phrases that appear most frequently in the output result; The confidence weighting manager is used to set confidence scores for the words or phrases in the output result; weight the words or phrases according to the confidence scores to obtain a second result, wherein the second result includes the words or phrases with the highest confidence after weighting; The sentence mixing manager is used to score the language quality of the sentences in the output result to obtain a third result, wherein the third result includes the sentences with the highest language quality score; The content fusion manager is used to merge the first result, the second result, or the third result based on a semantic similarity algorithm to obtain a fourth result; The text post-processor is used to correct the fourth result to obtain the processing result.
3. The model management system according to claim 1, characterized in that: The model adaptation module includes an input analyzer, a model selector and an interface adapter, wherein: The input analyzer is used to determine the type and complexity of the text data to be processed based on natural language processing technology; The model selector is used to match at least one target large language model applicable to the text data to be processed from multiple types of large language models currently applied according to the type and complexity; The interface adapter is used to call the at least one target large language model based on a unified API interface to obtain an output result obtained by applying the target large language model to process the text data to be processed.
4. The model management system according to any one of claims 1 to 3, characterized in that: The system also includes a model management module, which is used to detect whether the large language model is a target version among multiple large language models pre-stored locally, and to upgrade the large language model that is not the target version.
5. The model management system according to claim 4, characterized in that: The model management module includes a version controller, an update and replacement manager, a load and unload manager, a health monitor and a metadata manager, wherein: The version controller is used to manage version information of the large language model; The update and replacement manager is used to detect whether the large language model is a target version among multiple large language models pre-stored locally, and when the large language model is not a target version among multiple large language models pre-stored locally, perform version update or replacement on the large language model that is not a target version; The loading and unloading manager is used to unload and load the large language model; The health monitor is used to monitor the running status of the large language model; The metadata manager is used to manage the metadata of the large language model and record detailed information of the large language model.
6. The model management system according to any one of claims 1 to 3, characterized in that: The model management system further includes at least one of a post-processing module, a data synchronization module and a pre-processing module, wherein: The post-processing module is used to optimize and cache the processing results; The data synchronization module is used to ensure the consistency and integrity of data in the system; The preprocessing module is used to obtain raw data; convert the raw data into a format suitable for processing by the large language model; and perform data cleaning, data tokenization and data encoding on the format-processed data to obtain text data to be processed.
7. The model management system according to claim 6, characterized in that: The post-processing module includes a result optimizer, a formatting processor, a content checker, a result enhancer and a result buffer, wherein: The result optimizer is used to correct and remove redundancy from the processing result to obtain a fifth result; The formatting processor is used to format the fifth result to obtain a sixth result; The content verifier is used to verify the accuracy and legality of the sixth result to obtain a seventh result; The result enhancer is used to enhance the seventh result to obtain an eighth result; The result buffer is used to cache the eighth result.
8. The model management system according to claim 6, characterized in that: The data synchronization module includes a data version controller, a consistency checker, a synchronization processor, a backup and recovery manager, and a permission manager, wherein: The data version controller is used to manage and control the data version; The consistency checker is used to check the consistency of data and repair inconsistent data; The synchronization processor is used to synchronize data among multiple large language models; The backup and recovery manager is used to back up and restore system data; The permission manager is used to manage access rights to data.
9. The model management system according to claim 6, characterized in that: The preprocessing module includes an input processor, a text cleaner, a text tokenizer, a text encoder, and a data cache and manager; wherein: The input processor is used to obtain raw data and convert the raw data into a format suitable for processing by the large language model; The text cleaner is used to clean the formatted data to remove noise and irrelevant data; The text tokenizer is used to segment the cleaned data into words or subword units to facilitate processing by the large language model; The text encoder is used to convert the word or subword unit into the text data to be processed; The data cache and manager are used to cache the original data and the text data to be processed, and manage the life cycle of the cached data.
10. A business processing method, characterized in that: include: Obtain business data to be processed; A model management system is applied to process the business data to be processed to obtain a processing result corresponding to the business data to be processed, and the model management system is the model management system described in any one of claims 1 to 9.
Citation Information
Patent Citations
Session data processing method and device, equipment and storage medium
CN116644145A
Generative and decision-making AI robot based on ETC vehicle owner service
CN117407500A
Multi-modal recognition method and device based on large language model, electronic equipment and storage medium
CN118410457A
Model loading method and device, electronic equipment and storage medium
CN118446779A
Question and answer method and device, related equipment and computer program product
CN118733730A
Cited By
Self-adaptive voucher intelligent generation method, system, product, medium and equipment
CN120163674A
Adaptive credential intelligent generation method, system, product, medium and device
CN120163674B
Intelligent marketing content generation management system
CN120975815A
Large language model dynamic adaptation method and system based on Java
CN121012756A
Version management method and apparatus for large language model, and device and medium
WO2026174685A1