[go: up one dir, main page]

CN108959488B - Method and device for maintaining question-answering model - Google Patents

Method and device for maintaining question-answering model Download PDF

Info

Publication number
CN108959488B
CN108959488B CN201810652363.1A CN201810652363A CN108959488B CN 108959488 B CN108959488 B CN 108959488B CN 201810652363 A CN201810652363 A CN 201810652363A CN 108959488 B CN108959488 B CN 108959488B
Authority
CN
China
Prior art keywords
model
question
answer
answering
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810652363.1A
Other languages
Chinese (zh)
Other versions
CN108959488A (en
Inventor
阮淑梨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201810652363.1A priority Critical patent/CN108959488B/en
Publication of CN108959488A publication Critical patent/CN108959488A/en
Application granted granted Critical
Publication of CN108959488B publication Critical patent/CN108959488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a method and a device for maintaining a question-answering model, which are used for a question-answering robot system. In the embodiment, possible question-answering models used by the question-answering robot system are deployed on a deployment platform, and configuration information of each question-answering model is recorded through a model library configuration file. And the model center acquires the configuration information of each question-answer model by reading the configuration file of the model library, analyzes each question-answer model according to the configuration information, generates a corresponding model operation example and records the model operation example in the model set. And under the condition that the question-answer model changes, the model center detects the change of the configuration file of the model library and re-analyzes the question-answer model corresponding to the modified configuration information, so that the question-answer model in the model set is kept updated.

Description

Method and device for maintaining question-answering model
Technical Field
One or more embodiments of the present description relate to the field of computer artificial intelligence technology, and in particular, to the establishment and maintenance of a question-and-answer model in a question-and-answer robot system.
Background
With the development of computer artificial intelligence technology, various intelligent 'robots' are proposed to realize the work completed by conventional human beings. For example, in some application scenarios, a question-answering robot is designed. The question-answering robot is a man-machine interaction system, and can identify natural language question sentences input by a user, and finally return a most appropriate answer to the user through algorithm logic processing such as information retrieval, natural language processing, deep calculation and the like. Such a question-answering robot can be applied to scenes such as a chat robot, a training robot, a customer service waiter robot, and the like. Generally, in a question-answering robot system, an analysis process of a question or question is implemented by a question-answering model, and how to answer is determined. With the development of artificial intelligence and the deepening of model training, a plurality of question-answering models based on different ideas and different algorithms have been proposed.
Based on this, it is desirable to have an improved solution that allows more efficient use and maintenance of the question-answering model for the question-answering robot.
Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus that can dynamically maintain a question-answering model for a question-answering robot system, and implement "hot swapping" of the question-answering model, so that the online and offline and modification of the question-answering model can be flexibly implemented in a configured manner.
According to a first aspect, there is provided a method of maintaining a question-answering model for a question-answering robotic system, the question-answering robotic system comprising a question distribution module and a model center, the method being performed by the model center, the method comprising:
obtaining a model base configuration file, wherein the model base configuration file comprises configuration information of a deployed question-answer model on a deployment platform;
analyzing at least one question-answer model in the deployed question-answer models according to the configuration information so as to generate at least one model operation instance corresponding to the at least one question-answer model;
updating the model set with the at least one model runtime instance.
According to one embodiment, the configuration information includes a model id, a deployment environment of the model, and a resolution protocol of the model.
In an implementation scene, in the starting stage of a question-answering robot system, an initial model library configuration file is obtained; accordingly, the parsing step includes: analyzing each deployed question-answer model according to configuration information in the initial model library configuration file, and generating a model operation instance of each deployed question-answer model; and the updating step comprises the step of sequentially adding the model operation instance of each deployed question-answering model into the model set.
In another implementation scenario, obtaining the model library configuration file includes: at a first moment, acquiring a first model library configuration file; acquiring a second model library configuration file at a second moment which is a preset time interval after the first moment; and determining modified configuration information of the second model base configuration file changed compared with the first model base configuration file by comparing the second model base configuration file with the first model base configuration file.
Further, in an embodiment, the modified configuration information is configuration information of the second model base configuration file that is added in comparison with the first model base configuration file, and corresponds to the added first question-answering model. In such a case, the parsing step is implemented to parse the first question-answer model according to the modification configuration information, thereby generating a first model operation instance corresponding to the first question-answer model; the updating step is implemented by adding the first model runtime instance to the model set.
In another embodiment, the modified configuration information is configuration information of a second question-answer model in the second model library configuration file, and the second question-answer model is a question-answer model already included in the first model library configuration file. In such a case, the parsing step is implemented to parse the second question-and-answer model according to the modification configuration information, so as to generate a second model operation instance corresponding to the second question-and-answer model; and the updating step is realized by deleting the original model operation example corresponding to the second question-answering model in the model set and adding the second model operation example into the model set.
In another embodiment, the modified configuration information is configuration information of the second model base configuration file that is reduced relative to the first model base configuration file, and the reduced configuration information is configuration information of the first model base configuration file for the third question-answering model; in such a case, the method further comprises: and deleting the model operation instance corresponding to the third question-answering model from the model set.
According to one possible design, the method further comprises:
receiving a distribution request from the question distribution module, the distribution request including a first question and a first model set determined for the first question, the first model set including at least a first target question-answer model;
searching the first target question-answering model in the model set;
and under the condition that the first target question-answering model is found, calling a model operation example corresponding to the first target question-answering model to process the first question.
Further, in one embodiment, the question-answering robot system further comprises a question fusion module, and the method further comprises: obtaining a processing result of a model operation instance corresponding to the first target question-answering model aiming at the first question; and sending the processing result to the problem fusion module.
According to a second aspect, there is provided an apparatus for maintaining a question-answering model for a question-answering robotic system, the question-answering robotic system including a question distribution module and a model center, the apparatus being included in the model center, the apparatus comprising:
the system comprises an acquisition unit, a configuration unit and a configuration unit, wherein the acquisition unit is configured to acquire a model base configuration file, and the model base configuration file comprises configuration information of a deployed question-answer model on a deployment platform;
the analysis unit is configured to analyze at least one question-answer model in the deployed question-answer models according to the configuration information so as to generate at least one model operation instance corresponding to the at least one question-answer model;
an updating unit configured to update the model set with the at least one model runtime instance.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
According to a fourth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and wherein the processor, when executing the executable code, implements the method of the first aspect.
By the method and the device provided by the embodiment of the specification, the question-answering models possibly used by the question-answering robot system are deployed on the deployment platform, and the configuration information of each question-answering model is recorded through the model library configuration file. And the model center acquires the configuration information of each question-answer model by reading the configuration file of the model library, analyzes each question-answer model according to the configuration information, generates a corresponding model operation example and records the model operation example in the model set. In the case of change of the question-answering model, such as model online, model offline and model modification, the model library configuration file is changed correspondingly. The model center detects the change of the configuration file of the model base and re-analyzes the question-answer model corresponding to the modified configuration information, so that the question-answer model in the model set is kept updated. Therefore, the model center realizes the hot plug of each question-answering model, namely, the question-answering models in the model set are dynamically and flexibly maintained to be updated in a configuration mode under the condition that the system is not required to be restarted and is not required to be developed and reissued again, so that the model center is applied to the question-answering robot system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a question-answering robot system according to one embodiment disclosed herein;
FIG. 2 is a schematic diagram of a question-answering robot system according to another embodiment disclosed herein;
FIG. 3 illustrates a flow diagram of a method of maintaining a question-answer model, according to one embodiment;
FIG. 4 illustrates a flow diagram for distributing questions to a question-and-answer model, according to one embodiment;
FIG. 5 shows a schematic block diagram of a question-answering model maintenance device according to one embodiment.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a question-answering robot system according to an embodiment disclosed in the present specification. As described above, with the development of artificial intelligence and the deepening of model training, a plurality of question-answering models based on different ideas and different algorithms have been proposed for the question-answering robot to determine the answer of a question. These question-answer models include, for example, a question-answer model based on a search technology framework, a question-answer model based on a pattern matching technology framework, an interactive question-answer model, and the like. The question-answering models are suitable for different service scenes by using different algorithms and technologies, and have advantages and are different in autumn. Conventional techniques often employ one of suitable question-answering models to construct a question-answering robot system as needed. However, the adoption of a single question-answering model often causes technical defects in some aspects to be difficult to break through. Based on such consideration, in the question-answering robot system of the embodiment shown in fig. 1, a plurality of question-answering models are fused, and the various question-answering models are made up for deficiencies, so that targeted question-answering is better realized. Therefore, in the following description, the question-answering robot system in which a plurality of question-answering models shown in fig. 1 are fused is also referred to as a bus-type robot.
Specifically, the bus-type question-answering robot system shown in fig. 1 includes a preprocessing module, a question distribution module, a model center, a fusion rearrangement module, and the like. The model center includes a plurality of question-and-answer models, which are developed by developers and then deployed, tested, released, and brought online in the model center. A plurality of question-answer models constitute the above-mentioned model center.
When a problem is received by the robotic system, the problem is first pre-processed by a pre-processing model. The preprocessing process may include error correction, word segmentation, word decommissioning, traffic classification, and so on. The pre-processed problem may then enter a problem distribution module. The problem distribution module distributes the problems to different model sets contained in the model center according to some distribution rules. Each model would then process the question and output the recommended answer to the answer fusion module. And the answer fusion module combines and reorders the recommended answers of the models according to the preset fusion logic and outputs the optimal result.
In the model center of fig. 1, each question-answer model is developed by a person in charge of algorithm and application development in advance, and is built in the system. When a new model needs to be added or an existing model needs to be modified, a system developer needs to perform docking development on the new model or the modified model again, and then the new model or the modified model is released again to be on-line. In order to further improve the flexibility of the model framework of the bus type question answering robot, on the basis of fig. 1, a question answering robot system of fig. 2 is also provided.
Fig. 2 is a schematic diagram of a question-answering robot system according to another embodiment disclosed in the present specification. The robotic system of fig. 2 compares to that of fig. 1, the overall framework is the same, but the model center is optimized. In fig. 1, the question-answer model in the model center is concrete and is developed and docked in advance; the system is fixed once it is started. And if the model needs to be added or deleted, the application needs to re-develop and re-release the code.
In the question-answering robot system of fig. 2, the model center dynamically maintains each question-answering model that may be used. Specifically, in one embodiment, a developer may deploy the question-answering models on a deployment platform, and record configuration information of each question-answering model through a model library configuration file. When the system is started, the model center analyzes each question-answer model by reading the configuration information in the configuration file to generate a model operation example. After the system is started, if the question-answering model needs to be added or modified, the addition or modification can be reflected as the change of the model base configuration file. The model center may periodically detect changes in the configuration file and modify the corresponding model run instance based on the changes. This is so that the model center contains which models are not deterministically invariant, but are dynamically variable. Moreover, in the operation process of the question-answering robot system, the change of the model, such as newly accessing one model, downloading one model, modifying one model and the like, does not relate to the redevelopment and redelivery of the robot system. Therefore, the maintenance and management of the question-answering model are more flexible. The following describes a specific implementation manner of dynamically maintaining the question-answering model by the model center.
Fig. 3 shows a flowchart of a method of maintaining a question-and-answer model for a question-and-answer robot system including at least a question distribution module and a model center, the method of fig. 3 being performed by the model center, according to one embodiment. As shown in FIG. 3, in one embodiment, a method of maintaining a question-answer model may include: step 31, obtaining a model base configuration file, wherein the model base configuration file is used for describing configuration information of a deployed question-answer model on a deployment platform; step 33, analyzing at least one question-answer model in the deployed question-answer models according to the configuration information, so as to generate at least one model operation instance corresponding to the at least one question-answer model; and step 35, updating the model set by using the at least one model operation instance. The manner in which the above steps are performed is described below.
It is to be appreciated that, in accordance with one or more embodiments of the present description, in order to dynamically maintain a question-answering model for a question-answering robot, the model center and an engineer developing the question-answering model may pre-agree on one or more model agreements. When developing a question-answer model, an algorithm engineer implements a model algorithm based on one of pre-agreed model protocols. After a certain question-and-answer model is implemented, the question-and-answer model may be deployed into a deployment platform. It will be appreciated that conventional techniques have provided a wide variety of algorithmic platforms to provide some of the underlying capabilities for algorithmic code. When the model codes of the question-answering model are deployed to a deployment platform, the deployment platform compiles the codes and converts the codes into components which can be run by a machine to run. In one embodiment, a development engineer deploys a quiz model onto a hot deployment platform after completing code development of the quiz model, wherein hot deployment refers to a function that can modify a system while the system is running without requiring a system reboot.
After the question-answering model is deployed, configuration information of the question-answering model may be generated or determined, where the configuration information may include an environment in which the model is deployed (e.g., hardware parameters of a deployment platform, operating environment parameters, etc.), a model deployment id, a model protocol adopted by the model, an id of a question-answering robot to which the model is to be adapted, and the like. In one embodiment, a model library configuration file is employed to record configuration information for the question-answer models that have been deployed. Whenever a question-answer model is deployed, the configuration information of the question-answer model is added or written into a model library configuration file. Thus, the model library configuration file may be used to record or describe configuration information for each of the question-answering models deployed on the deployment platform.
In one embodiment, the model library configuration file may be stored in a deployment platform on which the various question-answering models are deployed. In another embodiment, the model library profile may be stored in a memory affiliated with the model center. In yet another embodiment, the model library configuration file may be stored in another separate repository, different from the deployment platform and the model center, which is connected with the deployment platform and the model center through multiple communication ways, so that after the question-answering model is deployed on the deployment platform, the configuration information may be written into the model library configuration file, and the model center may access the repository to read the model library configuration file.
In the case of the question-answering robot system startup, the model center obtains an initial version of the model library configuration file in step 31. Depending on the storage location of the model library configuration file, in various embodiments, the model hub may retrieve the model library configuration file from the deployment platform, or from its local storage, or from a separate repository.
As described above, the model library configuration file records configuration information of each question and answer model that has been deployed on the deployment platform. In the starting stage of the question-answering robot system, in step 33, the model center needs to sequentially analyze each question-answering model recorded in the configuration file according to the configuration information in the configuration file of the model library.
As described above, the configuration information of the question-answering model may include a model deployment environment, a model deployment id, a model protocol adopted by the model, and the like, where the model protocol adopted by the model describes a model implementation and analysis manner. More specifically, the model protocol may describe, among other things, the input and output formats of the question-answering model, the interface to be invoked, and so on. According to the content of the model protocol, the model center can analyze the deployed question-answering model, so as to generate a model operation example.
A model operation instance can be considered to correspond to an interface service, input parameters and the like can be transmitted to a corresponding question-answer model by calling the interface service in a preset format, namely calling the model operation instance, the question-answer model is operated and calculated on a deployment platform based on the input parameters, an operation result is obtained according to a model algorithm, and the operation result is returned through the model operation instance.
Upon parsing the generated model run instance, the model center adds the parsed generated model run instance to the model set in step 35. In one embodiment, the model center records that an available running instance of the model has been parsed by maintaining a collection of models. It should be understood that the model set is simply recorded, and the running examples of which models are generated by analysis; the model center cannot know the substantial contents of the models such as the algorithm, the code implementation, the action and the like of each question-answering model according to the model set.
For example, in one specific example, a model set maintained by a model center has recorded therein: model id of the question-answering model after analysis and deployment platform id. In another example, the model set also records the robot id to which each question-answering model is applied, and the information can be obtained from the configuration information of the corresponding question-answering model. In yet another example, the model set may also record only the model ids of the question-answering models that completed the parsing.
Thus, steps 31-35 are executed in the above manner, and when the question-answering robot system is started, the model center completes the analysis and loading of each question-answering model.
After the question-answering robot system is started, model developers can modify the question-answering models, including a new on-line question-answering model, an existing off-line question-answering model and a certain on-line question-answering model. The following describes an implementation process of maintaining the question-answering model by the model center in the case of change of the question-answering model.
Specifically, in one case, the developer needs to go online with a new question-and-answer model. Then, similarly, the developer implements the new question-answering model using a model protocol and deploys it onto the deployment platform. Then, the configuration information of the newly deployed question-answering model is added to the model base configuration file, so that the model base configuration file is updated.
In another case, the developer needs to take a deployed parsed question-answering model offline. Then, in one embodiment, the configuration information associated with the model to be downlinked can be deleted directly from the model repository configuration file, thus updating the model repository configuration file.
In yet another case, the developer needs to modify an online question-answering model, such as modifying a portion of the algorithmic logic or code implementation therein. In one embodiment, after modifying the implementation code of the question-answer model, the developer redeploys the modified model code to the deployment platform, and then updates the original configuration information corresponding to the question-answer model in the model library configuration file with the new configuration information of the redeployed question-answer model.
In the above cases, when the model developer modifies the question-answering model, the model library configuration file changes accordingly. Therefore, the model center can detect the change of the question-answering model by monitoring the configuration file of the model library, and further carry out corresponding modification. From a process execution perspective, the model center may again perform the process steps of FIG. 3 to effect modification of the question-answer model, except that in step 31, the updated model library configuration file is obtained by listening, in step 33, only the question-answer model involved in the modification is re-parsed, and then in step 35, the model set is updated with the newly parsed question-answer model.
Specifically, after the question-answering robot system is started, the model center listens for changes in the model library configuration file to detect modifications to the question-answering model. In other words, the model centre is still constantly reading the model base profiles at predetermined time intervals, for example 5min, and comparing the newly acquired model base profiles with or without changes from the previous version. That is, at step 31, the model center obtains a first model library profile at a first time, and thereafter obtains a second model library profile at a second time that is a predetermined time interval after the first time. The first time may be a time of system startup, and the first model library configuration file corresponds to an initial model library configuration file when the question-answering robot system is started. The first time may also be any time during a maintenance phase after system start-up. The second time is a time after a predetermined time interval, for example, 5min, has elapsed from the first time, at which the model base profile is acquired again, which is referred to as a second model base profile. Then, the second model base configuration file is compared with the first model base configuration file, so that the change information of the configuration information in the second model base configuration file compared with the configuration information of the first model base file is determined and is called modified configuration information.
If the modification configuration information relates to the addition of a new model or the modification of an existing model, then, in step 33, the question-answer model corresponding to the modification configuration information is parsed according to the modification configuration information, a corresponding modified model running instance is generated, and in step 35, the model set is updated.
In one embodiment, the modified configuration information is configuration information of a second model library configuration file added with respect to a first model library configuration file, wherein the model id is a model id not present in the first model library configuration file. This means that a new question-and-answer model needs to be brought online and the modified configuration information corresponds to the newly added question-and-answer model. At this time, in step 33, the newly added question-answer model is parsed according to the parsing protocol in the modified configuration information, so as to generate a model operation instance of the newly added question-answer model. Then, in step 35, the model running instance of the newly added question-answering model is added to the model set.
In another embodiment, the modified configuration information is the configuration information that is modified for a certain existing model id by the second model library configuration file relative to the first model library configuration file. This means that some existing question-answering model is modified, and the modified configuration information corresponds to the modified question-answering model. Or, the modified configuration information is new configuration information of a re-deployed question and answer model. Then, in step 33, the corresponding modified question-answer model is re-parsed according to the modified configuration information, so as to generate a corresponding modified model operation instance. The regenerated modified model runtime instance is then added to the model collection at step 35. In addition, the original model operation instance corresponding to the modified question-answering model is deleted from the model set.
In another embodiment, the modified configuration information is a configuration information that is a deletion of the second model library profile relative to the first model library profile. In other words, the first model base configuration file contains configuration information for a deployed parsed question-answer model, while the second model base configuration file does not contain configuration information for the question-answer model, which means that the deployed parsed question-answer model needs to be offline. At this time, the corresponding model id is determined from the modified configuration information, and then the corresponding model operation instance is determined, and then the corresponding model operation instance is deleted from the model set.
In this way, regardless of how the developer changes (goes online, goes offline, and modifies) the question-answer model, the model center dynamically maintains the question-answer model in the model set to be updated in a configuration manner without restarting the system or redeveloping and redeploying the question-answer model.
On the basis, the model center can provide questions and answers for the question-answering robot system based on the question-answering model dynamically maintained in the mode. Referring again to fig. 1 and 2, in fig. 1, the question-answer models of the model center are pre-developed and connected, and are fixed and unchangeable, and the question distribution module can directly distribute the questions to different model sets contained in the model center. However, when the model center of fig. 2 is used to dynamically maintain each question-answering model according to the method of fig. 3, the question-answering model maintained by the model center is not fixed, and therefore, the model center needs to perform additional processing and judgment in the process of distributing the questions to the question-answering models.
Specifically, in the question-answering robot system shown in fig. 2, after a question is received and subjected to necessary preprocessing, the question distribution module determines to which question-answering models the question should be distributed according to some preset distribution rules. The determined question-answer models suitable for answering the question constitute a set of models. The question distribution module then issues a distribution request to the model center instructing the model center to distribute the question to the question-answer models in the set of models it determines. The model center then performs the distribution of the question according to the distribution request described above.
FIG. 4 illustrates a flow diagram for distributing questions to a question-answering model, which is performed by a model center, according to one embodiment. As shown in FIG. 4, a distribution request is received from the issue distribution module at step 41. Generally, the distribution request includes a specific question to be answered (hereinafter referred to as a first question), and a set of models determined by the question distribution module for the question (hereinafter referred to as a first set of models), including respective question-answer models adapted to answer the first question, which will be referred to as target question-answer models hereinafter. In one embodiment, the model set includes model ids for each target question-answering model.
Upon receiving such a distribution request, the model center searches the maintained model set for each target question-and-answer model contained in the first model set in step 43. Taking a certain target question-answering model, hereinafter referred to as a first target question-answering model as an example, the model id of the first target question-answering model may be searched in the model set, and if the corresponding model id is found, the model center includes the target question-answering model, so in step 45, the question is distributed to the model operation instance corresponding to the first target question-answering model, that is, the corresponding model operation instance is called to process the first question. More specifically, the first question may be used as a part of the call parameter to call the service of the target model runtime instance, so that the first question is passed to the target question-answering model, and the target question-answering model processes the question.
In one embodiment, if a target question-and-answer model specified in the distribution request cannot be found in the model set, an error message may be returned to the question distribution module, including the model id of the target question-and-answer model that was not found.
In one embodiment, the above-described question-answering robot system is suitable for a plurality of question-answering robot terminals, such as a customer service waiter robot, a training robot, and the like. Accordingly, the model center, and the question-and-answer model maintained therein, are shared by the plurality of robot terminals. In such a case, the distribution request may further include a robot id from which the first question originates. Correspondingly, the model set maintained by the model center can also record the robot id applicable to each question-answering model. In such a case, according to an embodiment, after a certain target question-answering model is found in the model set, the robot id marked in the distribution request is compared with the robot id applicable to the target question-answering model recorded in the model set, and in the case that the robot id is matched with the robot id, the question distribution and the model operation instance are invoked.
According to one embodiment, after the first question in the distribution request is successfully distributed to each target question-answering model, the model center can also obtain the processing result of the model operation instance corresponding to each target question-answering model for the first question, and then send the processing result to the answer fusion module in the question-answering robot system, so that the answer fusion module performs answer fusion and rearrangement according to the processing result of each target question-answering model, and outputs a better answer.
Therefore, the model center dynamically maintains various question-answering models required by the question-answering robot system, so that the question-answering robot system can interact with users by using the question-answering models to realize question answering.
In another aspect, an apparatus for maintaining a question-answering model for a question-answering robot system is provided, wherein the question-answering robot system includes a question distribution module and a model center, and the apparatus for maintaining the question-answering model is included in the model center. FIG. 5 shows a schematic block diagram of a question-answering model maintenance device according to one embodiment. As shown in fig. 5, the maintenance device 50 includes: an obtaining unit 51 configured to obtain a model base configuration file, where the model base configuration file includes configuration information of a deployed question-answer model on a deployment platform; the analyzing unit 53 is configured to analyze at least one question-answer model in the deployed question-answer models according to the configuration information, so as to generate at least one model operation instance corresponding to the at least one question-answer model; an updating unit 55 configured to update the set of models with the at least one model runtime instance.
According to one embodiment, the configuration information includes a model id, a deployment environment of the model, and a resolution protocol of the model.
In an implementation scenario, the obtaining unit 51 is configured to obtain an initial model library configuration file during a starting phase of the question-answering robot system; correspondingly, the parsing unit 53 is configured to parse each deployed question-answer model according to the configuration information in the initial model library configuration file, so as to generate a model running instance of each deployed question-answer model; the updating unit 55 is configured to sequentially add the model running instance of each deployed question-and-answer model to the model set.
In another implementation scenario, the obtaining unit 51 is configured to: at a first moment, acquiring a first model library configuration file; acquiring a second model library configuration file at a second moment which is a preset time interval after the first moment; and determining modified configuration information of the second model base configuration file changed compared with the first model base configuration file by comparing the second model base configuration file with the first model base configuration file.
Further, in an embodiment, the modified configuration information is configuration information of the second model base configuration file which is added in comparison with the first model base configuration file, and corresponds to the added first question-answering model. In such a case, the parsing unit 53 is configured to parse the first question-answer model according to the modification configuration information, so as to generate a first model operation instance corresponding to the first question-answer model; the updating unit 55 is configured to add the first model runtime instance to the set of models.
In another embodiment, the modified configuration information is configuration information of a second question-answer model in a second model library configuration file, where the second question-answer model is a question-answer model already included in the first model library configuration file. In such a case, the parsing unit 53 is configured to parse the second question-and-answer model according to the modification configuration information, so as to generate a second model operation instance corresponding to the second question-and-answer model; the updating unit 55 is configured to delete an original model operation instance corresponding to the second question-and-answer model in the model set, and add the second model operation instance to the model set.
In another embodiment, the modified configuration information is configuration information of the second model base configuration file that is reduced relative to the first model base configuration file, and the reduced configuration information is configuration information of the first model base configuration file for the third question-answering model. In this case, the updating unit 55 deletes the model operation instance corresponding to the third question-answering model from the model set.
According to one embodiment, the maintenance device 50 further comprises a dispensing unit 57, which in turn comprises (not shown):
a first obtaining subunit configured to receive a distribution request from the question distribution module, where the distribution request includes a first question and a first model set determined for the first question, and the first model set includes at least a first target question-answer model;
a searching subunit configured to search the first target question-answering model in the model set;
and the calling subunit is configured to call a model operation example corresponding to the first target question-answering model to process the first question under the condition that the first target question-answering model is found.
In one embodiment, the question-answering robot system further includes a question fusion module, and the distribution unit 57 further includes: the second obtaining subunit is configured to obtain a processing result of the model operation instance corresponding to the first target question-answering model for the first question; a sending subunit configured to send the processing result to the problem fusion module.
In summary, according to one or more embodiments described above, the model center dynamically maintains a plurality of question-answering models required by the question-answering robot system, so that the question-answering robot system can interact with users by using the question-answering models to realize question answering. Particularly, according to the above embodiment, the question-answering model is peeled off from the bus type robot frame, and the effects of online, updating and offline models in real time are achieved by the development mode of thermal deployment and protocol agreement and combination configuration, so that the purpose of observing the online effect of the models as soon as possible is achieved. Meanwhile, the efficiency problem of butt joint development of an algorithm engineer and an application engineer is avoided, an application system is not required to be built in a model, and the flexibility of the whole bus type question-answering robot framework is enhanced.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 3 and/or 4.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor, when executing the executable code, implementing the method described in connection with fig. 3 and/or fig. 4.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (20)

1. A method of maintaining a question-and-answer model for a question-and-answer robotic system, the question-and-answer robotic system including a question distribution module and a model center, the method performed by the model center, the method comprising:
acquiring an updated model base configuration file, wherein the model base configuration file comprises configuration information of a deployed question-answering model on a deployment platform;
analyzing at least one question-answer model in the deployed question-answer models according to configuration information in the updated model library configuration file, so as to generate at least one model operation instance corresponding to the at least one question-answer model;
updating the model set with the at least one model runtime instance.
2. The method of claim 1, wherein the configuration information comprises a model id, a deployment environment of the model, and a resolution protocol of the model.
3. The method of claim 1, further comprising, during a startup phase of the question-answering robot system, obtaining an initial model library configuration file;
analyzing each deployed question-answer model according to configuration information in the initial model library configuration file, and generating a model operation instance of each deployed question-answer model;
and sequentially adding the model operation instance of each deployed question-answering model into a model set.
4. The method of claim 1, wherein said obtaining an updated model library profile comprises:
at a first moment, acquiring a first model library configuration file;
acquiring a second model library configuration file at a second moment which is a preset time interval after the first moment;
and determining modified configuration information of the second model base configuration file changed compared with the first model base configuration file by comparing the second model base configuration file with the first model base configuration file.
5. The method of claim 4, wherein the modified configuration information is an added configuration information of the second model base configuration file compared to the first model base configuration file, corresponding to the added first question-answering model,
analyzing at least one question-answer model in the deployed question-answer models according to the configuration information in the updated model library configuration file comprises analyzing the first question-answer model according to the modified configuration information so as to generate a first model operation instance corresponding to the first question-answer model;
the updating the model set with the at least one model runtime instance comprises: adding the first model running instance to the set of models.
6. The method of claim 4, wherein the modified configuration information is configuration information for a second question-and-answer model in the second model library profile, the second question-and-answer model being a question-and-answer model already contained in the first model library profile;
analyzing at least one question-answer model in the deployed question-answer models according to the configuration information in the updated model library configuration file comprises analyzing a second question-answer model according to the modified configuration information so as to generate a second model operation example corresponding to the second question-answer model;
the updating the model set with the at least one model runtime instance comprises: and deleting the original model operation example corresponding to the second question-answering model in the model set, and adding the second model operation example into the model set.
7. The method of claim 4, wherein the modified configuration information is a reduced configuration information of the second model library profile relative to the first model library profile, the reduced configuration information being configuration information for a third question-and-answer model in the first model library profile;
the method further comprises the following steps: and deleting the model operation instance corresponding to the third question-answering model from the model set.
8. The method of claim 1, further comprising:
receiving a distribution request from the question distribution module, the distribution request including a first question and a first model set determined for the first question, the first model set including at least a first target question-answer model;
searching the first target question-answering model in the model set;
and under the condition that the first target question-answering model is found, calling a model operation example corresponding to the first target question-answering model to process the first question.
9. The method of claim 8, the question-answering robotic system further comprising a question fusion module, the method further comprising:
obtaining a processing result of a model operation instance corresponding to the first target question-answering model aiming at the first question;
and sending the processing result to the problem fusion module.
10. An apparatus for maintaining a question-and-answer model for a question-and-answer robotic system, the question-and-answer robotic system including a question distribution module and a model center, the apparatus included in the model center, the apparatus comprising:
the obtaining unit is configured to obtain an updated model base configuration file, and the model base configuration file comprises configuration information of a deployed question-answer model on a deployment platform;
the analysis unit is configured to analyze at least one question-answer model in the deployed question-answer models according to the configuration information in the updated model library configuration file, so as to generate at least one model operation instance corresponding to the at least one question-answer model;
an updating unit configured to update the model set with the at least one model runtime instance.
11. The apparatus of claim 10, wherein the configuration information comprises a model id, a deployment environment of the model, and a resolution protocol of the model.
12. The apparatus according to claim 10, wherein the obtaining unit is further configured to obtain an initial model library configuration file during a startup phase of the question-answering robot system;
the analysis unit is also configured to analyze each deployed question-answer model according to the configuration information in the initial model library configuration file, so as to generate a model operation instance of each deployed question-answer model;
the updating unit is further configured to sequentially add the model running instance of each deployed question-answering model to the model set.
13. The apparatus of claim 10, wherein the obtaining unit is configured to:
at a first moment, acquiring a first model library configuration file;
acquiring a second model library configuration file at a second moment which is a preset time interval after the first moment;
and determining modified configuration information of the second model base configuration file changed compared with the first model base configuration file by comparing the second model base configuration file with the first model base configuration file.
14. The apparatus of claim 13, wherein the modified configuration information is an added configuration information of the second model base configuration file compared to the first model base configuration file, corresponding to the added first question-answering model,
the analysis unit is configured to analyze the first question-answer model according to the modification configuration information so as to generate a first model operation instance corresponding to the first question-answer model;
the update unit is configured to add the first model runtime instance to the set of models.
15. The apparatus according to claim 13, wherein the modified configuration information is configuration information for a second question-and-answer model in the second model library configuration file, the second question-and-answer model being a question-and-answer model already contained in the first model library configuration file;
the analysis unit is configured to analyze the second question-answer model according to the modification configuration information so as to generate a second model operation example corresponding to the second question-answer model;
the updating unit is configured to delete an original model operation instance corresponding to the second question-answering model in the model set, and add the second model operation instance to the model set.
16. The apparatus of claim 13, wherein the modified configuration information is a reduced configuration information of the second model library profile relative to the first model library profile, the reduced configuration information being configuration information for a third question-and-answer model in the first model library profile;
the updating unit is configured to delete the model operation instance corresponding to the third question-answering model from the model set.
17. The apparatus of claim 10, further comprising a distribution unit comprising:
a first obtaining subunit configured to receive a distribution request from the question distribution module, where the distribution request includes a first question and a first model set determined for the first question, and the first model set includes at least a first target question-answer model;
a searching subunit configured to search the first target question-answering model in the model set;
and the calling subunit is configured to call a model operation example corresponding to the first target question-answering model to process the first question under the condition that the first target question-answering model is found.
18. The apparatus of claim 17, wherein the question-answering robot system further comprises a question fusion module, the distribution unit further comprising:
the second obtaining subunit is configured to obtain a processing result of the model operation instance corresponding to the first target question-answering model for the first question;
a sending subunit configured to send the processing result to the problem fusion module.
19. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-9.
20. A computing device comprising a memory and a processor, wherein the memory has stored therein executable code that, when executed by the processor, performs the method of any of claims 1-9.
CN201810652363.1A 2018-06-22 2018-06-22 Method and device for maintaining question-answering model Active CN108959488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810652363.1A CN108959488B (en) 2018-06-22 2018-06-22 Method and device for maintaining question-answering model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810652363.1A CN108959488B (en) 2018-06-22 2018-06-22 Method and device for maintaining question-answering model

Publications (2)

Publication Number Publication Date
CN108959488A CN108959488A (en) 2018-12-07
CN108959488B true CN108959488B (en) 2021-12-07

Family

ID=64486128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810652363.1A Active CN108959488B (en) 2018-06-22 2018-06-22 Method and device for maintaining question-answering model

Country Status (1)

Country Link
CN (1) CN108959488B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658270A (en) * 2018-12-19 2019-04-19 前海企保科技(深圳)有限公司 It is a kind of to read the core compensation system and method understood based on insurance products
CN111079938B (en) * 2019-11-28 2020-11-03 百度在线网络技术(北京)有限公司 Question-answer reading understanding model obtaining method and device, electronic equipment and storage medium
CN113900996A (en) * 2020-06-22 2022-01-07 中兴通讯股份有限公司 A file processing method and device, storage medium and terminal
CN114519093A (en) * 2022-02-07 2022-05-20 京东科技信息技术有限公司 Question answering method, device, electronic equipment and computer readable storage medium
CN115687593A (en) * 2022-11-11 2023-02-03 中国工商银行股份有限公司 Intelligent question answering method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106297800A (en) * 2016-08-10 2017-01-04 中国科学院计算技术研究所 A kind of method and apparatus of adaptive speech recognition
CN106649394A (en) * 2015-11-03 2017-05-10 中兴通讯股份有限公司 Fusion knowledge base processing method and device and knowledge base management system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9047567B2 (en) * 2011-07-15 2015-06-02 International Business Machines Corporation Utilizing failures in question and answer system responses to enhance the accuracy of question and answer systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649394A (en) * 2015-11-03 2017-05-10 中兴通讯股份有限公司 Fusion knowledge base processing method and device and knowledge base management system
CN106297800A (en) * 2016-08-10 2017-01-04 中国科学院计算技术研究所 A kind of method and apparatus of adaptive speech recognition

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Image Captioning and Visual Question Answering Based on Attributes and External Knowledge;Qi Wu;《 IEEE Transactions on Pattern Analysis and Machine Intelligence》;20180601;第40卷(第6期);第1367-1381页 *
一种基于索引模型融合的面向问答的信息检索方法;郭稷;《中国计算机语言学研究前沿进展(2007-2009)》;20090724;全文 *
基于策略学习的多引擎中文问答系统的研究;白莲花;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130415;第2013年卷(第04期);第I138-1491页 *

Also Published As

Publication number Publication date
CN108959488A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN108959488B (en) Method and device for maintaining question-answering model
CN104461693B (en) Virtual machine update method and system under a kind of desktop cloud computing environment
CN113467980B (en) Log output method, device and system and embedded equipment
CN113641413B (en) Target model loading and updating method and device, readable medium and electronic device
CN113268312B (en) Application migration method and system
CN114020323B (en) Model processing method, code obtaining method, device and electronic equipment
CN112269565A (en) Container-based edge device operation method, device and system
CN113495723B (en) Method, device and storage medium for calling functional component
CN116266117A (en) Model conversion method, computer program product, storage medium and electronic device
CN113641591A (en) Test case generation method and device and test method and device
CN117130589A (en) Code processing method, apparatus, all-in-one machine and computer program product
CN114693220B (en) Algorithm warehouse management method and system based on digital twin DaaS platform
CN110209565B (en) Method and device for debugging metadata model
CN112148348B (en) Task processing method, device and storage medium
CN113849161A (en) Application control method and device, storage medium and electronic equipment
CN111061642B (en) Full-automatic competition data processing system and method based on user data
CN113721921A (en) Offline compiling method and system for alliance-chain multi-language external link code
CN114610446B (en) Method, device and system for automatically injecting probe
CN110908665A (en) Jenkins construction plug-in development optimization method and system
CN114020604B (en) Automatic testing method and device based on workflow
CN110502238A (en) A kind of method and device of front and back end joint debugging
CN114253532A (en) Model development method, device, engine and storage medium
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
CN114493360A (en) Process creative evaluation method, device, equipment and medium based on RPA and AI
US7386556B2 (en) Substitute manager component that obtains state information of one or more software components upon failure of a first manager component

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant