Service question and answer response method, device and equipment based on multiple models and storage medium

By determining and using multiple service scheduling models to process service Q&A statements in public large model containers, the problem of different response accuracy of different large models is solved, and efficient and accurate Q&A response is achieved.

CN119808965AActive Publication Date: 2025-04-11HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510294315.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-04-11
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

Different large models have different processing capabilities, which leads to differences in the accuracy of knowledge responses to different services, and there may be situations where "answers are not asked". How to improve the accuracy of Q&A response while ensuring the efficiency of Q&A responses has become an urgent problem.

Method used

By determining the first service scheduling model and the second service scheduling model in the public large model container, and inputting the service question and answer statements into the two models respectively, the first response result and the second response result are generated, and the target response result is then determined based on the response time and feedback to the user.

Benefits of technology

The goal of combining the response efficiency and accuracy of Q&A is achieved, avoiding generative deviations and answer misalignment in single model prediction, and improving the adaptability to user problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808965A_ABST
    Figure CN119808965A_ABST
Patent Text Reader

Abstract

The invention discloses a service question and answer response method and device based on multiple models, equipment and a storage medium. The method comprises the steps that a service question and answer statement input by a target user is acquired, and if model operation metadata does not exist in a current public large model container, a first service scheduling model and a second service scheduling model are determined according to model static metadata, and a current service session is established; respectively inputting the service question and answer statement into a first service scheduling model and a second service scheduling model to obtain a first response result output by the first service scheduling model and a second response result output by the second service scheduling model; and determining a target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, and feeding back the target response result to the target user. According to the technical scheme provided by the embodiment of the invention, the question and answer response accuracy of different business service requirements is improved while the question and answer response efficiency is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a service question and answer response method, device, equipment and storage medium based on multiple models. Background Art

[0002] As AIGC (Artificial Intelligence Generated Content) becomes more and more popular in all walks of life, large model platforms emerge one after another. However, due to the different processing capabilities of different large models, the accuracy of knowledge responses to different services varies, and there may be situations where "the answer is not what is asked". Therefore, how to improve the accuracy of question and answer responses for different business service needs while ensuring the efficiency of question and answer responses has become a problem that needs to be solved urgently. Summary of the invention

[0003] The present invention provides a service question and answer response method, device, equipment and storage medium based on multiple models to ensure the efficiency of question and answer response while improving the accuracy of question and answer response for different business service requirements.

[0004] According to one aspect of the present invention, a multi-model based service question and answer response method is provided, the method comprising:

[0005] Obtaining a service question and answer statement input by a target user, and if the model running metadata does not exist in the current public large model container, determining a first service scheduling model and a second service scheduling model according to the model static metadata and establishing a current service session; the public large model container stores a plurality of service scheduling models;

[0006] Inputting the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, obtaining a first response result output by the first service scheduling model and a second response result output by the second service scheduling model;

[0007] A target response result of the current service session is determined according to a first response time of the first response result and a second response time of the second response result, and the target response result is fed back to the target user.

[0008] According to another aspect of the present invention, a multi-model based service question and answer response device is provided, the device comprising:

[0009] The scheduling model determination module is used to obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, the first service scheduling model and the second service scheduling model are determined according to the model static metadata and the current service session is established; the public large model container stores several service scheduling models;

[0010] a response result generating module, used for inputting the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, and obtaining a first response result output by the first service scheduling model and a second response result output by the second service scheduling model;

[0011] A response result feedback module is used to determine a target response result of the current service session according to a first response time of the first response result and a second response time of the second response result, and feed back the target response result to the target user.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-model based service question and answer response method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-model-based service question and answer response method described in any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention determines the first service scheduling model and the second service scheduling model and establishes the current service session according to the model static metadata when receiving the service question and answer statement input by the user and determining that there is no model running metadata in the public large model container, and determines the target response result of the current service session according to the first response time when the first service scheduling model generates the first response result and the second response time when the second service scheduling model generates the second response result. This achieves the goal of balancing the response efficiency to the service question and answer statement and improving the response accuracy to the service question and answer statement, thereby achieving better adaptation to user questions and avoiding the generative bias and answer imbalance during single model prediction.

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

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flowchart of a multi-model based service question and answer response method provided according to Embodiment 1 of the present invention;

[0021] Figure 2 is a flowchart of a multi-model based service question and answer response method provided according to Embodiment 2 of the present invention;

[0022] Figure 3 2 is a schematic diagram of the structure of a multi-model based service question and answer response device provided according to Embodiment 3 of the present invention;

[0023] Figure 4 It is a structural diagram of an electronic device for implementing the multi-model based service question and answer response method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

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

[0026] Embodiment 1

[0027] Figure 1 This is a flowchart of a multi-model based service question and answer response method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where accurate responses are given to user questions and answers with different service requirements. This method can be performed by a multi-model based service question and answer response device. The multi-model based service question and answer response device can be implemented in the form of hardware and / or software. The multi-model based service question and answer response device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0028] S110. Obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, determine the first service scheduling model and the second service scheduling model according to the model static metadata and establish the current service session; the public large model container stores several service scheduling models.

[0029] S120. Input the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, and obtain a first response result output by the first service scheduling model and a second response result output by the second service scheduling model.

[0030] S130: Determine a target response result of the current service session according to a first response time of the first response result and a second response time of the second response result, and feed back the target response result to a target user.

[0031] The target user can be a user with question-answering needs in the same or different service areas. The public big model container is pre-built by relevant technical personnel and is used to store public big models of several different model development platforms, that is, service scheduling models.

[0032] Exemplarily, a public large model container can be built through the Spring AI (Spring artificial intelligence) framework, and the model scheduling code of the service scheduling model under different large model development platforms can be sliced ​​and developed, and runtime containers of different service scheduling models can be built. Specifically, Docker (containerization technology) can be used to encapsulate different service scheduling models into independent containers, each of which can contain model reasoning code, dependency environment, and calling interface, etc. In order to achieve model scheduling flexibility, the scheduling logic of the service scheduling model is split into multiple slices or modules, each of which can be responsible for different functions. The core of the runtime container of each service scheduling model is to integrate the above slices and provide a unified scheduling service. When the service scheduling model is scheduled, the corresponding runtime container is started.

[0033] Among them, the model operation metadata may include the model call time, model service field, and model response accuracy, etc.; the model static metadata may include the number of tokens and the model service price. Different service scheduling models correspond to their own model static metadata and model operation metadata, and are uniformly stored in the public large model container. It should be noted that if a service scheduling model stored in the public large model container has not been called in the current and historical time periods, there is no model operation metadata; the model operation metadata is dynamically updated with the response results of the service scheduling model.

[0034] When the target user conducts a big model service Q&A, a big model scheduling mechanism is built to determine whether there is model operation data in the public big model container in the current time period; if so, the service scheduling model is selected based on the model operation metadata; if not, the service scheduling model is selected based on the model static metadata.

[0035] For the scenario where there is no model running data in the public large model container in the current time period, the first service scheduling model and the second service scheduling model are determined according to the model static metadata. Specifically, according to the model service price in the model static metadata, several service scheduling models are sorted from low to high according to price, and two service scheduling models with lower prices are selected as the first service scheduling model and the second service scheduling model, and a dual-model mechanism scheduling is constructed. At the same time, the current service session is established, and the runtime containers corresponding to the first service scheduling model and the second service scheduling model are mounted. At the same time, the first service scheduling model and the second service scheduling model are triggered to run.

[0036] The service question and answer statements are input into the first service scheduling model and the second service scheduling model respectively, and the first response result output by the first service scheduling model and the second response result output by the second service scheduling model are obtained. At the same time, the runtime containers of the two service scheduling models are monitored in real time, and the running time of the runtime containers is recorded as the response time of the models. According to the first response time of the first response result and the second response time of the second response result, the target response result of the current service session is determined.

[0037] Optionally, a target response result of the current service session is determined based on the first response time of the first response result and the second response time of the second response result, including: if the first response time of the first response result is greater than the second response time of the second response result, using the second response result as the target response result of the current service session; or, if the first response time of the first response result is not greater than the second response time of the second response result, using the first response result as the target response result of the current service session.

[0038] Specifically, by comparing the first response time of the first response result and the second response time of the second response result, the response result with the shortest response time in the two service scheduling models is used as the target response result of the current service session, and the target response result is fed back to the target user.

[0039] Furthermore, if the target response result is the first response result, the second response result is stored as a temporary result, and when the target user initiates the same service question and answer statement in the current service session, the second response result is directly fed back to the target user.

[0040] The technical solution of the embodiment of the present invention determines the first service scheduling model and the second service scheduling model and establishes the current service session according to the model static metadata when receiving the service question and answer statement input by the user and determining that there is no model running metadata in the public large model container, and determines the target response result of the current service session according to the first response time when the first service scheduling model generates the first response result and the second response time when the second service scheduling model generates the second response result. This achieves the goal of balancing the response efficiency to the service question and answer statement and improving the response accuracy to the service question and answer statement, thereby achieving better adaptation to user questions and avoiding the generative bias and answer imbalance during single model prediction.

