Intelligent reply method and device based on natural language processing, equipment and medium
By building an initial knowledge graph and natural language matching model, the problem of insufficient accuracy of the intelligent question-and-answer system when processing complex queries is solved, and more efficient and accurate acquisition of reply information is achieved, suitable for querying knowledge in specific domains.
Patent Information
- Application Number
- CN202411293228.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-07
AI Technical Summary
The existing intelligent question-and-answer system does not have sufficient answer accuracy when dealing with user queries that are complex, vague or professional vocabulary. Especially when it involves questions about knowledge in specific fields, the system's answers cannot meet the needs of users.
By constructing the initial knowledge graph and generating common reply links, the natural language matching model is used to determine whether the user's question information matches the target reply information in the knowledge graph. If it matches, the reply information will be output. If it doesn't match, the forwarding service staff will respond.
Improves the efficiency and accuracy of the replies information, ensuring that users can quickly obtain accurate answers or transfer professionals to handle complex queries.
Smart Images

Figure CN119271777A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent reply method, device, equipment and medium based on natural language processing. Background Art
[0002] With the development of artificial intelligence and natural language processing technology, intelligent customer service systems are increasingly favored by enterprises and users. This system can understand and process users' natural language queries, provide fast and accurate services, and greatly improve the efficiency and quality of customer service. However, existing customer service systems still have difficulties in understanding complex, ambiguous or professional user queries, especially when dealing with questions involving knowledge in specific fields. The system's answers often cannot meet the needs of users, and the accuracy of intelligent question and answering through intelligent customer service systems is poor. Therefore, the intelligent question and answer method in the prior art method has the problem of insufficient answer accuracy. Summary of the invention
[0003] The embodiments of the present invention provide an intelligent reply method, apparatus, device and medium based on natural language processing, aiming to solve the problem of insufficient reply accuracy existing in the intelligent question-answering method in the prior art method.
[0004] In a first aspect, an embodiment of the present invention provides an intelligent reply method based on natural language processing, wherein the method comprises:
[0005] Construct an initial knowledge graph corresponding to the input historical reply information according to preset knowledge graph construction rules;
[0006] Extract corresponding reply information from the initial knowledge graph according to the historical reply information and generate common reply links for users to click;
[0007] If a question is received from a user, it is determined whether the initial knowledge graph contains target answer information matching the question according to a preset natural language matching model;
[0008] If the initial knowledge graph contains matching target answer information, obtain the target answer information and output it;
[0009] If the initial knowledge graph does not contain matching target answer information, the question information is sent to the service window to be transferred to the service staff for answering.
[0010] In a second aspect, an embodiment of the present invention further provides an intelligent reply device based on natural language processing, wherein the device is used to execute the intelligent reply method based on natural language processing as described in the first aspect above, and the device includes:
[0011] An initial knowledge graph construction unit, used to construct an initial knowledge graph corresponding to the input historical reply information according to a preset knowledge graph construction rule;
[0012] A common reply link generating unit, configured to extract corresponding reply information from the initial knowledge graph according to the historical reply information and generate common reply links for users to click;
[0013] An information matching unit, configured to determine, upon receiving question information input by a user, whether the initial knowledge graph contains target answer information matching the question information according to a preset natural language matching model;
[0014] A target answer information output unit, used to obtain and output the target answer information if the initial knowledge graph contains matching target answer information;
[0015] The question information sending unit is used to send the question information to the service window to transfer the question information to the service staff for answering if the initial knowledge graph does not contain matching target answer information.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device, wherein the device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0017] Memory, used to store computer programs;
[0018] The processor is used to implement the steps of the intelligent reply method based on natural language processing described in the first aspect when executing the program stored in the memory.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the intelligent reply method based on natural language processing as described in the first aspect above are implemented.
[0020] The embodiments of the present invention provide a method, device, equipment and medium for intelligent reply based on natural language processing, the method comprising: constructing an initial knowledge graph corresponding to historical reply information through knowledge graph construction rules and generating corresponding common reply links; judging whether the initial knowledge graph contains target reply information matching the question information input by the user according to the natural language matching model, if so, obtaining the target reply information for output, if not, sending the question information to the service window to transfer the service personnel for reply. The above-mentioned intelligent reply method can parse historical reply information based on natural language and construct an initial knowledge graph, generate common reply links corresponding to the initial knowledge graph for users to click and quickly obtain reply content, accurately obtain target reply information matching the question information input by the user based on the natural speech matching model and the initial knowledge graph, and improve the efficiency and accuracy of obtaining reply information. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0022] Figure 1 A method flow chart of an intelligent reply method based on natural language processing provided by an embodiment of the present invention;
[0023] Figure 2 A schematic block diagram of an intelligent reply device based on natural language processing provided by an embodiment of the present invention;
[0024] Figure 3 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0027] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0028] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0029] See also Figure 1 , as shown in the figure, an embodiment of the present invention application provides an intelligent reply method based on natural language processing, which is applied to a user terminal or a management server. The method is executed by an application installed in the user terminal or the management server. The user terminal can be a laptop, desktop computer, tablet computer or mobile phone and other devices. The management server is a server configured within an enterprise or organization for replying to the question information input by the user. When the method is applied to the user terminal, the user can directly input the question information in the terminal; when the method is applied to the management server, the management server can provide services to the client, and the client sends the question information to the management server. The management server executes the above method and obtains the reply information and outputs it to the client. Figure 1 As shown, the method includes steps S110 to S150.
[0030] S110. Construct an initial knowledge graph corresponding to the input historical reply information according to preset knowledge graph construction rules.
[0031] The initial knowledge graph corresponding to the input historical reply information is constructed according to the preset knowledge graph construction rules. The user of the user terminal or the administrator of the management server can input the historical reply information, and after receiving the historical reply information, the corresponding initial knowledge graph is constructed according to the pre-configured knowledge graph construction rules. The initial knowledge graph records the data in the form of a tree structure and can reflect the association relationship between the data.
[0032] In a specific embodiment, step S110 includes sub-steps: extracting corresponding reply features from the historical reply information according to the feature extraction model in the knowledge graph construction rule; classifying the reply features according to the structured classification rules in the knowledge graph construction rule to determine the structured type corresponding to each reply feature; and associating and combining the historical reply information according to the structured type of the reply features to generate a corresponding initial knowledge graph.
[0033] Among them, the knowledge graph construction rules include a feature extraction model and a structured classification rule. The feature extraction model is also an Embedding model. Through the feature extraction model, corresponding feature information can be extracted from the text content. The structured classification rule is the specific rule for classifying reply features. Different reply features correspond to different structured types. By associating and combining the reply content of the structured types, the initial knowledge graph can be obtained.
[0034] Specifically, for the reply content in the historical reply information that contains a reply to the question content, each reply content corresponds to a question content. The feature extraction model can be used to convert the characters in the reply content into corresponding character vectors respectively. For example, the character vector corresponding to the character "发" in "发票" is [1,0,0,1,1,0,1,1,0,0,1,1,1,0,1,0], and the character vector corresponding to the character "票" is [1,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0]. All the character vectors corresponding to a paragraph of reply content are input into the input node of the feature extraction model at the same time, so as to perform correlation analysis on the character vectors. The feature extraction model can be a neural network model constructed based on artificial intelligence. Through the output node in the feature extraction model, the feature information corresponding to this paragraph of reply content can be obtained. The feature information is used to quantitatively represent the features of the reply content.
[0035] Furthermore, classify the reply features according to the structured classification rule, calculate the matching between the reply features of each reply content and the type features in the structured classification rule, and obtain the type corresponding to the type feature with the highest matching degree as the structured type corresponding to the reply feature. The types included in the structured classification rule can be composed of a first-level type - a second-level type - a third-level type. For example, a type included in the structured classification rule is "Invoice - Information Abnormality - Amount Error".
[0036] According to the structured type of each reply feature, the reply features can be associated and combined in the text content corresponding to the historical reply information. The upper-level type in the structured type can be associated with multiple lower-level types. For example, the upper-level type "Invoice" can be associated with "Information Abnormality", "Mailing Abnormality", "Invoice Issuing Guide", etc. Then, through the structured type, the text content corresponding to the reply feature can be associated and combined to form an initial knowledge graph in a tree-branch shape.
[0037] S120. Extract the corresponding reply information from the initial knowledge graph according to the historical reply information and generate a common reply link for the user to click.
[0038] According to the historical reply information, the corresponding reply information is extracted from the initial knowledge graph and a common reply link is generated for the user to click. Further, the corresponding reply information can be extracted from the initial knowledge graph according to the historical reply information, and a common reply link is generated according to the extracted reply information. The common reply link can be clicked by the user. When the user clicks the common reply link on the page, the reply content corresponding to the common reply link can be quickly obtained.
[0039] In a specific embodiment, step S120 includes sub-steps: performing frequency statistics on the question content of the historical reply information to obtain corresponding question frequency statistical information; obtaining common question content corresponding to the extraction parameters according to preset extraction parameters and the question frequency statistical information; obtaining the reply information corresponding to the common question content in the initial knowledge graph as target reply information; and generating common reply links corresponding to each common question content according to the common question content and the target reply information.
[0040] Specifically, the frequency of the question content contained in the historical answer information can be counted. If the same question content appears, the statistical frequency of the question content is increased by one; the frequency of repeated question content is superimposed and counted to obtain question frequency statistical information.
[0041] Corresponding common reply contents are extracted from the historical reply information according to the pre-configured extraction parameters and question frequency statistics. Specifically, the question contents can be sorted from high to low according to the frequency of each question content in the question frequency statistics, and the top-ranked multiple question contents are extracted from the sorted question contents according to the extraction parameters as common question contents. For example, if the extraction parameter is 3, the top three question contents are extracted from the sorted question contents as common question contents. The extraction parameter can also be a ratio value. For example, the number of sorted question contents is 30, and the ratio value set in the extraction parameter is 0.1. The number of question contents is multiplied by the ratio value and the product is rounded down to obtain the extraction quantity; then the corresponding extraction quantity can be calculated to be 3, and the top three question contents are extracted from the sorted question contents as common question contents.
[0042] Obtain the reply content corresponding to the common question content in the initial knowledge graph, search the initial knowledge graph according to the common question content, and obtain the reply content corresponding to the common question content as the target reply content. Common question links corresponding to each common question content can be generated based on the acquired common question content and the target reply content. Specifically, a corresponding link pop-up page can be generated based on the target reply content, and the link pop-up page contains the target reply content. A link address is generated based on the common question content corresponding to the target reply content, and the link address points to the link pop-up page. The project content (Key value) of the link address is "common question content", and the underlying link (value) of the link address is the URL (Uniform Resource Locator) address of the link pop-up page. A set of common question links can be obtained by combining the link address with the link pop-up page. The above method can generate a corresponding set of common question links based on each common question content.
[0043] In a specific embodiment, after generating common answer links corresponding to each common question content according to the common question content and the target answer information, it also includes: configuring the page content of a preset user guide page according to the common answer link to obtain a configured user guide page.
[0044] Furthermore, the page content of the user guide page can be configured according to the common reply links, the link address in the generated common reply links can be added to the corresponding position in the user guide page, and the link pop-up page can be added to the user guide page and hidden. When the user clicks on a link address in the user guide page, the link pop-up page corresponding to the link address is displayed, so that the user can obtain the reply content corresponding to the link address.
[0045] S130: If a question is received from a user, determine whether the initial knowledge graph contains target answer information that matches the question according to a preset natural language matching model.
[0046] If the question information input by the user is received, the preset natural language matching model is used to determine whether the initial knowledge graph contains the target answer information that matches the question information. In addition to the common answer links, the user guide page is also configured with a text input box, in which the user can enter the question information. When the question information input by the user is received, the natural language matching model is used to determine whether the initial knowledge graph contains the corresponding target answer information.
[0047] In a specific embodiment, step S130 includes sub-steps: extracting corresponding question feature information from the question information according to the feature extraction model in the knowledge graph construction rule; obtaining the matching probability between the question feature information and the reply feature in the initial knowledge graph according to the natural language matching model; obtaining the reply feature with the highest matching probability and determining whether the matching probability of the reply feature meets the preset matching conditions; if the matching conditions are met, obtaining the reply content corresponding to the reply feature with the highest matching probability as the target reply information.
[0048] Specifically, the corresponding question feature information can be extracted from the question information according to the feature extraction model in the knowledge graph construction rules, wherein the process of extracting question feature information is similar to the process of extracting reply features from historical reply information. Furthermore, the matching probability between the question feature information and the reply features of each reply content in the initial knowledge graph can be obtained according to the natural speech matching model. Here, a natural speech matching model can be constructed based on the GPT model (such as GPT4, Gemini, Grok, etc.); the initial knowledge graph constructed above is learned through the natural speech matching model. After learning, the feature values of different dimensions in the input feature information have different weight values in the model. The more important the feature value in the input feature information, the greater the weight of this feature value. Determine the feature values that overlap between the question feature information and the reply feature, and extract the weights of the overlapping feature values from the learned natural speech matching model, so as to analyze the two sets of feature information to obtain the matching probability. Among them, the calculation formula for the matching probability can be: Among them, M is the total number of feature values that overlap between the question feature information and the answer feature, and P i is the weight corresponding to the i-th coincident eigenvalue, N is the total number of eigenvalues in the question feature information (N≥M), P j is the weight corresponding to the jth eigenvalue in the question feature information.
[0049] The answer feature with the highest matching probability is obtained and it is determined whether the matching probability of the answer feature reaches the probability threshold set in the matching condition, such as the probability threshold can be set to 80%. If the matching probability of the obtained answer feature is greater than the probability threshold, it is determined that the matching condition is met; if the matching probability of the obtained answer feature is not greater than the probability threshold, it is determined that the matching condition is not met.
[0050] If the matching condition is met, the reply content corresponding to the reply feature with the highest matching probability is obtained from the initial knowledge graph as the target reply information; if the matching condition is not met, the matching target reply information cannot be obtained.
[0051] S140: If the initial knowledge graph contains matching target response information, obtain the target response information for output.
[0052] If the initial knowledge graph contains matching target answer information, the target answer information is obtained and output. If the initial knowledge graph contains target answer information that matches the question information input by the user, the target answer information is obtained and output and displayed, and the user can directly view the target answer information.
[0053] In a specific embodiment, after step S140, the method further includes the steps of: combining the target reply information with the question information and adding them to the historical reply information to update the historical reply information; and updating the common reply links according to the updated historical reply information and the initial knowledge graph.
[0054] After combining the target reply information with the question information, the combined information obtained can be added to the historical reply information, that is, after obtaining the target reply information, the target reply information can be used as the historical reply content that has been replied to. After adding information and updating the historical reply information, the number of reply contents in the historical reply information increases by one. At this time, the common reply links can be updated according to the updated historical reply information and the initial knowledge graph, that is, the question frequency statistics information is obtained again based on the historical reply information, and the common reply links are updated according to the above method steps. Furthermore, the link update cycle time can be configured (such as configuring the link update cycle time to 1 day or 1 week), and each time a link update cycle time passes, an update operation of the common reply link is triggered.
[0055] S150: If the initial knowledge graph does not contain matching target answer information, send the question information to the service window to transfer to the service staff for answering.
[0056] If the initial knowledge graph does not contain the target answer information that matches the question information, the question information is sent to the service window to be transferred to the service staff for reply. If the initial knowledge graph does not contain the target answer information that matches the question information, the question information is sent to the service window, that is, it is transferred to the service staff for reply. At this time, the manual reply content entered by the service staff can be displayed in the service window, and the user can view the manual reply content in the service window.
[0057] In a specific embodiment, after step S150, the following steps are also included: if a manual reply content is received from a service personnel input into the service window, new graph information corresponding to the manual reply content is generated according to the knowledge graph construction rules; and the new graph information is added to the initial knowledge graph to update the initial knowledge graph.
[0058] If a new manual reply content is received from the service personnel, new graph information corresponding to the manual reply content is generated according to the knowledge graph construction rules, that is, the reply features are first extracted from the manual reply content according to the feature extraction model, and the structured type corresponding to the reply features is determined, and the reply features and the structured type are combined to obtain the new graph information. The new graph information is added to the initial knowledge graph, so that the initial knowledge graph can be updated. Specifically, a new lower-level type can be added to the upper-level type of the initial knowledge graph based on the new graph information, and the manual reply content can be added accordingly, so as to expand the content in the initial knowledge graph.
[0059] In the intelligent reply method based on natural language processing disclosed in the above embodiment, the method includes: constructing an initial knowledge graph corresponding to historical reply information through knowledge graph construction rules and generating corresponding common reply links; judging whether the initial knowledge graph contains target reply information matching the question information input by the user according to the natural language matching model, if it does, obtaining the target reply information for output, if not, sending the question information to the service window to transfer the service personnel for reply. The above intelligent reply method can parse historical reply information based on natural language and construct an initial knowledge graph, generate common reply links corresponding to the initial knowledge graph, so that users can click and quickly obtain reply content, accurately obtain target reply information matching the question information input by the user based on the natural speech matching model and the initial knowledge graph, and improve the efficiency and accuracy of obtaining reply information.
[0060] The embodiment of the present invention also provides an intelligent reply device based on natural language processing, which can be configured in a user terminal or a management server, and is used to execute any embodiment of the intelligent reply method based on natural language processing. Figure 2 , Figure 2 A schematic block diagram of an intelligent reply device based on natural language processing provided in an embodiment of the present invention.
[0061] like Figure 2 As shown, the intelligent reply device 100 based on natural language processing includes an initial knowledge graph construction unit 110, a common reply link generation unit 120, an information matching unit 130, a target reply information output unit 140 and a question information sending unit 150.
[0062] The initial knowledge graph construction unit 110 is used to construct an initial knowledge graph corresponding to the input historical reply information according to preset knowledge graph construction rules.
[0063] The common reply link generation unit 120 is used to extract corresponding reply information from the initial knowledge graph according to the historical reply information and generate common reply links for users to click.
[0064] The information matching unit 130 is used to determine whether the initial knowledge graph contains target answer information matching the question information based on a preset natural language matching model upon receiving question information input by the user.
[0065] The target reply information output unit 140 is used to obtain and output the target reply information if the initial knowledge graph contains matching target reply information.
[0066] The question information sending unit 150 is used to send the question information to the service window to transfer the question to the service staff for answering if the initial knowledge graph does not contain matching target answer information.
[0067] The intelligent reply device based on natural language processing provided in the embodiment of the present invention applies the above-mentioned intelligent reply method based on natural language processing, constructs an initial knowledge graph corresponding to the historical reply information through the knowledge graph construction rules and generates corresponding common reply links; determines whether the initial knowledge graph contains target reply information that matches the question information input by the user according to the natural language matching model, and if so, obtains the target reply information for output; if not, sends the question information to the service window to transfer the service personnel for reply. The above-mentioned intelligent reply method can parse the historical reply information based on natural language and construct the initial knowledge graph, generate common reply links corresponding to the initial knowledge graph, so that the user can click and quickly obtain the reply content, and accurately obtain the target reply information that matches the question information input by the user based on the natural speech matching model and the initial knowledge graph, thereby improving the efficiency and accuracy of obtaining the reply information.
[0068] The above-mentioned intelligent reply device based on natural language processing can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer device shown.
[0069] See also Figure 3 , Figure 3 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a user terminal or a management server for executing an intelligent reply method based on natural language processing to implement intelligent reply.
[0070] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a communication interface 505 connected via a communication bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0071] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute an intelligent reply method based on natural language processing, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0072] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0073] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an intelligent reply method based on natural language processing.
[0074] The communication interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0075] The processor 502 is used to run a computer program 5032 stored in the memory to implement the corresponding functions of the above-mentioned intelligent reply method based on natural language processing.
[0076] Those skilled in the art will understand that Figure 3 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 3 The embodiments shown are consistent and will not be described again here.
[0077] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0078] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned intelligent reply method based on natural language processing are implemented.
[0079] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0080] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0082] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0083] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.
[0084] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An intelligent reply method based on natural language processing, characterized in that: The method comprises: Construct an initial knowledge graph corresponding to the input historical reply information according to preset knowledge graph construction rules; Extract corresponding reply information from the initial knowledge graph according to the historical reply information and generate common reply links for users to click; If a question is received from a user, it is determined whether the initial knowledge graph contains target answer information matching the question according to a preset natural language matching model; If the initial knowledge graph contains matching target answer information, obtain the target answer information and output it; If the initial knowledge graph does not contain matching target answer information, the question information is sent to the service window to be transferred to the service staff for answering.
2. The intelligent reply method based on natural language processing according to claim 1 is characterized in that: The step of constructing an initial knowledge graph corresponding to the input historical reply information according to a preset knowledge graph construction rule includes: Extracting corresponding reply features from the historical reply information according to the feature extraction model in the knowledge graph construction rule; Classifying the answer features according to the structured classification rules in the knowledge graph construction rules to determine the structured type corresponding to each answer feature; The historical reply information is associated and combined according to the structured type of the reply feature to generate a corresponding initial knowledge graph.
3. The intelligent reply method based on natural language processing according to claim 1 is characterized in that: The extracting corresponding reply information from the initial knowledge graph according to the historical reply information and generating common reply links includes: Perform frequency statistics on the question content of the historical answer information to obtain corresponding question frequency statistical information; Acquire common question contents corresponding to the extraction parameters according to the preset extraction parameters and the question frequency statistical information; Obtaining answer information corresponding to the common question content in the initial knowledge graph as target answer information; A common answer link corresponding to each of the common question contents is generated according to the common question contents and the target answer information.
4. The intelligent reply method based on natural language processing according to claim 3 is characterized in that: After generating common answer links corresponding to each common question content according to the common question content and the target answer information, the method further includes: The page content of the preset user guidance page is configured according to the common reply link to obtain a configured user guidance page.
5. The intelligent reply method based on natural language processing according to claim 2 is characterized in that: The determining, according to a preset natural language matching model, whether the initial knowledge graph contains target answer information matching the question information includes: Extracting corresponding question feature information from the question information according to the feature extraction model in the knowledge graph construction rule; Acquire the matching probability between the question feature information and the answer feature in the initial knowledge graph according to the natural language matching model; Obtaining the answer feature with the highest matching probability and determining whether the matching probability of the answer feature satisfies a preset matching condition; If the matching condition is met, the reply content corresponding to the reply feature with the highest matching probability is obtained as the target reply information.
6. The intelligent reply method based on natural language processing according to claim 1, characterized in that: After sending the question information to the service window, the method further includes: If a manual reply content input by a service staff into the service window is received, newly added graph information corresponding to the manual reply content is generated according to the knowledge graph construction rule; The newly added graph information is added to the initial knowledge graph to update the initial knowledge graph.
7. The intelligent reply method based on natural language processing according to claim 1 is characterized in that: After obtaining the target reply information and outputting it, the method further includes: combining the target reply information with the question information and adding them to the historical reply information to update the historical reply information; The common reply links are updated according to the updated historical reply information and the initial knowledge graph.
8. An intelligent reply device based on natural language processing, characterized in that: The intelligent reply device based on natural language processing is used to execute the intelligent reply method based on natural language processing according to any one of claims 1 to 7, and the device includes: An initial knowledge graph construction unit, used to construct an initial knowledge graph corresponding to the input historical reply information according to a preset knowledge graph construction rule; A common reply link generating unit, configured to extract corresponding reply information from the initial knowledge graph according to the historical reply information and generate common reply links for users to click; An information matching unit, configured to determine, upon receiving question information input by a user, whether the initial knowledge graph contains target answer information matching the question information according to a preset natural language matching model; A target answer information output unit, used to obtain and output the target answer information if the initial knowledge graph contains matching target answer information; The question information sending unit is used to send the question information to the service window to transfer the question information to the service staff for answering if the initial knowledge graph does not contain matching target answer information.
9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the intelligent reply method based on natural language processing described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent reply method based on natural language processing as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Material map-based AI customer service construction method and system
CN120470092A
Government affair digital human dynamic interaction method and system based on multi-modal large model
CN120821813A
A Dynamic Interaction Method and System for Government Digital Humans Based on Multimodal Large Model
CN120821813B