CN113868400A - Method and device for responding to digital human questions, electronic equipment and storage medium - Google Patents

Method and device for responding to digital human questions, electronic equipment and storage medium Download PDF

Info

Publication number
CN113868400A
CN113868400A CN202111212379.9A CN202111212379A CN113868400A CN 113868400 A CN113868400 A CN 113868400A CN 202111212379 A CN202111212379 A CN 202111212379A CN 113868400 A CN113868400 A CN 113868400A
Authority
CN
China
Prior art keywords
question
request
current request
cache
frequency
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
CN202111212379.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.)
Shenzhen Zhuiyi Technology Co Ltd
Original Assignee
Shenzhen Zhuiyi 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 Shenzhen Zhuiyi Technology Co Ltd filed Critical Shenzhen Zhuiyi Technology Co Ltd
Priority to CN202111212379.9A priority Critical patent/CN113868400A/en
Publication of CN113868400A publication Critical patent/CN113868400A/en
Pending legal-status Critical Current

Links

Images

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/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/7844Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using original textual content or text extracted from visual content or transcript of audio data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Library & Information Science (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method and a device for responding to a digital human question, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a current request problem; judging whether a response video corresponding to the current request problem is stored in a cache; the cache is stored with a plurality of response videos corresponding to the high-frequency request problems in advance; if the response video corresponding to the current request problem is judged to be stored in the cache, the response video corresponding to the current request problem in the cache is output; if the answer video corresponding to the current request question is judged not to be stored in the cache, generating a text answer corresponding to the current request question by utilizing a pre-established language processing model; generating a response video corresponding to the current request question by using the text answer corresponding to the current request question; and outputting the generated response video corresponding to the current request problem. Therefore, the efficient intelligent question answering method is realized.

Description

Method and device for responding to digital human questions, electronic equipment and storage medium
Technical Field
The present application relates to the field of intelligent question answering technologies, and in particular, to a method and an apparatus for digital human question answering, an electronic device, and a storage medium.
Background
With the continuous development of artificial intelligence, intelligent question answering is also applied to various fields to realize intelligent human-computer interaction, so that the service processing efficiency can be effectively improved, the user experience can be improved, the cost can be reduced, and the like.
In the existing intelligent question-answering mode, when a question initiated by a user is received each time, after preprocessing such as format and the like, the question is processed based on a natural language processing technology, and a corresponding answer is matched by using a processed keyword, or a processing result is processed by using a language model and the corresponding answer is output.
But since the overall process of obtaining answers to questions is relatively long, the process of obtaining answers each time is relatively slow, resulting in an overall interactive process time course.
Disclosure of Invention
Based on the defects of the prior art, the application provides a method and a device for responding to a digital human question, electronic equipment and a storage medium, so as to solve the problem that the efficiency of the existing intelligent question-answering mode is relatively low.
In order to achieve the above object, the present application provides the following technical solutions:
a first aspect of the present application provides a method of digital human question answering, comprising:
acquiring a current request problem;
judging whether a response video corresponding to the current request problem is stored in a cache; the cache is stored with a plurality of response videos corresponding to the high-frequency request problems in advance;
if the response video corresponding to the current request problem is judged to be stored in the cache, the response video corresponding to the current request problem in the cache is output;
if the answer video corresponding to the current request question is judged not to be stored in the cache, generating a text answer corresponding to the current request question by utilizing a pre-established language processing model;
generating a response video corresponding to the current request question by using the text answer corresponding to the current request question;
and outputting the generated response video corresponding to the current request problem.
Optionally, in the method for responding to a digital human question provided above, further comprising:
counting the frequency of each request problem in a preset time period regularly;
sequencing the request problems according to the sequence of the frequency of the request problems from large to small to obtain a sequencing result;
determining each request problem of the first N bits in the sequencing result as a high-frequency request problem;
generating a text answer corresponding to each high-frequency request question by using the language processing model;
respectively generating a response video corresponding to each high-frequency request question by using the text answer corresponding to each high-frequency request question;
and updating the response video corresponding to each high-frequency request problem into the cache.
Optionally, in the above provided method for responding to a digital human question, the updating, to the cache, a response video corresponding to each high-frequency request question includes:
respectively aiming at each high-frequency request problem, calculating the high-frequency request problem by using an information summary algorithm to obtain a hash value corresponding to the high-frequency request problem;
and updating the key value pair consisting of the hash value corresponding to the high-frequency request question and the response video corresponding to the high-frequency request question into the cache.
Optionally, in the above method for responding to a digital human question, before determining whether a response video corresponding to the current request question is stored in the cache, the method further includes:
converting the current request question into a text format;
calculating the current request problem converted into a text format by using the information summary algorithm to obtain a hash value corresponding to the current request problem;
wherein, the determining whether the response video corresponding to the current request problem is stored in the cache includes:
inquiring whether a hash value consistent with a hash value corresponding to the current request problem is stored in the cache; if the hash value which is consistent with the hash value corresponding to the current request question is stored in the cache, judging that the response video corresponding to the current request question is stored in the cache.
Optionally, in the above provided method for responding to a digital human question, the generating a response video corresponding to the current request question by using the text answer corresponding to the current request question includes:
matching an animation template corresponding to the current request problem;
converting the text answer corresponding to the current request question into an audio format;
and splicing the animation template corresponding to the current request question with the text answer which is converted into an audio format and corresponds to the current request question to obtain a response video corresponding to the current request question.
A second aspect of the present application provides an apparatus for digital human question answering, comprising:
the acquisition unit is used for acquiring a current request problem;
the judging unit is used for judging whether a response video corresponding to the current request problem is stored in a cache; the cache is stored with a plurality of response videos corresponding to the high-frequency request problems in advance;
the first feedback unit is used for outputting the response video corresponding to the current request question in the cache if the response video corresponding to the current request question is judged to be stored in the cache;
a first answer generating unit, configured to generate a text answer corresponding to the current request question by using a pre-established language processing model if it is determined that the response video corresponding to the current request question is not stored in the cache;
the first video generation unit is used for generating a response video corresponding to the current request question by using the text answer corresponding to the current request question;
and the second feedback unit is used for outputting the generated response video corresponding to the current request problem.
Optionally, in the above provided apparatus for digital human question answering, further comprising:
the statistical unit is used for regularly counting the frequency of each request problem in a preset time period;
the ordering unit is used for ordering the request problems according to the sequence of the frequency of the request problems from large to small to obtain an ordering result;
a determining unit, configured to determine each request problem of the top N bits in the sorting result as a high-frequency request problem;
the second answer generating unit is used for generating text answers corresponding to the high-frequency request questions by utilizing the language processing model;
the second video generation unit is used for generating response videos corresponding to the high-frequency request questions by respectively utilizing text answers corresponding to the high-frequency request questions;
and the cache unit is used for updating the response videos corresponding to the high-frequency request problems into the cache.
Optionally, in the above provided apparatus for responding to a digital human question, the cache unit includes:
the first calculation unit is used for calculating the high-frequency request problems by using an information summary algorithm aiming at each high-frequency request problem to obtain a hash value corresponding to the high-frequency request problem;
and the updating unit is used for updating the key value pair consisting of the hash value corresponding to the high-frequency request question and the response video corresponding to the high-frequency request question into the cache.
Optionally, in the above provided apparatus for digital human question answering, further comprising:
the first format conversion unit is used for converting the current request question into a text format;
the second calculation unit is used for calculating the current request problem converted into the text format by using the information abstract algorithm to obtain a hash value corresponding to the current request problem;
wherein, when the determining unit determines whether the response video corresponding to the current request problem is stored in the cache, the determining unit is configured to:
inquiring whether a hash value consistent with a hash value corresponding to the current request problem is stored in the cache; if the hash value which is consistent with the hash value corresponding to the current request question is stored in the cache, judging that the response video corresponding to the current request question is stored in the cache.
Optionally, in the above provided apparatus for digital human question answering, the first video generating unit includes:
the matching unit is used for matching an animation template corresponding to the current request problem;
the second format conversion unit is used for converting the text answer corresponding to the current request question into an audio format;
and the splicing unit is used for splicing the animation template corresponding to the current request question with the text answer which is converted into an audio format and corresponds to the current request question to obtain the response video corresponding to the current request question.
A third aspect of the present application provides an electronic device comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is adapted to execute the program, which when executed is particularly adapted to implement the method of digital human question answering as defined in any of the above.
A fourth aspect of the present application provides a computer storage medium storing a computer program for, when executed, implementing a method of digital human question answering as claimed in any one of the preceding claims.
According to the digital human question answering method, answering videos corresponding to a plurality of high-frequency request questions are stored in a cache in advance. Therefore, after the current request problem is obtained, whether a response video corresponding to the current request problem is stored in the cache is judged. If the response video corresponding to the current request problem is stored in the cache, the response video corresponding to the current request problem in the cache is directly output, so that the current request problem does not need to be processed to generate the corresponding response video, and the response efficiency is improved. In addition, in the whole interaction process, the current request problems provided by the user are high-frequency request problems in a high frequency, so that most of the problems can be directly responded from the cache, and the efficiency of the whole interaction process is greatly improved. And for few current list problems, if the answer video corresponding to the current request problem is judged not to be stored in the cache, generating a text answer corresponding to the current request problem by using a pre-constructed language processing model, then generating the answer video corresponding to the current request problem by using the text answer corresponding to the current request problem, and outputting the generated answer video corresponding to the current request problem, so that the answer of the problem can be fed back to the user in time for few problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a problem response system according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for responding to a digital human question provided by an embodiment of the present application;
fig. 3 is a method for generating and caching a response video corresponding to a high-frequency request problem according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for generating a response video according to an embodiment of the present application;
FIG. 5 is a flow chart of another method for digital human question answering according to another embodiment of the present application;
fig. 6 is a flowchart of another method for generating a response video corresponding to a high-frequency request problem in advance and storing the response video in a cache according to another embodiment of the present application;
fig. 7 is a schematic application environment diagram of a method provided in the present application according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a digital human question answering device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a cache unit according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a first video generating unit according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this application, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The application provides a digital human question answering method, which aims to solve the problem that the existing intelligent question answering mode is relatively slow in efficiency.
Optionally, in order to implement the digital human question answering method provided by the application, the embodiment of the application provides a question answering system. The architecture of the problem response system provided in the embodiment of the present application, as shown in fig. 1, includes:
the system comprises a high-frequency question-answer counting module, a digital human central control module, a Bot module, a video generation module and an OSS storage module.
The high-frequency problem counting module is used for counting the problems received within a period of time so as to obtain a high-frequency request problem, and then issuing a high-frequency response video generation task to the digital human central control based on the high-frequency request problem. Alternatively, the high-frequency problem statistic module may issue a high-frequency response video generation task to the digital human center based on a Message Queue (MQ).
The data man central control is mainly used for calling the bot module to generate text answers when a high-frequency response video generation task is received, then calling the video generation module to generate response video files and storing the response video files in the OSS storage module. And when receiving the current request problem, judging whether the OSS storage module comprises a response video corresponding to the current request problem, if so, outputting the response video corresponding to the current problem in the OSS storage module, if not, generating a text answer in the calling bot module, and then calling the video generation module to generate and output a response video file.
The Bot module is primarily used to generate answers to input questions. The text answer to the question may be obtained based on a natural language model, and specifically may be obtained based on a language model trained in advance. In addition, in the process of model training and the like, accurate answers can be obtained through the Internet.
The video generation module is mainly used for generating a corresponding response video by using the text answer generated by the Bot module, and directly feeding back or caching the response video to the OSS storage module.
The OSS storage module is mainly used for caching the response video of the high-frequency request problem generated by the video generation module.
Based on the problem response system provided above, the embodiment of the present application provides a method for digital human problem response, as shown in fig. 2, including the following steps:
s201, acquiring the current request problem.
Optionally, the current request question extracted by the user may be collected by a voice manner, or the current request question of the user may be obtained by a manner of typing in by the user, selecting a question by the user, or the like.
If the format of the current request question is not suitable for the text format, for example, if the current request question is obtained as voice, the format of the current request question needs to be converted into the text format for subsequent processing.
S202, judging whether response videos corresponding to the current request problems are stored in the cache.
The cache stores a plurality of response videos corresponding to the high-frequency request questions in advance.
It should be noted that, in the embodiment of the present application, high-frequency request problems meeting requirements are counted in advance based on the problems obtained in the historical time period, and a response video corresponding to the high-frequency request problems is generated. And then storing the generated response video corresponding to the high-frequency request problem into a cache for later use.
Optionally, the method may include extracting a keyword in the current request problem, and then matching the extracted keyword with the response video in the cache, so as to determine whether the response video corresponding to the current request problem is stored in the cache, or determine whether the response video corresponding to the current request problem is stored in the cache in other manners, which all belong to the protection scope of the present application.
If it is determined that the response video corresponding to the current request question is stored in the cache, step S203 is executed. If it is determined that the response video corresponding to the current request problem is not stored in the cache, step S204 is executed.
Optionally, in another embodiment of the present application, a method for generating and caching a response video corresponding to a high-frequency request problem is provided, as shown in fig. 3, including the following steps:
s301, counting the frequency of each request problem in a preset time period regularly.
Specifically, the frequency of each request question in the previous day may be counted in the morning or other idle time each day.
S302, sequencing the request problems according to the sequence of the frequency of the request problems from large to small to obtain a sequencing result.
S303, determining the first N-bit request problems in the sequencing result as high-frequency request problems.
And S304, generating text answers corresponding to the high-frequency request questions by using the language processing model.
Specifically, text answers corresponding to the high-frequency request questions are generated through the Bot module by using the language processing model.
It should be noted that the speech processing model is obtained by training a plurality of questions and corresponding text answers in advance.
S305, generating response videos corresponding to the high-frequency request questions by respectively using the text answers corresponding to the high-frequency request questions.
Because the response video is finally output to realize the interaction between the vivid digital person and the user, the response video corresponding to each high-frequency request question needs to be generated by respectively utilizing the text answer corresponding to each high-frequency request question.
S306, updating the response video corresponding to each high-frequency request problem into a cache.
Optionally, since the response video corresponding to the high-frequency request problem previously stored in the cache may not belong to the high-frequency request problem at present, all the response videos in the cache may be deleted first, and then the currently obtained response video corresponding to each high-frequency request problem may be stored in the cache.
And S203, outputting the response video corresponding to the current request problem in the cache.
Because the response video corresponding to the current request problem is stored in the cache, the response video corresponding to the current request problem is generated without processing the current request problem, and the response video corresponding to the parent request problem in the cache is directly extracted and output.
And S204, generating a text answer corresponding to the current request question by using a pre-constructed language processing model.
Since the response video corresponding to the current request question is not stored in the cache, and the response video corresponding to the current request question needs to be fed back, the text answer corresponding to the current request question is generated by using the pre-constructed language processing model, and then step S205 is executed.
It should be noted that the construction method and the training method of the speech processing model belong to the prior art, and therefore are not described herein again.
And S205, generating a response video corresponding to the current request question by using the text answer corresponding to the current request question.
In order to realize the interaction between the digital person and the user, the answer video corresponding to the current request question needs to be generated by using the text answer corresponding to the current request question, so that the text answer corresponding to the current request question can be spoken by the digital person through the answer video.
Optionally, in another embodiment of the present application, a specific implementation manner of step S205, as shown in fig. 4, includes the following steps:
and S401, matching an animation template corresponding to the current request problem.
In the embodiment of the application, corresponding animation templates are configured in advance based on different types of questions. Therefore, the type corresponding to the current request question can be determined, and then the animation template corresponding to the type corresponding to the current request question can be used.
S402, converting the text answer corresponding to the current request question into an audio format.
And S403, splicing the animation template corresponding to the current request question with the text answer converted into the audio format and corresponding to the current request question to obtain a response video corresponding to the current request question.
Optionally, when the response video is generated, the corresponding subtitle may be generated by using the text answer corresponding to the current request question, and the subtitle and the animation template corresponding to the current request question are converted into an audio format to generate a response together.
And S206, outputting the generated response video corresponding to the current request problem.
Specifically, the response video is fed back to the front end, and the response video corresponding to the current request problem is played on the user interface by the front end.
The embodiment of the application provides a digital human question answering method, wherein answering videos corresponding to a plurality of high-frequency request questions are stored in a cache in advance. Therefore, after the current request problem is obtained, whether a response video corresponding to the current request problem is stored in the cache is judged. If the response video corresponding to the current request problem is stored in the cache, the response video corresponding to the current request problem in the cache is directly output, so that the current request problem does not need to be processed to generate the corresponding response video, and the response efficiency is improved. In addition, in the whole interaction process, the current request problems provided by the user are high-frequency request problems in a high frequency, so that most of the problems can be directly responded from the cache, and the efficiency of the whole interaction process is greatly improved. And for few current list problems, if the answer video corresponding to the current request problem is judged not to be stored in the cache, generating a text answer corresponding to the current request problem by using a pre-constructed language processing model, then generating the answer video corresponding to the current request problem by using the text answer corresponding to the current request problem, and outputting the generated answer video corresponding to the current request problem, so that the answer of the problem can be fed back to the user in time for few problems.
Another embodiment of the present application provides another method for responding to a digital human question, as shown in fig. 5, including the following steps:
s501, obtaining the current request problem.
It should be noted that, for the specific implementation of step S501, reference may be made to step S201 in the foregoing method embodiment, and details are not described here again.
And S502, converting the current request question into a text format.
It should be noted that, currently, a digital human interaction mode is usually adopted to perform question response, so that the obtained current request question is usually in a voice format, and therefore, the current request question needs to be converted into a text format for subsequent processing.
S503, calculating the current request problem converted into the text format by using an information abstract algorithm to obtain a hash value corresponding to the current request problem.
In the embodiment of the present application, the hash value corresponding to the high-frequency request problem and the response video corresponding to the high-frequency request problem are stored in the cache in a key-value pair manner, so that whether the response video corresponding to the current request problem is stored in the cache can be determined by using the hash value corresponding to the current request problem, and therefore, the hash value corresponding to the current request problem needs to be obtained by calculation first.
Optionally, the information summarization algorithm used may be specifically the MD5 algorithm.
S504, whether the cache stores the hash value consistent with the hash value corresponding to the current request problem or not is inquired.
The cache is stored with a plurality of response videos corresponding to the high-frequency request questions in advance.
It should be noted that, in the embodiment of the present application, whether a response video corresponding to the current request question is stored in the cache is determined by querying whether a hash value consistent with a hash value corresponding to the current request question is stored in the cache, so if a hash value consistent with a hash value corresponding to the current request question is stored in the cache, it is determined that a response video corresponding to the current request question is stored in the cache, and therefore step S505 is executed at this time. If the cache does not store the hash value consistent with the hash value corresponding to the current request question, step S506 is executed.
Optionally, another method for generating a response video corresponding to a high-frequency request problem in advance and storing the response video in a cache, as shown in fig. 6, includes:
s601, counting the frequency of each request problem in a preset time period regularly.
It should be noted that, for the specific implementation of step S601, reference may be made to step S301 in the foregoing method embodiment, and details are not described here again.
S602, sequencing the request problems according to the sequence of the frequency of the request problems from large to small to obtain a sequencing result.
S603, determining the first N-bit request problems in the sequencing result as high-frequency request problems.
And S604, generating text answers corresponding to the high-frequency request questions by using the language processing model.
And S605, generating response videos corresponding to the high-frequency request questions by respectively using the text answers corresponding to the high-frequency request questions.
And S606, calculating the high-frequency request problems by using an information summary algorithm aiming at each high-frequency request problem to obtain a hash value corresponding to the high-frequency request problem.
S607, the key value pair formed by the hash value corresponding to the high-frequency request question and the response video corresponding to the high-frequency request question is updated to the cache.
Specifically, for each high-frequency request question, the hash value corresponding to the high-frequency request question is regarded as a key, and the response video corresponding to the high-frequency request question is regarded as a valu, so that the key value pair corresponding to the high-frequency request question is formed. And finally, caching the key value pair corresponding to each high-frequency request problem.
And S505, outputting the response video corresponding to the current request problem in the cache.
It should be noted that, in the specific implementation of step S505, reference may be made to step S203 in the foregoing method embodiment, and details are not described here again.
S506, generating a text answer corresponding to the current request question by using a pre-constructed language processing model.
It should be noted that, for the specific implementation of step S506, reference may be made to step S204 in the foregoing method embodiment, and details are not described here again.
And S507, generating a response video corresponding to the current request question by using the text answer corresponding to the current request question.
It should be noted that, for the specific implementation of step S507, reference may be made to step S205 in the foregoing method embodiment, and details are not described here again.
S508, outputting the generated response video corresponding to the current request problem
It should be noted that, in the specific implementation of step S508, reference may be made to step S206 in the foregoing method embodiment, and details are not described here again.
It should be noted that the flowchart and block diagrams in the above-described method embodiments illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating an application environment suitable for the embodiment of the present application. The method of digital human question answering provided by any of the above embodiments of the present application may be applied to an interactive system 700 as shown in fig. 7. The interactive system 700 comprises a terminal device 701 and a server 702, wherein the server 702 is in communication connection with the terminal device 701. The server 702 may be a conventional server or a cloud server, which is not limited herein.
The terminal device 701 may be various electronic devices that have a display screen, a data processing module, a shooting camera, an audio input/output function, and the like, and support data input, including but not limited to a smartphone, a tablet computer, a laptop portable computer, a desktop computer, a kiosk, a wearable electronic device, and the like. Specifically, the data input may be inputting voice based on a voice module provided on the electronic device, inputting characters based on a character input module, and the like.
The terminal device 701 may have a client application installed thereon, and the user may be based on the client application (for example, APP, wechat applet, etc.), where the conversation robot in this embodiment is also a client application configured in the terminal device 701. A user may register a user account in the server 702 based on the client application program, and communicate with the server 702 based on the user account, for example, the user logs in the user account in the client application program, inputs information through the client application program based on the user account, and may input text information or voice information, and the like, after receiving information input by the user, the client application program may send the information to the server 702, so that the server 702 may receive the information, process and store the information, and the server 702 may also receive the information and return a corresponding output information to the terminal device 701 according to the information.
In some embodiments, the apparatus for processing the data to be identified may also be disposed on the terminal device 701, so that the terminal device 701 can interact with the user without relying on the server 702 to establish communication, and in this case, the interactive system 700 may only include the terminal device 701.
Another embodiment of the present application provides a digital human question answering device, as shown in fig. 8, including the following units:
an obtaining unit 801 is used for obtaining the current request problem.
The determining unit 802 is configured to determine whether a response video corresponding to the current request problem is stored in the cache.
The cache stores a plurality of response videos corresponding to the high-frequency request questions in advance.
The first feedback unit 803 is configured to, if it is determined that the response video corresponding to the current request question is stored in the cache, output the response video corresponding to the current request question in the cache.
The first answer generating unit 804 is configured to, if it is determined that the response video corresponding to the current request question is not stored in the cache, generate a text answer corresponding to the current request question by using a pre-established language processing model.
The first video generating unit 805 is configured to generate a response video corresponding to the current request question by using the text answer corresponding to the current request question.
And a second feedback unit 806, configured to output a response video corresponding to the generated current request question.
Optionally, in an apparatus for responding to a digital human question provided in another embodiment of the present application, the apparatus further includes:
and the counting unit is used for regularly counting the frequency of each request problem in a preset time period.
And the sequencing unit is used for sequencing the request problems according to the sequence of the frequency of the request problems from large to small to obtain a sequencing result.
And the determining unit is used for determining each request problem of the first N bits in the sequencing result as a high-frequency request problem.
And the second answer generating unit is used for generating text answers corresponding to the high-frequency request questions by using the language processing model.
And the second video generation unit is used for generating response videos corresponding to the high-frequency request questions by respectively utilizing the text answers corresponding to the high-frequency request questions.
And the cache unit is used for updating the response videos corresponding to the high-frequency request problems into the cache.
Optionally, in an apparatus for responding to a digital human question provided in another embodiment of the present application, a cache unit, as shown in fig. 9, includes:
the first calculating unit 901 is configured to calculate the high-frequency request problem by using an information digest algorithm for each high-frequency request problem, so as to obtain a hash value corresponding to the high-frequency request problem.
An updating unit 902, configured to update the hash value corresponding to the high-frequency request question and the key-value pair formed by the response video corresponding to the high-frequency request question into the cache.
Optionally, in an apparatus for responding to a digital human question provided in another embodiment of the present application, the apparatus further includes:
and the first format conversion unit is used for converting the current request question into a text format.
And the second calculating unit is used for calculating the current request problem converted into the text format by using an information abstract algorithm to obtain a hash value corresponding to the current request problem.
When the determining unit in the embodiment of the present application performs the determination on whether the response video corresponding to the current request problem is stored in the cache, the determining unit is configured to:
and inquiring whether a hash value consistent with the hash value corresponding to the current request problem is stored in the cache.
If the hash value consistent with the hash value corresponding to the current request problem is stored in the cache, the response video corresponding to the current request problem is stored in the cache.
Optionally, in an apparatus for responding to a digital human question provided in another embodiment of the present application, a first video generating unit, as shown in fig. 10, includes:
the matching unit 1001 is configured to match an animation template corresponding to the current request question.
The second format conversion unit 1002 is configured to convert the text answer corresponding to the current request question into an audio format.
The splicing unit 1003 is configured to splice the animation template corresponding to the current request question with the text answer converted into the audio format and corresponding to the current request question, so as to obtain an answer video corresponding to the current request question.
Optionally, each unit provided in the above embodiments of the present application may specifically be a component of each module in the system shown in fig. 1.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be referred to accordingly, and are not described herein again.
Another embodiment of the present application provides an electronic device, as shown in fig. 11, including:
a memory 1101 and a processor 1102.
The memory 1101 is used for storing programs.
The processor 1102 is adapted to execute the program stored in the memory 1101, and when the program is executed, is specifically adapted to implement the method of digital human question answering as provided in any of the embodiments described above.
It should be noted that, for a specific implementation process, reference may be made to the specific implementation process of the foregoing method embodiment, and details are not described here.
Another embodiment of the present application provides a computer storage medium for storing a computer program, which when executed, is used for implementing the method for digital human question answering as provided in any one of the above embodiments.
Computer storage media, including permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of digital human question answering, comprising:
acquiring a current request problem;
judging whether a response video corresponding to the current request problem is stored in a cache; the cache is stored with a plurality of response videos corresponding to the high-frequency request problems in advance;
if the response video corresponding to the current request problem is judged to be stored in the cache, the response video corresponding to the current request problem in the cache is output;
if the answer video corresponding to the current request question is judged not to be stored in the cache, generating a text answer corresponding to the current request question by utilizing a pre-established language processing model;
generating a response video corresponding to the current request question by using the text answer corresponding to the current request question;
and outputting the generated response video corresponding to the current request problem.
2. The method of claim 1, further comprising:
counting the frequency of each request problem in a preset time period regularly;
sequencing the request problems according to the sequence of the frequency of the request problems from large to small to obtain a sequencing result;
determining each request problem of the first N bits in the sequencing result as a high-frequency request problem;
generating a text answer corresponding to each high-frequency request question by using the language processing model;
respectively generating a response video corresponding to each high-frequency request question by using the text answer corresponding to each high-frequency request question;
and updating the response video corresponding to each high-frequency request problem into the cache.
3. The method according to claim 2, wherein the updating the response video corresponding to each high-frequency request question into the cache comprises:
respectively aiming at each high-frequency request problem, calculating the high-frequency request problem by using an information summary algorithm to obtain a hash value corresponding to the high-frequency request problem;
and updating the key value pair consisting of the hash value corresponding to the high-frequency request question and the response video corresponding to the high-frequency request question into the cache.
4. The method according to claim 3, wherein before determining whether the response video corresponding to the current request question is stored in the cache, the method further comprises:
converting the current request question into a text format;
calculating the current request problem converted into a text format by using the information summary algorithm to obtain a hash value corresponding to the current request problem;
wherein, the determining whether the response video corresponding to the current request problem is stored in the cache includes:
inquiring whether a hash value consistent with a hash value corresponding to the current request problem is stored in the cache; if the hash value which is consistent with the hash value corresponding to the current request question is stored in the cache, judging that the response video corresponding to the current request question is stored in the cache.
5. The method of claim 1, wherein the generating a response video corresponding to the current request question by using the text answer corresponding to the current request question comprises:
matching an animation template corresponding to the current request problem;
converting the text answer corresponding to the current request question into an audio format;
and splicing the animation template corresponding to the current request question with the text answer which is converted into an audio format and corresponds to the current request question to obtain a response video corresponding to the current request question.
6. An apparatus for digital human answering, comprising:
the acquisition unit is used for acquiring a current request problem;
the judging unit is used for judging whether a response video corresponding to the current request problem is stored in a cache; the cache is stored with a plurality of response videos corresponding to the high-frequency request problems in advance;
the first feedback unit is used for outputting the response video corresponding to the current request question in the cache if the response video corresponding to the current request question is judged to be stored in the cache;
a first answer generating unit, configured to generate a text answer corresponding to the current request question by using a pre-established language processing model if it is determined that the response video corresponding to the current request question is not stored in the cache;
the first video generation unit is used for generating a response video corresponding to the current request question by using the text answer corresponding to the current request question;
and the second feedback unit is used for outputting the generated response video corresponding to the current request problem.
7. The apparatus of claim 6, further comprising:
the statistical unit is used for regularly counting the frequency of each request problem in a preset time period;
the ordering unit is used for ordering the request problems according to the sequence of the frequency of the request problems from large to small to obtain an ordering result;
a determining unit, configured to determine each request problem of the top N bits in the sorting result as a high-frequency request problem;
the second answer generating unit is used for generating text answers corresponding to the high-frequency request questions by utilizing the language processing model;
the second video generation unit is used for generating response videos corresponding to the high-frequency request questions by respectively utilizing text answers corresponding to the high-frequency request questions;
and the cache unit is used for updating the response videos corresponding to the high-frequency request problems into the cache.
8. The apparatus of claim 7, wherein the buffer unit comprises:
the first calculation unit is used for calculating the high-frequency request problems by using an information summary algorithm aiming at each high-frequency request problem to obtain a hash value corresponding to the high-frequency request problem;
and the updating unit is used for updating the key value pair consisting of the hash value corresponding to the high-frequency request question and the response video corresponding to the high-frequency request question into the cache.
9. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is adapted to execute the program, which when executed is particularly adapted to implement the method of digital human question answering according to any one of claims 1 to 5.
10. A computer storage medium for storing a computer program which, when executed, is adapted to implement the method of digital human question answering according to any one of claims 1 to 5.
CN202111212379.9A 2021-10-18 2021-10-18 Method and device for responding to digital human questions, electronic equipment and storage medium Pending CN113868400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111212379.9A CN113868400A (en) 2021-10-18 2021-10-18 Method and device for responding to digital human questions, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111212379.9A CN113868400A (en) 2021-10-18 2021-10-18 Method and device for responding to digital human questions, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113868400A true CN113868400A (en) 2021-12-31

Family

ID=79000121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111212379.9A Pending CN113868400A (en) 2021-10-18 2021-10-18 Method and device for responding to digital human questions, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113868400A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635785A (en) * 2024-01-24 2024-03-01 卓世科技(海南)有限公司 Method and system for generating worker protection digital person

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039881A (en) * 2004-07-26 2006-02-09 Nippon Telegr & Teleph Corp <Ntt> System, method, and program for answering question
CN109657033A (en) * 2018-12-13 2019-04-19 泰康保险集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of customer problem processing
CN111125384A (en) * 2018-11-01 2020-05-08 阿里巴巴集团控股有限公司 Multimedia answer generation method and device, terminal equipment and storage medium
CN112597291A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Intelligent question and answer implementation method, device and equipment
CN112612877A (en) * 2020-12-16 2021-04-06 平安普惠企业管理有限公司 Multi-type message intelligent reply method, device, computer equipment and storage medium
CN113157897A (en) * 2021-05-26 2021-07-23 中国平安人寿保险股份有限公司 Corpus generation method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039881A (en) * 2004-07-26 2006-02-09 Nippon Telegr & Teleph Corp <Ntt> System, method, and program for answering question
CN111125384A (en) * 2018-11-01 2020-05-08 阿里巴巴集团控股有限公司 Multimedia answer generation method and device, terminal equipment and storage medium
CN109657033A (en) * 2018-12-13 2019-04-19 泰康保险集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of customer problem processing
CN112612877A (en) * 2020-12-16 2021-04-06 平安普惠企业管理有限公司 Multi-type message intelligent reply method, device, computer equipment and storage medium
CN112597291A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Intelligent question and answer implementation method, device and equipment
CN113157897A (en) * 2021-05-26 2021-07-23 中国平安人寿保险股份有限公司 Corpus generation method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635785A (en) * 2024-01-24 2024-03-01 卓世科技(海南)有限公司 Method and system for generating worker protection digital person
CN117635785B (en) * 2024-01-24 2024-05-28 卓世科技(海南)有限公司 Method and system for generating worker protection digital person

Similar Documents

Publication Publication Date Title
CN110298906B (en) Method and device for generating information
CN111159220B (en) Method and apparatus for outputting structured query statement
WO2020160252A1 (en) Task-aware neural network architecture search
US11749255B2 (en) Voice question and answer method and device, computer readable storage medium and electronic device
KR20210090576A (en) A method, an apparatus, an electronic device, a storage medium and a program for controlling quality
CN110321544B (en) Method and device for generating information
CN111738010B (en) Method and device for generating semantic matching model
EP3707612B1 (en) Duplicative data detection
JP7200277B2 (en) Method and apparatus, electronic device, storage medium and computer program for identifying word slots
US11755949B2 (en) Multi-platform machine learning systems
CN110738056B (en) Method and device for generating information
CN109543154B (en) Type conversion method and device of table data, storage medium and electronic equipment
CN112182255A (en) Method and apparatus for storing media files and for retrieving media files
CN110245334B (en) Method and device for outputting information
CN113823282B (en) Voice processing method, system and device
CN113868400A (en) Method and device for responding to digital human questions, electronic equipment and storage medium
CN111008213A (en) Method and apparatus for generating language conversion model
CN110688827A (en) Data processing method and device, electronic equipment and storage medium
CN113111658A (en) Method, device, equipment and storage medium for checking information
US11386056B2 (en) Duplicate multimedia entity identification and processing
CN111191242A (en) Vulnerability information determination method and device, computer readable storage medium and equipment
CN110472055B (en) Method and device for marking data
CN114661289A (en) Knowledge and data driving-based micro application development system and method
CN112309390B (en) Information interaction method and device
CN110990528A (en) Question answering method and device and electronic equipment

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