CN108959488A - Safeguard the method and device of Question-Answering Model - Google Patents

Safeguard the method and device of Question-Answering Model Download PDF

Info

Publication number
CN108959488A
CN108959488A CN201810652363.1A CN201810652363A CN108959488A CN 108959488 A CN108959488 A CN 108959488A CN 201810652363 A CN201810652363 A CN 201810652363A CN 108959488 A CN108959488 A CN 108959488A
Authority
CN
China
Prior art keywords
model
question
answering
configuration file
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.)
Granted
Application number
CN201810652363.1A
Other languages
Chinese (zh)
Other versions
CN108959488B (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
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding 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

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Abstract

This specification embodiment provides a kind of method and apparatus for safeguarding Question-Answering Model, to be used for question and answer robot system.In embodiment, the Question-Answering Model that question and answer robot system may be used is deployed on deployment platform, and records the configuration information of each Question-Answering Model by model base configuration file.Model center obtains the configuration information of each Question-Answering Model by reading model base configuration file, and parses each Question-Answering Model according to configuration information, generates corresponding model running example, is recorded in model set.In the case where Question-Answering Model changes, model center passes through the variation of detection model base configuration file, the corresponding Question-Answering Model of configuration information for new analytic modification of laying equal stress on, to keep the update of Question-Answering Model in model set.

Description

Safeguard the method and device of Question-Answering Model
Technical field
This specification one or more embodiment is related to Artificial technical field of intelligence more particularly to question and answer robot The foundation and maintenance of Question-Answering Model in system.
Background technique
With the development of Artificial intellectual technology, various intelligence " robot " are proposed to realize that conventional human completes Work.For example, devising question and answer robot in application scenes.Question and answer robot is a kind of man-machine interactive system, should System can identify the natural language question sentence of user's input, and pass through information retrieval, natural language processing, depth calculation scheduling algorithm Logical process finally returns to a most appropriate answer to user.Such question and answer robot can be applied to such as chatting machine Device people trains robot, in the scenes such as small two robot of customer service.Generally, in question and answer robot system, pass through Question-Answering Model It realizes that the analysis to question sentence or problem is handled, and determines how answer.With the development of artificial intelligence and the depth of model training Enter, it has been proposed that a variety of Question-Answering Models based on different thinking algorithms of different.
On this basis, it would be desirable to have improved plan, more efficiently operation and maintenance can be used for question and answer robot Question-Answering Model.
Summary of the invention
This specification one or more embodiment describes a kind of method and apparatus, can dynamically maintain for interrogation responsor The Question-Answering Model of device people's system realizes " hot plug " of Question-Answering Model, so that the upper offline and modification of Question-Answering Model can be to match The mode for setting flexibly is realized.
According in a first aspect, provide it is a kind of maintenance for question and answer robot system Question-Answering Model method, it is described to ask Answering robot system includes problem distribution module and model center, and the method is executed by the model center, the method packet It includes:
Model base configuration file is obtained, the model base configuration file includes the deployment Question-Answering Model on deployment platform Configuration information;
According to the configuration information, described at least one Question-Answering Model disposed in Question-Answering Model of parsing, to generate At least one model running example corresponding at least one described Question-Answering Model;
Model set is updated at least one described model running example.
According to a kind of embodiment, configuration information includes model id, the deployed environment of model, and solution to model analyses agreement.
In an implement scene, in the startup stage of question and answer robot system, initial model base configuration file is obtained;Phase Ying Di, analyzing step include: according to the configuration information in the initial model base configuration file, and question and answer mould has each been disposed in parsing Type, to generate the model running example for each having disposed Question-Answering Model;Updating step includes, and has each disposed question and answer for described The model running example of model is successively added in model set.
In another implement scene, obtaining model base configuration file includes: to obtain the configuration of the first model library at the first moment File;The second moment of predetermined time interval after the first moment obtains the second model base configuration file;Pass through comparison second Model base configuration file and the first model base configuration file determine that the second model base configuration file is configured compared to the first model library The modification configuration information that file changes.
Further, in one embodiment, above-mentioned modification configuration information is that the second model base configuration file is compared In the configuration information that the first model base configuration file increases newly, corresponding to the first newly-increased Question-Answering Model.In this case, it solves Analysis step is embodied as, and according to modification configuration information, parses first Question-Answering Model, to generate and first Question-Answering Model pair The the first model running example answered;It updates step to be embodied as, the first model running example is added to the model set In.
In another embodiment, above-mentioned modification configuration information is to ask in the second model base configuration file for second The configuration information of model is answered, second Question-Answering Model is the Question-Answering Model that the first model base configuration file has included. In this case, analyzing step is embodied as, and according to the modification configuration information, parses second Question-Answering Model, thus Generate the second model running example corresponding with second Question-Answering Model;Update step be embodied as, in case-deleted models set with institute The corresponding original model running example of the second Question-Answering Model is stated, the second model running example is added to the model set In.
In another embodiment, above-mentioned modification configuration information is that the second model base configuration file is relative to the first mould The configuration information of type base configuration file reduction, the configuration information of the reduction are in the first model base configuration file for third The configuration information of Question-Answering Model;In this case, the above method further include: by the corresponding model of the third Question-Answering Model Running example is deleted from the model set.
According to a kind of possible design, the above method further include:
Receive distribution request from described problem distribution module, distribution request includes first problem, and be directed to this First Models Sets of one problem and determination, first Models Sets include at least first object Question-Answering Model;
The first object Question-Answering Model is searched in the model set;
In the case where finding the first object Question-Answering Model, the corresponding mould of the first object Question-Answering Model is called The type running example processing first problem.
Further, in one embodiment, question and answer robot system further includes problem Fusion Module, and the side Method further include: obtain the processing knot that the corresponding model running example of the first object Question-Answering Model is directed to the first problem Fruit;The processing result is sent to described problem Fusion Module.
According to second aspect, a kind of device for safeguarding the Question-Answering Model for question and answer robot system, the question and answer are provided Robot system includes problem distribution module and model center, and described device is included in the model center, described device packet It includes:
Acquiring unit is configured to obtain model base configuration file, and the model base configuration file includes, on deployment platform The configuration information of Question-Answering Model is disposed;
Resolution unit is configured to according to the configuration information, and parsing is described have been disposed at least one of Question-Answering Model and ask Model is answered, to generate at least one model running example corresponding at least one described Question-Answering Model;
Updating unit is configured to update model set at least one described model running example.
According to the third aspect, a kind of computer readable storage medium is provided, computer program is stored thereon with, when described When computer program executes in a computer, enable computer execute first aspect method.
According to fourth aspect, a kind of calculating equipment, including memory and processor are provided, which is characterized in that described to deposit It is stored with executable code in reservoir, when the processor executes the executable code, the method for realizing first aspect.
The method and apparatus provided by this specification embodiment, the Question-Answering Model that question and answer robot system may be used It is deployed on deployment platform, and records the configuration information of each Question-Answering Model by model base configuration file.Model center passes through Reading model base configuration file obtains the configuration information of each Question-Answering Model, and parses each Question-Answering Model according to configuration information, Corresponding model running example is generated, is recorded in model set.In the case where Question-Answering Model changes, such as mould Type is online, offline and modification, model base configuration file can be changed accordingly.Model center passes through detection model base configuration file Variation, the corresponding Question-Answering Model of configuration information for new analytic modification of laying equal stress on, to keep in model set Question-Answering Model more Newly.In this way, model center realizes " hot plug " of each Question-Answering Model, that is, in a manner of configurationization, it is being without restarting System, without developing publication again again in the case where, safeguard to dynamic flexible that Question-Answering Model in model set keeps updating, with Applied to question and answer robot system.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill of field, without creative efforts, it can also be obtained according to these attached drawings others Attached drawing.
Fig. 1 is the schematic diagram of the question and answer robot system of one embodiment that this specification discloses;
Fig. 2 is the schematic diagram of the question and answer robot system for another embodiment that this specification discloses;
Fig. 3 shows the method flow diagram of the maintenance Question-Answering Model according to one embodiment;
Fig. 4 shows the flow chart that problem is distributed to Question-Answering Model according to one embodiment;
Fig. 5 shows the schematic block diagram of the Question-Answering Model maintenance device according to one embodiment.
Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
Fig. 1 is the schematic diagram of the question and answer robot system of one embodiment that this specification discloses.As previously mentioned, with people The development of work intelligence and going deep into for model training, it has been proposed that a variety of Question-Answering Models based on different thinking algorithms of different are used The answer of question sentence is determined in question and answer robot.These Question-Answering Models are for example including based on the Question-Answering Model of search technique frame, base In the Question-Answering Model of mode-matching technique frame, interactive Question-Answering Model etc..These Question-Answering Models using different algorithm and Technology, it is each advantageous suitable for different business scenarios, it is each has something to recommend him.Routine techniques is often as needed using one of which Suitable Question-Answering Model constructs question and answer robot system.However, often will cause the skill in terms of certain using single Question-Answering Model Art defect is difficult to break through.Based on such consideration, in the question and answer robot system of embodiment shown in Fig. 1, a variety of ask has been merged Model is answered, is learnt from other's strong points to offset one's weaknesses for a variety of Question-Answering Models, so that targetedly question and answer be better achieved.Therefore, in following theory In bright, the question and answer robot system shown in FIG. 1 for having merged a variety of Question-Answering Models is also known as bus humanoid robot.
Specifically, bus-type question and answer robot system shown in FIG. 1 includes preprocessing module, problem distribution module, model Center, fusion reordering module etc..Model center includes multiple Question-Answering Models, these Question-Answering Models are developed by developer, then It disposed, tested, being issued, is online in the heart in a model.Multiple Question-Answering Models constitute above-mentioned model center.
When robot system receives problem, problem is pre-processed by pretreated model first.Preprocessing process It may include error correction, participle removes stop words, business classification etc..Then, problem can be entered by pretreated problem to distribute Module.Problem distribution module is distributed to the different model sets that model center is included according to some distribution rules, by problem On.Then, each model can be handled for problem, and answer will be recommended to be output to answer Fusion Module.Mould is merged in answer Root tuber merges the recommendation answer of each model, resequences according to scheduled fusion logic, exports optimal result.
In the model center of Fig. 1, each Question-Answering Model is responsible for algorithm and the personnel of application and development dock exploitation in advance It is good, it is built-in in systems.When needing newly-increased model, or modifying existing model, need system developer to new model or The model of person's modification re-starts docking exploitation, then issues again again online.In order to further enhance bus-type question and answer machine The flexibility of the model framework of people, on the basis of Fig. 1, it is also proposed that the question and answer robot system of Fig. 2.
Fig. 2 is the schematic diagram of the question and answer robot system for another embodiment that this specification discloses.The robot system of Fig. 2 Compared with Fig. 1, general frame is identical, but model center is optimized.In Fig. 1, asking in model center It answers model and is specifically, being preparatory exploitation to connecting;System immobilizes once after starting.If necessary to newly-increased or Person revises model, it is necessary to which application re-starts code development, issues again.
And in the question and answer robot system of Fig. 2, model center dynamically maintains each Question-Answering Model for being possible to use. Specifically, in one embodiment, Question-Answering Model can be deployed in deployment platform by developer, and configure text by model library Part records the configuration information of each Question-Answering Model.In system starting, model center matches confidence by reading in configuration file Breath parses each Question-Answering Model, generates model running example.After system start-up, if necessary to increase or modify Question-Answering Model newly, These newly-increased or modifications can be presented as the variation of model base configuration file.Model center can be periodically detected the change of configuration file Change, and according to the variation, modifies corresponding model running example.So that it not is true which model is model center, which include, It is fixed constant, but dynamically changeable.Also, in question and answer robot system operation, change to model, such as it is new on One model of line, an offline model modify model etc., are not related to the exploitation again of robot system and send out again Cloth.So that the maintenance and management to Question-Answering Model is more flexible.Model center Dynamic Maintenance Question-Answering Model is described below Specific implementation.
Fig. 3 shows the method flow diagram of the maintenance Question-Answering Model according to one embodiment, and the Question-Answering Model safeguarded is to use In question and answer robot system, the question and answer robot system includes at least problem distribution module and model center, the method for Fig. 3 by Model center executes.As shown in figure 3, in one embodiment, the method for safeguarding Question-Answering Model may include: step 31, obtain Model base configuration file, the model base configuration file for describing, on deployment platform disposed Question-Answering Model with confidence Breath;Step 33, according to above-mentioned configuration information, described at least one Question-Answering Model disposed in Question-Answering Model of parsing, thus raw At at least one model running example corresponding at least one described Question-Answering Model;Step 35, at least one described model Running example updates model set.The executive mode of above each step is described below.
It is to be appreciated that being used for interrogation responsor according to one or more embodiments of this specification in order to dynamically maintain The engineer of the Question-Answering Model of device people, model center and exploitation Question-Answering Model can make an appointment one or more model protocols. Algorithm engineering teacher realizes mould based on one of the model protocol made an appointment agreement when developing a Question-Answering Model Type algorithm.After realizing some Question-Answering Model, which can be deployed in deployment platform.It is appreciated that conventional Technology can provide various algorithm platforms, to provide some base powers for algorithmic code.When question and answer The model code of model is deployed to deployment platform, these code compilations can be converted into the group that machine can be run by deployment platform Part behaves.In one embodiment, Developmental Engineer is after the code development for completing Question-Answering Model, by Question-Answering Model portion It affixes one's name on heat deployment platform, wherein heat deployment refers to that system can be modified without the machine of system reboot when system is run Energy.
After Question-Answering Model is disposed, it can generate or determine the configuration information of the Question-Answering Model, the configuration Information may include the environment (such as hardware parameter of deployment platform, running environment parameter etc.) of model deployment, model deployment Id, the model protocol that model uses, the model question and answer robot id, etc. to be adapted to.In one embodiment, using model library Configuration file records the configuration information of deployed Question-Answering Model.Whenever what a Question-Answering Model disposed, just by the question and answer The configuration information of model is added or is written in model base configuration file.Therefore, model base configuration file can be used for record or It describes, the configuration information for each Question-Answering Model disposed on deployment platform.
In one embodiment, which can be stored in and is deployed with the deployment of each Question-Answering Model and puts down In platform.In another embodiment, which can be stored in the memory for being under the jurisdiction of model center.Again In one embodiment, above-mentioned model base configuration file can be stored in and independently be deposited different from deployment platform and the another of model center In storage cavern, which is connect with deployment platform and model center by communication, so that by Question-Answering Model After deployment platform deployment, model base configuration file can be written into configuration information, and accessible this of model center is deposited Storage cavern carrys out reading model base configuration file.
In the case where the starting of question and answer robot system, in step 31, the model library that model center obtains initial version is matched Set file.According to the storage location of model base configuration file, in different embodiments, model center can from deployment platform, or Person obtains above-mentioned model base configuration file from its local storage, or from separate storage library.
As previously mentioned, model base configuration file record has, the configuration for each Question-Answering Model disposed on deployment platform Information.In question and answer robot system start-up phase, in step 33, model center is needed according to the configuration in model base configuration file Information successively parses each Question-Answering Model recorded in configuration file.
As previously mentioned, may include in the configuration information of Question-Answering Model, the environment of model deployment, model disposes id, model The model protocol etc. of use wherein describes realization and the analysis mode of model in the model protocol of model use.It is more specific and It says, can be described in model protocol, the input/output format of the Question-Answering Model, interface of calling, etc..According to model protocol Content, model center can parse the Question-Answering Model disposed, to generate model running example.
One model running example can consider corresponding to an interface service, by being taken with predetermined format calling interface Business, that is, call the model running example, so that it may will input parameter etc. and pass to corresponding Question-Answering Model, Question-Answering Model is based on passing Enter parameter to be run and calculated on deployment platform, operation result is obtained according to model algorithm, and pass through model running example Return to operation result.
On the basis of parsing generates model running example, in the model running that step 35, model center generate parsing Example is added in model set.In one embodiment, model center is by maintenance model set, and to record, parsed can Model running example.It is to be appreciated that only simple in model set record, parses and which model generated Running example;Model center according to such model set, can not know that the algorithm of each Question-Answering Model, code are realized, made With equal models substantive content.
For example, being had recorded in the model set of model center maintenance in a specific example: completing the question and answer mould of parsing The model id and deployment platform id of type.In another example, the machine for having each Question-Answering Model to be applicable in also is recorded in Models Sets People id, the information can be obtained from the configuration information of corresponding Question-Answering Model.In another example, model set can also only be remembered The model id of the Question-Answering Model of parsing is completed in record.
In this way, executing step 31-35 in the above manner, in the starting of question and answer robot system, model center is completed The parsing and load of each Question-Answering Model.
After the starting of question and answer robot system, model development personnel can modify to Question-Answering Model, including online new Question-Answering Model, offline existing Question-Answering Model, and modify some online Question-Answering Model.It is described below, in Question-Answering Model In the case where changing, model center safeguards the realization process of Question-Answering Model.
Specifically, in one case, developer needs an online new Question-Answering Model.So, similar, it opens Hair personnel realize the new Question-Answering Model using certain model protocol, and are deployed on deployment platform.Then, this is new The configuration information of the Question-Answering Model of deployment is added in model base configuration file, to update model base configuration file.
In another case, developer needs an offline Question-Answering Model for having disposed to have parsed.So, at one In embodiment, can be deleted directly from model base configuration file with should be to the related configuration information of lower line model, in this way, updating Model base configuration file.
In still another case, developer needs to modify online Question-Answering Model, such as modifies portion therein Algorithm logic or code is divided to realize.In one embodiment, developer will repair after the realization code of modification Question-Answering Model Model code after changing is re-deployed to deployment platform, then with the new configuration information of the Question-Answering Model redeployed, updates mould Original configuration information corresponding with the Question-Answering Model in type base configuration file.
In above several situations, when model development personnel modify to Question-Answering Model and change, model library configuration text Part all can correspondingly change.Therefore, model center can detect question and answer by way of monitoring model base configuration file The change of model, and then accordingly modified.The angle executed from process, model center can execute the process step of Fig. 3 again It is rapid to realize that the modification of Question-Answering Model obtains the model base configuration file of update by monitoring, in step only in step 31 Rapid 33, the Question-Answering Model for being related to modification is parsed again only, then in step 35, updates mould with the Question-Answering Model newly parsed Type set.
Specifically, question and answer robot system starting after, model center monitor model base configuration file variation with Detect the modification of Question-Answering Model.In other words, model center reads mould still constantly with predetermined time interval, such as 5min Type base configuration file, and the model base configuration file newly obtained is compared compared to previous version either with or without variation.It is, in step Rapid 31, model center obtains the first model base configuration file, later, the predetermined time interval after the first moment in the first moment The second moment, obtain the second model base configuration file.At the time of above-mentioned first moment can be system starting, the first mould at this time Type base configuration file corresponds to model base configuration file initial when question and answer robot system starts.First moment was also possible to Any time of maintenance phase after system starting.Second moment was to go over predetermined time interval, such as 5min at the first moment, later At the time of, at this point, obtaining model base configuration file, referred to as the second model base configuration file again.Then, the second model library is compared Configuration file and the first model base configuration file, so that it is determined that the configuration information in the second model base configuration file is compared to out The modification information of the configuration information of one model library file, referred to as modification configuration information.
If above-mentioned modification configuration information is related to the addition of new model or the modification of existing model, in step 33, root According to above-mentioned modification configuration information, the corresponding Question-Answering Model of modification configuration information is parsed, it is real to generate corresponding modification model running Example, and in step 35, update model set.
In one embodiment, above-mentioned modification configuration information is that the second model base configuration file is matched relative to the first model library The newly-increased configuration information of file is set, model id therein is the model id being not present in the first model base configuration file.This meaning , online new Question-Answering Model is needed, and the modification configuration information corresponds to newly-increased Question-Answering Model.At this point, in step 33, root According to the analysis protocol in the modification configuration information, the newly-increased Question-Answering Model is parsed, to generate the newly-increased Question-Answering Model Model running example.Then, in step 35, the model running example of the newly-increased Question-Answering Model is added in model set.
In another embodiment, above-mentioned modification configuration information is that the second model base configuration file is matched relative to the first model library For setting file, for some already existing model id, the configuration information modified.It means that it is existing some ask It answers model to be modified, and the modification configuration information corresponds to the Question-Answering Model modified.In other words, the modification Configuration information is the new configuration information of some Question-Answering Model redeployed.Then, in step 33, confidence is matched according to the modification Breath, parses the Question-Answering Model of corresponding modification, to generate corresponding modification model running example again.Then, in step 35, The modification model running example regenerated is added in model set.In addition, corresponding to Question-Answering Model also by the modification Original model running example deleted from model set.
In another embodiment, above-mentioned modification configuration information is that the second model base configuration file is matched relative to the first model library File is set, the configuration information deleted.In other words, the first model base configuration file includes to have disposed asking of having parsed for some The configuration information of model is answered, and the second model base configuration file does not include the configuration information for the Question-Answering Model, this meaning , need offline this to dispose the Question-Answering Model parsed.At this point, corresponding model id is determined from modification configuration information, And then determine corresponding model running example, the corresponding model running example is then deleted from model set.
In this way, model center is logical regardless of developer carries out what kind of change (online, offline, modification) to Question-Answering Model The mode for crossing configurationization dynamically maintains model set without restarting system, issuing again without developing again In Question-Answering Model keep update.
On this basis, model center can be mentioned based on the Question-Answering Model of such Dynamic Maintenance for question and answer robot system For question and answer.Referring again to Fig. 1 and Fig. 2, in Fig. 1, each Question-Answering Model of model center is preparatory exploitation to connecting, and fixed Constant, problem can be directly distributed on the different model sets that model center is included by problem distribution module.And work as Using the model center of Fig. 2, according to each Question-Answering Model of method Dynamic Maintenance of Fig. 3 in the case where, what model center was safeguarded Question-Answering Model is simultaneously not fixed, and therefore, during problem is distributed to Question-Answering Model, model center also needs to carry out additional Processing and judgement.
Specifically, receiving a problem in question and answer robot system shown in Fig. 2, being carried out to it necessary After pretreatment, by problem distribution module according to some preset distribution rules, it is determined which question and answer is the problem are distributed to Model.The identified suitable Question-Answering Model for answering the problem constitutes a Models Sets.Then problem distribution module is into model The heart issues distribution request, indicates the Question-Answering Model that the above problem is distributed in Models Sets determined by it by model center. Then, model center requests the distribution of executive problem according to above-mentioned distribution.
Fig. 4 shows the flow chart that problem is distributed to Question-Answering Model according to one embodiment, and the process is by model center It executes.As shown in figure 4, receiving distribution request from problem distribution module in step 41.Generally, distribution request is waited for including some The particular problem (hereinafter referred to as first problem) and problem distribution module of answer for this problem and determine Models Sets (with It is known as the first Models Sets down), including each Question-Answering Model for being suitable for answering above-mentioned first problem, below referred to target Question-Answering Model.It in one embodiment, include the model id of each target Question-Answering Model in Models Sets.
In the case where receiving such distribution request, in step 43, model center is looked into the model set of maintenance Look for each target Question-Answering Model for including in above-mentioned first Models Sets.With some target Question-Answering Model, hereinafter referred to as first object For Question-Answering Model, the model id of the first object Question-Answering Model can be searched in model set, if found corresponding Model id, then problem is distributed to the first object question and answer then in step 45 comprising the target Question-Answering Model by model center The corresponding model running example of model, it is, calling the corresponding above-mentioned first problem of model running instance processes.More specifically Ground, can be using above-mentioned first problem as part call parameters, the service of invocation target model running example, so that first be asked Topic passes to target Question-Answering Model, so that target Question-Answering Model handles problem.
In one embodiment, if failing to find some the target question and answer specified in distribution request in model set Model a, then error message can be returned to problem distribution module, wherein including the target Question-Answering Model not found Model id.
In one embodiment, above-mentioned question and answer robot system is small by two suitable for multiple question and answer robot terminals, such as customer service Robot, training robot etc..Correspondingly, model center and the Question-Answering Model wherein safeguarded, by multiple robot terminal It shares.In this case, distribution request in can also include, first problem from robot id.Correspondingly, mould The model set of type central service also can recorde, the applicable robot id of each Question-Answering Model.In this case, according to One embodiment after finding some target Question-Answering Model in model set, will also distribute the robot marked in request The applicable robot id of the target Question-Answering Model recorded in id and model set is compared, in the matched situation of the two, Just carry out the calling of problem distribution and model running example.
According to one embodiment, by the first problem in distribution request be successfully distributed to each target Question-Answering Model it Afterwards, model center can also obtain the processing knot that the corresponding model running example of each target Question-Answering Model is directed to first problem Then the processing result is sent to the answer Fusion Module in question and answer robot system by fruit, so that mould is merged in answer Root tuber carries out the fusion and rearrangement of answer according to the processing result of each target Question-Answering Model, exports more preferably answer.
In this way, a variety of Question-Answering Models needed for model center Dynamic Maintenance question and answer robot system, so that question and answer robot System can use these Question-Answering Models and interact with user, realize question and answer.
On the other hand, a kind of device for safeguarding the Question-Answering Model for question and answer robot system is also provided, wherein interrogation responsor Device people's system includes problem distribution module and model center, and the device of above-mentioned maintenance Question-Answering Model is included in model center.Fig. 5 The schematic block diagram of Question-Answering Model maintenance device according to one embodiment is shown.As shown in figure 5, the maintenance device 50 includes: Acquiring unit 51 is configured to obtain model base configuration file, and the model base configuration file includes the deployment on deployment platform The configuration information of Question-Answering Model;Resolution unit 53 is configured to according to the configuration information, and parsing is described have been disposed in Question-Answering Model At least one Question-Answering Model, to generate corresponding at least one described Question-Answering Model at least one model running example; Updating unit 55 is configured to update model set at least one described model running example.
According to a kind of embodiment, the configuration information includes model id, the deployed environment of model, solution to model analysis association View.
In an implement scene, acquiring unit 51 is configured to, and in the startup stage of the question and answer robot system, is obtained Initial model base configuration file;Correspondingly, resolution unit 53 is configured to, according to the configuration in the initial model base configuration file Information, parsing have each disposed Question-Answering Model, to generate the model running example for each having disposed Question-Answering Model;Updating unit 55 are configured to, and the model running example for each having disposed Question-Answering Model is successively added in model set.
In another implement scene, acquiring unit 51 was configured that at the first moment, obtained the first model base configuration file; The second moment of predetermined time interval after the first moment obtains the second model base configuration file;By comparing the second model Base configuration file and the first model base configuration file determine the second model base configuration file compared to the first model base configuration file The modification configuration information changed.
Further, in one embodiment, above-mentioned modification configuration information is the second model base configuration file compared to the The newly-increased configuration information of one model base configuration file, corresponding to the first newly-increased Question-Answering Model.In this case, parsing is single Member 53 is configured to, and according to the modification configuration information, parses first Question-Answering Model, to generate and first Question-Answering Model Corresponding first model running example;Updating unit 55 is configured to, and the first model running example is added to the model In set.
In another embodiment, above-mentioned modification configuration information is that the second question and answer mould is directed in the second model base configuration file The configuration information of type, second Question-Answering Model are the Question-Answering Models that the first model base configuration file has included.At this In the case where sample, resolution unit 53 is configured to, and according to the modification configuration information, parses second Question-Answering Model, thus raw At the second model running example corresponding with second Question-Answering Model;Updating unit 55 is configured to, in case-deleted models set with institute The corresponding original model running example of the second Question-Answering Model is stated, the second model running example is added to the model set In.
In another embodiment, above-mentioned modification configuration information is that the second model base configuration file is relative to the first mould The configuration information of type base configuration file reduction, the configuration information of the reduction are in the first model base configuration file for third The configuration information of Question-Answering Model.In this case, updating unit 55 is by the corresponding model running of the third Question-Answering Model Example is deleted from the model set.
According to a kind of embodiment, maintenance device 50 further includes Dispatching Unit 57, and the Dispatching Unit includes (not showing again Out):
First obtains subelement, is configured to receive distribution request from described problem distribution module, and the distribution request includes First problem, and the first Models Sets of determination for the first problem, first Models Sets include at least first object Question-Answering Model;
Subelement is searched, is configured to search the first object Question-Answering Model in the model set;
Subelement is called, is configured in the case where finding the first object Question-Answering Model, first mesh is called Mark first problem described in the corresponding model running instance processes of Question-Answering Model.
In one embodiment, question and answer robot system further includes problem Fusion Module, above-mentioned Dispatching Unit 57 further include: Second obtains subelement, is configured to obtain the corresponding model running example of the first object Question-Answering Model and asks for described first The processing result of topic;Transmission sub-unit is configured to the processing result being sent to described problem Fusion Module.
In summary, pass through one or more embodiments described above, system of model center Dynamic Maintenance question and answer robot A variety of Question-Answering Models needed for system, so that question and answer robot system can use these Question-Answering Models and interact with user, realization is asked It answers.In particular, Question-Answering Model is removed from bus-type robot frame, according to above embodiments with heat deployment and agreement The development mode of agreement achievees the effect that online in real time, update, lower line model in conjunction with configuration, realizes the " hot to insert of Question-Answering Model Pull out ", that is, achieving the purpose that being capable of effect on observing and nursing line as early as possible.Meanwhile also removing algorithm engineering teacher and Application Engineer couple from The efficiency of exploitation is connect, application system is not furthermore needed yet and does built in model, enhances entire bus-type question and answer robot frame The flexibility of frame.
According to the embodiment of another aspect, a kind of computer readable storage medium is also provided, is stored thereon with computer journey Sequence enables computer execute and combines method described in Fig. 3 and/or Fig. 4 when the computer program executes in a computer.
According to the embodiment of another further aspect, a kind of calculating equipment, including memory and processor, the memory are also provided In be stored with executable code, when the processor executes the executable code, realize the side in conjunction with described in Fig. 3 and/or Fig. 4 Method.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention Protection scope, all any modification, equivalent substitution, improvement and etc. on the basis of technical solution of the present invention, done should all Including within protection scope of the present invention.

Claims (20)

1. a kind of method of Question-Answering Model of maintenance for question and answer robot system, the question and answer robot system include problem point Hair module and model center, the method are executed by the model center, which comprises
Model base configuration file is obtained, the model base configuration file includes having disposed matching for Question-Answering Model on deployment platform Confidence breath;
According to the configuration information, described at least one Question-Answering Model disposed in Question-Answering Model of parsing, thus generation and institute State at least one corresponding model running example of at least one Question-Answering Model;
Model set is updated at least one described model running example.
2. according to the method described in claim 1, wherein, the configuration information includes model id, the deployed environment of model, mould The analysis protocol of type.
3. according to the method described in claim 1, wherein, the acquisition model base configuration file includes, in the question and answer machine The startup stage of people's system obtains initial model base configuration file;
According to the configuration information, described at least one Question-Answering Model disposed in Question-Answering Model of parsing, comprising: according to described Configuration information in initial model base configuration file, parsing have each disposed Question-Answering Model, have each disposed question and answer to generate The model running example of model;
Model set is updated at least one described model running example, comprising: by the mould for each having disposed Question-Answering Model Type running example is successively added in model set.
4. according to the method described in claim 1, wherein, the acquisition model base configuration file includes:
At the first moment, the first model base configuration file is obtained;
The second moment of predetermined time interval after the first moment obtains the second model base configuration file;
By the second model base configuration file of comparison and the first model base configuration file, determine that the second model base configuration file is compared In the modification configuration information that the first model base configuration file changes.
5. according to the method described in claim 4, wherein, the modification configuration information is the second model base configuration file phase Than the configuration information increased newly in the first model base configuration file, corresponding to the first newly-increased Question-Answering Model,
It is described that according to the configuration information, parsing described at least one Question-Answering Model disposed in Question-Answering Model includes, according to The modification configuration information parses first Question-Answering Model, to generate the first model corresponding with first Question-Answering Model Running example;
It is described to update model set at least one described model running example, comprising: to add the first model running example It is added in the model set.
6. according to the method described in claim 4, wherein the modification configuration information is, in the second model base configuration file For the configuration information of the second Question-Answering Model, second Question-Answering Model is that the first model base configuration file has included Question-Answering Model;
It is described that according to the configuration information, parsing described at least one Question-Answering Model disposed in Question-Answering Model includes, according to The modification configuration information parses second Question-Answering Model, to generate the second model corresponding with second Question-Answering Model Running example;
It is described to update model set at least one described model running example, comprising: with described second in case-deleted models set The corresponding original model running example of Question-Answering Model, the second model running example is added in the model set.
7. according to the method described in claim 4, wherein the modification configuration information is, the second model base configuration file phase For the configuration information of the first model base configuration file reduction, the configuration information of the reduction is the first model base configuration file In be directed to third Question-Answering Model configuration information;
The method also includes: the corresponding model running example of the third Question-Answering Model is deleted from the model set.
8. according to the method described in claim 1, further include:
Distribution request is received from described problem distribution module, and distribution request includes first problem, and first asks for this The first Models Sets inscribed and determined, first Models Sets include at least first object Question-Answering Model;
The first object Question-Answering Model is searched in the model set;
In the case where finding the first object Question-Answering Model, the corresponding model fortune of the first object Question-Answering Model is called First problem described in row instance processes.
9. the method is also according to the method described in claim 8, the question and answer robot system further includes problem Fusion Module Include:
Obtain the processing result that the corresponding model running example of the first object Question-Answering Model is directed to the first problem;
The processing result is sent to described problem Fusion Module.
10. a kind of device of Question-Answering Model of maintenance for question and answer robot system, the question and answer robot system includes problem Distribution module and model center, described device are included in the model center, and described device includes:
Acquiring unit is configured to obtain model base configuration file, and the model base configuration file includes the portion on deployment platform Affix one's name to the configuration information of Question-Answering Model;
Resolution unit is configured to according to the configuration information, described at least one the question and answer mould disposed in Question-Answering Model of parsing Type, to generate at least one model running example corresponding at least one described Question-Answering Model;
Updating unit is configured to update model set at least one described model running example.
11. device according to claim 10, wherein the configuration information includes model id, the deployed environment of model, Solution to model analyses agreement.
12. device according to claim 10, wherein the acquiring unit is configured to, in the question and answer robot system Startup stage, obtain initial model base configuration file;
The resolution unit is configured to, and according to the configuration information in the initial model base configuration file, parsing has each been disposed Question-Answering Model, to generate the model running example for each having disposed Question-Answering Model;
The updating unit is configured to, and the model running example for each having disposed Question-Answering Model is successively added to Models Sets In conjunction.
13. device according to claim 10, wherein the acquiring unit is configured that
At the first moment, the first model base configuration file is obtained;
The second moment of predetermined time interval after the first moment obtains the second model base configuration file;
By the second model base configuration file of comparison and the first model base configuration file, determine that the second model base configuration file is compared In the modification configuration information that the first model base configuration file changes.
14. device according to claim 13, wherein the modification configuration information is the second model base configuration file Compared to the configuration information that the first model base configuration file increases newly, corresponding to the first newly-increased Question-Answering Model,
The resolution unit is configured to, and according to the modification configuration information, parses first Question-Answering Model, to generate and be somebody's turn to do The corresponding first model running example of first Question-Answering Model;
The updating unit is configured to, and the first model running example is added in the model set.
15. device according to claim 13, wherein the modification configuration information is the second model base configuration file In be directed to the second Question-Answering Model configuration information, second Question-Answering Model is that the first model base configuration file has included Question-Answering Model;
The resolution unit is configured to, and according to the modification configuration information, parses second Question-Answering Model, to generate and be somebody's turn to do The corresponding second model running example of second Question-Answering Model;
The updating unit is configured to, and original model running corresponding with second Question-Answering Model is real in case-deleted models set Example, the second model running example is added in the model set.
16. device according to claim 13, wherein the modification configuration information is the second model base configuration file Relative to the configuration information of the first model base configuration file reduction, the configuration information of the reduction is the first model library configuration text The configuration information of third Question-Answering Model is directed in part;
The updating unit is configured to, and the corresponding model running example of the third Question-Answering Model is deleted from the model set It removes.
17. device according to claim 10 further includes Dispatching Unit, the Dispatching Unit includes:
First obtains subelement, is configured to receive distribution request from described problem distribution module, the distribution request includes first Problem, and the first Models Sets of determination for the first problem, first Models Sets include at least first object question and answer Model;
Subelement is searched, is configured to search the first object Question-Answering Model in the model set;
Subelement is called, is configured to call the first object to ask in the case where finding the first object Question-Answering Model Answer first problem described in the corresponding model running instance processes of model.
18. device according to claim 17, wherein interrogation responsor device people's system further includes problem Fusion Module, it is described Dispatching Unit further include:
Second obtains subelement, is configured to obtain the corresponding model running example of the first object Question-Answering Model for described the The processing result of one problem;
Transmission sub-unit is configured to the processing result being sent to described problem Fusion Module.
19. a kind of computer readable storage medium, is stored thereon with computer program, when the computer program in a computer When execution, computer perform claim is enabled to require the method for any one of 1-9.
20. a kind of calculating equipment, including memory and processor, which is characterized in that be stored with executable generation in the memory Code realizes method of any of claims 1-9 when the processor executes the executable code.
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 true CN108959488A (en) 2018-12-07
CN108959488B 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)

Cited By (3)

* 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
CN111079938A (en) * 2019-11-28 2020-04-28 百度在线网络技术(北京)有限公司 Question-answer reading understanding model obtaining method and device, electronic equipment and storage medium
WO2021259197A1 (en) * 2020-06-22 2021-12-30 中兴通讯股份有限公司 File processing method and apparatus, storage medium, and terminal

Citations (3)

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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150186784A1 (en) * 2011-07-15 2015-07-02 International Business Machines Corporation Utilizing failures in question and answer system responses to enhance the accuracy of question and answer systems
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
QI WU: "Image Captioning and Visual Question Answering Based on Attributes and External Knowledge", 《 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 *
白莲花: "基于策略学习的多引擎中文问答系统的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
郭稷: "一种基于索引模型融合的面向问答的信息检索方法", 《中国计算机语言学研究前沿进展(2007-2009)》 *

Cited By (4)

* 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
CN111079938A (en) * 2019-11-28 2020-04-28 百度在线网络技术(北京)有限公司 Question-answer reading understanding model obtaining method and device, electronic equipment and storage medium
CN111079938B (en) * 2019-11-28 2020-11-03 百度在线网络技术(北京)有限公司 Question-answer reading understanding model obtaining method and device, electronic equipment and storage medium
WO2021259197A1 (en) * 2020-06-22 2021-12-30 中兴通讯股份有限公司 File processing method and apparatus, storage medium, and terminal

Also Published As

Publication number Publication date
CN108959488B (en) 2021-12-07

Similar Documents

Publication Publication Date Title
Zhdanova et al. Community-driven ontology matching
CN106529673A (en) Deep learning network training method and device based on artificial intelligence
CN109857475A (en) A kind of method and device of frame management
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN108764480A (en) A kind of system of information processing
CN108959488A (en) Safeguard the method and device of Question-Answering Model
CN110852695A (en) Task approval method and device, server and storage medium
CN110807566A (en) Artificial intelligence model evaluation method, device, equipment and storage medium
KR102311787B1 (en) Apparatus and method for preventing performance degradation of ai model
CN110928553A (en) Deployment method, device and system of deep learning model
CN101221420A (en) Autonomy field system of reconfigurable digital controller
CN115358401A (en) Inference service processing method and device, computer equipment and storage medium
CN106021114B (en) Towards the automated testing method and system of intelligent robot
CN113391992A (en) Test data generation method and device, storage medium and electronic equipment
CN112559124A (en) Model management system and target operation instruction processing method and device
CN117215661A (en) Event processing method, device and storage medium
Braubach et al. A generic simulation service for distributed multi-agent systems
CN113326113B (en) Task processing method and device, electronic equipment and storage medium
CN109408104A (en) A kind of method and device for obtaining game and integrating information
CN114721344A (en) Intelligent decision method and system based on digital twin DaaS platform
CN111273901B (en) File format and deployment method of machine learning model capable of being rapidly deployed online
Yu et al. From goal models to feature models: A rule-based approach for software product lines
CN111208980B (en) Data analysis processing method and system
Abid et al. Asynchronous coordination of stateful autonomic managers in the cloud
CN116954644A (en) Cloud collaboration-based model upgrading method and device, computer equipment and medium

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