Business request processing method and system based on large model middleware engine

Through the big model middleware engine, the business application layer and the big model layer are decoupled and the big model API is automatically matched, which solves the problems of big model resource management and switching in the existing technology, and achieves the effect of flexible response to business needs and reducing maintenance costs.

CN119227638AInactive Publication Date: 2024-12-31GOLDEN TIMES CULTURE COMM

Patent Information

Application Number
CN202411256179.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently manage and switch different large model resources, which makes it difficult for the system to flexibly respond to changes in business needs. The large model functions are insufficiently utilized, the system is too tightly coupled, and maintenance is difficult.

Method used

Using the business request processing method based on the big model middleware engine, the middleware service layer decouples the business application layer and the big model layer, automatically identify business function categories and match the most suitable big model API, to achieve intelligent and accurate business requests and ensure the scientificity and accuracy of the selection through preset indicator scores.

Benefits of technology

It realizes flexibility and efficiency in business request processing, reduces the impact of large-scale model replacement on the system, reduces maintenance costs and complexity, and improves the flexibility and maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227638A_ABST
    Figure CN119227638A_ABST
Patent Text Reader

Abstract

The invention relates to a business request processing method and system based on a large model middleware engine, and belongs to the technical field of artificial intelligence. The business request processing method comprises the following steps: receiving a to-be-processed business request sent by a business application layer; determining a corresponding service function category according to the to-be-processed service request; based on a preset association model data set, a corresponding target large model API is obtained through matching according to the service function categories; initializing a corresponding access implementation class according to the target large model API; generating an API request according to the to-be-processed service request and sending the API request to a target large model API in the large model layer; obtaining a model calculation result output by the large model layer; and performing standardized packaging processing on a model calculation result, and feeding back the result to the business application layer. According to the invention, diversity changes of service requirements can be flexibly handled, and the cost and complexity of system maintenance are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a business request processing method and system based on a large model middleware engine. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, especially the widespread application of deep learning and large-scale language models (LLMs), more and more companies are beginning to use these technologies to improve their business processing capabilities. By using large models, companies can perform more complex data analysis, natural language processing, and other high-level tasks. However, due to the complexity of large models themselves and the high flexibility of computing requirements, how to effectively apply large model capabilities to specific business scenarios has become an important challenge.

[0003] At present, there are many types of big models on the market, covering multiple application scenarios from natural language processing to image generation. Each big model has an independent application interface method to solve specific business needs. As business needs become more diverse and complex, companies usually bring together multiple big models to solve different business scenarios. However, since the API interfaces of each big model are different, most common business processing systems cannot efficiently manage and switch different model resources, making it difficult for the system to flexibly respond to the diverse changes in business needs. At the same time, it also limits the efficient use of big model functions, resulting in problems such as tight system coupling and difficult maintenance. Summary of the invention

[0004] In order to flexibly respond to the diverse changes in business needs, the present application provides a business request processing method and system based on a large model middleware engine.

[0005] In the first aspect, the present application provides a business request processing method based on a large model middleware engine, which adopts the following technical solution: A business request processing method based on a big model middleware engine is applied to a business request processing system including a business application layer and a big model layer, wherein the big model layer includes a plurality of different big model APIs, and a middleware service layer is further configured and connected between the business application layer and the big model layer; The service request processing method comprises: Receiving a pending service request sent by the service application layer; Determine a corresponding service function category according to the pending service request; Based on the preset association model data set, the corresponding target big model API is obtained according to the business function category matching; wherein the preset association model data set includes a plurality of groups of association relationships between business function categories and big model APIs, and each of the business function categories is associated with a unique corresponding target big model API; Initialize the corresponding access implementation class according to the target large model API; Generate an API request according to the pending business request and send it to the target big model API in the big model layer; Obtaining the model calculation results output by the large model layer; The model calculation results are standardized and packaged and fed back to the business application layer; wherein the business application layer is used to parse the model calculation results and send them to the terminal interface.

