Intelligent man-machine conversation processing method and device, equipment and storage medium
Through the intelligent human-computer dialogue processing method combining regular expressions and neural network models, the problem of high training cost of human-computer dialogue system is solved, efficient response and low maintenance costs are achieved, and the flexibility and adaptability of the system are improved.
Patent Information
- Application Number
- CN202411183686.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing human-computer dialogue system has high training costs, high computing resources requirements, and poor adaptability to specific scenarios. Especially for fixed modes or high-frequency task requests, using complex machine learning models seems to be inexpensive and efficient enough.
Using an intelligent human-computer dialogue processing method combining regular expressions and neural network models, the user input is matched through regular expressions, and the neural network model is used to process it when there is no match. The self-attention mechanism and cache mechanism are used to optimize response speed and resource utilization. Rate.
It significantly reduces development and maintenance costs, improves the response speed and resource utilization of the human-computer dialogue system, improves the flexibility and adaptability of the system, supports online update of matching rules, and quickly responds to user needs.
Smart Images

Figure CN118942458A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent dialogue technology, and in particular to an intelligent human-computer dialogue processing method, device, equipment and storage medium. Background Art
[0002] With the development of artificial intelligence technology, human-computer dialogue systems have been widely used in customer service, smart home, virtual assistants, etc. Most of the current human-computer dialogue systems use deep learning technology, especially natural language processing models based on neural networks to understand user intentions and generate responses.
[0003] Although these models have strong generalization and expression capabilities, they also have some limitations, such as long training cycles, high computing resource requirements, and poor adaptability to specific scenarios. In addition, for some fixed-mode or high-frequency task requests, the use of complex machine learning models is not cost-effective.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide an intelligent human-computer dialogue processing method, device, equipment and storage medium, aiming to solve the technical problem of high training cost of human-computer dialogue system.
[0006] To achieve the above objectives, the present application proposes an intelligent human-computer dialogue processing method, which is applied to an intelligent human-computer dialogue system. The intelligent human-computer dialogue processing method includes:
[0007] Get user input information;
[0008] Match the information using a regular expression to obtain a regular matching result;
[0009] When the regular matching result is no match, the information is processed through a neural network model to obtain a target processing result.
[0010] In one embodiment, before the step of matching the information by using a regular expression, the method further includes:
[0011] Defining each function of the intelligent human-computer dialogue system by a set of keywords;
[0012] A corresponding regular expression is created based on the function defined by the keyword.
[0013] In one embodiment, the method further comprises:
[0014] Acquire real-time information input by users, and identify new needs based on the real-time information;
[0015] A new regular expression is generated based on the new requirement.
[0016] In one embodiment, the step of matching the information using a regular expression to obtain a regular matching result includes:
[0017] Removing irrelevant characters, normalizing, and correcting spelling of the information to obtain preprocessed information;
[0018] Performing precise matching on the preprocessed information to determine a completely matching regular expression;
[0019] When the exact match fails to determine a completely matching regular expression, fuzzy matching is performed on the preprocessed information to determine a fuzzy matching regular expression;
[0020] A regular matching result is determined based on the complete matching regular expression and the fuzzy matching regular expression.
[0021] In one embodiment, when the regular matching result is no match, before the step of processing the information through a neural network model to obtain a target processing result, the step includes:
[0022] Get historical user input information;
[0023] Performing function annotation on the historical user information, and dividing the annotated historical user information into a training set and a test set;
[0024] The pre-trained model is trained using the training set and the test set to obtain a neural network model.
[0025] In one embodiment, the step of processing the information through a neural network model to obtain a target processing result includes:
[0026] Removing irrelevant characters, normalizing, correcting spellings, and performing word vectorization processing on the information to obtain preprocessed information;
[0027] The preprocessed information is parsed through the self-attention mechanism of the neural network model to obtain the target processing result.
[0028] In one embodiment, before the step of parsing the preprocessed information through the self-attention mechanism of the neural network model, it also includes:
[0029] Get the results of the previous round of regular matching and the target processing results of the previous round of neural network output;
[0030] The output of the neural network model is optimized based on the result of the previous round of regular matching and the target processing result of the previous round of neural network output.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes an intelligent human-computer dialogue processing device, the device comprising:
[0032] An information acquisition module is used to obtain information input by the user;
[0033] A regular matching module, used to match the information through a regular expression to obtain a regular matching result;
[0034] The model processing module is used to process the information through a neural network model to obtain a target processing result when the regular matching result is no match.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes an intelligent human-computer dialogue processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the intelligent human-computer dialogue processing method described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the intelligent human-computer dialogue processing method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the intelligent human-computer dialogue processing method as described above.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] Obtain information input by the user; match the information through regular expressions to obtain regular matching results; when the regular matching result is no match, process the information through a neural network model to obtain the target processing result. By combining the use of neural networks and regular matching methods, the response speed and resource utilization of the human-computer dialogue system are improved, and the development and maintenance costs are significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0042] Figure 1 A flowchart of the first embodiment of the intelligent human-computer dialogue processing method of the present application is provided;
[0043] Figure 2 A flowchart of the second embodiment of the intelligent human-computer dialogue processing method of the present application is provided;
[0044] Figure 3 A flowchart of the third embodiment of the intelligent human-computer dialogue processing method of the present application is provided;
[0045] Figure 4 This is a schematic diagram of the module structure of the intelligent human-computer dialogue processing device according to the embodiment of the present application;
[0046] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the intelligent human-computer dialogue processing method in the embodiment of the present application.
[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an intelligent human-computer dialogue processing device, etc. The following takes the intelligent human-computer dialogue processing device as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides an intelligent human-computer dialogue processing method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the intelligent human-computer dialogue processing method of the present application.
[0052] In this embodiment, the intelligent human-computer dialogue processing method includes steps S10 to S30:
[0053] Step S10, obtaining information input by the user;
[0054] It should be noted that the information input by the user can be voice input or text input.
[0055] Furthermore, real-time information input by users is obtained, and new needs are identified based on the real-time information;
[0056] It should be noted that in the user's input, the intelligent human-computer dialogue processing system will recognize specific entities (such as time, place, name, proper nouns, etc.), which are crucial to understanding user needs.
[0057] Step S20, matching the information with a regular expression to obtain a regular matching result;
[0058] It should be noted that regular expression is a text processing tool that uses a single string to describe and match a series of strings that conform to a certain syntactic rule.
[0059] It should be understood that the regular expression matching result includes finding a regular expression that matches the information and not finding a regular expression that matches the information.
[0060] Furthermore, before step S20, the method further includes:
[0061] Define each function of the intelligent human-computer dialogue system through a set of keywords;
[0062] Create corresponding regular expressions based on the functions defined by keywords.
[0063] Generate new regular expressions based on new requirements.
[0064] It should be noted that the specific functions that need to be implemented in the human-computer dialogue system need to be clearly defined. These functions may include but are not limited to daily operations such as querying order status, playing music, setting reminders, etc. Each function needs to be precisely defined in order to build matching rules later.
[0065] It should be understood that for each function, a set of keywords and their corresponding regular expressions are defined. The design of these expressions needs to be flexible enough to capture the various expressions that users may use. For example, for the "play music" function, the regular expression should be able to match different expressions such as "play a song" and "play music randomly"; by analyzing a large amount of user conversation data, keywords related to specific functions are extracted, and these keywords will serve as the basis of regular expressions to help the system understand the user's intentions more accurately.
[0066] In the specific implementation, flexible regular expressions are designed according to the application scenarios to ensure that a variety of user input situations can be covered.
[0067] Step S30, when the regular matching result is no match, the information is processed through the neural network model to obtain the target processing result.
[0068] It should be noted that the neural network model is responsible for parsing these more complex or irregular sentences and outputting the corresponding processing results. This mechanism ensures that even in the face of unknown or complex situations, it can be accurately processed through the powerful neural network model.
[0069] It should be understood that this strategy can store commonly used matching results through a cache mechanism, reduce repeated calculations, and further improve response speed. For those functions that are frequently called, the cache mechanism is particularly important, which can significantly reduce latency and improve user experience.
[0070] In the specific implementation, for the sentences that are not matched by the regular expression, they are passed as input to the pre-trained neural network model.
[0071] It should be understood that compared with the traditional method that completely relies on the neural network model, the present invention combines the neural network with the regular matching, giving full play to the advantages of the combination of the two technical solutions. By mixing the neural network and the regular matching method, the present technical solution brings the following significant beneficial results:
[0072] Fast response speed: By using string matching and carefully designed regular expressions, the present invention can quickly identify and parse users' high-frequency, regular sentences, significantly improving the system's response speed and enabling users to obtain instant feedback.
[0073] Short development cycle: For urgent or high-priority needs, this solution can complete the update and deployment of matching rules in a short time, which is much faster than the development cycle of traditional neural network models, which usually takes several months to complete.
[0074] Low maintenance cost: Compared with the neural network model, the technical solution of the present invention is easier to maintain and does not require a professional team to continuously monitor and optimize, thus reducing the maintenance cost of the system.
[0075] Strong flexibility: For fixed patterns or regular sentences, the method of the present invention can provide a more flexible processing method. For simple, clear and regular instructions, the use of regular matching can respond to user needs more efficiently.
[0076] Easy to expand and update: The present invention supports online updating of matching rules and can be quickly adjusted according to new user needs, thereby improving the adaptability and scalability of the system.
[0077] Strong interpretability: Compared with the black box operation of the neural network model, the technical solution of the present invention is easier to understand and explain, which helps to enhance the transparency and credibility of the system.
[0078] Improved user satisfaction: For flexible statements that are difficult for neural networks to handle, the present invention significantly improves the user experience and increases user satisfaction by providing fast, accurate and personalized responses.
[0079] This embodiment provides an intelligent human-computer dialogue processing method, which obtains information input by a user; matches the information through a regular expression to obtain a regular matching result; when the regular matching result is no match, processes the information through a neural network model to obtain a target processing result. By combining the use of a neural network and a regular matching method, the response speed and resource utilization of the human-computer dialogue system are improved, and the development and maintenance costs are significantly reduced.
[0080] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 After step S20, the intelligent human-computer dialogue processing method further includes steps S201 to S204:
[0081] Step S201, removing irrelevant characters, normalizing and correcting spelling of the information to obtain pre-processed information;
[0082] It should be noted that removing irrelevant characters means removing punctuation marks, special characters and numbers in the text (if they are irrelevant to the task).
[0083] Normalization converts all text to a uniform case, usually lowercase, to avoid differences in case, for example, converting "Hello" to "hello".
[0084] Spelling correction is the identification and correction of spelling errors.
[0085] It should be understood that the input information may be a speech signal. If it is a speech signal, the speech signal is preprocessed, including denoising, normalizing the volume, segmenting speech segments, etc., to improve the accuracy of recognition.
[0086] Step S202, performing precise matching on the preprocessed information to determine a completely matching regular expression;
[0087] It should be noted that in the current human-computer dialogue system, almost all user input is sent to the neural network model for processing. Although this approach can handle complex and changeable language structures, it also brings some obvious shortcomings and disadvantages, such as extended response time, high resource consumption, long development cycle, high maintenance cost, limited flexibility, high training data requirements, and poor interpretability.
[0088] In the specific implementation, this regular expression is run in the information to check whether there is a part that fully matches the defined pattern. If a match is found, it means that the information conforms to the expected strict format; if not, fuzzy matching is required.
[0089] Step S203, when the exact match fails to determine a completely matching regular expression, fuzzy matching is performed on the preprocessed information to determine a fuzzy matching regular expression;
[0090] In the specific implementation, when the exact match fails, the restrictions of the regular expression are relaxed to allow some changes. If a match is found, it means that the text conforms to the fuzzy format and the corresponding function can be found; if not found, it needs to be processed by a neural network.
[0091] Step S204: determining a regular matching result based on the completely matching regular expression and the fuzzy matching regular expression.
[0092] It should be noted that if the regular matching result is a successful match, the preset function module is directly called to perform the corresponding operation.
[0093] It should be understood that the regular matching result includes finding a regular expression that matches the information and not finding a regular expression that matches the information, wherein the regular expression that matches the information includes a fuzzy matching regular expression and a completely matching regular expression.
[0094] This strategy also supports online updating of matching rules to respond to new user needs in a timely manner. This means that when new user needs arise, the system can respond within days, which is much faster than the development cycle of neural network models, which usually takes months to complete.
[0095] This embodiment provides an intelligent human-computer dialogue processing method, which can quickly identify and parse users' high-frequency and common sentences by using string matching and carefully designed regular expressions, significantly improving the response speed of the system and enabling users to obtain instant feedback; for urgent or high-priority needs, it can complete the update and deployment of matching rules in a short time, and supports online updating of matching rules, which can be quickly adjusted according to new user needs, improving the adaptability and scalability of the system.
[0096] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 3 , step S30, including steps S301-S302:
[0097] Step S301, removing irrelevant characters, normalizing, correcting spellings, and vectorizing the information to obtain pre-processed information;
[0098] It should be noted that removing irrelevant characters means removing punctuation marks, special characters and numbers in the text (if they are irrelevant to the task).
[0099] Normalization converts all text to a uniform case, usually lowercase, to avoid differences in case, for example, converting "Hello" to "hello".
[0100] Spelling correction is the identification and correction of spelling errors.
[0101] Word vectorization is the process of mapping words into numerical vector space to facilitate processing by neural networks.
[0102] It should be understood that the input information may be a speech signal. If it is a speech signal, the speech signal is preprocessed, including denoising, normalizing the volume, segmenting speech segments, etc., to improve the accuracy of recognition.
[0103] Step S302, parse the preprocessed information through the self-attention mechanism of the neural network model to obtain the target processing result.
[0104] In the specific implementation, when the user input fails to be hit by the regular match, the system automatically calls the neural network for processing; the neural network model is responsible for parsing more complex or non-fixed-pattern statements and outputting the corresponding processing results.
[0105] Furthermore, before step S302, the method further includes:
[0106] Get historical user input information;
[0107] Perform function annotation on historical user information, and divide the annotated historical user information into a training set and a test set;
[0108] The pre-trained model is trained using the training set and the test set to obtain a neural network model.
[0109] It should be noted that in order to ensure the accuracy of parsing, the neural network model needs to be fully trained to cover as many user input scenarios as possible.
[0110] Furthermore, the result of the previous round of regular matching and the target processing result output by the previous round of neural network are obtained;
[0111] The output of the neural network model is optimized based on the results of the previous round of regular matching and the target processing results of the previous round of neural network output.
[0112] It should be noted that context understanding and memory: In order to better understand the user's continuous input, the neural network model can be designed with context memory capabilities, combined with the regular matching hits in the previous round or the neural network's replies, so as to maintain coherence and consistency during the conversation; this capability is particularly important for processing complex requests involving multiple rounds of conversations, ensuring that the system can correctly track the conversation process and make appropriate responses.
[0113] This embodiment provides an intelligent human-computer dialogue processing method, which processes information that cannot be matched by a regular matching formula in the human-computer dialogue through a neural network. Through training, the neural network can learn a large amount of language data, thereby continuously improving its dialogue ability; the neural network can also capture contextual information in the dialogue, so that the dialogue system can generate more accurate and relevant responses based on the previous dialogue content.
[0114] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the intelligent human-computer dialogue processing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0115] This application also provides an intelligent human-computer dialogue processing device, please refer to Figure 4 , the intelligent human-computer dialogue processing device comprises:
[0116] The information acquisition module 10 is used to acquire information input by the user;
[0117] A regular matching module 20 is used to match information through a regular expression to obtain a regular matching result;
[0118] The model processing module 30 is used to process the information through the neural network model to obtain the target processing result when the regular matching result is no match.
[0119] The intelligent human-computer dialogue processing device provided by the present application adopts the intelligent human-computer dialogue processing method in the above embodiment, which can solve the technical problem of high training cost of the human-computer dialogue system. Compared with the prior art, the beneficial effects of the intelligent human-computer dialogue processing device provided by the present application are the same as the beneficial effects of the intelligent human-computer dialogue processing method provided by the above embodiment, and other technical features in the intelligent human-computer dialogue processing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0120] The present application provides an intelligent human-computer dialogue processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the intelligent human-computer dialogue processing method in the above-mentioned embodiment one.
[0121] Reference below Figure 5 , which shows a schematic diagram of the structure of an intelligent human-computer dialogue processing device suitable for implementing the embodiment of the present application. The intelligent human-computer dialogue processing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The intelligent human-computer dialogue processing device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0122] like Figure 5As shown, the intelligent human-computer dialogue processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the intelligent human-computer dialogue processing device are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the intelligent human-computer dialogue processing device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows an intelligent human-computer dialogue processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0123] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include 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 device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0124] The intelligent human-computer dialogue processing device provided by the present application adopts the intelligent human-computer dialogue processing method in the above embodiment, which can solve the technical problem of high training cost of the human-computer dialogue system. Compared with the prior art, the beneficial effects of the intelligent human-computer dialogue processing device provided by the present application are the same as the beneficial effects of the intelligent human-computer dialogue processing method provided by the above embodiment, and the other technical features in the intelligent human-computer dialogue processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0125] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0126] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0127] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the intelligent human-computer dialogue processing method in the above-mentioned embodiment.
[0128] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, 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 this embodiment, the 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, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0129] The above-mentioned computer-readable storage medium may be included in the intelligent human-computer dialogue processing device; or it may exist independently without being assembled into the intelligent human-computer dialogue processing device.
[0130] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the intelligent human-computer dialogue processing device, the intelligent human-computer dialogue processing device: obtains information input by the user; matches the information through regular expressions to obtain regular matching results; when the regular matching result is no match, processes the information through a neural network model to obtain a target processing result.
[0131] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0132] 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 application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / 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.
[0133] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0134] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned intelligent human-computer dialogue processing method, and can solve the technical problem of high training costs of human-computer dialogue systems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the intelligent human-computer dialogue processing method provided by the above-mentioned embodiment, and will not be repeated here.
[0135] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned intelligent human-computer dialogue processing method when executed by a processor.
[0136] The computer program product provided by this application can solve the technical problem of high training cost of human-computer dialogue system. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the intelligent human-computer dialogue processing method provided by the above embodiment, which will not be repeated here.
[0137] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An intelligent human-computer dialogue processing method, characterized in that: The intelligent human-computer dialogue processing method is applied to an intelligent human-computer dialogue system, and the intelligent human-computer dialogue processing method includes: Get user input information; Match the information using a regular expression to obtain a regular matching result; When the regular matching result is no match, the information is processed through a neural network model to obtain a target processing result.
2. The intelligent human-computer dialogue processing method as claimed in claim 1, characterized in that: Before the step of matching the information by regular expressions, the method further includes: Defining each function of the intelligent human-computer dialogue system by a set of keywords; A corresponding regular expression is created based on the function defined by the keyword.
3. The intelligent human-computer dialogue processing method as claimed in claim 2, characterized in that: The method further comprises: Acquire real-time information input by users, and identify new needs based on the real-time information; A new regular expression is generated based on the new requirement.
4. The intelligent human-computer dialogue processing method as claimed in claim 1, characterized in that: The step of matching the information by regular expressions to obtain regular matching results includes: Removing irrelevant characters, normalizing, and correcting spelling of the information to obtain preprocessed information; Performing precise matching on the preprocessed information to determine a completely matching regular expression; When the exact match fails to determine a completely matching regular expression, fuzzy matching is performed on the preprocessed information to determine a fuzzy matching regular expression; A regular matching result is determined based on the complete matching regular expression and the fuzzy matching regular expression.
5. The intelligent human-computer dialogue processing method as claimed in claim 1, characterized in that: Before the step of processing the information by a neural network model to obtain a target processing result when the regular matching result is no match, the method includes: Get historical user input information; Performing function annotation on the historical user information, and dividing the annotated historical user information into a training set and a test set; The pre-trained model is trained using the training set and the test set to obtain a neural network model.
6. The intelligent human-computer dialogue processing method as claimed in claim 1, characterized in that: The step of processing the information through a neural network model to obtain a target processing result includes: Removing irrelevant characters, normalizing, correcting spellings, and performing word vectorization processing on the information to obtain preprocessed information; The preprocessed information is parsed through the self-attention mechanism of the neural network model to obtain the target processing result.
7. The intelligent human-computer dialogue processing method as claimed in claim 6, characterized in that: Before the step of parsing the preprocessed information through the self-attention mechanism of the neural network model, it also includes: Get the results of the previous round of regular matching and the target processing results of the previous round of neural network output; The output of the neural network model is optimized based on the result of the previous round of regular matching and the target processing result of the previous round of neural network output.
8. An intelligent human-computer dialogue processing device, characterized in that: The device comprises: An information acquisition module is used to obtain information input by the user; A regular matching module, used to match the information through a regular expression to obtain a regular matching result; The model processing module is used to process the information through a neural network model to obtain a target processing result when the regular matching result is no match.
9. An intelligent human-computer dialogue processing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the intelligent human-computer dialogue processing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the intelligent human-computer dialogue processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A resource recommendation method and device
CN109241431A
Intention recognition method and device applied to intelligent customer service robot
CN110096570A
Customer service question and answer processing method and system for retrieving multiple rounds of conversations
CN111046132A
Semantic recognition method and device, computer equipment and storage medium
CN112149410A
Intelligent digital newspaper automatic abstract and voice interaction news chat method and system thereof
CN112562669A
