[go: up one dir, main page]

CN109783627B - Automatic response method, device, computer equipment and storage medium - Google Patents

Automatic response method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109783627B
CN109783627B CN201910011566.7A CN201910011566A CN109783627B CN 109783627 B CN109783627 B CN 109783627B CN 201910011566 A CN201910011566 A CN 201910011566A CN 109783627 B CN109783627 B CN 109783627B
Authority
CN
China
Prior art keywords
information
dialog
unit
box
response
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
CN201910011566.7A
Other languages
Chinese (zh)
Other versions
CN109783627A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910011566.7A priority Critical patent/CN109783627B/en
Publication of CN109783627A publication Critical patent/CN109783627A/en
Application granted granted Critical
Publication of CN109783627B publication Critical patent/CN109783627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an automatic response method, an automatic response device, computer equipment and a storage medium. The method comprises the following steps: acquiring problem information of a user, and acquiring a dialogue unit box corresponding to the problem information according to a regular matching mode; acquiring the execution sequence relation of the dialog unit box; acquiring the identity information of a parent dialog unit box of the dialog unit box according to the execution sequence relation; judging whether the identity information of the parent dialog unit box is null or not; if the identity information of the parent dialog box is a non-null value, reading the identity information of the last executed dialog box, and responding to the problem information according to the response information in the response column of the dialog box when the identity information of the last executed dialog box is judged to be the same as the identity information of the parent dialog box. The method can improve the accuracy and the flexibility of dialog box matching.

Description

Automatic response method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for automatic response, a computer device, and a storage medium.
Background
Nowadays, the robot technology is mature day by day, semantic understanding is performed by deep learning, and functions of the robot are enriched. For a task type multi-turn conversation robot, the robot performs multi-turn conversations with a user to help the user to complete business handling and other well-defined matters. To simplify the process of creating a task-type multi-wheeled conversation robot, AIML (english holly: artificial Intelligence Markup Language) is currently used to create a task-type multi-wheeled conversation robot.
However, when the task type multi-wheel conversation robot manufactured by adopting the AIML performs conversation tasks, problems of inaccurate conversation unit box matching, insufficient matching flexibility and the like easily occur, so that the task type multi-wheel conversation robot has low intelligence and low user experience.
Disclosure of Invention
The application provides an automatic response method, an automatic response device, computer equipment and a storage medium, so that accuracy and flexibility of dialogue unit box matching are improved.
In a first aspect, the present application provides a method of automatic response comprising:
acquiring problem information of a user, and acquiring a dialogue unit box corresponding to the problem information according to a regular matching mode, wherein the dialogue unit box comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing the response information corresponding to the problem information or similar problem information;
Acquiring an execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequential execution sequence relation among a plurality of dialog unit boxes;
acquiring the identity information of the parent dialog unit of the dialog unit according to the execution sequence relation;
judging whether the identity information of the parent dialog unit box is null or not;
if the identity information of the parent dialog box is a non-null value, reading the identity information of the last executed dialog box;
judging whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box;
and if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box, responding to the problem information according to the response information in the response column of the dialog box.
In a second aspect, the present application provides an automatic answering apparatus, comprising:
the unit frame acquisition unit is used for acquiring the problem information of the user and acquiring a dialogue unit frame corresponding to the problem information according to a regular matching mode, wherein the dialogue unit frame comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing the response information corresponding to the problem information or similar problem information;
The relation acquisition unit is used for acquiring the execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequential execution sequence relation among a plurality of dialog unit boxes;
the identification acquisition unit is used for acquiring the identification information of the parent-level dialog unit of the dialog unit according to the execution sequence relation;
the judging unit is used for judging whether the identity information of the parent-level dialogue unit box is null or not;
the reading unit is used for reading the identity information of the last executed dialogue unit if the identity information of the parent dialogue unit is a non-null value;
the judging unit is further configured to judge whether the identity information of the last executed dialog unit box is the same as the identity information of the parent dialog unit box;
and the response unit is used for responding to the problem information according to the response information in the response column of the dialogue unit if the identity information of the last executed dialogue unit is the same as the identity information of the parent dialogue unit.
In a third aspect, the present application further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of automatic answering provided in the first aspect when executing the computer program.
In a fourth aspect, the present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the method of automatic answering provided in the first aspect.
The application provides an automatic response method, an automatic response device, computer equipment and a storage medium. According to the method, the dialog boxes are matched in a regular matching mode, so that the matching flexibility and accuracy of the dialog boxes are improved, meanwhile, after the dialog boxes are matched, whether the identity information of the parent dialog box of the dialog box is null or not and whether the identity information of the parent dialog box is identical to the identity information of the dialog box which is executed last time are judged, the matched dialog box is further determined to be an accurate dialog box, the matching accuracy of the dialog boxes is further improved, the intelligence of the robot is also improved, the robot can provide services for users more accurately, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for automatic response provided in an embodiment of the present application;
FIG. 2 is a specific schematic flow chart of a method for automatic response provided in an embodiment of the present application;
FIG. 3 is another specific schematic flow chart of a method for automatic response provided in an embodiment of the present application;
FIG. 4 is another specific schematic flow chart of a method of automatic response provided in an embodiment of the present application;
FIG. 5 is another schematic flow chart diagram of a method of automatic response provided by an embodiment of the present application;
FIG. 6 is a schematic block diagram of an apparatus for automatic response provided in an embodiment of the present application;
FIG. 7 is another schematic block diagram of an apparatus for automatic response provided by an embodiment of the present application;
fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for automatically responding according to an embodiment of the present application. The automatic response method is applied to a task type multi-turn dialogue robot which is installed in an execution server and used for carrying out multi-turn dialogue with a user to assist the user to complete corresponding business transaction and the like. The robot was developed using PAML (English full name: pattern Aware Markup Language).
Wherein the PAML is an artificial intelligence markup language defined using the XML standard, which describes a set of data objects called PAML objects, and describes the behavior of processing the objects. Which inherits the AIML body and is modified to form it. The grammar basic knowledge unit of PAML is composed of Category (Chinese name: class), and each Category is composed of Pattern (Chinese name: mode) and Template (Chinese name: template). One basic PAML unit is as follows:
<category>
< pattern > hello-! Pattern-
< template > is true, you are good-! Sample-
</category>
Where < pattern > represents the question information of the user, and < template > is response information that the robot should give when the question information of the user matches < pattern >. In addition to the above basic tags, PAML defines a number of important tags to simulate a human conversation, such as a topic tag < topic >, a context tag < that >, a condition output tag < condition >, and so forth. Through the use of these tags, the PAML may implement a one-to-one intelligent dialog.
In this embodiment, the robot is preconfigured with an XML file necessary for performing a plurality of rounds of conversations. The XML file includes a plurality of dialog boxes formulated by a business expert through a configuration system developed based on the PAML, question information, response information, and configuration information corresponding to each dialog box, execution order relationships between dialog boxes, and the like.
As shown in fig. 1, the method of automatic response includes steps S101 to S107.
S101, acquiring problem information of a user, and acquiring a dialogue unit box corresponding to the problem information according to a regular matching mode, wherein the dialogue unit box comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing response information corresponding to the problem information or similar problem information.
When a user needs to transact a business and other things, problem information is presented to the robot by means of a mobile phone, a computer, bank self-service equipment and the like through modes of manual input, voice input and the like, and the robot can acquire the problem information of the user.
For example, the user wants to transact the policy loan service, and the user can send the problem information of 'i want to transact the policy loan' to the robot by means of the mobile phone through a voice input mode. When the robot acquires the problem information of the user, the robot can be matched with a dialogue unit box corresponding to the problem information in a regular matching mode.
The dialogue unit box comprises a question column and a response column, wherein the question column is used for storing some question information or similar question information which is set by a service expert and can be set by a user in the service handling process, and the response column is used for storing response information which is required to be made by a robot set by the service expert on the question information or the similar question information.
In one embodiment, the response message may be a message that the robot feeds back to the user, for example, when the question message is "i want to transact a policy loan," the response message may be "good asking what is you's name? ". The response message may also be an action made by the robot according to the question information, for example, when the question information is that the my name is Zhang Sanu, the response message may be an action for verifying the validity of the name of Zhang Sanu.
Specifically, in one embodiment, as shown in fig. 2, fig. 2 is a specific schematic flowchart of a method for automatically responding according to an embodiment of the present application. The dialog unit box corresponding to the problem information is obtained according to the regular matching mode, and specifically includes steps S1011 to S1013.
S1011, traversing a plurality of pre-stored dialog unit boxes and configuration information of each dialog unit box, wherein the configuration information comprises a problem regular expression.
S1012, acquiring a problem regular expression matched with the problem information in a regular matching mode.
S1013, taking the dialog box corresponding to the matched problem regular expression as the dialog box corresponding to the problem information.
In the embodiment shown in fig. 2, an XML file required for multiple rounds of conversations is stored in advance in the robot, and the XML file includes a plurality of dialog unit boxes, configuration information of each dialog unit box, and the like, where the configuration information includes a problem regular expression, and the problem regular expression is a refinement of problem information that may be proposed by a user and similar problem information. After the robot acquires the problem information of the user, traversing the prestored dialog unit boxes and the configuration information of each dialog unit box, acquiring a problem regular expression matched with the problem information in a regular matching mode, and finally taking the dialog unit box corresponding to the matched problem regular expression as the dialog unit box corresponding to the problem information.
Of course, in other embodiments, the dialog unit boxes corresponding to the problem information are obtained according to the regular matching method, or the problem information of the user may be directly matched with the problem information in each dialog unit box by adopting the regular matching method, so as to obtain the dialog unit box matched with the problem information of the user. That is, when dialog box matching is performed according to the regular matching method, matching may not be performed by the problem regular expression.
S102, acquiring an execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequence relation among a plurality of dialog unit boxes.
After the dialogue unit box matched with the problem information is acquired, the execution sequence relation of the dialogue unit box is acquired.
The execution sequence relation comprises identification information of each dialog box and sequence relation among dialog boxes. The robot may search the execution sequence relationship of the dialog box according to the identification information of the dialog box matched in step S101.
S103, according to the execution sequence relation, the identity information of the parent dialog unit of the dialog unit is obtained.
In the execution order relationship, for two adjacent dialog boxes, the dialog box that is executed first is referred to as a parent dialog box. For example, in the execution order relationship, dialog box a and dialog box B are two adjacent dialog boxes, and dialog box a is executed first, then dialog box B is executed next, then dialog box a is the parent dialog box of dialog box B. By searching the execution sequence relationship, the identity information of the parent dialog box of the dialog box matched in step S101 can be obtained.
S104, judging whether the identity information of the parent dialog unit box is null.
In this embodiment, the execution order relationship includes a mainline execution order relationship. In general, each business transaction has some necessary data, and the execution sequence relationship formed by dialog boxes for acquiring the necessary data is called a main line execution sequence relationship. For example, when conducting the payment service of the policy, the necessary data generally includes the number of the policy to be paid, the payment amount, the payment mode, the payment password, etc., so that the robot can interact with the user through the XML file corresponding to the payment service of the policy, thereby helping the user complete the payment service of the policy. The conversation process is presented through a plurality of dialog boxes and execution sequence relations among the dialog boxes.
In an ideal case, the user and the robot complete the multi-round dialogue according to the dialogue unit boxes in the pre-established main line execution sequence relation, and the business transaction can be completed. However, during actual operation, many emergency situations may occur. For example, the user suddenly has a phone and needs to leave temporarily, or the user does not remember how many insurance numbers the user has, and needs to ask the robot which insurance numbers the user has, and these emergency situations also need the robot to give a response. Thus, in the present embodiment, the execution order relationship also includes a branch execution order relationship. The execution sequence relationship formed by the dialog boxes of the emergency in the business handling process is called a branch execution sequence relationship. It will be appreciated that in an XML document corresponding to a business transaction, there is typically only one main line execution order relationship, and there may be multiple branch line execution order relationships.
In order to improve the intelligence of the robot and improve the user experience, so that the robot can better serve the user to complete the related business transaction, the robot needs to determine whether the identity information of the parent dialog unit box in step S103 is null.
If the identity information of the parent dialog box is null, it is indicated that the dialog box matched in the step S101 does not have the parent dialog box, the dialog box matched in the step S101 is a dialog box in the branch execution sequence relationship, at this time, the identity information of the last executed dialog box is recorded as breakpoint identity information, then, the question information is responded according to the response information in the response column of the dialog box, and after the response is completed, the dialog box corresponding to the breakpoint identity information is returned to execute. That is, when the dialog box matched in step S101 is a dialog box in the branch execution order relationship, the identity information of the last executed dialog box needs to be recorded, and it is understood that the last executed dialog box is a dialog box in the main line execution order relationship, so that after the branch execution order relationship is executed, the dialog box can return to the main line execution order relationship to continue to execute the following dialog box.
For example, when the robot goes to "what is you's policy number to pay? When the user suddenly inquires about what policy numbers are in the dialog box of "what policy numbers are in me", the dialog box of "what policy numbers are in me" is matched with the dialog box of "what policy numbers are in me" and is the dialog box in the branch execution order relationship, so that it is necessary to record "what is the policy number you want to pay? The identification information of the dialogue unit box is breakpoint identification information, then the branch execution sequence relation of which policy numbers I have is executed, and after the branch execution sequence relation is executed, the branch execution sequence relation is returned to the main line execution sequence relation again according to the breakpoint identification information, and the policy numbers you want to pay are? And the dialogue unit box is used for realizing the continuous handling of the policy repayment service.
If the robot determines that the identity information of the parent dialog box is a non-null value, it indicates that the dialog box matched in step S101 is a dialog box in the main line execution order relationship, and step S105 will be executed at this time.
S105, if the identity information of the parent dialog box is a non-null value, reading the identity information of the last executed dialog box.
When the robot determines that the identification information of the parent dialog box is a non-null value, the robot reads the identification information of the last executed dialog box, and then executes step S106.
S106, judging whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box.
The robot judges whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box. If the dialog box matching in step S101 is the correct dialog box, step S107 will be executed. If not, the dialog box matched in step S101 is an inaccurate dialog box, and in this case, the business transaction or the like may be ended.
And S107, if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box, responding to the problem information according to the response information in the response column of the dialog box.
When the dialog box matched in the step S101 is determined to be an accurate dialog box, the robot may acquire the response information in the dialog box matched in the step S101, and respond to the problem information according to the response information.
In particular, in one embodiment, fig. 3 is another specific schematic flow chart of a method for automatically responding according to an embodiment of the present application. And responding to the problem information according to the response information in the response column of the dialogue unit box, wherein the method specifically comprises steps S1071 to S1073.
S1071, configuration information configured for the response information in the dialog box in advance is obtained, wherein the configuration information comprises variable names needing to be verified.
S1072, reading the corresponding variable value from the memory according to the variable name.
And S1073, verifying the variable value so as to match the dialog unit box of the next stage according to different verification results and answer according to the dialog unit box of the next stage.
Specifically, in this embodiment, the variable name to be verified is obtained from the configuration information of the response information of the dialog box, and then the corresponding variable value is read from the memory according to the variable name, and the variable value is verified. Typically, after verifying a variable, there are different verification results. For example, when the problem information of the user is "my policy number is 123456789", and the corresponding response information is policy number verification, that is, the response information of the dialog box is preconfigured with verification actions on the policy number variable, at this time, the robot will read the variable value "123456789" corresponding to the variable name "policy number" from the memory, and then perform validity verification on the variable "policy number", and output three verification results, namely "value=true", "value=false" and "value=other", respectively. Different verification results will match to different next level dialog boxes. For example, when the verification result is "value=true", the question field of the dialog box of the next stage that is matched is "value=true", and the answer field is "what is you please be your name? ". When the verification result is "value=false", the question field of the dialog box of the next stage matched is "value=false", and the answer field is "what you are speaking, i don't understand, please tell i how good is by changing the way? ". When the verification result is "value=other", the question field of the dialog unit box of the next stage that is matched is "value=other", and the response field is an operation of judging whether the number of times the variable value is verified exceeds a preset number of times. The robot will execute the corresponding response according to the matched next dialog box.
Specifically, in one embodiment, fig. 4 is another specific schematic flowchart of a method for automatically responding according to an embodiment of the present application. And responding to the problem information according to the response information in the response column of the dialogue unit box, wherein the method specifically comprises steps S1074 to S1076.
S1074, configuration information configured for the response information in the dialog unit box in advance is obtained, wherein the configuration information comprises an external system identifier to be called and a variable name required by calling the external system.
S1075, obtaining variable values corresponding to variable names required by calling the external system.
S1076, the variable names and the corresponding variable values required by calling the external system are input into the corresponding external system as input values, so that the data information fed back by the external system according to the input values is obtained, and the response is carried out according to the data information.
In the embodiment shown in fig. 4, when the response information of the dialog box is preconfigured with the configuration information for calling the external system, the robot may obtain the external system identifier to be called and the variable name required for calling the external system from the configuration information, then read the variable value corresponding to the variable name required for calling the external system from the memory, and input the variable name required for calling the external system and the corresponding variable value as input values to the external system corresponding to the external system identifier, so that the external system may perform corresponding operation according to the input values to obtain the data information to be fed back, and feed back the data information to the robot, so that the robot may respond according to the fed-back data information.
For example, when an external policy system needs to be invoked, a user name, an identification card number and a policy number can be input into the policy system as input values, so that the policy system can verify the user name, the identification card number and the policy number and feed back data information to the robot, wherein the data information comprises verification success and verification failure, and the robot can respond correspondingly according to the data information. For example, when the data information received by the robot is "verification successful", the robot matches the data information to a dialogue unit box of "value=verification successful", and the robot pays "how much money you want to loan? "respond". When the data information received by the robot is verification failure, the robot is matched to a dialogue unit box of value=verification failure according to the data information, and the robot requests to input a response again according to the fact that the name, the identification card number or the policy number of the user in a response column in the dialogue unit box is wrong.
In one embodiment, as shown in fig. 5, fig. 5 is another schematic flow chart of a method for automatically responding according to an embodiment of the present application. Steps S108 and S109 may also be performed after determining that the identity information of the last executed dialog box is identical to the identity information of the parent dialog box.
S108, acquiring key information in the problem information according to configuration information of the dialogue unit box, wherein the configuration information comprises preset variable names of the key information.
And S109, assigning the key information to a variable name to store the key information.
In the embodiment shown in fig. 5, in the configuration information of some dialog boxes, variable names of key information are set. For example, the key information can be the user name, the identification card number, the policy number, the mobile phone number and other information which may need to be used in the subsequent multi-round dialogue and the business handling, and the key information can be acquired and stored in the multi-round dialogue process so as to facilitate the subsequent use. When the robot determines that the identity information of the last executed dialog box is identical to the identity information of the parent dialog box, key information in the problem information can be acquired according to the configuration information of the dialog box and assigned to a preset variable name, so that the key information in the problem information is stored.
In this embodiment, the automatic response method matches the dialog unit boxes in a regular matching manner, so as to improve flexibility and accuracy of matching the dialog unit boxes. Meanwhile, after the dialog box is matched, whether the identity information of the parent dialog box of the dialog box is null and whether the identity information of the parent dialog box is identical with the identity information of the last executed dialog box are judged, so that the matched dialog box is an accurate dialog box is further determined, the matching accuracy of the dialog box is further improved, the intelligence of the robot is also improved, the robot can provide services for users more accurately, and the user experience is improved.
The embodiment of the application also provides an automatic response device, which is used for executing the automatic response method. In particular, referring to fig. 6, fig. 6 is a schematic block diagram of an apparatus for automatic response according to an embodiment of the present application. The automatic response device 300 is installed in an execution server that can execute a task-type multi-round dialogue. The automatic response device 300 is preconfigured with XML files necessary for performing a plurality of rounds of dialogue. The XML file includes a plurality of dialog boxes formulated by a business expert through a configuration system developed based on the PAML, question information, response information, and configuration information corresponding to each dialog box, execution order relationships between dialog boxes, and the like.
As shown in fig. 6, the apparatus 300 for automatic response includes a unit frame acquisition unit 301, a relationship acquisition unit 302, an identification acquisition unit 303, a judgment unit 304, a reading unit 305, and a response unit 306.
The unit box obtaining unit 301 is configured to obtain problem information of a user, and obtain a dialog unit box corresponding to the problem information according to a regular matching manner, where the dialog unit box includes a problem bar and a response bar, the problem bar is configured to store the problem information or similar problem information similar to the problem information, and the response bar is configured to store response information corresponding to the problem information or similar problem information.
In an embodiment, the unit box obtaining unit 301 is specifically configured to traverse a plurality of pre-stored dialog unit boxes and configuration information of each dialog unit box, where the configuration information includes a problem regular expression; acquiring a problem regular expression matched with the problem information in a regular matching mode; and taking the dialog box corresponding to the matched problem regular expression as the dialog box corresponding to the problem information.
And the relationship obtaining unit 302 is configured to obtain an execution sequence relationship where the dialog unit boxes are located, where the execution sequence relationship is used to store a sequential execution sequence relationship between a plurality of dialog unit boxes.
And the identifier obtaining unit 303 is configured to obtain, according to the execution order relationship, identity information of a parent dialog unit of the dialog unit.
And the judging unit 304 is configured to judge whether the identity information of the parent dialog unit is null.
In the present embodiment, the execution sequence relationship includes a main line execution sequence relationship and a branch line execution sequence relationship.
If the judging unit 304 judges that the identification information of the parent dialog unit box is a non-null value, a control signal is sent to the reading unit 305 to enable the reading unit 305 to execute the corresponding operation.
If the judging unit 304 judges that the identity information of the parent dialog box is null, as shown in fig. 7, the judging unit 304 sends a control signal to the recording unit 307 to enable the recording unit 307 to record that the identity information of the last executed dialog box is breakpoint identity information, then the answering unit 306 answers the question information according to the answer information in the answer column of the dialog box, and returns to execute the dialog box corresponding to the breakpoint identity information after the answer is completed.
And a reading unit 305, configured to read the identification information of the last executed dialog box if the identification information of the parent dialog box is a non-null value.
The judging unit 304 is further configured to judge whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box.
And a response unit 306, configured to respond to the problem information according to response information in a response column of the dialog box if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box.
Specifically, in one embodiment, the response unit 306 is specifically configured to obtain configuration information configured for response information in the dialog unit box in advance, where the configuration information includes a variable name that needs to be verified; reading a corresponding variable value from a memory according to the variable name; and verifying the variable value so as to match the dialog box of the next stage according to different verification results and answer according to the dialog box of the next stage.
Specifically, in one embodiment, the response unit 306 is specifically configured to obtain configuration information configured for response information in the dialog unit box in advance, where the configuration information includes an external system identifier to be called and a variable name required for calling the external system; obtaining a variable value corresponding to a variable name required by calling an external system; and inputting the variable names and the corresponding variable values required by calling the external system as input values to the corresponding external system so as to acquire data information fed back by the external system according to the input values and respond according to the data information.
In an embodiment, as shown in fig. 7, the apparatus for automatic answering further includes a key information acquiring unit 308 and a storage unit 309.
A key information obtaining unit 308, configured to obtain key information in the problem information according to configuration information of the dialog box, where the configuration information includes a variable name of the preset key information.
And the storage unit 309 is configured to assign the key information to a variable name to store the key information.
It should be noted that, for convenience and brevity of description, the specific working process of the above-described automatic response device 300 and each unit may refer to the corresponding process in the foregoing automatic response method embodiment, which is not described herein again.
The automatic answering device 300 in this embodiment matches the dialog unit boxes in a regular matching manner, so as to improve the flexibility and accuracy of matching the dialog unit boxes. Meanwhile, after the dialog box is matched, whether the matched dialog box is an accurate dialog box is further determined by judging whether the identity information of the parent dialog box of the dialog box is null and whether the identity information of the parent dialog box is identical with the identity information of the last executed dialog box, so that the accuracy of dialog box matching is further improved.
The means of automatic answering described above may be implemented in the form of a computer program which can be run on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 device may be an execution server for executing task-type multi-round conversations. The execution server is preconfigured with XML files required for conducting multiple rounds of conversations. The XML file includes a plurality of dialog boxes formulated by a business expert through a configuration system developed based on the PAML, question information, response information, and configuration information corresponding to each dialog box, execution order relationships between dialog boxes, and the like.
With reference to FIG. 8, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method of auto-answer.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a method of auto-answer.
The network interface 505 is used for network communication such as transmitting assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to execute a computer program 5032 stored in a memory to perform the following functions: acquiring problem information of a user, and acquiring a dialogue unit box corresponding to the problem information according to a regular matching mode, wherein the dialogue unit box comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing the response information corresponding to the problem information or similar problem information; acquiring an execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequential execution sequence relation among a plurality of dialog unit boxes; acquiring the identity information of the parent dialog unit of the dialog unit according to the execution sequence relation; judging whether the identity information of the parent dialog unit box is null or not; if the identity information of the parent dialog box is a non-null value, reading the identity information of the last executed dialog box; judging whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box; and if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box, responding to the problem information according to the response information in the response column of the dialog box.
In one embodiment, after executing the determination of whether the id information of the parent dialog unit is null, the processor 502 further performs the following functions: if the identity information of the parent dialog box is null, recording the identity information of the last executed dialog box as breakpoint identity information; and responding to the problem information according to the response information in the response column of the dialogue unit box, and returning to execute the dialogue unit box corresponding to the breakpoint identity information after the response is completed.
In one embodiment, the processor 502 specifically performs the following functions when executing a dialog box corresponding to the problem information obtained according to the regular matching manner: traversing a plurality of pre-stored dialog unit boxes and configuration information of each dialog unit box, wherein the configuration information comprises a problem regular expression; acquiring a problem regular expression matched with the problem information in a regular matching mode; and taking the dialog box corresponding to the matched problem regular expression as the dialog box corresponding to the problem information.
In one embodiment, after executing the dialog box that has been executed, the processor 502 further performs the following functions after executing the dialog box that has been executed in the previous dialog box that has the same id information as the parent dialog box: acquiring key information in the problem information according to configuration information of the dialogue unit box, wherein the configuration information comprises a variable name of preset key information; and assigning the key information to a variable name to store the key information.
In one embodiment, the processor 502 performs the following functions when executing a response to the question information according to the response information in the response field of the dialog box: acquiring configuration information configured for response information in the dialogue unit box in advance, wherein the configuration information comprises variable names required to be verified; reading a corresponding variable value from a memory according to the variable name; and verifying the variable value so as to match the dialog box of the next stage according to different verification results and answer according to the dialog box of the next stage.
In one embodiment, the processor 502 performs the following functions when executing a response to the question information according to the response information in the response field of the dialog box: acquiring configuration information configured for response information in the dialogue unit box in advance, wherein the configuration information comprises an external system identifier to be called and a variable name required by calling the external system; obtaining a variable value corresponding to a variable name required by calling an external system; and inputting the variable names and the corresponding variable values required by calling the external system as input values to the corresponding external system so as to acquire data information fed back by the external system according to the input values and respond according to the data information.
It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be appreciated by those skilled in the art that all or part of the flow of the method for implementing the automatic response of the above embodiment may be implemented by a computer program to instruct the relevant hardware. The computer program may be stored in a computer readable storage medium. The computer readable storage medium is a non-volatile readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of an embodiment of a method comprising respective dynamic responses as described above.
The computer readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, etc. which may store the program code.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. A method of automatically responding comprising:
acquiring problem information of a user, and acquiring a dialogue unit box corresponding to the problem information according to a regular matching mode, wherein the dialogue unit box comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing the response information corresponding to the problem information or similar problem information;
acquiring an execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequential execution sequence relation among a plurality of dialog unit boxes;
acquiring the identity information of the parent dialog unit of the dialog unit according to the execution sequence relation;
Judging whether the identity information of the parent dialog unit box is null or not;
if the identity information of the parent dialog box is a non-null value, reading the identity information of the last executed dialog box;
judging whether the identity information of the last executed dialog box is the same as the identity information of the parent dialog box;
if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box, responding to the problem information according to the response information in the response column of the dialog box;
after judging whether the identity information of the parent dialog unit box is null, the method further comprises the following steps:
if the identity information of the parent dialog box is null, recording the identity information of the last executed dialog box as breakpoint identity information;
responding to the problem information according to the response information in the response column of the dialogue unit box, and returning to execute the dialogue unit box corresponding to the breakpoint identity information after the response is completed;
after the identity information of the dialog box executed by the last dialog box is the same as the identity information of the parent dialog box, the method further comprises:
Acquiring key information in the problem information according to configuration information of the dialogue unit box, wherein the configuration information comprises a variable name of preset key information;
assigning the key information to a variable name to store the key information;
the responding to the question information according to the response information in the response column of the dialogue unit box comprises the following steps:
acquiring configuration information configured for response information in the dialogue unit box in advance, wherein the configuration information comprises variable names required to be verified;
reading a corresponding variable value from a memory according to the variable name;
and verifying the variable value so as to match the dialog box of the next stage according to different verification results and answer according to the dialog box of the next stage.
2. The method of automatic response according to claim 1, wherein the obtaining the dialog box corresponding to the problem information according to the regular matching method includes:
traversing a plurality of pre-stored dialog unit boxes and configuration information of each dialog unit box, wherein the configuration information comprises a problem regular expression;
acquiring a problem regular expression matched with the problem information in a regular matching mode;
And taking the dialog box corresponding to the matched problem regular expression as the dialog box corresponding to the problem information.
3. The method of automatic answering according to claim 1, wherein said answering said question information according to answer information in an answer column of said dialog box includes:
acquiring configuration information configured for response information in the dialogue unit box in advance, wherein the configuration information comprises an external system identifier to be called and a variable name required by calling the external system;
obtaining a variable value corresponding to a variable name required by calling an external system;
and inputting the variable names and the corresponding variable values required by calling the external system as input values to the corresponding external system so as to acquire data information fed back by the external system according to the input values and respond according to the data information.
4. An automatic response device, comprising:
the unit frame acquisition unit is used for acquiring the problem information of the user and acquiring a dialogue unit frame corresponding to the problem information according to a regular matching mode, wherein the dialogue unit frame comprises a problem bar and a response bar, the problem bar is used for storing the problem information or similar problem information similar to the problem information, and the response bar is used for storing the response information corresponding to the problem information or similar problem information;
The relation acquisition unit is used for acquiring the execution sequence relation of the dialog unit boxes, wherein the execution sequence relation is used for storing the sequential execution sequence relation among a plurality of dialog unit boxes;
the identification acquisition unit is used for acquiring the identification information of the parent-level dialog unit of the dialog unit according to the execution sequence relation;
the judging unit is used for judging whether the identity information of the parent-level dialogue unit box is null or not;
the reading unit is used for reading the identity information of the last executed dialogue unit if the identity information of the parent dialogue unit is a non-null value;
the judging unit is further configured to judge whether the identity information of the last executed dialog unit box is the same as the identity information of the parent dialog unit box;
a response unit, configured to respond to the problem information according to response information in a response column of the dialog box if the identity information of the last executed dialog box is the same as the identity information of the parent dialog box;
after the judging unit, the judging unit is further configured to:
if the identity information of the parent dialog box is null, recording the identity information of the last executed dialog box as breakpoint identity information;
Responding to the problem information according to the response information in the response column of the dialogue unit box, and returning to execute the dialogue unit box corresponding to the breakpoint identity information after the response is completed;
after the identity information of the dialog box executed by the last dialog box is the same as the identity information of the parent dialog box, the method further comprises:
acquiring key information in the problem information according to configuration information of the dialogue unit box, wherein the configuration information comprises a variable name of preset key information;
assigning the key information to a variable name to store the key information;
the responding to the question information according to the response information in the response column of the dialogue unit box comprises the following steps:
acquiring configuration information configured for response information in the dialogue unit box in advance, wherein the configuration information comprises variable names required to be verified;
reading a corresponding variable value from a memory according to the variable name;
and verifying the variable value so as to match the dialog box of the next stage according to different verification results and answer according to the dialog box of the next stage.
5. The apparatus according to claim 4, wherein the unit frame obtaining unit is specifically configured to traverse a plurality of pre-stored dialog unit frames and configuration information of each dialog unit frame, where the configuration information includes a question regular expression; acquiring a problem regular expression matched with the problem information in a regular matching mode; and taking the dialog box corresponding to the matched problem regular expression as the dialog box corresponding to the problem information.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of automatic answering according to any one of claims 1 to 3 when the computer program is executed.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the method of automatic answering according to any one of claims 1 to 3.
CN201910011566.7A 2019-01-07 2019-01-07 Automatic response method, device, computer equipment and storage medium Active CN109783627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910011566.7A CN109783627B (en) 2019-01-07 2019-01-07 Automatic response method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910011566.7A CN109783627B (en) 2019-01-07 2019-01-07 Automatic response method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109783627A CN109783627A (en) 2019-05-21
CN109783627B true CN109783627B (en) 2023-06-30

Family

ID=66499140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910011566.7A Active CN109783627B (en) 2019-01-07 2019-01-07 Automatic response method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109783627B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434383A (en) * 2020-03-23 2021-09-24 北京奇虎科技有限公司 Evaluation method and system for automatically responding APP, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408639A (en) * 2014-10-22 2015-03-11 百度在线网络技术(北京)有限公司 Multi-round conversation interaction method and system
CN107977236A (en) * 2017-12-21 2018-05-01 上海智臻智能网络科技股份有限公司 Generation method, terminal device, storage medium and the question answering system of question answering system
CN108664599A (en) * 2018-05-09 2018-10-16 腾讯科技(深圳)有限公司 Intelligent answer method, apparatus, intelligent answer server and storage medium
CN108804525A (en) * 2018-04-27 2018-11-13 出门问问信息科技有限公司 A kind of intelligent Answering method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9818405B2 (en) * 2016-03-15 2017-11-14 SAESTEK Ses ve Iletisim Bilgisayar Tekn. San. Ve Tic. A.S. Dialog management system
US10521572B2 (en) * 2016-08-16 2019-12-31 Lexisnexis Risk Solutions Inc. Systems and methods for improving KBA identity authentication questions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408639A (en) * 2014-10-22 2015-03-11 百度在线网络技术(北京)有限公司 Multi-round conversation interaction method and system
CN107977236A (en) * 2017-12-21 2018-05-01 上海智臻智能网络科技股份有限公司 Generation method, terminal device, storage medium and the question answering system of question answering system
CN108804525A (en) * 2018-04-27 2018-11-13 出门问问信息科技有限公司 A kind of intelligent Answering method and device
CN108664599A (en) * 2018-05-09 2018-10-16 腾讯科技(深圳)有限公司 Intelligent answer method, apparatus, intelligent answer server and storage medium

Also Published As

Publication number Publication date
CN109783627A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
US12014379B2 (en) Automating communications using an intent classifier
CN110377720B (en) Intelligent multi-round interaction method and system
CN109514586B (en) Method and system for realizing intelligent customer service robot
CN112434501B (en) Method, device, electronic equipment and medium for intelligent generation of worksheet
CN108021934B (en) Method and device for recognizing multiple elements
US20220129491A1 (en) Method for supporting agent and computing device thereof
CN109801631A (en) Input method, device, computer equipment and storage medium based on speech recognition
CN113705249A (en) Dialogue processing method, system, device and computer readable storage medium
CN112529585A (en) Interactive awakening method, device, equipment and system for risk transaction
CN114970559B (en) Intelligent response method and device
CN109783627B (en) Automatic response method, device, computer equipment and storage medium
CN112990868B (en) Automatic paying method, system, equipment and storage medium for vehicle insurance
CN108460077B (en) Index analysis method, system and computer readable storage medium
CN112260933B (en) Communication method, communication device, electronic equipment and medium
CN116933800B (en) Template-based generation type intention recognition method and device
US20150262313A1 (en) Multiplicative incentive mechanisms
CN112929499A (en) Dialogue interaction method and device, computer equipment and computer-readable storage medium
CN116127036A (en) Dialogue processing method and device and electronic equipment
CN112488860B (en) Method and system for processing group list
CN116525093A (en) Prediction method, device, equipment and storage medium for session ending
CN114528850A (en) Punctuation prediction model training method, punctuation adding method and device
CN113704452A (en) Data recommendation method, device, equipment and medium based on Bert model
US20240193190A1 (en) Automated key-value extraction using natural language intents
CN114265505B (en) Human-computer interaction processing method, device, storage medium and electronic device
CN113111643B (en) Information processing method, device and apparatus

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
GR01 Patent grant
GR01 Patent grant