[0006] By adopting the above technical solution, the middleware service layer is introduced to achieve the decoupling between the business application layer and the big model layer. The business application layer interacts with the big model layer through the middleware service layer, so that the business function layer no longer directly depends on the specific implementation of the big model; after decoupling, the middleware service layer can automatically identify the business function category and match the most appropriate big model API, ensuring the intelligence and accuracy of the processing process. The business application layer can more conveniently switch or introduce different big models as needed, and can even use different big model capabilities in different business function parts to obtain the best performance or effect, and has a strong and flexible response capability to diverse business needs. In addition, due to the decoupling between business functions and big models, when the big model needs to be updated or replaced, the impact on the entire system can be reduced, thereby reducing the cost and complexity of maintenance.

[0007] Optionally, before the step of receiving the to-be-processed service request sent by the service application layer, the step further includes: Build a data model that includes business function categories and large model APIs; Initialize the basic data required for the data model; wherein the basic data includes business function category information, large model API information and associated information; Based on the association relationship, the business function category information and the large model API information are associated to obtain an associated model data set.

[0008] By adopting the above technical solutions, a clear correspondence is established between business functions and large model AI to ensure the efficiency and accuracy of business request processing.

[0009] Optionally, based on the association relationship, the step of associating the business function category information with the large model API information to obtain an associated model data set includes: Based on the business function category information, a test case set is constructed for each business function category; Preliminarily screening a big model candidate set corresponding to each business function category based on the association information and the big model API information; the big model candidate set includes a plurality of candidate big model APIs; Input the test case sets of the business function categories to be associated into the corresponding multiple candidate large model APIs respectively, and obtain the output result of each candidate large model API; Score the output results of each candidate large model API based on preset indicators; The candidate large model API with the highest score is associated with the business function category to be associated to obtain an associated model data set.

[0010] By adopting the above technical solutions, from preliminary association to actual evaluation to final selection, we ensure that the best large model API is selected for each business function category. Through the analysis and scoring of the input and actual output of the test case set, the solution maximizes the scientificity and accuracy of the selection, thereby ensuring the stability and efficiency of business functions.

[0011] Optionally, the preset indicators include accuracy, response time, robustness and resource consumption.

[0012] Optionally, the step of scoring the output results of each candidate large model API based on preset indicators includes: Based on the preset indicators, the corresponding indicator values ​​are determined according to the output results of the candidate large model API; Standardizing the preset index value; Perform weight allocation based on each preset indicator to obtain the preset weight corresponding to each preset indicator; The index value of each preset index and the preset weight are weighted averaged to obtain the score of each candidate large model API.

[0013] By adopting the above technical solution, the importance and specific performance of each indicator are comprehensively considered for quantitative scoring, which provides a quantitative basis for ranking the advantages and disadvantages of the models, ensures the comprehensiveness and objectivity of the selection process, and scientifically and rationally determines the best big model API for each business function and forms an associated model data set. This improves the accuracy and efficiency of the system's selection of big model APIs, and enhances the flexibility and maintainability of the system.

[0014] Optionally, the step of determining a corresponding service function category according to the to-be-processed service request includes: Preprocessing the pending business request; Segment the preprocessed business request to obtain a word sequence result; Extracting keyword information from the word sequence result; Performing semantic embedding on the keyword information to obtain a high-dimensional semantic vector; Performing semantic analysis based on the high-dimensional semantic vector and identifying semantic analysis results; Based on the predefined business function category information, the business function classification is performed according to the semantic analysis result, and the corresponding business function category is matched.

[0015] By adopting the above technical solutions, the system can accurately determine the corresponding business function category according to the pending business request, thus providing accurate direction for subsequent large model API matching and request processing. Through word segmentation parsing, keyword extraction, semantic analysis and business function classification at the middleware service layer, it ensures that business requests can be correctly classified and routed, thereby improving the overall performance of the system and user experience.

[0016] In the second aspect, the present application provides a business request processing system based on a large model middleware engine, which adopts the following technical solutions: A business request processing system based on a big model middleware engine, the business request processing system comprising a business application layer and a big model layer, the big model layer comprising a plurality of different big model APIs, and a middleware service layer is further configured and connected between the business application layer and the big model layer; The middleware service layer includes: A service request receiving module, used to receive a pending service request sent by the service application layer; A business function category determination module, used to determine the corresponding business function category according to the pending business request; A matching module, used to obtain a corresponding target big model API based on a preset association model data set and matching the business function category; wherein the preset association model data set includes a plurality of groups of association relationships between business function categories and big model APIs, and each of the business function categories is associated with a unique corresponding target big model API; An initialization module, used to initialize the corresponding access implementation class according to the target large model API; An API request generation module, used to generate an API request according to the pending business request; An API request sending module, used for sending to the target big model API in the big model layer; A model calculation result acquisition module, used to obtain the model calculation result output by the large model layer; A processing feedback module, used for standardizing and encapsulating the model calculation results and feeding them back to the business application layer; The business application layer is also used to parse the model calculation results and send them to the terminal interface.

[0017] Optionally, the middleware service layer further includes: Data model building module, used to build a data model containing business function categories and large model APIs; A data initialization module, used to initialize the basic data required by the data model; wherein the basic data includes business function category information, large model API information and related information; The association module is used to associate the business function category information with the large model API information based on the association relationship to obtain an associated model data set.

[0018] In a third aspect, the present application provides a computer device, which adopts the following technical solution: A computer device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the methods in the first aspect.

[0020] In summary, the present application includes at least one of the following beneficial technical effects: by decoupling specific business functions from the referenced big models, the business processing system has the ability to centrally introduce various big models, and can integrate and apply different big models in the same business function, while replacing the big model will not affect the normal use of the business function. Furthermore, the most suitable big model can be selected for a specific business function based on multiple dimensions such as needs, effects, cost-effectiveness, and service efficiency, and in the process of future development, other big models with the same functions can be easily replaced, or new big models can be incubated according to their own conditions. This not only avoids the business function from being bound by a specific big model, but also enables the business function to develop, optimize and adjust freely according to its own situation. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a first flow chart of a business request processing method based on a large model middleware engine according to one of the embodiments of the present application.

[0022] Figure 2This is a second flow chart of a business request processing method based on a large model middleware engine according to one of the embodiments of the present application.

[0023] Figure 3 This is a third flow chart of a business request processing method based on a large model middleware engine according to one of the embodiments of the present application.

[0024] Figure 4 This is the fourth flow chart of a business request processing method based on a large model middleware engine according to one of the embodiments of the present application.

[0025] Figure 5 This is the fifth flow chart of a business request processing method based on a large model middleware engine in one of the embodiments of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-5 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] At present, there are many application big models of different brands and application scenarios on the market. Each model has an independent application interface method and solves different business problems. However, since the research and development of different big models is based on different technologies and resource conditions, their application interface methods are different, making it difficult for upper-level applications to decouple from the adopted big models, resulting in the problem of applications being bound to specific big models. In order to solve these problems, the applicant has developed a set of middleware technology interaction control logic processes for decoupling applications to access big models, aiming to enable better interaction between business needs and big models while adapting to their respective situations.

[0028] Based on this, an embodiment of the present application discloses a business request processing method based on a large model middleware engine.

[0029] A business request processing method based on a big model middleware engine is applied to a business request processing system including a business application layer and a big model layer. The business application layer is connected to an interface terminal for user control. The big model layer includes multiple different big model APIs. A middleware service layer is also configured and connected between the business application layer and the big model layer.

[0030] In some embodiments, some currently common big models can be configured in the big model layer, such as the Tongyi Qianwen big model, the Baidu Qianfan big model, the Baichuan big model, the Google Gemini big model, the Google Gemma big model, the ChatGpt big model, the Lamma2 big model, and the like.

[0031] As an implementation method of the middleware service layer, the middleware service layer, also known as the middleware engine, is a software component specially designed to manage and coordinate the interaction between business requests and big models. Its main function is to provide an abstract layer between the business application layer and the big model, so that the business application layer can call the services of the big model more easily and efficiently without directly dealing with the complexity of the big model.

[0032] Reference Figure 1 This embodiment discloses a service request processing method based on the middleware service layer side. The service request processing method includes: Step S101, receiving a pending service request sent by a service application layer; Among them, as the first step of the entire business request processing flow, after the user clicks on the terminal interface, the business application layer generates a pending business request and sends the business request to the middleware service layer through an HTTP request or a message queue.

[0033] For example, assuming that a user submits a service request for converting a text into speech through a terminal interface, the request can be sent to the middleware service layer through the service application layer.

[0034] Step S102, determining a corresponding service function category according to the service request to be processed; Specifically, in order to accurately process business requests, the middleware service layer first needs to analyze and understand the specific content of the business request, and then map it to a predefined business function category. Different business requests will correspond to different business function categories, so as to facilitate the subsequent accurate matching of the corresponding large model API and improve processing efficiency and accuracy.

