Intelligent customer service response method, device, storage medium and electronic device
By calculating the response ratio of the leaf nodes of the answer rule tree and dynamically adjusting the tree structure, the response performance problem caused by high-frequency answers is solved, and faster response time and higher system efficiency are achieved.
Patent Information
- Application Number
- CN201910637015.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-07-15
AI Technical Summary
In an unmanned customer service scenario, when the answer to a user's frequently asked question is located in the last branch of the answer rule tree, the entire tree structure needs to be traversed, which affects the response performance and prolongs the response time. Especially when the rule configuration is complex and the external interface is called frequently, affect system efficiency.
By calculating the response proportion of the leaf nodes of the answer rule tree, dynamically merging the branch paths of high-frequency answers, inserting them into the upper end of the tree, and deleting branches when the response proportion is lower than the threshold, the tree execution complexity is reduced and the response performance is improved.
By optimizing the execution order of the answer rule tree, the number of traversals is reduced, the response speed is improved, the number of external interface calls is reduced, and the efficiency of the customer service system is improved.
Smart Images

Figure CN112308571B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an intelligent customer service response method, device, computer-readable storage medium and electronic device. Background Art
[0002] In the unmanned customer service scenario, the user asks a question, and the customer service robot makes a targeted response to the user's question based on the user's question, user attributes and classification scenario. Here, the answer to the user's question can be returned according to the answer rule tree configured by the answer answer.
[0003] For example, when the user's intention is to modify the order address, it is necessary to obtain the order number corresponding to the user's question, and then traverse the answer rule tree in depth-first order to find the answer. Specifically, according to the different order statuses, all branches of the answer rule tree are traversed in sequence until a leaf node that satisfies the user's question is found, and the leaf node answer is output. In actual applications, operators cannot estimate the probability of hitting the answer rule tree node. The configuration of the answer rule tree is configured from top to bottom according to business needs. Therefore, when traversing all branches of the answer rule tree, each time it is traversed from top to bottom in depth traversal.
[0004] In some scenarios, if the high-frequency answer to a user's question is a leaf node of the last branch in the answer rule tree, then the entire answer rule tree must be traversed each time before a response is given. In this case, if there are many leaf nodes in the answer tree and the rule configuration is very complex, the response performance will be seriously affected. In addition, when judging most rule nodes, it is necessary to configure components to call external interfaces such as order services. The more times the judgment is made, the slower the response.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide an intelligent customer service response method, device, computer-readable storage medium and electronic device, thereby improving the response speed of customer service response at least to a certain extent.
[0007] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0008] According to a first aspect of an embodiment of the present invention, there is provided a method for intelligent customer service response, the method comprising: obtaining an answer rule tree used by the intelligent customer service response, wherein different branches and nodes of the answer rule tree correspond to different questions; obtaining a first ratio of the number of responses of a leaf node of the answer rule tree to the total number of responses; when the first ratio is greater than or equal to a first set threshold, merging the paths from the root node to the leaf node to form a first branch, which is inserted into the upper end of the answer rule tree.
[0009] In some embodiments, after merging the paths from the root node to the leaf nodes to form a first branch, the method further includes: obtaining a second ratio of the number of answers of the leaf nodes of the first branch to the total number of answers; when the second ratio is less than a second set threshold, deleting the first branch from the answer rule tree.
[0010] In some embodiments, the method further includes: performing a breadth traversal on the answer rule tree, and merging branches with the same characteristics among multiple branches at the same level.
[0011] In some embodiments, the method also includes: generating key-value pair data based on the second branch of the answer rule tree that meets the first set condition, the first set condition including that the nodes between the root node of the second branch and the previous node of the leaf node are the same and are all determined value judgments, and the leaf nodes are mutually exclusive; storing the key-value pair data into a cache, wherein the key data in the key-value pair data is the attribute data of the leaf of the second branch, and the value data is the attribute value data of the leaf of the second branch.
[0012] In some embodiments, the cache is a redis cache.
[0013] In some embodiments, after merging the paths from the root node to the leaf node to form a first branch, the method includes: obtaining a customer request, identifying customer intent based on the customer request; providing slot filling guidance based on the intent identification result; and returning different response answers based on the slot filling data, user attributes, and the answer rule tree formed by the slot filling guidance.
[0014] In some embodiments, the method further includes, when the number of the first branches is at least two, sorting the two first branches according to a first ratio corresponding to the leaf nodes of the first branches, and inserting the sorting result into the upper end of the answer rule tree.
[0015] According to a second aspect of an embodiment of the present invention, an intelligent customer service response device is provided, the device comprising: a rule tree acquisition unit, used to obtain an answer rule tree used for intelligent customer service response, different branches and nodes of the answer rule tree correspond to different questions; a ratio acquisition unit, used to obtain a first ratio of the number of answers of a leaf node of the answer rule tree to the total number of answers; a new branch formation unit, used to merge the root-to-leaf path to form a new branch and insert it into the upper end of the answer rule tree when the first ratio is greater than or equal to a first set threshold.
[0016] According to a third aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the intelligent customer service response method as described in the first aspect of the above embodiment is implemented.
[0017] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent customer service response method as described in the first aspect of the above embodiment.
[0018] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0019] In the technical solutions provided by some embodiments of the present invention, the leaf nodes corresponding to the high-frequency answers are obtained by calculating the response ratios of the answers corresponding to the leaf nodes of the answer rule tree, and new branches are formed based on these leaf nodes and inserted into the upper end of the answer rule tree, thereby reducing the complexity of the answer rule tree execution algorithm and improving the response performance.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0022] Figure 1 The structure diagram of an answer rule tree in the related art is schematically shown;
[0023] Figure 2 A flowchart of an intelligent customer service response method according to an embodiment of the present invention is schematically shown;
[0024] Figure 3 A schematic diagram showing a structure of an answer rule tree according to an embodiment of the present invention;
[0025] Figure 4 A flowchart of a method for intelligent customer service response according to another embodiment of the present invention is schematically shown;
[0026] Figure 5 A schematic diagram showing a structure of an answer rule tree according to another embodiment of the present invention;
[0027] Figure 6 The structure diagram of another answer rule tree in the related art is schematically shown;
[0028] Figure 7 A schematic diagram showing a structure of an answer rule tree according to yet another embodiment of the present invention;
[0029] Figure 8 A flowchart of an intelligent customer service response method according to another embodiment of the present invention is schematically shown;
[0030] Fig. 9 A block diagram of an intelligent customer service response device according to an embodiment of the present invention is schematically shown;
[0031] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present invention will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0033] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0036] In related technologies, such as Figure 1 As shown in the figure, the answer rule tree is configured from top to bottom according to business requirements. If the high-frequency answer to the user's question corresponds to the leaf node of the last branch in the answer rule tree, then the entire answer rule tree must be traversed each time before a response is given. The longer the process of traversing the answer rule tree is, the longer the response time is, which affects the response efficiency of the entire customer service system.
[0037] To solve this problem, an embodiment of the present invention provides an intelligent customer service response method, which dynamically adjusts the execution order of the answer rule tree, adjusts the positions of the leaf nodes corresponding to the high-frequency answers, reduces the complexity of the answer rule tree execution algorithm, and improves the response performance.
[0038] Figure 2 The intelligent customer service response method of an exemplary embodiment of the present invention is schematically shown. The method provided by the embodiment of the present invention can be executed by any electronic device with computer processing capabilities, such as a terminal device and / or a server. Figure 2 , the intelligent customer service response method may include the following steps:
[0039] Step S202, obtaining an answer rule tree used by the intelligent customer service to answer, where different branches and nodes of the answer rule tree correspond to different questions.
[0040] S204, obtaining a first ratio of the number of responses of the leaf nodes of the answer rule tree to the total number of responses.
[0041] Step S206, when the first ratio is greater than or equal to the first set threshold, the paths from the root node to the leaf nodes are merged to form a first branch, which is inserted into the upper end of the answer rule tree.
[0042] In the technical solution of the exemplary embodiment of the present invention, by calculating the response ratio of the answers corresponding to the leaf nodes of the answer rule tree, the leaf nodes with a first ratio greater than the first set threshold are calculated, and the first branch is formed according to these leaf nodes and inserted into the upper end of the answer rule tree. In this way, the response time when calling these high-frequency leaf nodes is short, which reduces the complexity of the answer rule tree execution algorithm, thereby improving the response performance.
[0043] In the embodiment of the present invention, when the number of first branches is at least two, at least two first branches are sorted according to the first ratios corresponding to the leaf nodes of the first branches and inserted into the upper end of the answer rule tree. The first branch with the largest first ratio is located at the uppermost end of the answer rule tree.
[0044] Specifically, when the first threshold is set to 40%, based on the response statistics, it is found that in Figure 1 In the answer rule tree shown in the figure, the first ratio of the answer of the leaf node where answer three is located to the total number of answers is 46%, and the first ratio of the answer of the leaf node where answer five is located to the total number of answers is 41%, both exceeding 40%. At this time, the branches of the leaf nodes where answers three and five are located are merged respectively, sorted according to the size of the first ratio, and then inserted into the upper end of the answer rule tree, forming the following Figure 3 The new answer rule tree is shown.
[0045] When merging the branches of the leaf nodes where answer three or answer five is located, the paths from the root nodes of the branches to the leaf nodes are merged to form a new first branch.
[0046] When the answer ratio corresponding to the leaf node of the newly formed first branch is less than the second set threshold, the first branch can be deleted to reduce the answer response time. Specifically, when deleting the first branch, the second ratio of the number of answers of the leaf node of the first branch to the total number of answers can be obtained, and when the second ratio is less than the second set threshold, the first branch is deleted from the answer rule tree. Here, the second set threshold can be set to 15%.
[0047] like Figure 4 As shown, the intelligent customer service response method in one embodiment of the present invention includes the following steps:
[0048] Step S401, enter the answer rule tree response. Step S401 is executed after receiving the user request.
[0049] Step S402, counting the proportion of all answers. Step S402 is processed asynchronously with step S401. The proportion here is the proportion of the number of answers to the total number of answers, which can be the first proportion or the second proportion. After executing step S402, step S403 and step S406 can be executed.
[0050] Step S403, determine whether there is an answer with a response ratio lower than a second set threshold. New branches with a response ratio lower than the second set threshold can be deleted to shorten the response time. When the answer is yes, execute step S404.
[0051] Step S404, determine whether the branch corresponding to the answer whose answer ratio is lower than the second set threshold is the original branch. If the answer is the original branch, it means that the branch is not a new branch; if the answer is no, it means that the branch is a new first branch.
[0052] Step S405: when the answer is no, delete the branch.
[0053] Step S406, sorting the answers according to the response ratio.
[0054] Step S407, determining whether there is an answer whose response ratio is greater than a first set threshold.
[0055] Step S408: When there is an answer whose response ratio is greater than the first set threshold, it is determined whether there is a new branch corresponding to the answer.
[0056] Step S409, when the answer to step S408 is no, the paths from the root to the leaves are merged to form a new branch, namely the first branch.
[0057] Step S410, determine the position of inserting a new branch into the answer rule tree according to the size of the answer ratio. The position of the new branch can be dynamically adjusted according to the change of the first ratio, and the first branch corresponding to the answer with the largest first ratio is located at the top of the answer rule tree.
[0058] In the embodiment of the present invention, the common branches of the answer rule tree can also be merged. Specifically, after the answer rule tree is configured, the answer rule tree can be traversed in breadth to merge branches with the same characteristics in multiple branches at the same level. Afterwards, the answer rule tree is saved to the database.
[0059] In such Figure 1 In the answer rule tree shown in FIG. 1 , it is determined whether multiple branches at the same level are the same. If two branches at the same level are the same, for example, when both match "order status = completed", the two branches matching "order status = completed" are merged and summarized into the same branch, forming the following: Figure 5 The answer rule tree shown.
[0060] By optimizing the answer rule tree structure through the scheme of common branch merging, the number of matches and external interface calls can be reduced, and the execution efficiency can be improved.
[0061] In an exemplary embodiment of the present invention, the answer rule tree can also be split for mutually exclusive answers of the same type. Specifically, if there are nodes between the root node of the second branch and the previous node of the leaf node that are the same and all are determined value judgments, and the leaf nodes are mutually exclusive, then key-value pair data is generated according to the second branch. The key-value pair data can be key-value data, the key data key is the attribute data of the leaves of the second branch, and the value data value is the attribute value data of the leaves of the second branch. After the key-value pair data is generated, the key-value pair data is stored in a cache, where the cache can be a redis cache. Storing the key-value pair data in a cache is to store the key-value data pair in a redis cache.
[0062] Here, the node is determined to determine the value of the node, indicating that the node is equal to (==) or contains The same node means that the external interface used on the path when matching nodes is the same at each level. When each node between the root node and the previous node of the leaf node is the same and all are determined by the value judgment, and the leaf nodes are mutually exclusive, the determined matching data, that is, the attribute data of the leaf, is used as the key, mapped to the corresponding leaf answer, that is, the attribute value data of the leaf as the value corresponding to the key, and stored in the redis cache.
[0063] like Figure 6 From the root to answer seven and answer eight, there is a definite equal (==) judgment in the order status match, and the order type judgment is also a definite equal judgment. Moreover, the branches of answer seven and answer eight are mutually exclusive based on the order type. We combine "order status" + "order type" to split, forming the following: Figure 6 The answer rule tree shown.
[0064] When receiving a user request, the corresponding data is obtained from a specific external interface according to the matching rules. After combining the data to form key data, the answer is directly read from redis. If there is cache data corresponding to the key data, it is answered directly, otherwise it enters the answer rule tree to answer. It can be seen that splitting the same type of mutually exclusive answers can achieve the purpose of quickly locating the answer, reducing the number and scope of matching, and reducing the number of external interface calls.
[0065] like Figure 8 As shown, in an intelligent customer service response method of an exemplary embodiment of the present invention, after obtaining the customer request, step S811 is executed to identify the customer's intention according to the customer request, and to perform slot filling guidance according to the intention recognition result, so as to return different response answers according to the slot filling data, user attributes and answer rule tree formed by the slot filling guidance.
[0066] In step S812, the answer rule tree is read and the answer process is executed. The answer rule tree is stored in the database. When executing the answer rule tree, the data in the cache can also be called.
[0067] In step S813, the answer rule tree is updated according to the answer ratio and stored in the database. That is, according to the first ratio and the second ratio, the first branch whose answer ratio is greater than the first set threshold is added to the answer rule tree, or the first branch whose answer ratio is lower than the second set threshold is deleted. The database here can be a relational database management system called mySQL.
[0068] When configuring the answer rule tree, execute step S801 to determine whether there is a common conditional branch. If the result is no, execute step S803. If the result is yes, execute step S802.
[0069] In step S802, if there are common conditional branches, common branches are merged, and then step S803 is executed.
[0070] In step S803, it is determined whether there are mutually exclusive answers of the same type. If the answer is no, the answer rule tree is stored in the database.
[0071] In step S804, if there are mutually exclusive answers of the same type, the mutually exclusive answers of the same type are split and stored in the database, and key-value pair data is formed and stored in the cache.
[0072] In the intelligent customer service response method provided in some embodiments of the present invention, the leaf nodes corresponding to the high-frequency answers are obtained by calculating the response ratio of the answers corresponding to the leaf nodes of the answer rule tree, and new branches are formed according to these leaf nodes and inserted into the upper end of the answer rule tree, thereby reducing the complexity of the answer rule tree execution algorithm and improving the response performance.
[0073] The following describes an embodiment of the device of the present invention, which can be used to execute the intelligent customer service response method of the present invention. Fig. 9 The intelligent customer service response device 900 provided by the device embodiment of the present invention includes:
[0074] The rule tree acquisition unit 902 can be used to obtain an answer rule tree used by the intelligent customer service to answer, and different branches and nodes of the answer rule tree correspond to different questions.
[0075] The ratio acquisition unit 904 may be used to acquire a first ratio of the number of responses of the leaf nodes of the answer rule tree to the total number of responses.
[0076] The new branch forming unit 906 may be used to merge the paths from the root to the leaves to form a new branch and insert it into the upper end of the answer rule tree when the first ratio is greater than or equal to the first set threshold.
[0077] The intelligent customer service response device 900 provided by the device embodiment of the present invention also includes a deletion unit, a merging unit and a cache unit.
[0078] The ratio acquisition unit 904 may also be configured to acquire a second ratio of the number of responses of the leaf nodes of the first branch to the total number of responses.
[0079] The deleting unit may be configured to delete the first branch from the answer rule tree when the second ratio is less than a second set threshold.
[0080] The merging unit can be used to perform breadth traversal on the answer rule tree and merge branches with the same features in multiple branches at the same level.
[0081] The cache unit includes a generation subunit and a storage unit. The generation subunit is used to generate key-value pair data according to the second branch of the answer rule tree that meets the first set condition, and the first set condition includes that the nodes between the root node of the second branch and the previous node of the leaf node are the same and are all determined value judgments, and the leaf nodes are mutually exclusive. The storage subunit is used to store the key-value pair data into the cache, wherein the key data in the key-value pair data is the attribute data of the leaf of the second branch, and the value data is the attribute value data of the leaf of the second branch.
[0082] Since the various functional modules of the intelligent customer service response device in the exemplary embodiment of the present invention correspond to the steps of the exemplary embodiment of the above-mentioned intelligent customer service response method, for details not disclosed in the embodiment of the device of the present invention, please refer to the embodiment of the above-mentioned intelligent customer service response method of the present invention.
[0083] In the intelligent customer service response device provided in the embodiment of the present invention, the response ratio of the answers corresponding to the leaf nodes of the answer rule tree is calculated to obtain the leaf nodes corresponding to the high-frequency answers, and new branches are formed according to these leaf nodes and inserted into the upper end of the answer rule tree, thereby reducing the complexity of the answer rule tree execution algorithm and improving the response performance.
[0084] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 of an electronic device suitable for implementing an embodiment of the present invention. Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0085] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. Various programs and data required for system operation are also stored in the RAM 1003. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0086] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0087] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present application are executed.
[0088] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0090] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0091] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the intelligent customer service response method described in the above embodiment.
[0092] For example, the electronic device can implement Figure 1 As shown in: Step S102, obtaining the answer rule tree used by the intelligent customer service to answer, wherein different branches and nodes of the answer rule tree correspond to different questions; S104, obtaining a first ratio of the number of answers of the leaf nodes of the answer rule tree to the total number of answers; Step S106, when the first ratio is greater than or equal to a first set threshold, merging the paths from the root node to the leaf nodes to form a first branch, and inserting it into the upper end of the answer rule tree.
[0093] For example, the electronic device can achieve Figure 4 and Figure 8 The steps shown.
[0094] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0095] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0096] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0097] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An intelligent customer service response method, characterized in that: The method comprises: Obtain an answer rule tree used by the intelligent customer service to answer, where different branches and nodes of the answer rule tree correspond to different questions; Obtaining a first ratio of the number of answers of the leaf nodes of the answer rule tree to the total number of answers; When the first ratio is greater than or equal to a first set threshold, the paths from the root node to the leaf nodes are merged to form a first branch, which is inserted into the upper end of the answer rule tree.
2. The method according to claim 1, characterized in that After merging the paths from the root node to the leaf node to form a first branch, the method further includes: Obtaining a second ratio of the number of responses of the leaf nodes of the first branch to the total number of responses; When the second ratio is less than a second set threshold, the first branch is deleted from the answer rule tree.
3. The method according to claim 1, characterized in that The method further comprises: The answer rule tree is traversed in breadth, and branches with the same characteristics in multiple branches at the same level are merged.
4. The method according to claim 1, characterized in that: The method further comprises: Generate key-value pair data according to the second branch of the answer rule tree that meets the first setting condition, wherein the first setting condition includes that the nodes between the root node of the second branch and the previous node of the leaf node are the same and are all determined value judgments, and the leaf nodes are mutually exclusive; The key-value pair data is stored in a cache, wherein the key data in the key-value pair data is the attribute data of the leaf of the second branch, and the value data is the attribute value data of the leaf of the second branch.
5. The method according to claim 4, characterized in that The cache is a redis cache.
6. The method according to claim 1, characterized in that After merging the paths from the root node to the leaf node to form a first branch, the method further includes: Obtaining a customer request, and identifying customer intent based on the customer request; Provide slot filling guidance based on intent recognition results; Different response answers are returned according to the slot filling data formed by the slot filling guide, user attributes and the answer rule tree.
7. The method according to claim 1, characterized in that The method further includes, when the number of the first branches is at least two, sorting the two first branches according to a first ratio corresponding to the leaf nodes of the first branches, and inserting the sorted results into the upper end of the answer rule tree.
8. An intelligent customer service response device, characterized in that: The device comprises: A rule tree acquisition unit, used to acquire an answer rule tree used by the intelligent customer service to answer, wherein different branches and nodes of the answer rule tree correspond to different questions; A ratio acquisition unit, used to acquire a first ratio of the number of answers of the leaf nodes of the answer rule tree to the total number of answers; A new branch forming unit is used to merge the paths from the root to the leaves to form a new branch and insert it into the upper end of the answer rule tree when the first ratio is greater than or equal to a first set threshold.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the intelligent customer service response method as described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the intelligent customer service response method as described in any one of claims 1 to 7.