[0041] It should be noted that there may be different question-and-answer scenarios for the current service session, such as initiating the same service question-and-answer statement within a certain time period, or initiating other question-and-answer statements similar to the service question-and-answer statement within a certain time period, or initiating other question-and-answer statements different from the service question-and-answer statement within a certain time period, etc. For different question-and-answer scenarios, this application adopts different question-and-answer statement processing methods to ensure the response efficiency and response accuracy to the service question-and-answer statement.

[0042] In an optional embodiment, after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, it also includes: determining a cached response result based on the target response result, and storing the cached response result; and generating at least one associated question and answer statement corresponding to the service question and answer statement; and generating a question and answer waiting time based on the target response result.

[0043] If the target response result is the first response result, the second response result is determined as the cached response result; if the target response result is the second response result, the first response result is determined as the cached response result. In the current service session, the cached response result is temporarily stored in the public large model container.

[0044] After obtaining the target response result, a question chain of the service question and answer statement is constructed, wherein the question chain includes at least one associated question and answer statement corresponding to the service question and answer statement. For example, the associated question and answer statement can be generated based on context perception or knowledge graph association.

[0045] Among them, the question-and-answer waiting time is the time to wait for the target user to input a new question-and-answer statement after the target response result is fed back to the target user. For example, the question-and-answer waiting time can be pre-set by relevant technical personnel based on actual needs or actual experience and experiments. Alternatively, in order to further improve the rationality of the question-and-answer waiting time, it can also be generated based on the target response result. Specifically, based on the content size of the target response result, the question-and-answer waiting time is calculated with 25 characters per second. For example, if the target response result includes 100 characters, the question-and-answer waiting time is 4 seconds.

[0046] Since different service scheduling models have different model expertise and model processing capability characteristics, the response results of different service scheduling models for the same service question and answer statement are also different. When a user initiates the same service question and answer statement, it may indicate that the satisfaction or acceptance of the previous response result is low. Therefore, in an optional embodiment, after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, it also includes: if an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the service question and answer statement, then the cached response result is fed back to the target user in the current service session.

[0047] In the current service session, if an intermediate question-and-answer statement identical to the service question-and-answer statement is received within the question-and-answer waiting time, the cached response result is fed back to the target user.

[0048] The above technical solution uses a question-and-answer response method based on a dual-model mechanism. When receiving the same service question-and-answer statement, it directly feeds back the cached response result to the target user, thereby improving the response accuracy of the service question-and-answer service, avoiding the response deviation of a single model, and achieving rapid response and improving response efficiency.

[0049] In an optional embodiment, after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, it also includes: if an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the associated question and answer statement, then determining the previous historical question and answer statement of the intermediate question and answer statement; using a service scheduling model that responds to historical question and answer statements to respond to the intermediate question and answer statement, obtain an intermediate response result, and feed back the intermediate response result to the target user in the current service session.

[0050] Exemplarily, if the previous historical question and answer statement of the intermediate question and answer statement is statement a, and the service scheduling model that responds to statement a is model A, if an intermediate question and answer statement that is identical to any of several related question and answer statements is received within the question and answer waiting time, model A is used to generate an intermediate response result of the intermediate question and answer statement, and the intermediate response result is fed back to the target user in the current service session.

[0051] It can be understood that if in the current service session, the target user asks a related question and answer statement in the question chain, it can be said that the hit rate of the service question and answer model responding to the previous historical question and answer statement is relatively high, and the target user is highly satisfied with or accepts the model response result. Therefore, the previous service question and answer model can still be used to continue to respond to the result of the intermediate question and answer statement, ensuring the accuracy and efficiency of the response result to the question and answer statement.

[0052] In an optional embodiment, after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, it also includes: if the intermediate question and answer statement identical to the service question and answer statement is obtained within a preset number of cycles, determining a third service scheduling model and a fourth service scheduling model based on the model static metadata; inputting the intermediate question and answer statement into the third service scheduling model and the fourth service scheduling model respectively to obtain a third response result output by the third service scheduling model and a fourth response result output by the fourth service scheduling model; determining the intermediate response result based on the third response time of the third response result and the fourth response time of the fourth response result, and feeding back the intermediate response result to the target user in the current service session.

[0053] If the same intermediate question and answer statement as the service question and answer statement is obtained within the preset number of cycles, it means that the service scheduling model used within a certain number of times has a low hit rate for the response result of the service question and answer statement, and the target user's satisfaction and acceptance of the response result are low. Therefore, the dual service scheduling model is reselected based on the model static metadata. The number of cycles can be pre-set by relevant technical personnel based on actual needs or experience. For example, the number of cycles can be set to 3 or 4 times.

[0054] Specifically, according to the model static metadata stored in the public large model container, the third service scheduling model and the fourth service scheduling model are selected from the remaining service scheduling models. The remaining service scheduling models are service scheduling models other than the first service scheduling model and the second service scheduling model among the several service scheduling models stored in the public large model container.

[0055] According to the model service price in the model static metadata, two service scheduling models with lower prices are selected as the third service scheduling model and the fourth service scheduling model. The third response time of the third service scheduling model in response to the intermediate question and answer statement and the fourth response time of the fourth service scheduling model in response to the intermediate question and answer statement are recorded in real time. The shortest of the third response time and the fourth response time is fed back to the target user as the intermediate response result.

[0056] It is understandable that when the target user asks the same service question and answer statement repeatedly, it means that the target user is less satisfied with or less accepting of the current dual-service scheduling model, and the dual-model hit rate is low. Therefore, the response result of the intermediate question and answer statement generated by the dual-service scheduling model for repeated questions is re-determined to ensure the accuracy of the response to the target user's question and answer statement.

[0057] In an optional embodiment, after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, it also includes: if an intermediate question and answer statement identical to the service question and answer statement is not received within the question and answer waiting time, or if the received intermediate question and answer statement is different from the associated question and answer statement, then ending the current service session and updating the model operation metadata.

[0058] It should be noted that if no intermediate question and answer statement identical to the service question and answer statement is received within the question and answer waiting time; or if the intermediate question and answer statement received is completely different from the associated question and answer statement, it means that the target user has started a new round of service session, that is, has raised a new question, then the current service session will be terminated, and based on at least one round of question and answer statements of the previous service session and the response results of each question and answer statement, the model running metadata and model static metadata of the service scheduling model involved will be updated.

[0059] This embodiment also provides a method for updating model operation metadata. In an optional embodiment, updating the model operation metadata includes: determining the model input question and answer statements, model response results, model response time, associated question hit results, and main question hit results of the same service scheduling model in the current service session; determining the model service domain of the service scheduling model based on the model input question and answer statements and model response results of the service scheduling model; determining the accuracy of the model service domain of the service scheduling model based on the associated question hit results and the main question hit results; updating the model operation metadata of the service scheduling model based on the model service domain of the service scheduling model and its accuracy, as well as the model response time.

[0060] It should be noted that, for any service session, the listener records the relevant information of the question and answer response of the service scheduling model involved in the service session, such as the response time of the model to the question and answer statements, and based on the question and answer statements, the question and answer responses and the question and answer statements raised again by the user in response to the question and answer responses, the associated question hit rate and the main question hit rate can be calculated.

[0061] Specifically, determine the model input statement of the same service scheduling model in the current service session, and the model response result in response to the model input statement. Among them, the associated question hit result is the hit rate of the associated question and answer statements on the question chain; the main question hit result is the hit rate of the service question and answer statement initiated by the target user. The average of the associated question hit rate and the main question hit rate can be used as the accuracy of the model service field of the service scheduling model. Among them, the model service field represents the technical field in which the service scheduling model is good at. When the accuracy of the service scheduling model for the current model service field is high, it means that the service scheduling model is better at predicting problems in the model service field, and the problem prediction accuracy of the model service field is high. When the accuracy of the service scheduling model for the current model service field is low, it means that the service scheduling model is not good at predicting problems in the model service field, and the problem prediction accuracy of the model service field is low.

[0062] The model service domain and its accuracy, as well as the model response time of the service scheduling model of the current service session are used to update the model operation metadata of the service scheduling model. Specifically, if the model operation data of the service scheduling model is not stored in the current public large model container, the model service domain and its accuracy, as well as the model response time of the service scheduling model of the current service session are stored in the public large model container as the model operation metadata of the service scheduling model. If the model operation data of the service scheduling model is stored in the current public large model container, the model service domain and its accuracy, as well as the model response time of the service scheduling model of the current service session are used to update the model operation metadata of the service scheduling model stored in the public large model container.

[0063] By updating the model operation metadata of the model service scheduling model after each service session ends, dynamic update of the model operation metadata is achieved, so that when performing dual model selection, the service scheduling model for response can be selected more accurately, thereby improving the response accuracy to service question and answer statements.

[0064] This embodiment also provides a method for updating the static metadata of the model. In an optional embodiment, updating the static metadata of the model includes: determining the Tocken consumption of this service session according to the model response result of the service scheduling model; obtaining the Tocken remaining amount of the service scheduling model, and determining the current Tocken number of the service scheduling model according to the Tocken consumption and the Tocken remaining amount; and updating the model static metadata of the service scheduling model according to the current Tocken number.

[0065] The Tocken remaining amount of the service scheduling model is the number of Tockens remaining in the previous service session cycle.

[0066] Specifically, the difference between the Tocken remaining amount and the Tocken consumption amount is determined as the current Tocken amount of the service scheduling model, and the model static metadata of the service scheduling model is updated using the current Tocken amount.

[0067] By updating the model static metadata of the model service scheduling model after each service session ends, dynamic update of the model static metadata is achieved, which facilitates more accurate selection of the service scheduling model for response when performing dual model selection, thereby improving the accuracy of response to service question and answer statements.

[0068] Embodiment 2

[0069] Figure 2 This is a flowchart of a multi-model based service question and answer response method provided in Embodiment 2 of the present invention. This embodiment is optimized and improved on the basis of the above technical solutions.

[0070] Furthermore, after the step of "obtaining the service question and answer statement input by the target user", add the step of "if there is model operation metadata in the current public large model container, determine the field to which the service question and answer statement belongs; according to the model service field and accuracy of each service scheduling model in the model operation metadata, based on the field to which the service question and answer statement belongs, determine the first hit scheduling model and the second hit scheduling model; use the first hit scheduling model and the second hit scheduling model to generate the target response result of the service question and answer statement." to improve the method of selecting the service scheduling model.

[0071] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. Figure 2 As shown, the method comprises the following specific steps:

[0072] S210. Obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, execute S220-S240; if the model running metadata exists in the current public large model container, execute S250-S270.

[0073] S220. Determine a first service scheduling model and a second service scheduling model according to the model static metadata and establish a current service session; a plurality of service scheduling models are stored in the public large model container.

[0074] S230. Input the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, and obtain a first response result output by the first service scheduling model and a second response result output by the second service scheduling model.

[0075] S240: Determine a target response result of the current service session according to a first response time of the first response result and a second response time of the second response result, and feed back the target response result to a target user.

[0076] S250: Determine the domain to which the service question and answer statement belongs.

[0077] Specifically, a pre-trained domain prediction model may be used to perform domain prediction on the service question and answer sentences, or text analysis may be performed on the service question and answer sentences to determine the domain to which they belong, which is not limited in this embodiment.

[0078] S260. According to the model service domain and accuracy of each service scheduling model in the model operation metadata, and based on the domain to which the service question and answer statement belongs, determine the first hit scheduling model and the second hit scheduling model.

[0079] Specifically, at least one service scheduling model whose model service field is the same as or similar to the field to which the service question and answer statement belongs is selected from each service scheduling model, and based on the accuracy of the model service fields of each selected service scheduling model, two service scheduling models with higher accuracy are determined as the first hit scheduling model and the second hit scheduling model.

[0080] S270. Use the first hit scheduling model and the second hit scheduling model to generate a target response result of the service question and answer statement.

[0081] Specifically, the service question and answer statement is input into the first hit scheduling model and the second hit scheduling model respectively, and the first response result output by the first hit scheduling model and the second response result output by the second service scheduling model are obtained. The one with the shortest response time in the two service scheduling models is fed back to the target user as the target response result. Exemplarily, if the first response time of the first response result is greater than the second response time of the second response result, the second response result is used as the target response result of the current service session; or, if the first response time of the first response result is not greater than the second response time of the second response result, the first response result is used as the target response result of the current service session.

[0082] It should be noted that among the two service scheduling models selected based on the model operation metadata, there may be models with fewer Tocken remaining or higher model service prices, and such models are no longer suitable for model service scheduling of this session service. Therefore, for such situations, the first hit scheduling model and the second hit scheduling model obtained by screening can be screened to ensure that the model used for question and answer statement response is the optimal model.

[0083] In an optional embodiment, after determining the first hit scheduling model and the second hit scheduling model based on the service domain and accuracy of each service scheduling model in the model operation metadata and the domain to which the service question and answer statement belongs, the method further includes:

[0084] Step a: According to the model operation metadata and model static metadata corresponding to the first hit scheduling model and the second hit scheduling model respectively, determine whether the first hit scheduling model and / or the second hit scheduling model meets the preset model replacement condition.

[0085] Step b: If yes, determine the candidate scheduling model based on the running metadata and model static metadata of other service scheduling models, and use the candidate scheduling model to replace the first hit scheduling model and / or the second hit scheduling model that meets the model replacement condition.

[0086] Among them, other service scheduling models are service scheduling models other than the first hit scheduling model and the second hit scheduling model among several service scheduling models in the current public large model container.

[0087] Among them, the model replacement conditions can be pre-set by relevant technical personnel according to actual needs. For example, the model replacement conditions may be that the model Tocken remaining amount is lower than a preset remaining amount threshold, the model response time is higher than a preset response time and / or the model service price is higher than a preset price threshold, etc.

[0088] If the first hit scheduling model and / or the second hit scheduling model meets the preset model replacement condition, the candidate scheduling model is determined according to the operation metadata and model static metadata of other service scheduling models. Specifically, a service scheduling model with sufficient Tocken surplus, low model service price, and short model response time determined according to the model static metadata can be selected from the model operation metadata of other service scheduling models as the candidate scheduling model. The first hit scheduling model and / or the second hit scheduling model that meets the model replacement condition is replaced with the candidate scheduling model.

[0089] The technical solution of this embodiment determines the field to which the service question and answer statement belongs when determining that the model running metadata exists in the current public large model container, and determines the first hit scheduling model and the second hit scheduling model based on the field to which the service question and answer statement belongs according to the model service field and accuracy of each service scheduling model in the model running metadata; the first hit scheduling model and the second hit scheduling model are used to generate the target response result of the service question and answer statement, and realizes the selection of dual models based on the model running metadata in the scenario where the model running metadata exists, so as to predict the question and answer statement, while taking into account the efficiency of responding to the service question and answer statement, and improving the accuracy of responding to the service question and answer statement, so as to achieve better adaptation to user questions and avoid the generative bias and answer imbalance during single model prediction.

[0090] Embodiment 3

[0091] Figure 3 A schematic diagram of the structure of a service question and answer response device based on multiple models provided in the third embodiment of the present invention. A service question and answer response device based on multiple models provided in the embodiment of the present invention can be used to accurately respond to user questions and answers with different service requirements. The service question and answer response device based on multiple models can be implemented in the form of hardware and / or software, such as Figure 3 As shown, the device specifically includes: a scheduling model determination module 301, a response result generation module 302 and a response result feedback module 303. Among them,

[0092] The scheduling model determination module 301 is used to obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, the first service scheduling model and the second service scheduling model are determined according to the model static metadata and the current service session is established; the public large model container stores several service scheduling models;

[0093] A response result generating module 302, used for inputting the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, and obtaining a first response result output by the first service scheduling model and a second response result output by the second service scheduling model;

[0094] The response result feedback module 303 is used to determine the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, and feed back the target response result to the target user.

[0095] The technical solution of the embodiment of the present invention determines the first service scheduling model and the second service scheduling model and establishes the current service session according to the model static metadata when receiving the service question and answer statement input by the user and determining that there is no model running metadata in the public large model container, and determines the target response result of the current service session according to the first response time when the first service scheduling model generates the first response result and the second response time when the second service scheduling model generates the second response result. This achieves the goal of balancing the response efficiency to the service question and answer statement and improving the response accuracy to the service question and answer statement, thereby achieving better adaptation to user questions and avoiding the generative bias and answer imbalance during single model prediction.

[0096] Optionally, the response result feedback module 303 is specifically used to:

[0097] If the first response time of the first response result is greater than the second response time of the second response result, the second response result is used as the target response result of the current service session; or,

[0098] If the first response time of the first response result is not greater than the second response time of the second response result, the first response result is used as the target response result of the current service session.

[0099] Optionally, the device further comprises:

[0100] A result storage module is used to determine a cache response result according to the target response result after determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, and store the cache response result; and

[0101] a related statement generating module, configured to generate at least one related question and answer statement corresponding to the service question and answer statement; and

[0102] The waiting time generation module is used to generate the question-answering waiting time according to the target response result.

[0103] Optionally, the device further comprises:

[0104] A cached result response module is used to feed back the cached response result to the target user in the current service session after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, if an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the service question and answer statement.

[0105] Optionally, the device further comprises:

[0106] a historical statement determination module, configured to determine, after determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, a previous historical question and answer statement of the intermediate question and answer statement if an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the associated question and answer statement;

[0107] The first intermediate result response module is used to respond to the intermediate question and answer statement using the service scheduling model that responds to the historical question and answer statement, obtain an intermediate response result, and feed back the intermediate response result to the target user in the current service session.

[0108] Optionally, the device further comprises:

[0109] a model screening module for determining, after determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, a third service scheduling model and a fourth service scheduling model according to model static metadata if intermediate question and answer statements identical to the service question and answer statements are obtained within a preset number of cycles;

[0110] An intermediate statement processing module, used for inputting the intermediate question and answer statement into the third service scheduling model and the fourth service scheduling model respectively, and obtaining a third response result output by the third service scheduling model and a fourth response result output by the fourth service scheduling model;

[0111] The second intermediate result response module is used to determine an intermediate response result according to a third response time of the third response result and a fourth response time of the fourth response result, and feed back the intermediate response result to the target user in the current service session.

[0112] Optionally, the device further comprises:

[0113] A running metadata update module is used to end the current service session and update the model running metadata after determining the target response result of the current service session based on the first response time of the first response result and the second response time of the second response result, if no intermediate question and answer statement identical to the service question and answer statement is received within the question and answer waiting time, or if the received intermediate question and answer statement is different from the associated question and answer statement.

[0114] Optionally, the running metadata update module is specifically used to:

[0115] Determine the model input question and answer statement, model response result, model response time, associated question hit result and main question hit result of the same service scheduling model in the current service session;

[0116] Determine the model service domain of the service scheduling model according to the model input question and answer statement and the model response result of the service scheduling model;

[0117] Determine the accuracy of the model service field of the service scheduling model according to the associated problem hit results and the main problem hit results;

[0118] The model operation metadata of the service scheduling model is updated according to the model service domain and accuracy of the service scheduling model, as well as the model response time.

[0119] Optionally, the device further comprises:

[0120] A Tocken consumption rate determination module, used to determine the Tocken consumption of this service session according to the model response result of the service scheduling model;

[0121] A current Tocken amount determination module is used to obtain the Tocken remaining amount of the service scheduling model, and determine the current Tocken amount of the service scheduling model according to the Tocken consumption and the Tocken remaining amount;

[0122] The static metadata updating module is used to update the model static metadata of the service scheduling model according to the current Tocken number.

[0123] Optionally, the device further comprises:

[0124] A model domain determination module is used to determine the domain to which the service question and answer statement belongs after obtaining the service question and answer statement input by the target user, if the model running metadata exists in the current public large model container;

[0125] A hit scheduling model determination module, used to determine a first hit scheduling model and a second hit scheduling model based on the model service domain and accuracy of each of the service scheduling models in the model operation metadata and the domain to which the service question and answer statement belongs;

[0126] A response module is used to generate a target response result of the service question and answer statement by adopting the first hit scheduling model and the second hit scheduling model.

[0127] Optionally, the device further comprises:

[0128] A replacement condition judgment module is used to determine whether the first hit scheduling model and / or the second hit scheduling model meet a preset model replacement condition according to the model service domain and accuracy of each of the service scheduling models in the model operation metadata and based on the domain to which the service question and answer statement belongs, after determining the first hit scheduling model and the second hit scheduling model, according to the model operation metadata and model static metadata respectively corresponding to the first hit scheduling model and the second hit scheduling model;

[0129] A candidate model determination module is used to determine a candidate scheduling model based on the running metadata and model static metadata of other service scheduling models if the first hit scheduling model and / or the second hit scheduling model meet the preset model replacement conditions, and use the candidate scheduling model to replace the first hit scheduling model and / or the second hit scheduling model that meet the model replacement conditions; the other service scheduling models are service scheduling models other than the first hit scheduling model and the second hit scheduling model among several service scheduling models in the current public large model container.

[0130] The multi-model based service question and answer response device provided in the embodiment of the present invention can execute the multi-model based service question and answer response method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0131] Embodiment 4

[0132] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0133] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0134] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0135] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a service question-answering response method based on multiple models.

[0136] In some embodiments, the service question and answer response method based on multiple models may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the service question and answer response method based on multiple models described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the service question and answer response method based on multiple models in any other appropriate manner (e.g., by means of firmware).

[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0138] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0139] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0141] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0142] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0143] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0144] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-model based service question-answering response method, characterized in that: include: Obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, determine the first service scheduling model and the second service scheduling model according to the model static metadata and establish the current service session; The public large model container stores several service scheduling models; Inputting the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, obtaining a first response result output by the first service scheduling model and a second response result output by the second service scheduling model; A target response result of the current service session is determined according to a first response time of the first response result and a second response time of the second response result, and the target response result is fed back to the target user.

2. The method according to claim 1, characterized in that The determining, according to the first response time of the first response result and the second response time of the second response result, a target response result of the current service session includes: If the first response time of the first response result is greater than the second response time of the second response result, taking the second response result as the target response result of the current service session; or, If the first response time of the first response result is not greater than the second response time of the second response result, the first response result is used as the target response result of the current service session.

3. The method according to claim 1, characterized in that After determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, the method further includes: Determine a cache response result according to the target response result, and store the cache response result; and generating at least one associated question and answer statement corresponding to the service question and answer statement; and, A question-and-answer waiting time is generated according to the target response result.

4. The method according to claim 3, characterized in that: After determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, the method further includes: If an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the service question and answer statement, the cached response result is fed back to the target user in the current service session.

5. The method according to claim 3, characterized in that: After determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, the method further includes: If an intermediate question and answer statement input by the target user is received within the question and answer waiting time, and the intermediate question and answer statement is the same as the associated question and answer statement, determining a previous historical question and answer statement of the intermediate question and answer statement; The service scheduling model that responds to the historical question and answer statement is used to respond to the intermediate question and answer statement to obtain an intermediate response result, and the intermediate response result is fed back to the target user in the current service session.

6. The method according to claim 3, characterized in that: After determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, the method further includes: If the same intermediate question and answer statements as the service question and answer statements are obtained within the preset number of cycles, a third service scheduling model and a fourth service scheduling model are determined according to the model static metadata; Inputting the intermediate question-answer statement into the third service scheduling model and the fourth service scheduling model respectively, obtaining a third response result output by the third service scheduling model and a fourth response result output by the fourth service scheduling model; An intermediate response result is determined according to the third response time of the third response result and the fourth response time of the fourth response result, and the intermediate response result is fed back to the target user in the current service session.

7. The method according to claim 3, characterized in that After determining the target response result of the current service session according to the first response time of the first response result and the second response time of the second response result, the method further includes: If the intermediate question and answer statement identical to the service question and answer statement is not received within the question and answer waiting time, or if the received intermediate question and answer statement is different from the associated question and answer statement, the current service session is terminated and the model operation metadata is updated.

8. The method according to claim 7, characterized in that The updated model operation metadata includes: Determine the model input question and answer statement, model response result, model response time, associated question hit result and main question hit result of the same service scheduling model in the current service session; Determine the model service domain of the service scheduling model according to the model input question and answer statement and the model response result of the service scheduling model; Determine the accuracy of the model service field of the service scheduling model according to the associated problem hit results and the main problem hit results; The model operation metadata of the service scheduling model is updated according to the model service domain and accuracy of the service scheduling model, as well as the model response time.

9. The method according to claim 7, characterized in that: The method further comprises: Determine the Tocken consumption of this service session according to the model response result of the service scheduling model; Obtain the Tocken remaining amount of the service scheduling model, and determine the current Tocken quantity of the service scheduling model according to the Tocken consumption and the Tocken remaining amount; According to the current Tocken number, the model static metadata of the service scheduling model is updated.

10. The method according to claim 1, characterized in that After obtaining the service question and answer statement input by the target user, the method further includes: If the model running metadata exists in the current public large model container, then determining the domain to which the service question and answer statement belongs; Determine a first hit scheduling model and a second hit scheduling model according to the model service domain and accuracy of each of the service scheduling models in the model operation metadata and based on the domain to which the service question and answer statement belongs; The first hit scheduling model and the second hit scheduling model are used to generate a target response result of the service question and answer statement.

11. The method according to claim 10, characterized in that After determining the first hit scheduling model and the second hit scheduling model based on the model service domain and accuracy of each service scheduling model in the model operation metadata and the domain to which the service question and answer statement belongs, the method further includes: Determining whether the first hit scheduling model and / or the second hit scheduling model meets a preset model replacement condition according to the model running metadata and the model static metadata respectively corresponding to the first hit scheduling model and the second hit scheduling model; If so, a candidate scheduling model is determined based on the running metadata and model static metadata of other service scheduling models, and the candidate scheduling model is used to replace the first hit scheduling model and / or the second hit scheduling model that meets the model replacement conditions; the other service scheduling model is a service scheduling model other than the first hit scheduling model and the second hit scheduling model among several service scheduling models in the current public large model container.

12. A service question and answer response device based on multiple models, characterized in that: include: The scheduling model determination module is used to obtain the service question and answer statement input by the target user. If the model running metadata does not exist in the current public large model container, the first service scheduling model and the second service scheduling model are determined according to the model static metadata and the current service session is established; The public large model container stores several service scheduling models; a response result generating module, used for inputting the service question and answer statement into the first service scheduling model and the second service scheduling model respectively, and obtaining a first response result output by the first service scheduling model and a second response result output by the second service scheduling model; A response result feedback module is used to determine a target response result of the current service session according to a first response time of the first response result and a second response time of the second response result, and feed back the target response result to the target user.

13. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-model-based service question and answer response method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-model-based service question-and-answer response method according to any one of claims 1 to 11 when executed.

Citation Information

Patent Citations

  • Question and answer processing method and electronic equipment

    CN115827820A

  • Model training method and question and answer processing method and device based on large language model

    CN118245581A

  • Optimization method of large language model question-answering system

    CN118797016A

  • Information processing method and device, electronic equipment and storage medium

    CN119271781A

  • Question answer obtaining method and device based on distillation model, equipment and medium

    CN119357358A