[0035] Exemplarily, for example, the corresponding service function type is identified as "text-to-speech" according to the service request to be processed.

[0036] Step S103, based on the preset associated model data set, obtain the corresponding target large model API according to the business function category matching; The preset association model data set includes association relationships between multiple groups of business function categories and large model APIs, and each business function category is associated with a unique corresponding target large model API; Specifically, this step aims to connect the business function category with the big model API that best matches the category. The preset associated model data set in the system stores the relationship between the business function category and the big model API, so the system can automatically match the corresponding big model API based on the set.

[0037] It can be understood that by automatically matching the most appropriate big model API, the system ensures that business requests can be calculated using the most targeted and effective big model, thereby improving the overall intelligence level of the system.

[0038] Step S104, initializing the corresponding access implementation class according to the target large model API; This step involves preparing calls to the matching target big model API. In software development, once the target big model API is determined, the system needs to create a specific class instance to handle communication with the big model. This class is called an "access implementation class" and contains specific logic to interact with the specified big model API.

[0039] Specifically, necessary initialization is performed on the class instance, such as setting the API key, URL, authentication information, etc., to ensure that the business request from the business application layer can be received and the request can be sent to the target large model API.

[0040] Step S105, generating an API request according to the business request to be processed and sending it to the target big model API in the big model layer; Among them, the middleware service layer constructs an API request format that meets the requirements of the target big model API based on the business request and its accompanying data, and sends it to the corresponding API of the big model layer for processing, which includes data conversion, parameter setting and the actual initiation of the request.

[0041] Step S106, obtaining the model calculation result output by the large model layer; Among them, after receiving the API request, the target large model API in the large model layer performs the corresponding calculation task and returns the model calculation result to the middleware service layer; Exemplarily, after receiving the request, the target big model API in the big model layer converts the text in the business request into a voice file and sends the result back to the middleware service layer.

[0042] Step S107, standardize and encapsulate the model calculation results and feed them back to the business application layer; wherein the business application layer is used to parse the model calculation results and send them to the terminal interface.

[0043] Specifically, in order for the business application layer to correctly parse and display the results of the model calculation, the returned results need to be standardized and encapsulated, which includes data format conversion, unified encoding processing, etc.; after the business application layer receives the results from the middleware service layer, it can parse them into a form that the user can understand and display them to the user through the terminal interface.

[0044] In the above implementation, the introduction of the middleware service layer realizes the decoupling between the business application layer and the big model layer. The business application layer interacts with the big model layer through the middleware service layer, so that the business function layer no longer directly depends on the specific implementation of the big model; after decoupling, the middleware service layer can automatically identify the business function category and match the most appropriate big model API, ensuring the intelligence and accuracy of the processing process. The business application layer can more conveniently switch or introduce different big models as needed, and can even use different big model capabilities in different business function parts to obtain the best performance or effect, and has a strong and flexible response capability to diversified business needs. In addition, due to the decoupling between business functions and big models, when the big model needs to be updated or replaced, the impact on the entire system can be reduced, thereby reducing the cost and complexity of maintenance.

[0045] Reference Figure 2 As a further implementation of the service request processing method, before the step of receiving the service request to be processed sent by the service application layer, it also includes: Step S201, constructing a data model including business function categories and large model APIs; Specifically, this step is completed in the design phase. The purpose is to create a data model that associates different business function categories with the corresponding big model APIs. The design of the data model is based on business requirements and can help the system quickly find the processing logic corresponding to each business function when receiving a specific business request, and then determine the corresponding big model API; Step S202, initializing the basic data required by the data model; Among them, basic data includes business function category information, large model API information and related information; Among them, business function category information usually refers to different types of business operations or function sets in the business processing system, such as "text to speech", "text to image", etc., while the big model API information is the big model API interface information used to process these business requests.

[0046] Specifically, initializing the basic data required for the data model means that when the system starts or before deployment, the data model needs to be loaded and filled with necessary information, including but not limited to business function category information, large model API information, and the relationship between the two. This information constitutes the necessary reference data in the business request processing process.

