CN118364068A - Intelligent question-answering method, device, equipment and medium - Google Patents
Intelligent question-answering method, device, equipment and medium Download PDFInfo
- Publication number
- CN118364068A CN118364068A CN202410353816.6A CN202410353816A CN118364068A CN 118364068 A CN118364068 A CN 118364068A CN 202410353816 A CN202410353816 A CN 202410353816A CN 118364068 A CN118364068 A CN 118364068A
- Authority
- CN
- China
- Prior art keywords
- keyword
- text information
- keywords
- operation behavior
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000006399 behavior Effects 0.000 claims abstract description 137
- 238000004458 analytical method Methods 0.000 claims abstract description 60
- 238000012545 processing Methods 0.000 claims description 45
- 238000004891 communication Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 12
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 230000007704 transition Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 239000011159 matrix material Substances 0.000 description 6
- 238000003058 natural language processing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000006386 memory function Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Machine Translation (AREA)
Abstract
The application relates to the field of artificial intelligence, in particular to an intelligent question-answering method, device, equipment and medium, which are used for realizing that an intelligent question-answering system generates high-quality, accurate and targeted output information. The method comprises the following steps: the first device obtains first text information. The first device performs semantic analysis on the first text information to obtain a first keyword corresponding to the first text information. Wherein, the keywords of the text information are used for representing the semantics of the text information. The first device determines the operation behaviors corresponding to the first keywords according to the stored operation behavior information corresponding to the first keywords corresponding to the keywords. The operation behavior information corresponding to the stored keywords is obtained according to the business content corresponding to the first text information. And the first equipment executes the operation behavior corresponding to the first keyword.
Description
Technical Field
The application relates to the field of artificial intelligence, in particular to an intelligent question-answering method, device, equipment and medium.
Background
In the field of natural language processing (natural language processing, NLP), along with the continuous development of deep learning technology, a pre-training language model has made remarkable progress, so that the performance of various natural language processing tasks is greatly improved. While existing pre-trained language models have high performance, how to efficiently guide these models to accomplish a particular task remains a challenging problem.
Prompt engineering (prompt engineering) is a technique that directs models to generate high quality, accurate, and targeted outputs by designing, experiment, and optimizing input prompts for pre-trained language models.
At present, the existing technical scheme can generally solve the problem proposed by a user through prompting an engineering technology language model. However, when a user performs multiple information interactions with the language model, the language model often cannot generate high-quality, accurate and targeted output information through the existing prompt engineering technology.
Disclosure of Invention
The embodiment of the application provides an intelligent question-answering method, device, equipment and medium, which are used for realizing that an intelligent question-answering system generates high-quality, accurate and targeted output information.
In a first aspect, the present application provides an intelligent question-answering method, which includes: the first device obtains first text information. The first device performs semantic analysis on the first text information to obtain a first keyword of the first text information, wherein the keyword of the text information is used for representing the semantic meaning of the text information. The first device determines the operation behavior corresponding to the first keyword according to the stored operation behavior information corresponding to each keyword, wherein the stored operation behavior information corresponding to the keywords is obtained according to the service content corresponding to the first text information. And the first equipment executes the operation behavior corresponding to the first keyword.
By adopting the method, the first equipment determines and executes the operation behaviors corresponding to the first keywords according to the operation behavior information corresponding to the pre-stored keywords, so that high-quality, accurate and targeted output information can be generated.
In one implementation manner, the first device may determine, according to a semantic analysis result of the first text information, a first keyword from a preset keyword library, where a similarity between the first keyword and the semantic analysis result of the first text information meets a set threshold.
By adopting the method, the keywords in the preset keyword library are used as the first keywords, so that the professional question-answering capability of the follow-up intelligent question-answering system on the knowledge in the business field and the semantic analysis capability of the professional text information can be improved.
In one implementation, the first device may determine a plurality of first keywords from the keyword library based on the semantic analysis result. The similarity between the first keywords and the semantic analysis results meets a threshold.
In one implementation manner, when the similarity between the keyword in the keyword library and the semantic analysis result of the first text information does not meet the set threshold, the first device may use the semantic analysis result of the first text information as the first keyword. The first device may update the first keyword in the keyword library.
In one implementation manner, the first device may determine the operation behavior information corresponding to the first keyword according to the service corresponding to the first text information.
In one implementation manner, the first device obtains second text information, where service content corresponding to the second text information is the same as service content corresponding to the first text information. And the first equipment performs semantic analysis on the second text information to acquire a second keyword of the second text information. The first device determines the operation behaviors corresponding to the second keywords according to the operation behaviors corresponding to the first keywords and the stored operation behavior information corresponding to the keywords. And the first equipment executes the operation behavior corresponding to the second keyword.
In one implementation manner, the first device determines, according to the stored state information corresponding to each operation behavior, a system state corresponding to the operation behavior corresponding to the first keyword as a first state, where the state information is used to indicate a state of the system. And the first equipment determines the operation behaviors corresponding to the first state and the second keyword according to the stored operation behavior information corresponding to the states and the keywords.
In a second aspect, the present application provides an intelligent question answering apparatus, which includes a communication module and a processing module. Wherein,
And the communication module is used for acquiring the first text information. The processing module is used for carrying out semantic analysis on the first text information to obtain a first keyword of the first text information, wherein the keyword of the text information is used for representing the semantic meaning of the text information. The processing module is further used for determining the operation behaviors corresponding to the first keywords according to the stored operation behavior information corresponding to the keywords, and the stored operation behavior information corresponding to the keywords is obtained according to the service content corresponding to the first text information. The processing module is further used for executing the operation behavior corresponding to the first keyword.
In one implementation, the processing module is specifically configured to: according to the semantic analysis result of the first text information, determining a first keyword from a preset keyword library, wherein the similarity between the first keyword and the semantic analysis result of the first text information meets a set threshold.
In one implementation, the processing module is specifically configured to: and determining a plurality of first keywords from the keyword library according to the semantic analysis result. The similarity between the first keywords and the semantic analysis results meets a threshold.
In one implementation manner, when the similarity between the keyword in the keyword library and the semantic analysis result of the first text information does not meet the set threshold, the processing module is specifically configured to: and taking the semantic analysis result of the first text information as a first keyword. The first keyword is updated in the keyword library.
In one implementation, the processing module is specifically configured to: and determining the operation behavior information corresponding to the first keyword according to the service corresponding to the first text information.
In one implementation manner, the communication module is further configured to obtain second text information, where service content corresponding to the second text information is the same as service content corresponding to the first text information. The processing module is also used for carrying out semantic analysis on the second text information to obtain a second keyword of the second text information. The processing module is further used for determining the operation behaviors corresponding to the second keywords according to the operation behaviors corresponding to the first keywords and the stored operation behavior information corresponding to the keywords. And the processing module is also used for executing the operation behavior corresponding to the second keyword.
In one implementation, the processing module is specifically configured to: and determining the system state corresponding to the operation behavior corresponding to the first keyword as a first state according to the stored state information corresponding to each operation behavior, wherein the state information is used for indicating the state of the system. And determining the operation behaviors corresponding to the first state and the second keyword according to the stored operation behavior information corresponding to the keywords in each state.
In a third aspect, the present application provides an electronic device comprising:
A memory for storing program instructions;
A processor for invoking program instructions stored in the memory and executing the steps comprised by the method according to any of the first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any one of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
The technical effects of the second aspect to the fifth aspect and any one of the designs thereof may be referred to as the technical effects of the corresponding designs in the first aspect, and will not be described herein.
Drawings
FIG. 1 is a schematic flow chart of an intelligent question-answering method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an intelligent question-answering device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application. Embodiments of the application and features of the embodiments may be combined with one another arbitrarily without conflict. Also, while a logical order of illustration is depicted in the flowchart, in some cases the steps shown or described may be performed in a different order than presented.
The terms first and second in the description and claims of the application and in the above-mentioned figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The term "plurality" in the present application may mean at least two, for example, two, three or more, and embodiments of the present application are not limited.
In the technical scheme of the application, the data is collected, transmitted, used and the like, and all meet the requirements of national relevant laws and regulations.
Before introducing the intelligent question-answering method provided by the embodiment of the application, the technical background of the embodiment of the application is described in detail for facilitating understanding.
Prompt engineering is an important technology in the field of artificial intelligence (ARTIFICIAL INTELLIGENCE, AI), especially in natural language processing. Prompt engineering is a technique for optimizing input prompts to guide a model to generate high quality, accurate, and targeted outputs.
In natural language processing, prompt engineering is typically used to construct questions or text that represents tasks such that a pre-trained language model generates high quality, accurate, and targeted outputs from the prompt text.
In the existing intelligent question-answering system, when a user inputs a question into the intelligent question-answering system, a corresponding prompt text is generally required to be constructed, so that the intelligent question-answering system generates accurate output to solve the problem of the user. However, when a user does not construct a corresponding prompt text or performs multiple information interactions with the intelligent question-answering system, the intelligent question-answering system often cannot generate high-quality, accurate and targeted output.
In order to solve the technical problems, the embodiment of the application provides an intelligent question-answering method, device, equipment and medium, which are used for realizing that an intelligent question-answering system generates high-quality, accurate and targeted output information.
In the application, the method comprises the following steps: the first device obtains first text information. The first device performs semantic analysis on the first text information to obtain a first keyword corresponding to the first text information. Wherein, the keywords of the text information are used for representing the semantics of the text information. The first device determines the operation behaviors corresponding to the first keywords according to the stored operation behavior information corresponding to the first keywords corresponding to the keywords. The operation behavior information corresponding to the stored keywords is obtained according to the business content corresponding to the first text information. And the first equipment executes the operation behavior corresponding to the first keyword.
By adopting the method, the first equipment determines and executes the operation behaviors corresponding to the first keywords according to the operation behavior information corresponding to the pre-stored keywords, so that high-quality, accurate and targeted output information can be generated.
Further, the first device may be a processing device for performing the method of the present application, or may be a processing apparatus, such as a processor or a processing module, for performing the method of the present application in a computer system, and the present application is not particularly limited.
Fig. 1 is a schematic flow chart of an intelligent question-answering method according to an embodiment of the present invention. Taking the first device as an execution body as an example, the process may include the following steps:
s101, the first device acquires first text information.
Specifically, the business person may input the first text information through an input device (such as a mouse, a keyboard, a touch screen, etc.) of the intelligent question-answering system. For example, a business person may input first text information to the intelligent question-answering system by entering text through a keyboard. Or the business personnel can input the first text information into the intelligent question-answering system in a mode of converting the voice information into the text information through the voice recognition equipment. In addition, the first text information can be input to the intelligent question-answering system in other modes, and the application is not particularly limited.
S102, the first device performs semantic analysis on the first text information, and determines at least one first keyword corresponding to the first text information. Wherein, the keywords of the text information are used for representing the semantics of the text information.
Specifically, the first device may perform semantic analysis on the first text information according to a preset language processing model, and generate a first keyword for representing the semantic meaning of the text information according to a result of the semantic analysis. For example, if the text information to be processed is "the computer cannot access the internet", the first device performs voice analysis on the text information according to the language processing model, and generates a first keyword of "network failure" according to the result of semantic analysis for characterizing the text information.
Or the first device may perform semantic analysis on the first text information according to a preset language processing model, and extract a corresponding first keyword from the first text information according to a result of the semantic analysis. Taking the above example as an example, if the text information to be processed is "internet surfing disabled" of the computer, the first device performs voice analysis on the text information according to the language processing model, and extracts "internet surfing disabled" from the first text information as a first keyword of the text information according to a result of the semantic analysis.
In one or more embodiments, the first device may determine the first keyword from a preset keyword library according to a semantic analysis result of the first text information. The similarity between the first keyword and the semantic analysis result of the first text information meets a set threshold.
In particular, the keyword library may include related keywords of a particular business. The keywords in the keyword library may be preset. For example, the intelligent question-answering system includes a storage device, and keywords in a keyword library may be stored in the storage device in advance. Or the application may also include a storage device that may store keywords in the keyword library. In addition, other ways of storing keywords in the keyword library may be adopted, and details thereof will not be described here.
The first device may perform semantic analysis on the first text information according to a preset language processing model, determine, from a preset keyword library, a keyword whose semantic similarity with the text information meets a set threshold according to a result of the semantic analysis, and use the keyword as the first keyword. For example, a keyword having the highest semantic similarity with the text information in the keyword library may be used as the keyword of the text information, i.e., the first keyword. For example, the first text information is "the computer cannot access the internet", and the preset keyword library includes "the network is interrupted", so that the "the network is interrupted" can be used as the first keyword of "the computer cannot access the internet".
In addition, the similarity threshold in the present application may be arbitrarily set, for example, the similarity threshold may be 90%. For example, the similarity threshold of the keywords is 90%, and when the maximum value of the semantic similarity between the keywords in the keyword library and the text information is greater than or equal to 90%, the keyword with the highest similarity can be used as the keyword of the text information. When the maximum value of the semantic similarity between the keywords in the keyword library and the text information is smaller than 90%, new keywords can be generated according to the text information, and the keywords are stored in the keyword library.
In addition, keyword libraries may be created for information of corresponding business content. Wherein, different businesses can correspond to different intelligent question-answering systems. Different intelligent question-answering systems may correspond to different keyword libraries, or different intelligent question-answering systems may correspond to the same keyword library.
For example, a business person may input expertise to a language model through an input device, and the language model may perform semantic word segmentation processing on the expertise to obtain a plurality of keywords, thereby constructing a keyword library.
Alternatively, the first device may determine a plurality of first keywords from the keyword library according to the semantic analysis result. The similarity between the first keywords and the semantic analysis results meets a threshold.
Based on the embodiment, the keywords in the preset keyword library are used as the keywords of the first text information, so that the professional question-answering capability of the follow-up intelligent question-answering system on the knowledge of the business field and the semantic analysis capability of the professional text information can be improved.
In one or more embodiments, the first device may use a semantic analysis result of the first text information as the first keyword. The first device may update the first keyword in the keyword library.
Specifically, if the similarity between the keyword in the keyword and the semantic analysis result of the information of the first text does not meet the set threshold, the first device may use the semantic analysis result of the first text information as the first keyword, and store the first keyword in the keyword library.
Optionally, the first device may determine the operation behavior information corresponding to the first keyword according to the service corresponding to the first text information. For example, when the similarity between the keyword in the keyword library and the semantic analysis result of the first text information does not meet the set threshold, the first device may use the operation behavior information corresponding to the keyword with the highest similarity between the senses of the first keyword as the operation behavior information corresponding to the first keyword. Furthermore, the application can also comprise verification equipment, the first equipment can send the first keyword and the corresponding operation behavior information to the verification equipment after determining the operation behavior information corresponding to the first keyword, and the verification equipment can check and verify the accuracy of the operation behavior information.
Based on the embodiment, the accuracy of determining the operation behavior corresponding to the first text information can be improved by adopting the method, so that the accuracy of the intelligent question-answering system is improved.
S103, the first device determines the operation behaviors corresponding to the first keywords according to the stored operation behavior information corresponding to the keywords. The operation behavior information corresponding to the stored keywords is obtained according to the business content corresponding to the first text information.
Specifically, the operation behavior information corresponding to each keyword may be set according to the specified service content, and different services may correspond to different operation behavior information corresponding to each keyword. For example, if the service is designated as a network after-sales service, the operation behavior corresponding to the keyword may be configured according to the service content of the service. The operation behavior corresponding to the keyword "network disruption" may be "collect network ID of client, e-mail".
And generating and storing operation behavior information corresponding to the corresponding keywords according to the specific business content. For example, if the intelligent question-answering system includes a storage device, the operation behavior information corresponding to each keyword may be stored in the storage device in advance. Or the application can also comprise a storage device which can store the operation behavior information corresponding to each keyword. Or the operation behavior information corresponding to each keyword can be stored in a keyword library. In addition, the operation behavior information corresponding to each keyword may be stored in other manners, which are not exemplified here.
After obtaining the keywords, the first device may determine, according to the keywords, an operation behavior corresponding to the keywords from operation behavior information corresponding to each keyword stored in the first device.
The first device may determine, by using a table lookup method, an operation behavior corresponding to the keyword according to the keyword. Table 1 is a correspondence table between keywords and operation behaviors provided in the embodiment of the present application. As shown in table 1, different keywords correspond to different operation behaviors, and the corresponding operation behaviors can be determined according to the keywords by a table look-up method.
TABLE 1
Keyword(s) | Operational behavior |
Keyword 1 | Operational behavior 1 |
Keyword 2 | Operational behavior 2 |
Keyword 3 | Operational behavior 3 |
Keyword 4 | Operational behavior 4 |
Keyword 5 | Operational behavior 5 |
In addition, the first device may obtain, according to the keyword, an operation behavior corresponding to the keyword in other manners, and the present application is not limited specifically.
In one or more embodiments, the operational behavior information corresponding to each keyword includes a state transition matrix. The state transition matrix may be used to indicate correspondence between states, keywords, and operational behavior.
Specifically, the state transition matrix may include a correspondence between states and keywords. Wherein different states may correspond to different keywords. One state may correspond to at least one keyword.
The states in the state transition matrix may include all states of the intelligent question-answering system. Wherein the state may be a system state. Taking the specific service as a network after-sales service as an example, the state of the intelligent question-answering system corresponding to the service comprises greeting, intention recognition, demand information collection, network line quality information collection, problem solving and session ending.
The state transition matrix may also include state-to-state transition relationships. The transition relation between the states can be set according to the corresponding business content.
Exemplary, table 2 is a state transition table of a network after-sales service provided in an embodiment of the present application. As shown in table 2, the state of the intelligent question-answering system corresponding to the service is a greeting, and when the keyword of the text information to be processed received by the system is a greeting sentence, the greeting state is converted into the state of intention recognition.
TABLE 2
Current state of | Next state | Keyword(s) |
Greeting card | Intent recognition | Greeting sentence |
Intent recognition | Demand information collection | Determining demand intention |
Demand information collection | Network line quality information collection | Network failure |
Network line quality information collection | Problem solving | Collecting all information |
Network line quality information collection | Network line quality information collection | There is still uncollected information |
Problem solving | Demand information collection | There are other problems |
Problem solving | Ending the dialog | No other problems |
In one or more embodiments, the first device may determine the converted state according to the state transition matrix, the current state, and keywords of the text information to be processed. And determining the operation behavior corresponding to the text information to be processed according to the converted state.
In particular, the transition between states may be triggered by keywords of the text information to be processed. That is, the first device may determine the next state according to the current state and the keyword of the text information to be processed. It is understood that the same keyword may trigger different state transitions in different states. For example, the current state is network line quality information collection, and when the keyword of the text information to be processed is "no other problem", the current state is converted into a problem-solving state. The current state is a problem solving state, and when the keyword of the text information to be processed is "no other problem", the current state is converted into a state of ending the dialogue.
Different states may correspond to different operational behaviors. The operation behavior corresponding to the state may be set according to the service content. Exemplary, table 2 is a correspondence table between states and operation behaviors provided in an embodiment of the present application. As shown in Table 2, the operational behavior corresponding to the greeting state may be sending a greeting statement. The operation behavior corresponding to the intention recognition state can recognize the intention of the client through the prompt.
TABLE 3 Table 3
S104, the first device executes the operation behavior corresponding to the first keyword.
Specifically, after determining the operation behavior corresponding to the first keyword, the first device may execute the operation behavior corresponding to the first keyword.
In one or more embodiments, the first device may perform semantic analysis on the first text information, determine a plurality of first keywords corresponding to the first text information, and determine and execute operation behaviors corresponding to the plurality of first keywords according to the plurality of first keywords.
Specifically, the first device may determine a plurality of first keywords according to the first text information, and determine operation behaviors corresponding to the plurality of first keywords according to the plurality of first keywords. The first device may sequentially execute the operation behaviors corresponding to the plurality of first keywords according to the order of the plurality of first keywords.
Still taking the above-mentioned after-sale service of the network as an example, the first text information is "your good, my network has a fault", and the first device may determine the first keywords of the greeting and the network fault according to the first text information, so as to determine the operation behaviors corresponding to the greetings and the first keywords corresponding to the network fault. The first device may execute an operation behavior corresponding to a first keyword corresponding to the first keyword greeting, and an operation behavior corresponding to a first keyword corresponding to the first keyword network fault, respectively.
In one or more embodiments, after the first device performs the operation behavior corresponding to the first keyword, the first device may further obtain the second text information. The service content corresponding to the second text information is the same as the service content corresponding to the first text information.
The first device may perform semantic analysis on the second text information to obtain a second keyword of the second text information.
Specifically, the specific manner of the first device to obtain the second keyword by performing semantic analysis on the second text information may refer to the specific manner of the first device to obtain the first keyword, which is not described herein again.
The first device may determine the operation behavior corresponding to the second keyword according to the operation behavior corresponding to the first keyword and the stored operation behavior information corresponding to each keyword. Optionally, the first device may determine, according to the stored state information corresponding to each operation behavior, a system state corresponding to the operation behavior corresponding to the first keyword as the first state. Wherein the status information is used to indicate the status of the system.
Specifically, the state information corresponding to each operation behavior may be set according to the specified service content. For example, as shown in FIG. 3, different operational behaviors correspond to different states.
The first device may determine, according to the stored operation behavior information corresponding to the keyword in each state, an operation behavior corresponding to the second keyword in the first state.
Specifically, the first device may determine, according to the current state of the system and a keyword of the text information to be processed, an operation behavior corresponding to the keyword.
It can be appreciated that determining the operational behavior in this manner may increase the accuracy of the operational behavior, and thus may generate high quality, accurate, and targeted output information.
The first device may perform an operational behavior corresponding to the second keyword.
Specifically, the specific embodiment of the first device executing the operation behavior corresponding to the second keyword may refer to the specific embodiment of the first device executing the operation behavior corresponding to the first keyword, which is not described herein again.
In addition, in order to further ensure that the intelligent question-answering system supported by the method provided by the application can generate high-quality, accurate and targeted output information, the first equipment can record all state transition records and the result of executing operation behaviors after the state transition. Wherein, the recorded content can be set according to the specific business content. The record content corresponding to different services is different.
Based on the same inventive concept, the embodiment of the application provides an intelligent question-answering device. Fig. 2 shows a schematic structural diagram of an intelligent question-answering device according to an embodiment of the present application. As shown in fig. 2, the apparatus includes a communication module 201 and a processing module 202.
And the communication module 201 is used for acquiring the first text information. The processing module 202 is configured to perform semantic analysis on the first text information, obtain a first keyword of the first text information, and use the keyword of the text information to characterize the semantic meaning of the text information. The processing module 202 is further configured to determine an operation behavior corresponding to the first keyword according to the stored operation behavior information corresponding to each keyword, where the stored operation behavior information corresponding to the keyword is obtained according to the service content corresponding to the first text information. The processing module 202 is further configured to execute the operation behavior corresponding to the first keyword.
In one implementation, the processing module 202 is specifically configured to: according to the semantic analysis result of the first text information, determining a first keyword from a preset keyword library, wherein the similarity between the first keyword and the semantic analysis result of the first text information meets a set threshold.
In one implementation, the processing module 202 is specifically configured to: and determining a plurality of first keywords from the keyword library according to the semantic analysis result. The similarity between the first keywords and the semantic analysis results meets a threshold.
In one implementation manner, when the similarity between the keyword in the keyword library and the semantic analysis result of the first text information does not meet the set threshold, the processing module 202 is specifically configured to: and taking the semantic analysis result of the first text information as a first keyword. The first keyword is updated in the keyword library.
In one implementation, the processing module 202 is specifically configured to: and determining the operation behavior information corresponding to the first keyword according to the service corresponding to the first text information.
In one implementation manner, the communication module 201 is further configured to obtain second text information, where service content corresponding to the second text information is the same as service content corresponding to the first text information. The processing module 202 is further configured to perform semantic analysis on the second text information, and obtain a second keyword of the second text information. The processing module 202 is further configured to determine an operation behavior corresponding to the second keyword according to the operation behavior corresponding to the first keyword and the stored operation behavior information corresponding to each keyword. The processing module 202 is further configured to execute the operation behavior corresponding to the second keyword.
In one implementation, the processing module 202 is specifically configured to: and determining the system state corresponding to the operation behavior corresponding to the first keyword as a first state according to the stored state information corresponding to each operation behavior, wherein the state information is used for indicating the state of the system. And determining the operation behaviors corresponding to the first state and the second keyword according to the stored operation behavior information corresponding to the keywords in each state.
Based on the same inventive concept, the embodiments of the present application provide an electronic device, which may implement the functions of the apparatus described above. Fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
The electronic device in an embodiment of the application may comprise a processor 301. Processor 301 is the control center of the device and may connect the various parts of the device using various interfaces and lines by running or executing instructions stored in memory 303 and invoking data stored in memory 303. Alternatively, the processor 301 may include one or more processing units, and the processor 301 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system and application programs, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301. In some embodiments, processor 301 and memory 303 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 301 may be a general purpose processor such as a central processing unit (Central Processing Unit, CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be performed directly by a hardware processor or by a combination of hardware and software modules in the processor.
In an embodiment of the present application, the memory 303 stores instructions executable by the at least one processor 301, and the at least one processor 301, by executing the instructions stored in the memory 303, may be used to perform the method steps disclosed in the embodiment of the present application.
The memory 303 is used as a non-volatile computer-readable storage medium for storing non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 303 may include at least one type of storage medium, and may include, for example, flash Memory, a hard disk, a multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 303 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 303 in embodiments of the present application may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
In the embodiment of the application, the device may further include a communication interface 302, and the electronic device may transmit data through the communication interface 302.
Alternatively, the processing module 202 and/or the communication module 201 shown in fig. 2 may be implemented by the processor 301 (or the processor 301 and the communication interface 302) shown in fig. 3, that is, the actions of the processing module 202 and/or the communication module 201 may be performed by the processor 301 (or the processor 301 and the communication interface 302).
Based on the same inventive concept, embodiments of the present application also provide a computer-readable storage medium in which instructions may be stored, which when run on a computer, cause the computer to perform the operational steps provided by the above-described method embodiments. The computer readable storage medium may be the memory 303 shown in fig. 3.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
1. An intelligent question-answering method, characterized in that the method comprises the following steps:
Acquiring first text information;
Carrying out semantic analysis on the first text information, and determining at least one first keyword corresponding to the first text information, wherein the keywords of the text information are used for representing the semantics of the text information;
Determining the operation behaviors corresponding to the first keywords according to the stored operation behavior information corresponding to the keywords, wherein the operation behavior information corresponding to the stored keywords is obtained according to the service content corresponding to the first text information;
And executing the operation behavior corresponding to the first keyword.
2. The method of claim 1, wherein the performing semantic analysis on the first text information to determine at least one first keyword corresponding to the first text information comprises:
and determining the first keyword from a preset keyword library according to the semantic analysis result of the first text information, wherein the similarity between the first keyword and the semantic analysis result meets a set threshold.
3. The method as claimed in claim 2, comprising:
and determining a plurality of first keywords from the keyword library according to the semantic analysis result, wherein the similarity between the plurality of first keywords and the semantic analysis result meets the threshold value.
4. The method of claim 2, wherein none of the similarity of keywords in the keyword library to the semantic analysis result of the first text information satisfies a set threshold, the method further comprising:
The semantic analysis result of the first text information is used as the first keyword;
And updating the first keyword in the keyword library.
5. A method as claimed in claim 3, wherein the method further comprises:
And determining the operation behavior information corresponding to the first keyword according to the service corresponding to the first text information.
6. The method of claim 1, wherein after the performing the operation action corresponding to the first keyword, the method further comprises:
acquiring second text information, wherein the service corresponding to the second text information is the same as the service corresponding to the first text information;
Carrying out semantic analysis on the second text information to obtain a second keyword of the second text information;
Determining the operation behaviors corresponding to the second keywords according to the operation behaviors corresponding to the first keywords and the stored operation behavior information corresponding to the keywords;
And executing the operation behavior corresponding to the second keyword.
7. The method of claim 5, wherein the determining the operation behavior corresponding to the second keyword according to the operation behavior corresponding to the first keyword and the stored operation behavior information corresponding to each keyword comprises:
determining a system state corresponding to the operation behavior corresponding to the first keyword as a first state according to the stored state information corresponding to each operation behavior, wherein the state information is used for indicating the state of the system;
and determining the operation behaviors corresponding to the first state and the second keyword according to the stored operation behavior information corresponding to the keywords in each state.
8. An intelligent question-answering device, characterized in that the device comprises:
the communication module is used for acquiring the first text information;
the processing module is used for carrying out semantic analysis on the first text information, determining at least one first keyword corresponding to the first text information, wherein the keywords of the text information are used for representing the semantics of the text information;
The processing module is further configured to determine an operation behavior corresponding to the first keyword according to stored operation behavior information corresponding to each keyword, where the stored operation behavior information corresponding to the keyword is obtained according to service content corresponding to the first text information;
the processing module is further configured to execute an operation behavior corresponding to the first keyword.
9. An electronic device comprising a processor for implementing the steps of the method according to any of claims 1-7 when executing a computer program stored in a memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410353816.6A CN118364068A (en) | 2024-03-26 | 2024-03-26 | Intelligent question-answering method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410353816.6A CN118364068A (en) | 2024-03-26 | 2024-03-26 | Intelligent question-answering method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118364068A true CN118364068A (en) | 2024-07-19 |
Family
ID=91886058
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410353816.6A Pending CN118364068A (en) | 2024-03-26 | 2024-03-26 | Intelligent question-answering method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118364068A (en) |
-
2024
- 2024-03-26 CN CN202410353816.6A patent/CN118364068A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6799574B2 (en) | Method and device for determining satisfaction with voice dialogue | |
CN111859960B (en) | Semantic matching method, device, computer equipment and medium based on knowledge distillation | |
CN112346567B (en) | Virtual interaction model generation method and device based on AI (Artificial Intelligence) and computer equipment | |
CN106649825B (en) | Voice interaction system and creation method and device thereof | |
US9684876B2 (en) | Question answering system-based generation of distractors using machine learning | |
CN117520523B (en) | Data processing method, device, equipment and storage medium | |
CN109284502B (en) | Text similarity calculation method and device, electronic equipment and storage medium | |
CN111209363B (en) | Corpus data processing method, corpus data processing device, server and storage medium | |
US8315874B2 (en) | Voice user interface authoring tool | |
CN111177307A (en) | Test scheme and system based on semantic understanding similarity threshold configuration | |
CN112084317A (en) | Method and apparatus for pre-training a language model | |
CN114757176A (en) | Method for obtaining target intention recognition model and intention recognition method | |
CN112579757A (en) | Intelligent question and answer method and device, computer readable storage medium and electronic equipment | |
CN117216222A (en) | Intelligent question-answering method and device and related equipment | |
CN111524043A (en) | Method and device for automatically generating litigation risk assessment questionnaire | |
CN117875292A (en) | Financial knowledge intelligent question-answering method, system, terminal equipment and storage medium | |
CN111444729A (en) | Information processing method, device, equipment and readable storage medium | |
CN111309882B (en) | Method and device for realizing intelligent customer service question and answer | |
CN117472431A (en) | Code annotation generation method, device, computer equipment, storage medium and product | |
CN116186219A (en) | Man-machine dialogue interaction method, system and storage medium | |
CN118364068A (en) | Intelligent question-answering method, device, equipment and medium | |
CN113901793A (en) | Event extraction method and device combining RPA and AI | |
JP6743108B2 (en) | PATTERN RECOGNITION MODEL AND PATTERN LEARNING DEVICE, GENERATION METHOD THEREOF, FAQ EXTRACTION METHOD USING THE SAME, PATTERN RECOGNITION DEVICE, AND PROGRAM | |
CN118503396B (en) | Open prompt word-based ERP system large model calling method, device and medium | |
CN112992128B (en) | Training method, device and system of intelligent voice robot |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |