CN116932704A - Intelligent question-answering method and system - Google Patents

Intelligent question-answering method and system Download PDF

Info

Publication number
CN116932704A
CN116932704A CN202210348236.9A CN202210348236A CN116932704A CN 116932704 A CN116932704 A CN 116932704A CN 202210348236 A CN202210348236 A CN 202210348236A CN 116932704 A CN116932704 A CN 116932704A
Authority
CN
China
Prior art keywords
question
answer
user
text
model
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
Application number
CN202210348236.9A
Other languages
Chinese (zh)
Inventor
沈一卓
胡媛媛
苏萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210348236.9A priority Critical patent/CN116932704A/en
Publication of CN116932704A publication Critical patent/CN116932704A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an intelligent question-answering method and system, firstly, acquiring a question text of a user and a answer mode selected by the user; then, if the answer mode is a first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; and finally, sending the target answer to terminal equipment corresponding to the user. According to the method, character attribute information of the user is introduced, accuracy of target answers output by the question-answer model is improved, wrong answers are prevented from being returned to the user, and user experience is improved.

Description

Intelligent question-answering method and system
Technical Field
The invention relates to the technical field of Internet, in particular to an intelligent question-answering method and system.
Background
With the rapid development of internet technology, the exponential growth of network information data, in the information big data age, how to quickly and accurately obtain required information in the face of massive information is an urgent need of users. Compared with a search engine, the intelligent question-answering system can directly return answer information required by a user according to natural language questions presented by the user, so that the time cost of acquiring information of the user is reduced, meanwhile, along with the development of deep learning technology, the intelligent question-answering system is widely applied in the natural language processing field at present, and is widely used in daily life of people.
In the prior art, an intelligent question-answering system generally screens, combines and associates answers in a question-answering database based on user question-answering intentions or user interests, so as to realize accurate response to user questions. However, in real life, there may be situations that the professional terms are the same but the meanings are different among industries, which will cause that the answers determined when the intelligent question-answering system is actually used are easily confused, and wrong answers are easily returned to the user, so that the accuracy of the answers is reduced and the experience of the user is reduced.
Disclosure of Invention
The invention provides an intelligent question-answering method and system, which are used for solving the defects in the prior art.
The invention provides an intelligent question-answering method, which comprises the following steps:
acquiring a question text of a user and a reply mode selected by the user;
if the answer mode is the first mode, acquiring character attribute information of the user;
inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model;
sending the target answer to terminal equipment corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
According to the intelligent question-answering method provided by the invention, the question text is input into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model, and the method comprises the following steps:
splicing the problem text and the character attribute information to obtain a spliced text, and determining one-hot vectors of the spliced text;
inputting the one-hot vector to a hidden layer of the question-answer model after passing through an input layer of the question-answer model, and obtaining a feature vector of the one-hot vector output by the hidden layer;
and inputting the feature vector to a classification layer of the question-answer model, determining answer text matched with the question text in a question-answer database based on the feature vector by the classification layer, and outputting the answer text as the target answer.
According to the intelligent question-answering method provided by the invention, the question-answering database comprises a database index, and the database index is created based on the character attribute information and the structured query keywords corresponding to the answer text.
According to the intelligent question-answering method provided by the invention, the acquiring of the character attribute information of the user comprises the following steps:
authenticating the identity field of the user to obtain an authentication result;
and determining the character attribute information based on the authentication result.
According to the intelligent question-answering method provided by the invention, the initial model is constructed based on the Seq2Seq framework and the Attention mechanism.
According to the intelligent question-answering method provided by the invention, the target answers comprise a plurality of answers;
the step of sending the target answer to the terminal equipment corresponding to the user comprises the following steps:
sequencing a plurality of target answers to obtain a sequencing result;
and sending the sequencing result to the terminal equipment.
The intelligent question-answering method provided by the invention further comprises the following steps:
receiving an answer evaluation result sent by the terminal equipment;
and updating the question-answer model again based on the answer evaluation result, the question text and the target answer.
The invention also provides an intelligent question-answering system, which comprises:
the first acquisition module is used for acquiring the question text of the user and the answer mode selected by the user;
the second acquisition module is used for acquiring the character attribute information of the user if the reply mode is the first mode;
the answer determining module is used for inputting the question text and the character attribute information into a question-answer model to obtain a target answer corresponding to the question text output by the question-answer model;
the sending module is used for sending the target answer to terminal equipment corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the intelligent question-answering method according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements an intelligent question-answering method as described in any one of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements the intelligent question-answering method as described in any one of the above.
The intelligent question-answering method and system provided by the invention firstly acquire the question text of the user and the answer mode selected by the user; then, if the answer mode is a first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; and finally, sending the target answer to terminal equipment corresponding to the user. According to the method, character attribute information of the user is introduced, accuracy of target answers output by the question-answer model is improved, wrong answers are prevented from being returned to the user, and user experience is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious to those skilled in the art that other drawings can be obtained according to these drawings without inventive effort.
FIG. 1 is a schematic flow chart of an intelligent question-answering method provided by the invention;
FIG. 2 is a schematic diagram of the intelligent question-answering system provided by the invention;
fig. 3 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the prior art, intelligent question-answering systems typically screen, combine and associate answers in a question-answering database based on user question-answering intents or user interests. And because the conditions that the professional terms are the same but the meanings are different exist among industries, answers determined when the intelligent question-answering system is actually used are easy to be confused, wrong answers are easy to return to users, the accuracy of the answers is reduced, and the experience of the users is reduced. Therefore, the embodiment of the invention provides an intelligent question-answering method.
Fig. 1 is a flow chart of an intelligent question-answering method provided in the embodiment of the invention, as shown in fig. 1, the method includes:
s1, acquiring a question text of a user and a reply mode selected by the user;
s2, if the answer mode is a first mode, acquiring character attribute information of the user;
s3, inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model;
s4, sending the target answer to terminal equipment corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
Specifically, the execution subject of the intelligent question-answering method provided in the embodiment of the present invention is an intelligent question-answering system, and the system may be configured in a server, where the server may be a local server, or may be a cloud server, and the local server may be a computer, or the like.
First, step S1 is executed to obtain a question text of a user and a reply mode selected by the user. It will be appreciated that the user refers to a user who needs to give an answer through the intelligent question-answering system, and the question text refers to a text form of a question that the user inputs to the intelligent question-answering system. Particularly, when the questions input by the user to the intelligent question-answering system are in other forms such as voice, the questions in other forms need to be converted into the questions in the text form, and the text of the questions is obtained.
In addition, the user needs to input a reply mode of the user questions and answers to the intelligent question and answer system. The intelligent question-answering system may be configured with a display interface that displays a plurality of answer modes available for selection by a user, from which the user selects one. The answer modes of the intelligent question-answering system for the user to select can comprise a first mode and a second mode, wherein the first mode can be a precise answer mode, and the modes need to introduce character attribute information of the user. The second mode may be a fuzzy answer mode, which may be a answer mode that a conventional intelligent question-answering system has.
Then, step S2 is performed to acquire character attribute information of the user when the reply mode selected by the user is the first mode. The character attribute information is used for representing identity attributes played by the present user in the real life under the social environment, and can comprise identities of students, teachers, indoor designers, building designers and the like, and identities of parents, couples, pregnant women and the like. The obtaining of the attribute information of the role may be achieved by performing identity field authentication on the user, which is not particularly limited herein.
And then, executing step S3, inputting the question text and the character attribute information into a question-answer model, analyzing the question text and the character attribute information through the question-answer model, and determining answer texts in a question-answer database corresponding to the question text and the character attribute information, wherein the answer texts can be used as target answers corresponding to the question texts. The number of the target answers may be one or more, and is determined according to the number of the question templates corresponding to the text of the question and the character attribute information, and the number of answer labels corresponding to the question templates, which are not particularly limited herein.
It may be appreciated that the question-answer database may include answer texts in each field, and the number of answer texts may be plural. Through the character attribute information of the user, an answer text library corresponding to the character attribute information can be screened out from the question-answer database, and then a target answer can be selected out from the answer text library through the question text.
The question-answering model adopted in the embodiment of the invention is obtained by training an initial model through a question sample carrying an answer label and a character attribute label corresponding to the question sample. The question sample refers to a question whose answer is known, and the answer of the question sample is the answer label carried by the question sample. The role attribute label corresponding to the problem sample is the role attribute label of the proposer of the problem sample, and the field where the problem sample is located can be represented by the role attribute label.
The initial model adopted in the embodiment of the invention can be a neural network model and can be constructed based on a Seq2Seq framework and an Attention mechanism. The initial model can be obtained by training by adopting a deep learning algorithm in combination with a question sample carrying an answer label and a character attribute label corresponding to the question sample.
And finally, executing step S4, wherein the target answer can be used as an answer corresponding to the question text of the user, so that the target answer is sent to terminal equipment corresponding to the user, and the terminal equipment can display the target answer to the user. The terminal device corresponding to the user may be a computer, a tablet computer, a smart phone or the like, which is not particularly limited herein.
The intelligent question answering method provided by the embodiment of the invention comprises the steps of firstly, acquiring a question text of a user and an answer mode selected by the user; then, if the answer mode is a first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; and finally, sending the target answer to terminal equipment corresponding to the user. According to the method, character attribute information of the user is introduced, accuracy of target answers output by the question-answer model is improved, wrong answers are prevented from being returned to the user, and user experience is improved.
On the basis of the foregoing embodiment, in the intelligent question-answering method provided in the embodiment of the present invention, the inputting the question text into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model includes:
splicing the problem text and the character attribute information to obtain a spliced text, and determining one-hot vectors of the spliced text;
inputting the one-hot vector to a hidden layer of the question-answer model after passing through an input layer of the question-answer model, and obtaining a feature vector of the one-hot vector output by the hidden layer;
and inputting the feature vector to a classification layer of the question-answer model, determining answer text matched with the question text in a question-answer database based on the feature vector by the classification layer, and outputting the answer text as the target answer.
Specifically, in the embodiment of the invention, before a question text is input into a question-answering model, in order to ensure that the question text and character attribute information can be successfully identified by the question-answering model, the question text and the character attribute information need to be spliced to obtain a spliced text, and then vector conversion is carried out on the spliced text. Therefore, it is necessary to determine a one-hot vector of the spliced text, which contains a problematic text vector component and a character attribute information vector component.
The question-answering model may include an input layer, a hidden layer, and a softmax layer, which are connected in sequence.
And inputting the one-hot vector into an input layer of the question-answering model, transmitting the one-hot vector to a hidden layer through the input layer, and extracting the characteristics of the one-hot vector through the hidden layer to obtain a characteristic vector, wherein the characteristic vector can comprise characteristic components of the text of the question and characteristic components of character attribute information.
After that, the feature vector is input to a classification layer of the question-answer model, answer text matching the question text in the question-answer database is determined by the classification layer based on the feature vector, and the answer text is output as a target answer.
The question-answer database may include a plurality of database indexes, each of which may be created by a role attribute tag and a query condition field in answer text. The question-answer model can respectively determine the semantic proximity of each answer text to the question text according to the question text, each question sample in the question-answer database, the answer label, the question semantic extraction formula, the answer semantic extraction formula, the training value of the question semantic extraction parameter and the training value of the answer semantic extraction parameter; and selecting a target answer from each answer text according to the semantic proximity of each answer text and the question text and the text proximity of each answer text and the question text, and feeding back the question text.
In the embodiment of the invention, a weight matrix w is arranged between an input layer and a hidden layer of a question-answer model, the hidden layer can be set to be 300-dimensional, a 300-dimensional feature vector can be obtained by multiplying the weight matrix w and one-hot vector, and probability output can be obtained after a wx+b function and softmax. The parameters set in training the initial model are as follows: embedding size (embedding_size): 100, skip window (skip_window): 5, number of skips (num_skip): 2, number of steps (num_steps): 100000, number of samples (num_sampled): 64 sound size (vocab_size): 50000, learning rate (learning_rate): 0.0001, epoch: 100, batch size (batch_size): 100.
where the approximate size is generally determined from empirical values, and then a suitable size is searched for violently. skip_window represents the number of words selected from one side (left or right) of the current input word. If skip_window=2 is set, then The words in The final obtained window (including input word) are [ ' The ', ' dog ', ' barked ', ' at ]. skip_window=2 represents that 2 words to the left and 2 words to the right of the left input word are selected to enter the window, so the whole window size span=2x2=4.
num_skip represents a run step, num_steps represents the length of a sentence; vocab_size refers to the size of the question-answer database; learning_rate represents an important super-parameter in supervised learning and deep learning that determines whether and when the objective function can converge to a local minimum. The appropriate learning rate enables the objective function to converge to a local minimum at an appropriate time. Epoch means that when a complete data set passes through the neural network once and returns once, this process is called once > Epoch. One Epoch is the process of training all training samples once. The batch_size represents the number of samples selected for one training. The size of the batch_size affects the degree and speed of optimization of the model.
On the basis of the above embodiment, the question-answer database includes a database index, and the database index is created based on the character attribute information and the structured query keyword corresponding to the answer text.
Specifically, in the embodiment of the present invention, a database index may be created according to character attribute information and each structured query keyword corresponding to answer text in the question-answer database: determining field information of each query condition field in the keyword sentences in the question-answer database; according to the field information of each query condition field, calculating the weight of each query condition field; creating a database index in combination with role attribute information according to the weight of each query condition field
On the basis of the above embodiment, the method for obtaining the role attribute information of the user according to the intelligent question answering provided in the embodiment of the present invention includes:
authenticating the identity field of the user to obtain an authentication result;
and determining the character attribute information based on the authentication result.
Specifically, in the embodiment of the invention, when the identity field authentication is performed on the user, a questionnaire form can be adopted, so that the identity and occupation of the user in life can be determined, and further, the preference and interested fields of the user can be confirmed through the questionnaire form.
Furthermore, the authentication of the identity field can be performed in a real-name authentication mode, namely, the authentication is performed by inputting the identity card number, the name and the face recognition of the person, the authentication can be performed by binding the mobile phone number, and the real-name authentication gateway is connected to the CA mechanism for performing the authentication and returning an authentication result; the real-name authentication gateway is connected to the public security population library for identity verification, and returns a verification result; the real-name authentication gateway receives the verification result and the check result.
In the embodiment of the invention, the USB Key can be adopted to carry out the authentication of the identity field for the user. The data length of the identity field of the user can be 20 bits, and the length of the USB Key serial number is 16 bits; and constructing a first Key of the Triviem algorithm by adopting a first formula according to the first 4-bit data in the data of the identity field and the 16-bit serial number in the USB Key serial number. The first key is 20 bits. The data of a 16-bit output field in the Trivium algorithm can be obtained by adopting the first secret key;
the first formula is:
wherein uuid i The first 4 bits of data, the identity field, are the serialNumber i-4 Is 16-bit serial number in USB Key serial number, key1 is first Key, key1 i Is the ith bit of the first key. Comparing the data of the 16-bit output field with the last 16-bit data in the data of the identity field, if the data of the 16-bit output field is the same as the last 16-bit data in the data of the identity field, the identity verification is successful, otherwise, the identity verification is failed.
In addition, the USB Key can be used for reading the identity field of the user. And constructing a second Key of the Triviem algorithm by adopting a second formula according to the last 16-bit data in the data of the identity field and the first 4-bit data of the first field in the USB Key sequence number. The second key is also 20 bits. Decrypting the first 4-bit data of the first field by adopting the second key to obtain an actual value of the first 4-bit data of the first field;
the second formula is:
wherein uuid i-4 Is the last 16 bits data in the data of the identity field, data i For the first 4 bits of data of the first field, key2 is the second key, key2 i Is the ith bit of the first key.
On the basis of the above embodiment, the intelligent question-answering method provided in the embodiment of the present invention includes a plurality of target answers;
the step of sending the target answer to the terminal equipment corresponding to the user comprises the following steps:
sequencing a plurality of target answers to obtain a sequencing result;
and sending the sequencing result to the terminal equipment.
Specifically, in the embodiment of the present invention, the target answer may include a plurality of answers. At this time, the multiple target answers may be ranked, and a ranking result may be obtained. And then sending the sequencing result to the terminal equipment. The ranking may be implemented by semantic similarity between a plurality of target answers and the question text and the degree of text similarity, which are not specifically limited herein.
According to the embodiment of the invention, the user can first see the target answer with the highest semantic similarity and the highest text similarity between the user and the question text, and the user experience is improved.
On the basis of the above embodiment, the intelligent question-answering method provided in the embodiment of the present invention further includes:
receiving an answer evaluation result sent by the terminal equipment;
and updating the question-answer model again based on the answer evaluation result, the question text and the target answer.
Specifically, in the embodiment of the invention, after the target answer is sent to the terminal device corresponding to the user, the user can evaluate the target answer and feed back the answer evaluation result to the intelligent question-answering system.
After receiving the answer evaluation result sent by the terminal equipment, the intelligent question-answering system can train the initial model again through the answer evaluation result, the question text, the target answer, the question sample and the character attribute label to obtain a new question-answering model. The question-answer model can also be updated by answer evaluation results, question text and target answers. Thus, the accuracy of the question-answering model can be ensured.
Based on the embodiment, the intelligent question-answering method provided by the embodiment of the invention carries out training of the initial model based on the answer evaluation result of the user on the target answer, perfects the question-answering word stock of the initial model in real time based on the deep learning technology, and correspondingly adjusts the question-answering word stock; the method comprises the steps of analyzing characteristic information of a target initialization neural network in a preset neural network big data or database to obtain an analysis result; the target initialization network acquisition module is used for determining a target initialization neural network according to the analysis result; and the neural network deep learning module is used for training the target initialization neural network through training data to obtain a deep-learned target neural network.
Wherein the characteristic information includes at least one of a network tag of the training data, a data format of the training data, and a network function. And acquiring a prediction neural network stored in a preset neural network big data or database, and inputting the characteristic information of the target initialization neural network into the prediction neural network to obtain a prediction result.
The analysis process is to query a preset neural network big data or database, the preset neural network big data or database stores a trained neural network, the characteristic information of the trained neural network is obtained, the preset characteristic information matching rule is obtained, the characteristic information matching rule comprises matching priority, and according to the matching priority, the characteristic information of the target initialization neural network and the characteristic information of the trained neural network are subjected to correlation matching to obtain a matching result.
New words and sentences often appear along with the development of times, or old words and sentences are added with other meanings in the background of the present times, so that the words and sentences also need to be adjusted and supplemented in a question-answer database.
On the basis of the embodiment, the intelligent question-answering method provided by the embodiment of the invention can acquire dialogue records and convert dialogue contents into a text form when training an initial model, so as to construct a question-answering document; performing word segmentation, stop word removal and id number allocation on the question-answer document, so as to obtain a data set; taking the data set as the input of the deep learning network model, training the deep learning network model for a plurality of times, and continuously reducing the entropy values of the true value and the predicted value so as to achieve convergence and form a question-answering system model; the question-answering system trained by the Seq2Seq framework and the Attention mechanism can more accurately understand the semantics of the questions, not only contains the context information of the dialogue, but also fuses the history dialogue information into the current dialogue, thereby being capable of accurately answering the questions.
In summary, according to the intelligent question-answering method provided by the embodiment of the invention, through analyzing and confirming the character attribute information of the user, and searching the target answer for the question text proposed by the user under the corresponding character field in the question-answering database based on the character attribute information, the quick response and higher answer accuracy of the question-answering of the user are realized, the confusion of the answer is avoided, namely the word ambiguity phenomenon under different character attributes is avoided, and the correct target answer in another character field is prevented from being fed back to the user not belonging to the character field.
As shown in fig. 2, on the basis of the above embodiment, the embodiment of the present invention provides a user account management system, including:
a first obtaining module 21, configured to obtain a question text of a user and a reply mode selected by the user;
a second obtaining module 22, configured to obtain character attribute information of the user if the reply mode is the first mode;
the answer determining module 23 is configured to input the question text and the character attribute information into a question-answer model, and obtain a target answer corresponding to the question text output by the question-answer model;
a sending module 24, configured to send the target answer to a terminal device corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
On the basis of the foregoing embodiments, the user account management system provided in the embodiment of the present invention includes an answer determining module, configured to:
splicing the problem text and the character attribute information to obtain a spliced text, and determining one-hot vectors of the spliced text;
inputting the one-hot vector to a hidden layer of the question-answer model after passing through an input layer of the question-answer model, and obtaining a feature vector of the one-hot vector output by the hidden layer;
and inputting the feature vector to a classification layer of the question-answer model, determining answer text matched with the question text in a question-answer database based on the feature vector by the classification layer, and outputting the answer text as the target answer.
On the basis of the above embodiment, the user account management system provided in the embodiment of the present invention, where the question-answer database includes a database index, and the database index is created based on the character attribute information and the structured query keyword corresponding to the answer text.
On the basis of the foregoing embodiment, in the user account management system provided in the embodiment of the present invention, the obtaining role attribute information of the user includes:
authenticating the identity field of the user to obtain an authentication result;
and determining the character attribute information based on the authentication result.
Based on the above embodiment, the user account management system provided in the embodiment of the present invention, the initial model is constructed based on the Seq2Seq framework and the Attention mechanism.
Based on the above embodiment, the user account management system provided in the embodiment of the present invention, where the target answer includes a plurality of target answers;
the sending module is used for:
sequencing a plurality of target answers to obtain a sequencing result;
and sending the sequencing result to the terminal equipment.
On the basis of the above embodiment, the user account management system provided in the embodiment of the present invention further includes an update module, configured to:
receiving an answer evaluation result sent by the terminal equipment;
and updating the question-answer model again based on the answer evaluation result, the question text and the target answer.
Specifically, the functions of each module in the user account management system provided in the embodiment of the present invention are in one-to-one correspondence with the operation flows of each step in the above method embodiment, and the achieved effects are consistent.
Fig. 3 illustrates a physical schematic diagram of an electronic device, as shown in fig. 3, where the electronic device may include: processor (Processor) 310, communication interface (Communications Interface) 320, memory (Memory) 330 and communication bus 340, wherein Processor 310, communication interface 320, memory 330 accomplish communication with each other through communication bus 340. Processor 310 may invoke logic instructions in memory 330 to perform the intelligent question-answering method provided in the various embodiments described above, including: acquiring a question text of a user and a reply mode selected by the user; if the answer mode is the first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; sending the target answer to terminal equipment corresponding to the user; the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the intelligent question-answering method provided in the above embodiments, the method comprising: acquiring a question text of a user and a reply mode selected by the user; if the answer mode is the first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; sending the target answer to terminal equipment corresponding to the user; the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the intelligent question-answering method provided in the above embodiments, the method comprising: acquiring a question text of a user and a reply mode selected by the user; if the answer mode is the first mode, acquiring character attribute information of the user; inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model; sending the target answer to terminal equipment corresponding to the user; the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An intelligent question-answering method is characterized by comprising the following steps:
acquiring a question text of a user and a reply mode selected by the user;
if the answer mode is the first mode, acquiring character attribute information of the user;
inputting the question text and the character attribute information into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model;
sending the target answer to terminal equipment corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
2. The intelligent question-answering method according to claim 1, wherein the inputting the question text into a question-answering model to obtain a target answer corresponding to the question text output by the question-answering model includes:
splicing the problem text and the character attribute information to obtain a spliced text, and determining one-hot vectors of the spliced text;
inputting the one-hot vector to a hidden layer of the question-answer model after passing through an input layer of the question-answer model, and obtaining a feature vector of the one-hot vector output by the hidden layer;
and inputting the feature vector to a classification layer of the question-answer model, determining answer text matched with the question text in a question-answer database based on the feature vector by the classification layer, and outputting the answer text as the target answer.
3. The intelligent question-answering method according to claim 2, wherein the question-answering database includes a database index created based on the character attribute information and the structured query keyword corresponding to the answer text.
4. The intelligent question-answering method according to claim 1, wherein the acquiring character attribute information of the user includes:
authenticating the identity field of the user to obtain an authentication result;
and determining the character attribute information based on the authentication result.
5. The intelligent question-answering method according to claim 1, wherein the initial model is constructed based on a Seq2Seq framework and an Attention mechanism.
6. The intelligent question-answering method according to any one of claims 1 to 5, wherein the target answer includes a plurality of;
the step of sending the target answer to the terminal equipment corresponding to the user comprises the following steps:
sequencing a plurality of target answers to obtain a sequencing result;
and sending the sequencing result to the terminal equipment.
7. The intelligent question-answering method according to any one of claims 1 to 5, further comprising:
receiving an answer evaluation result sent by the terminal equipment;
and updating the question-answer model again based on the answer evaluation result, the question text and the target answer.
8. An intelligent question-answering system, comprising:
the first acquisition module is used for acquiring the question text of the user and the answer mode selected by the user;
the second acquisition module is used for acquiring the character attribute information of the user if the reply mode is the first mode;
the answer determining module is used for inputting the question text and the character attribute information into a question-answer model to obtain a target answer corresponding to the question text output by the question-answer model;
the sending module is used for sending the target answer to terminal equipment corresponding to the user;
the question-answer model is obtained by training an initial model based on a question sample carrying answer labels and character attribute labels corresponding to the question sample.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the intelligent question-answering method according to any one of claims 1 to 7 when the program is executed by the processor.
10. A computer program product comprising a computer program which when executed by a processor implements the intelligent question-answering method according to any one of claims 1 to 7.
CN202210348236.9A 2022-04-01 2022-04-01 Intelligent question-answering method and system Pending CN116932704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210348236.9A CN116932704A (en) 2022-04-01 2022-04-01 Intelligent question-answering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210348236.9A CN116932704A (en) 2022-04-01 2022-04-01 Intelligent question-answering method and system

Publications (1)

Publication Number Publication Date
CN116932704A true CN116932704A (en) 2023-10-24

Family

ID=88386636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210348236.9A Pending CN116932704A (en) 2022-04-01 2022-04-01 Intelligent question-answering method and system

Country Status (1)

Country Link
CN (1) CN116932704A (en)

Similar Documents

Publication Publication Date Title
CN109885672B (en) Question-answering type intelligent retrieval system and method for online education
CN111444428B (en) Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
CN117033608A (en) Knowledge graph generation type question-answering method and system based on large language model
CN112800170A (en) Question matching method and device and question reply method and device
CN110929125B (en) Search recall method, device, equipment and storage medium thereof
CN113672708B (en) Language model training method, question-answer pair generation method, device and equipment
CN111324713B (en) Automatic replying method and device for conversation, storage medium and computer equipment
CN110597962B (en) Search result display method and device, medium and electronic equipment
CN110909145B (en) Training method and device for multi-task model
CN111159367B (en) Information processing method and related equipment
CN112287069B (en) Information retrieval method and device based on voice semantics and computer equipment
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN117520503A (en) Financial customer service dialogue generation method, device, equipment and medium based on LLM model
CN116955591A (en) Recommendation language generation method, related device and medium for content recommendation
CN113704623A (en) Data recommendation method, device, equipment and storage medium
CN111552787A (en) Question and answer processing method, device, equipment and storage medium
CN113946668A (en) Semantic processing method, system and device based on edge node and storage medium
CN113870998A (en) Interrogation method, device, electronic equipment and storage medium
CN114528851B (en) Reply sentence determination method, reply sentence determination device, electronic equipment and storage medium
CN114860883A (en) Intelligent question and answer method and system
CN116932704A (en) Intelligent question-answering method and system
CN114093447A (en) Data asset recommendation method and device, computer equipment and storage medium
CN115618873A (en) Data processing method and device, computer equipment and storage medium
CN113704422A (en) Text recommendation method and device, computer equipment and storage medium

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