[0047] Step S203: Based on the association relationship, the business function category information and the large model API information are associated to obtain an associated model data set.

[0048] Specifically, the corresponding large model API is found according to the business function category information, and the two are saved as a one-to-one (or many-to-one) relationship for use in subsequent business request calls.

[0049] It is understandable that the generated association model data set will be used as a lookup table or mapping library in actual business processing. When the system receives a specific business request, it can quickly find the corresponding large model API by searching this set.

[0050] In the above implementation, a clear correspondence is established between the business functions and the large model AI to ensure the efficiency and accuracy of business request processing.

[0051] Reference Figure 3 As an implementation method of step S203, based on the association relationship, the business function category information and the large model API information are associated to obtain the associated model data set, including: Step S301, constructing a test case set for each business function category based on the business function category information; Specifically, in order to evaluate the performance of each big model API, it is necessary to create a corresponding test case set for each business function category. These test case sets can be used to test the actual output results of the big model API and verify its fit with the expected functions.

[0052] For example, for the NLP business function category, a set of text inputs can be constructed, such as a series of natural language questions or commands, and the corresponding expected output may be an accurate answer to the question or a reasonable command execution result; while the test cases of the image processing category may include a certain number of image samples, and the expected output may be the correct image classification label.

[0053] It can be understood that the standardized test case set ensures that different candidate large model APIs are compared under the same objective criteria, which improves the fairness and accuracy of the evaluation.

[0054] Step S302, preliminarily screening a big model candidate set corresponding to each business function category based on the association information and the big model API information; wherein the big model candidate set includes a plurality of candidate big model APIs; Specifically, based on the previous association information and the information of the big model API, a preliminary screening of the big model candidate set is performed for each business function category. The purpose of this step is to narrow the selection range and reduce the subsequent computing burden.

[0055] For example, by checking the functional description and technical details of the big model API in advance, you can preliminarily exclude those APIs that are not suitable or not very suitable for a certain business function category; for example, for NLP business, you can first screen out those big models specifically for natural language processing tasks, such as GPT, BERT, etc.; you can also pre-specify corresponding candidate big model APIs for business function categories according to user needs.

[0056] Step S303, input the test case sets of the business function categories to be associated into the corresponding multiple candidate large model APIs respectively, and obtain the output result of each candidate large model API; Specifically, the test case set of each business function category is passed through the initially screened candidate large model APIs in turn to obtain the output results of these APIs under specific situations or tasks. This step aims to obtain the actual model performance.

[0057] For example, for the text generation API, input a common natural language query such as "What's the weather like today?", and then record the output of the large model API as a basis for subsequent evaluation. Similarly, for the image classification API, input a specific picture and record its output classification label.

[0058] It is understandable that by applying actual test cases, we can obtain performance data of each candidate API in real business scenarios, which further ensures the scientific nature of the selection.

[0059] Step S304, scoring the output results of each candidate large model API based on preset indicators; In some embodiments, the output results of each candidate big model API are scored in detail based on preset technical indicators (such as accuracy, response time, robustness, resource consumption, etc.). The scoring criteria need to meet business goals and user needs. The higher the score, the more the API meets business needs. Through a quantitative scoring mechanism, it is ensured that the selected big model API performs best in multiple dimensions to maximize business results.

[0060] Step S305 , associating the candidate large model API with the highest score with the business function category to be associated, to obtain an associated model data set.

[0061] For example, if the system requires high accuracy, the prediction accuracy of the API can be used as the main scoring indicator; at the same time, the response time can also be considered as a secondary evaluation indicator; finally, the API with the highest comprehensive score can be used as the association model for the business function category.

[0062] In the above implementation, from preliminary association to actual evaluation to final selection, the optimal large model API is selected for each business function category. Through the analysis and scoring of the input and actual output of the test case set, the solution maximizes the scientificity and accuracy of the selection, thereby ensuring the stability and efficiency of the business function.

[0063] Reference Figure 4 As an implementation of step S304, the step of scoring the output results of each candidate large model API based on the preset index includes: Step S401, based on the preset indicator, determine the corresponding indicator value according to the output result of the candidate large model API; Specifically, according to the preset evaluation index, the output result of each candidate large model API is measured to obtain the corresponding index value.

[0064] In some embodiments, preset indicators include but are not limited to accuracy, response time, robustness and resource consumption, among which accuracy is a measure of the degree of match between the model output result and the expected answer or standard answer; response time refers to the time consumed by the system from receiving a request to generating a result; robustness is to evaluate the stability of the model in handling different situations (such as input syntax errors, data ambiguity, etc.); resource consumption is to record the computing resources required by the model when performing tasks (such as memory, CPU / GPU usage).

[0065] Step S402, standardizing the preset index value; Since the dimensions of different indicators may be different, all indicator values ​​need to be converted to the same scale range for weighted averaging. For example, the accuracy, response time, robustness, and resource consumption indicators can be standardized to values ​​between 0 and 1 to ensure the comparability of different indicators and avoid scoring bias caused by different dimensions.

[0066] Step S403, performing weight allocation based on each preset indicator to obtain a preset weight corresponding to each preset indicator; Specifically, different weights can be assigned to each preset indicator in advance according to business needs and importance. The higher the weight value, the greater the proportion of the indicator in the final score. For example, assuming that accuracy is the most important, it is given the highest weight (such as 0.4), followed by response time (0.3), then robustness (0.2), and finally resource consumption (0.1).

[0067] It is understandable that the sum of the weights of the various preset indicators can be set to 1. Through reasonable weight distribution, the most important indicators can be highlighted while not ignoring other minor but still important factors, making the final comprehensive score more reasonable.

[0068] Step S404, the index value of each preset index and the preset weight are comprehensively averaged to obtain the score of each candidate large model API.

[0069] Specifically, when the sum of the weights of the preset indicators is 1, the indicator value of each preset indicator is multiplied by its corresponding preset weight, and then the sum is calculated to obtain the final weighted average score.

[0070] In the above implementation, the importance and specific performance of each indicator are comprehensively considered for quantitative scoring, which provides a quantitative basis for ranking the advantages and disadvantages of the models, ensures the comprehensiveness and objectivity of the selection process, and scientifically and rationally determines the best big model API for each business function and forms an associated model data set. The accuracy and efficiency of the system's selection of big model APIs are improved, and the flexibility and maintainability of the system are enhanced.

[0071] Reference Figure 5 As an implementation of step S102, the step of determining the corresponding service function category according to the service request to be processed includes: Step S501, pre-processing the service request to be processed; The pending business request may be a command, question or statement in the form of natural language text.

[0072] In some embodiments, the preprocessing step includes removing stop words, punctuation marks, handling upper and lower case, and unifying formatting, etc. This step can ensure that subsequent analysis is performed on the basis of clean and standardized text.

[0073] Step S502, segmenting the pre-processed business request to obtain a word sequence result; Exemplarily, the business request "Please convert this text into a picture" is segmented into a word list. This step can use a rule-based or statistical method.

[0074] Step S503, extracting keyword information from the word sequence result; Specifically, from the parsed business request content, key words or phrases describing business functions are extracted. For example, keyword information such as "text", "convert", and "picture" are extracted based on algorithms such as TF-IDF (term frequency-inverse document frequency) and named entity recognition (NER).

[0075] Step S504, semantically embedding the keyword information to obtain a high-dimensional semantic vector; Specifically, word embedding (such as Word2Vec, GloVe) or context embedding (such as BERT) can be used to semantically embed the extracted keywords to generate high-dimensional semantic vectors. These semantic vectors retain the semantic information of the keywords and can be used for subsequent semantic matching.

[0076] Step S505, performing semantic analysis based on the high-dimensional semantic vector and identifying the semantic analysis result; Among them, NLP technology can be used to perform semantic analysis on keyword information to ensure that the system can understand the true intention of the business request, rather than just the superficial keyword matching. For example, by associating "text" and "image" through context, it can be recognized that the user wants to perform the "text to image" operation.

[0077] Step S506 , based on the predefined business function category information, the business function classification is performed according to the semantic analysis result, and the corresponding business function category is matched.

[0078] The predefined business function category information includes business operations or function sets of different categories in the business processing system. By matching the obtained semantic results with business function categories, the most suitable business function category can be determined.

[0079] Exemplarily, if the semantic analysis result is highly correlated with the “text-to-image” category, the service request is mapped to the “text-to-image” service function category.

[0080] In the above implementation, the system can accurately determine the corresponding business function category according to the pending business request, thereby providing accurate direction for subsequent large model API matching and request processing. Through the word segmentation parsing, keyword extraction, semantic analysis and business function classification of the middleware service layer, it is ensured that the business request can be correctly classified and routed, thereby improving the overall performance of the system and user experience.

[0081] In actual application, a business request processing method of an embodiment of the present application can be used in application fields that require AIGC generation capabilities, such as application scenarios such as text-to-text (such as dialogue communication), text-to-picture, text-to-video, picture-to-video, and text-to-audio. It can also support a variety of specific applications such as chat robots, science fiction humanistic environment image generation, promotional video generation, and micro-short drama generation.

[0082] The embodiment of the present application discloses a business request processing system based on a large model middleware engine.

[0083] A business request processing system based on a big model middleware engine includes a business application layer and a big model layer. The big model layer includes a plurality of different big model APIs. A middleware service layer is also configured to connect the business application layer and the big model layer.

[0084] As an implementation method of the middleware service layer, the middleware service layer includes: A service request receiving module, used to receive a pending service request sent by the service application layer; A business function category determination module is used to determine the corresponding business function category according to the business request to be processed; A matching module is used to obtain a corresponding target big model API based on a preset association model data set and matching according to the business function category; wherein the preset association model data set includes a plurality of groups of association relationships between business function categories and big model APIs, and each business function category is associated with a unique corresponding target big model API; Initialization module, used to initialize the corresponding access implementation class according to the target large model API; An API request generation module is used to generate an API request based on a pending business request; An API request sending module, used for sending to a target big model API in the big model layer; A model calculation result acquisition module is used to obtain the model calculation results output by the large model layer; The processing feedback module is used to standardize and encapsulate the model calculation results and feed them back to the business application layer; The business application layer is also used to parse the model calculation results and send them to the terminal interface.

[0085] The business processing system of the embodiment of the present application supports the concentration of various large model capabilities to serve specific business application scenarios, and can completely isolate the large model application interface from the specific business application scenarios to ensure that the internal update and iteration of the large model will not affect the stability of the business application; at the same time, it can also meet the corresponding large model with better application effect in different parts of the same business function, thereby comprehensively improving the efficiency and quality of business processing.

[0086] As a further implementation of the middleware service layer, the middleware service layer further includes: Data model building module, used to build a data model containing business function categories and large model APIs; The data initialization module is used to initialize the basic data required by the data model; the basic data includes business function category information, large model API information and related information; The association module is used to associate the business function category information with the large model API information based on the association relationship to obtain an association model data set.

[0087] In the above implementation, the system can establish a clear correspondence between business functions and large model AI to form an efficient business request processing mechanism to ensure the efficiency and accuracy of business request processing.

[0088] The middleware service layer in the business request processing system of the embodiment of the present application can implement any of the above-mentioned business request processing methods, and the specific working process of each module in the middleware service layer can refer to the corresponding process in the above-mentioned method embodiment.

[0089] In the several embodiments provided in this application, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are only illustrative; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0090] The embodiment of the present application also discloses a computer device.

[0091] The computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the service request processing method as described above is implemented.

[0092] The embodiment of the present application also discloses a computer-readable storage medium.

[0093] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the above-mentioned service request processing methods.

[0094] Among them, computer-readable storage media can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus or device; the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0095] It should be noted that in the above embodiments, the description of each embodiment has different emphases, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0096] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

Claims

1. A business request processing method based on a large model middleware engine, characterized in that: Applicable to a business request processing system including a business application layer and a big model layer, wherein the big model layer includes a plurality of different big model APIs, and a middleware service layer is further configured and connected between the business application layer and the big model layer; The service request processing method comprises: Receiving a pending service request sent by the service application layer; Determine a corresponding service function category according to the pending service request; Based on the preset association model data set, the corresponding target big model API is obtained according to the business function category matching; wherein the preset association model data set includes a plurality of groups of association relationships between business function categories and big model APIs, and each of the business function categories is associated with a unique corresponding target big model API; Initialize the corresponding access implementation class according to the target large model API; Generate an API request according to the pending business request and send it to the target big model API in the big model layer; Obtaining the model calculation results output by the large model layer; The model calculation results are standardized and packaged and fed back to the business application layer; wherein the business application layer is used to parse the model calculation results and send them to the terminal interface.

2. A business request processing method based on a large model middleware engine according to claim 1, characterized in that: Before the step of receiving the pending service request sent by the service application layer, the method further includes: Build a data model that includes business function categories and large model APIs; Initialize the basic data required for the data model; wherein the basic data includes business function category information, large model API information and associated information; Based on the association relationship, the business function category information and the large model API information are associated to obtain an associated model data set.

3. A method for processing business requests based on a large model middleware engine according to claim 2, characterized in that: Based on the association relationship, the business function category information and the large model API information are associated to obtain an associated model data set, including: Based on the business function category information, a test case set is constructed for each business function category; Preliminarily screening a big model candidate set corresponding to each business function category based on the association information and the big model API information; the big model candidate set includes a plurality of candidate big model APIs; Input the test case sets of the business function categories to be associated into the corresponding multiple candidate large model APIs respectively, and obtain the output result of each candidate large model API; Score the output results of each candidate large model API based on preset indicators; The candidate large model API with the highest score is associated with the business function category to be associated to obtain an associated model data set.

4. The method for processing business requests based on a large model middleware engine according to claim 3, characterized in that: The preset indicators include accuracy, response time, robustness and resource consumption.

5. A method for processing business requests based on a large model middleware engine according to claim 4, characterized in that: The step of scoring the output results of each candidate large model API based on the preset indicators includes: Based on the preset indicators, the corresponding indicator values ​​are determined according to the output results of the candidate large model API; Standardizing the preset index value; Perform weight allocation based on each preset indicator to obtain the preset weight corresponding to each preset indicator; The index value of each preset index and the preset weight are weighted averaged to obtain the score of each candidate large model API.

6. A method for processing business requests based on a large model middleware engine according to any one of claims 1 to 5, characterized in that: The step of determining the corresponding service function category according to the service request to be processed comprises: Preprocessing the pending business request; Segment the preprocessed business request to obtain a word sequence result; Extracting keyword information from the word sequence result; Performing semantic embedding on the keyword information to obtain a high-dimensional semantic vector; Performing semantic analysis based on the high-dimensional semantic vector and identifying semantic analysis results; Based on the predefined business function category information, the business function classification is performed according to the semantic analysis result, and the corresponding business function category is matched.

7. A business request processing system based on a large model middleware engine, characterized in that: The business request processing system includes a business application layer and a big model layer, the big model layer includes a plurality of different big model APIs, and a middleware service layer is also configured and connected between the business application layer and the big model layer; The middleware service layer includes: A service request receiving module, used to receive a pending service request sent by the service application layer; A business function category determination module, used to determine the corresponding business function category according to the pending business request; A matching module, used to obtain a corresponding target big model API based on a preset association model data set and matching the business function category; wherein the preset association model data set includes a plurality of groups of association relationships between business function categories and big model APIs, and each of the business function categories is associated with a unique corresponding target big model API; An initialization module, used to initialize the corresponding access implementation class according to the target large model API; An API request generation module, used to generate an API request according to the pending business request; An API request sending module, used for sending to the target big model API in the big model layer; A model calculation result acquisition module, used to obtain the model calculation result output by the large model layer; A processing feedback module, used for standardizing and encapsulating the model calculation results and feeding them back to the business application layer; The business application layer is also used to parse the model calculation results and send them to the terminal interface.

8. A business request processing system based on a large model middleware engine according to claim 7, characterized in that: The middleware service layer also includes: Data model building module, used to build a data model containing business function categories and large model APIs; A data initialization module, used to initialize the basic data required by the data model; wherein the basic data includes business function category information, large model API information and related information; The association module is used to associate the business function category information with the large model API information based on the association relationship to obtain an associated model data set.

9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Customer service scheduling method and system, terminal equipment and storage medium

    CN113176938A

  • Model evaluation method and device, electronic equipment and storage medium

    CN117272011A

  • Task scheduling method and device, computer equipment, storage medium and program product

    CN117742970A

  • Unifying domain model for internet business systems

    US20120271779A1

  • Service processing method and apparatus, electronic device, and medium

    WO2023071616A1

Cited By

  • Method, device, equipment and product for identifying large model application business risk

    CN120915840A

  • Business processing method, system and terminal based on large model middleware engine

    CN120956790A