CN110059231B - Reply content generation method and device - Google Patents

Reply content generation method and device Download PDF

Info

Publication number
CN110059231B
CN110059231B CN201910322333.9A CN201910322333A CN110059231B CN 110059231 B CN110059231 B CN 110059231B CN 201910322333 A CN201910322333 A CN 201910322333A CN 110059231 B CN110059231 B CN 110059231B
Authority
CN
China
Prior art keywords
content
reply
appeal
data
type
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.)
Active
Application number
CN201910322333.9A
Other languages
Chinese (zh)
Other versions
CN110059231A (en
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.)
Kang Zhonghua
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201910322333.9A priority Critical patent/CN110059231B/en
Publication of CN110059231A publication Critical patent/CN110059231A/en
Application granted granted Critical
Publication of CN110059231B publication Critical patent/CN110059231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90332Natural language query formulation or dialogue systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

The invention relates to the technical field of data analysis, and discloses a method and a device for generating reply content, wherein the method comprises the following steps: acquiring the appeal content of the appeal person; analyzing the appeal content to obtain a plurality of appeal characterization data; and generating the appeal reply content through a reply generation module on the basis of the plurality of appeal characterization data, wherein the appeal reply content is matched with any one of the appeal characterization data. By implementing the embodiment of the invention, the plurality of appeal representation data in the appeal content can be acquired, and the reply content is generated according to the plurality of appeal representation data, so that the reply content is more fit with the appeal content input by the user, the efficiency of replying the appeal content is improved, and the use experience of the user is improved.

Description

Reply content generation method and device
Technical Field
The invention relates to the technical field of data analysis, in particular to a method and a device for generating reply content.
Background
With the development of the internet, more and more people choose to use the emotion complaint platform to describe the complaint of the family or the friend to the stranger, and in order to make a targeted response to the complaint of the complaint, the emotion complaint platform usually responds to the complaint of the complaint in a manual mode. However, it has been found in practice that it is inefficient to reply to the complaint content manually.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for generating reply content, which can improve the efficiency of replying the appealing content and improve the user experience.
The first aspect of the embodiments of the present invention discloses a method for generating reply content, where the method includes:
acquiring the appeal content of the appeal person;
analyzing the appeal content to obtain a plurality of appeal characterization data, wherein the appeal characterization data at least comprises appeal text data;
and generating reply content corresponding to the appeal content through a reply generation module on the basis of the plurality of appeal characterization data, wherein the reply content is matched with any one of the appeal characterization data.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the analyzing the content to obtain a plurality of characterization data includes:
determining a current data type of the complaint content, wherein the data type at least comprises any one of a text type, an audio type, a picture type and a video type;
when the current data type is the text type, analyzing the appeal content through a plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model;
when the current data type is any one of the audio type, the picture type and the video type, analyzing the appeal content through a plurality of content analysis models to obtain text appeal representation data corresponding to each content analysis model, and analyzing the text appeal representation data through a plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the generating reply content corresponding to the appeal content by using the reply generation module based on the plurality of appeal feature data includes:
determining a data type of each of the complaint characterization data;
determining reply generation models from a reply generation module that match the data types of the complaint characterization data, wherein one data type of the complaint characterization data matches one of the reply generation models;
inputting the complaint characterization data into the reply generation model that matches a data type of the complaint characterization data;
and obtaining reply contents corresponding to the appeal contents from a plurality of reply generation models.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the inputting the characterization data into the reply generation model that matches the data type of the characterization data includes:
inputting each complaint representation data into the reply generation model matched with the data type of the complaint representation data; alternatively, the first and second electrodes may be,
combining the appeal representation data according to a preset data combination model to obtain a plurality of target appeal representation data, and obtaining a target data type of each target appeal representation data;
inputting the target complaint characterization data into a reply generation model that matches a target data type of the target complaint characterization data.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the obtaining reply content corresponding to the content from the plurality of reply generation models includes:
obtaining a plurality of reply sub-contents from the plurality of reply models, wherein one reply sub-content is from one reply model;
and integrating the plurality of reply sub-contents to obtain reply contents corresponding to the appeal contents.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the integrating the plurality of reply sub-contents to obtain the reply content corresponding to the appealing content includes:
detecting the number of the reply sub-contents corresponding to the appeal contents;
when the number of the reply sub-contents is detected to be multiple, combining the reply sub-contents according to a preset reply combination model to obtain reply contents corresponding to the appeal contents;
and when the number of the reply sub-contents is one, determining the reply sub-contents as reply contents corresponding to the appeal contents.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the combining the reply sub-contents according to a preset reply combination model to obtain the reply content corresponding to the appealing content includes:
combining the reply sub-contents according to a preset reply combination model to obtain initial reply contents;
and optimizing the initial reply content to obtain final reply content corresponding to the appeal content, wherein the optimizing operation at least comprises a sentence correcting operation and/or a sensitive word replacing/deleting operation.
A second aspect of the present invention discloses a device for generating reply content, including:
an acquisition unit that acquires the content of the appealing person;
the analysis unit is used for analyzing the appeal content to obtain a plurality of appeal characterization data, and the appeal characterization data at least comprises appeal text data;
the generation unit is used for generating reply contents corresponding to the appeal content through a reply generation module according to the plurality of appeal characterization data, and the reply contents are matched with any one of the appeal characterization data.
As an alternative implementation, in a second aspect of the embodiments of the present invention, the analysis unit includes:
the first determining subunit is configured to determine a current data type of the appeal content, where the data type at least includes any one of a text type, an audio type, a picture type, and a video type;
the first analysis subunit is configured to, when the current data type is the text type, analyze the content through a plurality of text content analysis models to obtain the representation data corresponding to each text content analysis model;
the second analysis subunit is configured to, when the current data type is any one of the audio type, the picture type, and the video type, analyze the content through the plurality of content analysis models to obtain the text appeal representation data corresponding to each content analysis model, and analyze the text appeal representation data through the plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the generating unit includes:
a second determining subunit, configured to determine a data type of each of the complaint characterization data;
a third determining subunit, configured to determine, from a reply generation module, a reply generation model that matches the data type of the characterization data, where one data type of the characterization data matches one reply generation model;
an input subunit, configured to input the characterization data into the reply generation model that matches a data type of the characterization data;
and the obtaining subunit is used for obtaining reply content corresponding to the appeal content from a plurality of reply generation models.
As an alternative implementation, in the second aspect of the embodiment of the present invention, the input subunit includes:
the first input module is used for inputting each appearancing data into the reply generation model matched with the data type of the appearancing data; alternatively, the first and second electrodes may be,
the combination module is used for combining the characterization data according to a preset data combination model to obtain a plurality of target appeal characterization data and obtain a target data type of each target appeal characterization data;
a second input module for inputting the target appeal characterization data into a reply generation model matched with a target data type of the target appeal characterization data.
As an alternative implementation, in the second aspect of the embodiment of the present invention, the obtaining subunit includes:
an obtaining module, configured to obtain a plurality of reply sub-contents from the plurality of reply models, where one reply sub-content is from one reply model;
and the integration module is used for integrating the reply sub-contents to obtain reply contents corresponding to the appeal contents.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the integration module includes:
the detection submodule is used for detecting the number of the reply sub-content corresponding to the appeal content;
the combining submodule is used for combining the reply sub-contents according to a preset reply combination model when the number of the reply sub-contents is detected to be multiple, so as to obtain reply contents corresponding to the appeal contents;
the determining sub-module is used for determining the reply sub-content as the reply content corresponding to the appeal content when the number of the reply sub-content is detected to be one.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the combining sub-module includes:
the combination component is used for combining the reply sub-contents according to a preset reply combination model to obtain initial reply contents when the number of the reply sub-contents is detected to be multiple;
and the optimization component is used for performing optimization operation on the initial reply content to obtain final reply content corresponding to the appeal content, wherein the optimization operation at least comprises sentence correcting operation and/or sensitive word replacing/deleting operation.
A third aspect of an embodiment of the present invention discloses an electronic device, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform part or all of the steps of any one of the methods of the first aspect.
A fourth aspect of the present embodiments discloses a computer-readable storage medium storing a program code, where the program code includes instructions for performing part or all of the steps of any one of the methods of the first aspect.
A fifth aspect of embodiments of the present invention discloses a computer program product, which, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
A sixth aspect of the present embodiment discloses an application publishing platform, where the application publishing platform is configured to publish a computer program product, where the computer program product is configured to, when running on a computer, cause the computer to perform part or all of the steps of any one of the methods in the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the content of the appetizer is obtained; analyzing the appeal content to obtain a plurality of appeal characterization data; and generating the appeal reply content through a reply generation module on the basis of the plurality of appeal characterization data, wherein the appeal reply content is matched with any one of the appeal characterization data. Therefore, by implementing the embodiment of the invention, the plurality of appeal representation data in the appeal content can be acquired, and the reply content can be generated according to the plurality of appeal representation data, so that the reply content is more fit with the appeal content input by the user, the efficiency of replying the appeal content is improved, and the use experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a reply content generation method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for generating reply content according to the embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for generating reply content according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for generating reply content according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another apparatus for generating reply content according to the embodiment of the present invention;
fig. 6 is a schematic structural diagram of another apparatus for generating reply content according to the embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the embodiments and drawings of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a method and a device for generating reply content, which can enable the reply content to be more fit with the appeal content input by a user, improve the efficiency of replying to the appeal content and improve the use experience of the user. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for generating reply content according to an embodiment of the present invention. As shown in fig. 1, the method for generating reply content may include the following steps:
101. the electronic device obtains the appeal content of the appeal person.
102. The electronic equipment analyzes the appeal content to obtain a plurality of appeal characterization data, and the appeal characterization data at least comprises appeal text data.
In the embodiment of the present invention, the electronic device may be a device for generating reply content. The content type can be a text type, a picture type, an audio type, a video type and the like, the narrator can input the content of the text type and/or the picture type through a page output by the electronic device, can input the content of the audio type (such as the narrative voice input by a user) through a sound acquisition device (such as a microphone and the like) of the electronic device, and can simultaneously acquire the content of the video type and the audio type input by the user through an image acquisition device (such as a camera and the like) and a sound acquisition device of the electronic device. The content may contain only one type of content or may contain multiple types of content at the same time.
In an embodiment of the present invention, the content includes a content main body and/or a content title, where the content main body may be a content text, a content voice instruction (such as a voice instruction of the content), a picture content expression (such as a personal story with a group of pictures), or a video-captured instruction (such as an audio/video of the content captured by a camera), and the content main body may include one or more of the above-mentioned contents; the content may optionally include personal information of the appetizer, which is pre-stored in the electronic device and used as a component of the content.
In the embodiment of the invention, the electronic device can analyze the collected appeal content to obtain one or more appeal characterization data; the electronic device can analyze the content in different types in different manners to obtain final representation data, and the reply content subsequently generated by the electronic device needs to be analyzed according to the text content, so that the representation data obtained by the electronic device at least contains the text data, and the reply content generated by the electronic device is more accurate.
In the embodiment of the present invention, the complaint representation data may include text, title, theme, abstract, label (such as classification label, topic label, etc.), complaint intention, situation event, disease information, person information and person relationship information, complaint person personal information (such as age, gender, social identity, academic calendar, ethnicity, location, marital status, etc.), psychological analysis result of complaint person, complaint style information, metaphorical information, story allegian information, religious information, social information (such as work information, study information, life information, etc.), scientific information (such as mathematical content, philosophic content, physical content, chemical content, etc.), and semantic analysis result (such as sentence entity, grammar information, syntax information, grammar information, etc.) of complaint content; the narrative content comprises a plurality of situational events, a plurality of themes, a plurality of disease information, a plurality of character information and character relation information, a plurality of metaphor information, a plurality of story allegian information, a plurality of religious information, a plurality of social information and a plurality of scientific information, and the psychological analysis result of the narrative person at least comprises any one of a cognitive analysis result, a personality analysis result, a sentiment analysis result, a subconscious analysis result, an intention analysis result and a psychological condition evaluation result.
In the embodiment of the invention, each appellation data is obtained through a corresponding content analysis model, including that the appellation content text in the appellation data can be directly obtained through the appellation content, or obtained from an appellation content audio, an appellation content picture and an appellation content video through an identification model; the content title can be directly obtained through the content (the content contains the title); the theme of the appeal content can be obtained through a theme generation model; the abstract of the content can be obtained through an abstract generation model; the label of the content can be obtained through a label generation model; the appeal intention in the appeal content input by the appetitive person can be obtained through an appeal intention generation model; the situation event contained in the content can be obtained through a situation event analysis model; the disease information contained in the content can be obtained through a disease content acquisition model; the person information and the person relation information contained in the content can be obtained through a person and person relation analysis model; the psychological analysis result of the narcisant can be obtained through a psychological analysis model; the appeal style information of the content can be obtained through the appeal style analysis model; the metaphor information contained in the narrative content can be obtained through a metaphor analysis model; the story allegian information contained in the appeal content can be obtained through a story allegian analysis model; religious information contained in the appeal content can be obtained through a religious content analysis model; the social information contained in the content can be obtained through a social information analysis model; scientific information contained in the content can be obtained through a scientific content analysis model; the content semantic analysis result can be obtained through a semantic analysis module; the personal information of the appetizer can be obtained through the appetizer content and can also be obtained through a personal information analysis module. In addition, a theme generation model, a summary generation model, a tag generation model, a narration intention generation model, a contextual event analysis model, a disease content acquisition model, a character and character relationship analysis model, a narration style analysis model, a metaphorical analysis model, a story alleviation analysis model, a religious content analysis model, a social information analysis model, a scientific content analysis model and a psychological analysis model can be constructed through a neural network technology based on machine learning; the semantic analysis module can be constructed by a traditional semantic analysis technology or a neural network model based on machine learning. In addition, in recent years, the neural network model based on machine learning has been widely applied in the field of Natural Language Processing (NLP), and has abundant research results in the aspects of text summary generation, machine reading understanding, emotion analysis, content generation and the like, and the research results provide theoretical and technical bases for constructing an automatic response reply system.
The narrative content text, title, subject, abstract, label, intention, situation event, disease information, character information and character relation information, personal information of the narrative person, metaphor information, story dialect information and scientific information can be text content; the religious information, the social information, the psychological analysis result, the appeal style information and the semantic analysis result can be text data or numerical data.
One content analysis model can obtain one complaint representation data, or one text content analysis model can also obtain a plurality of complaint representation data.
As an optional implementation manner, the analyzing, by the electronic device, the content of the complaint obtained from the complaint person to obtain the plurality of characterization data may include the following steps:
the electronic equipment analyzes the appeal content acquired by the appeal person and determines the data type of the appeal content;
when the data type of the appeal content is detected to be a text type, the electronic equipment analyzes the appeal content of the text type through a content analysis model corresponding to the text type to obtain a plurality of appeal characterization data;
when the data type of the appeal content is detected to be the picture type, the electronic device conducts identification analysis on the appeal content of the picture type through a graphic image identification model to obtain text information in the appeal content picture, analyzes the text information through a content analysis model corresponding to the text type to obtain a plurality of appeal characterization data, and can identify the face image based on a facial expression identification model to obtain psychological characterization data of the appeal person when the appeal content of the picture type is identified to contain the face image, and can jointly determine the appeal text data and the psychological characterization data to be the identified plurality of appeal characterization data;
when the data type of the appeal content is detected to be an audio type, the electronic device identifies the appeal content through a voice identification module based on an Automatic Speech Recognition (ASR) technology to obtain text information corresponding to the appeal content voice, analyzes the text information through a content analysis model corresponding to the text type to obtain a plurality of appeal characterization data, and can also identify and analyze the speaking voice characteristics of the appeal person based on a voice emotion identification model to obtain psychology characterization data of the appeal person;
when the fact that the data type of the appeal content is the video type is detected, the electronic equipment identifies audio information in the appeal content through the voice identification module to obtain text information of the appeal content, can also conduct subconscious behavior identification analysis on the body behaviors of people through the body behavior identification analysis model to obtain psychological characterization data of the appeal people, and analyzes all the text information through the content analysis model corresponding to the text type to obtain a plurality of appeal characterization data.
By implementing the implementation mode, different manners can be used for analyzing according to the appeal contents of different data types, different appeal characterization data corresponding to the appeal contents of different data types are obtained, and the accuracy of analyzing and obtaining the appeal characterization data is improved.
Optionally, when it is detected that the data type of the complaint content is the picture type, the electronic device may perform identification analysis on the complaint content of the picture type through the image content analysis model, may analyze the character event content in the complaint content of the picture type, and may analyze the character event content to obtain a content description of the complaint content of the picture type, so as to generate text information corresponding to the content description, and analyze the text information through the text content analysis model corresponding to the text type to obtain a plurality of complaint representation data, thereby improving diversity of analysis modes of the electronic device for the content of the picture type.
103. The electronic equipment generates reply content corresponding to the appeal content through the reply generation module according to the plurality of appeal characterization data, and the reply content is matched with any one appeal characterization data.
In the embodiment of the invention, the reply generation module can be constructed through a neural network model, and optionally can also comprise a traditional NLP semantic analysis technology module, and the electronic device can generate reply contents matched with each piece of characterization data through the reply generation module so as to obtain contents matched with any one piece of characterization data in the generated reply contents.
For example, the text of the user-entered narrative may be: "I try very hard all the time, the time is study, the result is still suddenly high and low, this examination is not good. The examination result is better than that of the others who play the game after the break. I do not understand what meaning I have in the presence of the mediocre person in front of the excellence. What are the goals of many mediocre people living in the world facing the essence of the society? The electronic device can analyze the text of the content through various content analysis models, and when the text of the content is analyzed through the topic generation model, the data representing the content corresponding to the topic of the content, which can be obtained from the text of the content, is "how I should accept the average of the content facing elite? When the text of the appeal content is analyzed through the contextual event analysis model, the appeal representation data corresponding to the context of the appeal content, which can be obtained from the text of the appeal content, is that the fact that I is very hard all the time, the after-break time is learned, the score is suddenly high and suddenly low, the examination is not good at this time, and the fact that the after-break time of other people is played, but the examination score is better than the test score of I. Further, the electronic device may generate, by the reply generation module, a first reply sub-content "this scenario of your speaking" of the representation data corresponding to the context: 'why others play the lesson time but the test results are better than me', which is a too common situation and endeavors to get the best results "; the electronic equipment can also generate second reply sub-content of the appeal representation data corresponding to the theme through the reply generation module to ask for the attitude of the first life, but not the significance of the life. The big tree has the scene of the big tree, the small grass has the wonderful color of the small grass, and the healthy mind is obtained. The electronic device may combine the first reply sub-content and the second reply sub-content through the reply generation model to obtain a final reply content "this scenario you say: 'why others have been playing for the break time but the test performance is better than me', which is a too common situation and endeavors do not yield the best results. The answers of my are: the first is the attitude of life, but not the meaning of life. The big tree has the scene of the big tree, the small grass has the wonderful color of the small grass, and the healthy mind is obtained. The electronic device can output the obtained final reply content so that the complainer can see the reply of the electronic device to the complaining content, and therefore the reply content output by the electronic device is more targeted.
In the method described in fig. 1, the reply content can be more fit to the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the user experience is improved. In addition, the method described in fig. 1 is implemented, so that the accuracy of analyzing the characterization data is improved. In addition, the method described in fig. 1 is implemented, so that the diversity of the analysis modes of the electronic equipment for the content of the image type is improved. In addition, the method described in fig. 1 is implemented, so that the reply content output by the electronic device is more targeted.
Example two
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another reply content generating method according to an embodiment of the present invention. As shown in fig. 2, the method for generating reply content may include the following steps:
201. the electronic device obtains the appeal content of the appeal person.
202. The electronic device determines a current data type of the complaint content, where the data type includes at least any one of a text type, an audio type, a picture type, and a video type.
203. When the current data type is a text type, the electronic device analyzes the appeal content through the text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
In the embodiment of the present invention, the text content analysis model may be a machine learning-based neural network model, and may analyze the content of one or more text types input by the user to obtain the representation data corresponding to each text content analysis model, and the representation data obtained by analyzing one text content analysis model may be one or more.
204. When the current data type is any one of an audio type, a picture type and a video type, the electronic device analyzes the content through the plurality of content analysis models to obtain the text appeal representation data corresponding to each content analysis model, and analyzes the text appeal representation data through the plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
In the embodiment of the invention, the content analysis model can be a neural network model based on machine learning, the appeal contents of the text type, the audio type, the picture type and the video type can be analyzed, the model for analyzing the appeal contents of the text type can be a text content analysis model, the result obtained by analyzing the appeal contents of the audio type, the picture type and the video type by the content analysis model can be the appeal characterization data of the text type, and the obtained appeal characterization data of the text type can be analyzed by the text content analysis model to obtain the final appeal characterization data.
For example, when the content analysis model is any neural network model, the electronic device may input the appeal content into the neural network model, and obtain the corresponding text appeal characterization data by using the neural network model.
Optionally, the complaint representation data may be labeled in advance, for example, a content title text, a complaint content tag text, and complaint content user basic information in the complaint representation data may be labeled, and the complaint representation data labeled in advance in the complaint content may be directly obtained by analyzing the complaint representation data through a content analysis model.
In the embodiment of the present invention, the number of the content analysis models may be one or more, and the content analysis models may include a theme generation model, a summary generation model, a tag generation model, a narrative intention generation model, a contextual event analysis model, a disease content acquisition model, a person and person relationship analysis model, a narrative style analysis model, a metaphorical analysis model, a story-dwelling language analysis model, a religious content analysis model, a social information analysis model, a scientific content analysis model, a psychological analysis model, and the like, which are constructed based on a machine learning neural network technology. In addition, the content analysis model can analyze the content through the traditional NLP semantic analysis technology.
The content analysis model can be a neural network model based on machine learning, the appeal content is input into the neural network model, and the model is utilized to obtain the corresponding appeal characterization data. Or the content analysis model can also directly obtain the pre-marked appeal part characterization data in the appeal content, wherein the pre-marked appeal part characterization data comprises any one of appeal content title text, appeal content label text and appeal content user basic information.
For example, the neural network technique for constructing the abstract generation model may be: (1) supervised Learning (Supervised Learning) training model: the method comprises the steps of obtaining text samples of a plurality of appealing contents and abstract samples corresponding to the text samples, inputting the text samples and the abstract samples into a pre-constructed neural network model for carrying out multiple rounds of iterative operations, and training to obtain an optimal model, namely an abstract generation model. (2) Semi-supervised Learning (Semi-supervised Learning) training model: the method comprises the steps of obtaining a plurality of text samples of the appeal content and abstract samples (labeled data pairs) corresponding to the text samples, and abstract samples without corresponding relation or abstract samples (unlabeled data) without corresponding relation, inputting the abstract samples or the abstract samples without corresponding relation into a pre-constructed neural network model for carrying out iterative operation for multiple times, enabling the neural network model to generate corresponding pseudo text labels or pseudo abstract text labels for unlabeled data by using a learner obtained by iterative operation of the text samples of the appeal content and the abstract samples corresponding to the text samples, mixing the label data pairs and the pseudo label data pairs, carrying out iterative operation for multiple times, and training to obtain an optimal model, namely an abstract generation model. (3) Active Learning (Active Learning) can acquire a plurality of unlabeled sample data (such as text samples of the narrative content without the corresponding relationship or abstract text samples without the corresponding relationship), a learner can self-select some unlabeled samples and inquire an external knowledge system to obtain labels of the samples, and then the labeled samples are used as training examples to carry out conventional supervised Learning. (4) Unsupervised Learning (Unsupervised Learning) training model: the method comprises the steps of obtaining a plurality of unmarked sample data (such as an apperceive text sample without corresponding relation, an abstract text sample without corresponding relation or a text sample with other knowledge content), inputting the sample data into a pre-established neural network model for multi-round iteration operation, training an optimal example rule model, and automatically generating an abstract text according to the example rule by the model when the text with the apperceive content is input into the model. (5) Model based on pre-trained model: and (3) carrying out fine adjustment on a model obtained on the basis of the model according to the abstract task on the basis of a pre-training model obtained on the basis of large-scale corpus training or super-large-scale corpus training. For example, a secondary model construction may be performed on the basis of a Google BERT (Bidirectional Encoder retrieval from transforms) pre-training model, and multiple iterative operations are performed on the training corpus to train to obtain an optimal model, i.e., the abstract generation model. (6) Other abstract generation models constructed based on machine learning neural network models. Therefore, the abstract generation model can be constructed through various neural network technologies, and the accuracy of constructing the abstract generation model is guaranteed. The construction modes based on the neural network model are also suitable for constructing other content analysis models.
In the embodiment of the present invention, in steps 202 to 204, the content of the obtained appealing person may be analyzed by each content analysis model, so as to obtain the characterization data corresponding to the content, so that the characterization data obtained by analyzing the content is more accurate.
205. The electronic device determines a data type for each of the characterization data.
In the embodiment of the present invention, the data type of the characterization data may be a theme type, a tag type, a complaint intention type, a psychological analysis type, a basic information type, and the like, which is not limited in the embodiment of the present invention.
206. The electronic equipment determines reply generation models matched with the data types of the representation data from the reply generation module, wherein one data type of the representation data is matched with one reply generation model.
In the embodiment of the present invention, the reply generation module may include one or more reply generation models, and any one of the reply generation models may correspond to one data type of the characterization data, that is, one data type of the characterization data may only match one reply generation model.
207. The electronic device enters the characterization data into a reply generation model that matches the data type of the characterization data.
208. The electronic equipment obtains reply contents corresponding to the appeal contents from the reply generation models, and the reply contents are matched with any one of the appeal characterization data.
In the embodiment of the present invention, step 205 to step 208 are executed to determine the data type of each of the characterization data, and generate the reply content according to the reply generation model corresponding to the data type, so that the generated reply content is matched with any one of the characterization data, that is, any one of the characterization data can find the content matched with the data type in the reply content, thereby improving the comprehensiveness of the reply content.
In the method described in fig. 2, the reply content can be more fit to the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the user experience is improved. In addition, the method described in FIG. 2 is implemented, so that the accuracy of constructing the abstract generation model is ensured. In addition, the method described in fig. 2 can be implemented to make the characterization data obtained from the content analysis more accurate. In addition, the implementation of the method described in fig. 2 improves the comprehensiveness of the reply content.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic flow chart of another reply content generation method according to an embodiment of the present invention. As shown in fig. 3, the method for generating reply content may include the following steps:
step 301 to step 306 are the same as step 201 to step 206, and the following description is omitted.
307. The electronic device enters the characterization data into a reply generation model that matches the data type of the characterization data.
As an alternative embodiment, the manner in which the electronic device inputs the characterization data into the reply generation model that matches the data type of the characterization data may include the following steps:
and the electronic equipment inputs the representation data into a reply generation model matched with the data types of the representation data respectively.
By implementing the implementation mode, each acquired attribute data can be input into the reply generation model corresponding to the attribute data, so that reply content corresponding to each attribute data is obtained, and the obtained reply content is more matched with the content told by the toler.
As an optional implementation, the manner in which the electronic device inputs the characterization data into the reply generation model matched with the data type of the characterization data may further include the following steps:
the electronic equipment combines the representation data according to a preset data combination model to obtain a plurality of target representation data, and obtains a target data type of each target representation data;
the electronic device inputs the target appeal characterization data into a reply generation model matched with the target data type of the target appeal characterization data.
By implementing the implementation mode, the appeal representation data matched with the data types can be combined to obtain a plurality of target appeal representation data, and then the plurality of appeal representation data are respectively input into the corresponding reply generation models to obtain reply contents corresponding to the target appeal representation data, so that the process of replying the reply contents generated by the generation models is simplified, and the efficiency of generating the reply contents is improved.
In an embodiment of the present invention, the preset data combination model may include: (1) enhanced combination: the one or more characterization data may enhance the characterization of one or more other characterization data (e.g., an age-gender-added preference for a contextual event may enhance the general sense judgment of a contextual event, in an event where an adult drives a party, by combining characterization data for an age of 10 years into the party, an informational representation may be obtained that the event may be a child-abuse event, or a mutual enhancement of multiple pieces of characterization data); (2) supplementary perfect combination: the information of a single complaint representation data is incomplete, and a plurality of complaint representation data are combined together to express complete representation information. (3) Combining in the same way: allows a simple combination of some of the same type of complaint characterization data to be input into the generative model at one time. (4) Combining and repeating: and judging whether the characterization contents of the two appeal characterization data are the same, and if so, combining the two appeal characterization data into one appeal characterization data.
As an optional implementation manner, the manner in which the electronic device combines the characterization data according to the preset data combination model to obtain the plurality of target appeal characterization data and obtain the target data type of each target appeal characterization data may include the following steps:
the electronic equipment groups the characterization data according to data types to obtain a plurality of groups of characterization data groups with different data types;
the electronic equipment marks the characterization data with the same content in the same group of characterization data groups, only one piece of characterization data is reserved in the characterization data with the same content, and the unretained characterization data is deleted, so that the content of the characterization data in any one of the characterization data groups is unique;
the electronic equipment respectively combines the appeal characterization data in each appeal characterization data group to obtain the appeal characterization data, and combines the appeal characterization data according to a preset data combination model to obtain a plurality of target appeal characterization data;
the electronic device determines a target data type for each of the target complaint characterization data.
By implementing the implementation mode, the obtained plurality of target appeal representation data sets are compared pairwise, repeated target appeal representation data sets are eliminated, repeated content cannot occur in the obtained target appeal representation data, and the resource utilization rate of the electronic equipment can be improved.
308. The electronic equipment obtains a plurality of reply sub-contents from a plurality of reply models, wherein one reply sub-content comes from one reply model.
309. The electronic equipment integrates the reply sub-contents to obtain reply contents corresponding to the appeal contents, and the reply contents are matched with any one of the appeal characterization data.
In the embodiment of the present invention, step 308 to step 309 are executed, the content generated by each reply model may be determined as the reply sub-content, and then the reply sub-contents are integrated to obtain the final reply content, so that it is ensured that the reply content includes the reply sub-contents generated by each reply model, and further that the reply content is more matched with the appeal content.
As an optional implementation manner, the method for integrating the plurality of reply sub-contents by the electronic device to obtain the reply content corresponding to the content may include the following steps:
the electronic equipment detects the number of reply sub-contents corresponding to the content;
when the number of the reply sub-contents is detected to be multiple, the electronic equipment combines the reply sub-contents according to a preset reply combination module to obtain reply contents corresponding to the appeal contents;
when the number of the reply sub-content is one, the electronic equipment determines the reply sub-content as the reply content corresponding to the appeal content.
By implementing the embodiment, the final generation mode of the reply content can be determined according to the number of the reply sub-contents generated by the reply model, if the number of the reply sub-contents is only one, the reply sub-contents can be directly output as the reply content, and if the number of the reply sub-contents is more than one, all the reply sub-contents can be directly combined to obtain the combined final reply content, and the final reply content is output, so that the efficiency of generating the reply content is improved.
The preset reply combination module can comprise a reply sub-content comparison sub-module, two reply sub-contents generated by the same reply model in combination are compared in content similarity, if the two reply sub-contents are similar, only one reply sub-content is reserved, and because the reply sub-content is similar to the dropped other reply sub-content, the reply sub-content can also be matched with the appeal representation data corresponding to the other reply sub-content. The preset reply combination module can also comprise a combination optimization module which is used for sequentially sequencing a plurality of reply sub-contents in combination, and adding sentence paragraph connection, sentence paragraph transition and modifying words or sentences among the plurality of reply sub-contents so as to improve the fluency and readability of the reply contents.
As an optional implementation manner, the method for combining, by the electronic device, each reply sub-content according to the preset reply combination module to obtain the reply content corresponding to the content may include the following steps:
the electronic equipment combines the reply sub-contents according to a preset reply combination module to obtain initial reply contents;
and the electronic equipment performs optimization operation on the initial reply content to obtain the final reply content corresponding to the appeal content, wherein the optimization operation at least comprises sentence correcting operation and/or sensitive word replacing/deleting operation.
The optimization operation on the initial reply content can further include placeholder processing (such as UNK placeholder replacement), semantic entity replacement (such as replacing a general pronoun's' in the initial reply content with a name 'xiaoli' in the complaint content), and by implementing the implementation mode, the output reply content can be optimized, so that problems of ill sentences, sensitive words, wrongly written characters and the like in the reply content are reduced, readability of the reply content can be optimized, and use experience of a complaint person is improved.
In the method described in fig. 3, the reply content can be more fit to the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the user experience is improved. In addition, the method described in fig. 3 can be implemented to make the obtained reply content more match with the content of the person claiming the reply. In addition, the method described in fig. 3 is implemented, so that the efficiency of reply content generation is improved. In addition, the memory space of the electronic device can be increased by implementing the method described in fig. 3. In addition, the implementation of the method described in fig. 3 ensures that the reply content is more matched with the appealing content. In addition, the method described in fig. 3 is implemented, and the efficiency of generating the reply content is improved. In addition, the method described in fig. 3 is implemented to improve the use experience of the claimant.
Example four
The reply generation model related in the first embodiment to the third embodiment of the present invention may be a neural network model based on machine learning, and the appeal data of different data types may generate corresponding reply sub-content through different reply generation models. For example, the appeal part characterization data of the text type can obtain reply sub-content through a text reply generation model corresponding to the text type; the representation data of the title type can obtain reply sub-content through a title reply generation model corresponding to the title type; the appeal representation data of the abstract type can obtain reply sub-content through an abstract reply generation model corresponding to the abstract type; the appeal representation data of the intention type can obtain reply sub-content through an appeal intention reply generation model corresponding to the intention type; the complaint data of the disease information type can obtain reply sub-content through a disease information reply generation model corresponding to the disease information type; the appeal representation data of the character information and the character relation information type can obtain reply sub-content through a character information and character relation information reply generation model corresponding to the character information and character relation information type; the appeal data of the psychological analysis type can be obtained through a psychological analysis reply generation model corresponding to the psychological analysis type to obtain reply sub-content; the appeal representation data of the style information type can obtain reply sub-content through an appeal style information reply generation model corresponding to the appeal style information type; the representation data of the metaphorical information type can obtain reply sub-content through a metaphorical information reply generation model corresponding to the metaphorical information type; the appeal representation data of the story allegian information type can obtain reply sub-content through a story allegian information reply generation model corresponding to the story allegian information type; the appeal representation data of the religious information type can obtain reply sub-content through a religious information reply generation model corresponding to the religious information type; the appeal data of the social information type can obtain reply sub-content through a social information reply generation model corresponding to the social information type; the appeal representation data of the scientific information type can obtain reply sub-content through a scientific information reply generation model corresponding to the scientific information type; the appeal data of the semantic analysis type can obtain reply sub-content through a semantic analysis reply generation model corresponding to the semantic analysis type; the appeal data of the personal information type can obtain reply sub-content through a personal information reply generation model corresponding to the personal information type. The text reply generation model and the abstract reply generation model can be the same reply generation model.
By implementing the embodiment, only part of the representation data can be generated into the reply sub-content, and all the obtained representation data are not required to be generated into the reply sub-content.
As an optional implementation manner, the representation data are combined according to a preset data combination model to obtain a plurality of target representation data, and a target data type of each target representation data is obtained; and inputting the target appeal representation data into a reply generation model matched with the target data type of the target appeal representation data, wherein the target appeal representation data of different target data types can generate corresponding reply sub-content through different reply generation models.
Optionally, the neural network technology for constructing the various reply generation models may be: (1) and (3) supervising a learning training model: a plurality of samples of the characterization data and reply sub-content samples corresponding to the samples can be obtained, the samples are input into a pre-constructed neural network model to carry out a plurality of times of iterative operations, and an optimal model, namely a reply generation model, is obtained through training. (2) Semi-supervised learning training model: the method comprises the steps of obtaining a plurality of samples of the characterization data and reply sub-content samples (labeled data pairs) corresponding to the samples of the characterization data, inputting the reply sub-content samples without the corresponding relationship or the samples (unlabeled data) of the characterization data without the corresponding relationship into a pre-constructed neural network model for carrying out iterative operation for multiple times, generating corresponding pseudo characterization data or pseudo reply sub-content for the unlabeled data by using a learner obtained by iterative operation of the samples of the characterization data and the reply sub-content samples corresponding to the samples of the characterization data, mixing the labeled data pairs and the pseudo data pairs, carrying out iterative operation for multiple times, and training to obtain an optimal model, namely a reply generation model. (3) Active learning: a plurality of unlabeled sample data (for example, samples of the complaint characterization data without the corresponding relationship, or reply sub-content samples without the corresponding relationship) can be acquired, the learner can self-select some unlabeled samples and query an external knowledge system to obtain labels of the samples, and then the labeled samples are used as training examples to perform conventional supervised learning. (4) Unsupervised learning training model: the method comprises the steps of obtaining a plurality of unmarked sample data (such as an appetizing sample without corresponding relation, a replying sub-content sample without corresponding relation or a text sample with other knowledge content), inputting the sample data into a pre-established neural network model for multi-round iteration operation, training an optimal example rule model, and automatically generating replying sub-content according to the example rule by the model when the text of the appeasing characterizing data is input into the model. (5) Model based on pre-trained model: and (3) carrying out fine adjustment on a model obtained on the basis of the model according to the abstract task on the basis of a pre-training model obtained on the basis of large-scale corpus training or super-large-scale corpus training. For example, a quadratic model construction can be performed on the basis of a Google BERT pre-training model, and a plurality of iterative operations are performed on the training corpus to train to obtain an optimal model, namely, the reply generation model. (6) Other machine learning based neural network models build a reply generation model. Therefore, the reply generation model can be constructed by various neural network technologies, and the accuracy of constructing the reply generation model is guaranteed.
For example, the appellation characterization data of the contextual event type analyzed by the electronic device may be "i do not pass the graduation test this time, i do not pass university, i feel that the life does not come into the future, i have some despair", the appellation characterization data of the contextual event type may be input into the contextual event reply generation model corresponding to the contextual event type, and a reply sub-content "is not yet available for a supplementary examination? If the graduation certificate can not be taken, the person is not the end of life, the main purpose of the school is to learn knowledge, and the school can also learn knowledge and skills outside the school. The life is very long, and difficult to meet the frustration, everybody is the same, your life just begins soon, refuels. Therefore, the electronic device can generate reply content matched with the current data type through the reply generation model corresponding to the data type aiming at different data types, so that the reply content generated by the electronic device is more matched with the complaint content input by the complainter.
EXAMPLE five
Referring to fig. 4, fig. 4 is a schematic structural diagram of a reply content generating device according to an embodiment of the present invention. As shown in fig. 4, the generating device of the reply content may include:
an obtaining unit 401, configured to obtain the content of the claimant.
An analyzing unit 402, configured to analyze the content to obtain a plurality of representation data, where the representation data at least includes the text data.
As an optional implementation manner, the analyzing unit 402 may analyze the appeal content obtained from the appeal person to obtain a plurality of characterization data, where the manner of obtaining the characterization data is specifically:
analyzing the appeal content obtained from the appeal person, and determining the data type of the appeal content;
when the data type of the appeal content is detected to be a text type, analyzing the appeal content of the text type through a content analysis model corresponding to the text type to obtain a plurality of appeal representation data;
when the data type of the appeal content is detected to be the picture type, the appeal content of the picture type is identified and analyzed through the graphic image identification model, text information in the appeal content picture can be obtained, the text information is analyzed through the content analysis model corresponding to the text type, a plurality of appeal characterization data are obtained, when the appeal content of the picture type is identified to contain a face image, psychological characterization data of the appeal person are obtained based on the identification of the face image through the facial expression identification model, and the appeal text data and the psychological characterization data can be jointly determined to be the identified plurality of appeal characterization data;
when the data type of the content is detected to be an audio type, the content is identified through an ASR-based speech identification module to obtain text information corresponding to the content speech, the text information is analyzed through a content analysis model corresponding to the text type to obtain a plurality of characterization data, and the speaking sound characteristics of the appealing person can be identified and analyzed based on a sound emotion identification model to obtain psychology characterization data of the appealing person;
when the fact that the data type of the appeal content is the video type is detected, the voice recognition module based on the ASR recognizes the audio information in the appeal content to obtain text information of the appeal content, the body behavior recognition analysis model based on the body behavior can be used for conducting subconscious behavior recognition analysis on the body behavior of the person to obtain psychological characterization data of the appeal person, and the content analysis model corresponding to the text type is used for conducting analysis on all the text information to obtain a plurality of appeal characterization data.
By implementing the implementation mode, different manners can be used for analyzing according to the appeal contents of different data types, different appeal characterization data corresponding to the appeal contents of different data types are obtained, and the accuracy of analyzing and obtaining the appeal characterization data is improved.
Optionally, when it is detected that the data type of the complaint content is the picture type, the electronic device may perform identification analysis on the complaint content of the picture type through the image content analysis model, may analyze the character event content in the complaint content of the picture type, and may analyze the character event content to obtain a content description of the complaint content of the picture type, so as to generate text information corresponding to the content description, and analyze the text information through the text content analysis model corresponding to the text type to obtain a plurality of complaint representation data, thereby improving diversity of analysis modes of the electronic device for the content of the picture type.
The generating unit 403 is configured to generate reply content corresponding to the appeal content through the reply generating module according to the plurality of appeal feature data obtained by the analyzing unit 402, where the reply content is matched with any one of the appeal feature data.
Therefore, by implementing the reply content generation device described in fig. 4, the reply content can be more fit with the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the use experience of the user is improved. In addition, the device described in fig. 4 is implemented, so that the accuracy of analyzing the characterization data is improved. In addition, the implementation of the device described in fig. 4 improves the diversity of the analysis modes of the electronic device for the content of the image type.
EXAMPLE six
Referring to fig. 5, fig. 5 is a schematic structural diagram of another apparatus for generating reply content according to an embodiment of the present disclosure. The reply content generation device shown in fig. 5 is optimized by the reply content generation device shown in fig. 4. The analysis unit 402 of the reply content generation apparatus shown in fig. 5 may include:
the first determining subunit 4021 is configured to determine a current data type of the content, where the data type at least includes any one of a text type, an audio type, a picture type, and a video type.
The first analyzing subunit 4022 is configured to, when the current data type determined by the first determining subunit 4021 is a text type, analyze the content through the plurality of text content analysis models to obtain the representation data corresponding to each text content analysis model.
The second analysis subunit 4023 is configured to, when the current data type determined by the first determination subunit 4021 is any one of an audio type, a picture type, and a video type, analyze the content through the multiple content analysis models to obtain text appeal characterization data corresponding to each content analysis model, and analyze the text appeal characterization data through the multiple text content analysis models to obtain appeal characterization data corresponding to each text content analysis model.
In the embodiment of the invention, the acquired appeal content of the appeal person can be analyzed through each content analysis model, so that the appeal representation data corresponding to the appeal content can be obtained, and the appeal representation data obtained through analysis according to the appeal content can be more accurate.
As an alternative implementation, the generating unit 403 of the generating device of the reply content shown in fig. 5 may include:
a second determining subunit 4031, configured to determine a data type of each of the characterization data;
a third determining subunit 4032, configured to determine, from the reply generation module, a reply generation model that matches the data type of the characterization data determined by the second determining subunit 4031, where one data type of the characterization data matches one reply generation model;
an input subunit 4033, configured to input the characterization data into a reply generation model matched with the data type of the characterization data determined by the third determining subunit 4032;
the obtaining subunit 4034 is configured to obtain reply content corresponding to the content from the plurality of reply generation models in which the representation data is input by the input subunit 4033.
By implementing the implementation mode, the data type of each complaint representation data can be determined, and the reply content can be generated according to the reply generation model corresponding to the data type, so that the generated reply content is matched with any complaint representation data, namely, the reply content matched with any complaint representation data can be found in the reply content by any complaint representation data, and the comprehensiveness of the reply content is improved.
Therefore, by implementing the reply content generation device described in fig. 5, the reply content can be more fit with the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the use experience of the user is improved. In addition, the device described in FIG. 5 is implemented, and the accuracy of the construction of the reply generation model is ensured. In addition, the apparatus described in fig. 5 can be implemented to make the characterization data obtained from the content analysis more accurate. In addition, the implementation of the device described in fig. 5 improves the comprehensiveness of the reply content.
EXAMPLE seven
Referring to fig. 6, fig. 6 is a schematic structural diagram of another apparatus for generating reply content according to an embodiment of the present disclosure. The reply content generation device shown in fig. 6 is optimized by the reply content generation device shown in fig. 5. The input subunit 4033 of the apparatus for generating reply content shown in fig. 6 may include:
a first input module 40331 is configured to input each characterization data into a reply generation model matched with a data type of the characterization data. Alternatively, the first and second electrodes may be,
the combination module 40332 is used for combining the representation data according to a preset data combination model to obtain a plurality of target representation data and obtain a target data type of each target representation data.
A second input module 40333, configured to input the target appeal characterization data obtained by the combination module 40332 into a reply generation model matched with a target data type of the target appeal characterization data.
In the embodiment of the invention, each acquired appeal data can be input into the reply generation model corresponding to the appeal data to obtain reply content corresponding to each appeal data, so that the obtained reply content is more matched with the content told by the appeal person. In addition, the appeal representation data matched with the data types can be combined to obtain a plurality of target appeal representation data, and then the plurality of appeal representation data are respectively input into the corresponding reply generation models to obtain reply contents corresponding to the target appeal representation data, so that the process of replying the reply contents generated by the generation models is simplified, and the efficiency of generating the reply contents is improved.
As an optional implementation manner, the manner in which the combination module 40332 combines the representation data according to a preset data combination model to obtain a plurality of target representation data, and obtains a target data type of each target representation data may specifically be:
grouping the characterization data according to data types to obtain a plurality of characterization data groups with different data types;
marking the characterization data with the same content in the same group of characterization data groups, only keeping one characterization data in the characterization data with the same content, and deleting the characterization data which is not kept so as to enable the content of the characterization data in any one characterization data group to be unique;
respectively combining the appeal characterization data in each appeal characterization data group to obtain the appeal characterization data, and combining the appeal characterization data according to a preset data combination model to obtain a plurality of target appeal characterization data;
and determining the target data type of each target appeal characterization data.
By implementing the implementation mode, the representation data with the same data type and content can be deleted, so that the representation data in each representation data group cannot be repeated, repeated content cannot occur in the target representation data obtained by combining the representation data groups, and the memory space of the electronic device can be increased.
As an alternative implementation, the obtaining subunit 4034 of the apparatus for generating reply content shown in fig. 6 may include:
an obtaining module 40341 configured to obtain a plurality of reply sub-contents from a plurality of reply models, where one reply sub-content is from one reply model;
an integrating module 40342, configured to integrate the plurality of reply sub-contents obtained by the obtaining module 40341 to obtain reply contents corresponding to the content.
By implementing the implementation mode, the content generated by each reply model can be determined as the reply sub-content, and then the reply sub-contents are integrated to obtain the final reply content, so that the reply content is ensured to contain the reply sub-contents generated by each reply model, and further the reply content is ensured to be more matched with the appeal content.
As an alternative embodiment, the integration module 40342 of the reply content generation apparatus shown in fig. 6 may include:
a detection submodule 403421, configured to detect the number of reply sub-contents corresponding to the content;
the combining submodule 403422 is configured to, when the detecting submodule 403421 detects that the number of the reply sub-contents is multiple, combine the reply sub-contents according to a preset reply combining module to obtain reply contents corresponding to the appealing contents;
the determining submodule 403423 is configured to, when the detecting submodule 403421 detects that the number of the reply sub-content is one, determine the reply sub-content as the reply content corresponding to the appeal content.
By implementing the embodiment, the final generation mode of the reply content can be determined according to the number of the reply sub-contents generated by the reply model, if the number of the reply sub-contents is only one, the reply sub-contents can be directly output as the reply content, and if the number of the reply sub-contents is more than one, all the reply sub-contents can be directly combined to obtain the combined final reply content, and the final reply content is output, so that the efficiency of generating the reply content is improved.
As an alternative embodiment, the combination submodule 403422 of the reply content generation apparatus shown in fig. 6 may include:
the combining component 4034221 is configured to, when the detecting sub-module 403421 detects that the number of the reply sub-contents is multiple, combine the reply sub-contents according to a preset reply combining module to obtain an initial reply content;
the optimizing component 4034222 is configured to perform an optimizing operation on the initial reply content obtained by the combining component 4034221 to obtain the reply content corresponding to the final appeal content, where the optimizing operation at least includes a sentence correcting operation and/or a sensitive word replacing/deleting operation.
The optimization operation on the initial reply content can further include placeholder processing (such as UNK placeholder replacement), semantic entity replacement (such as replacing a general pronoun's' in the initial reply content with a name 'xiaoli' in the complaint content), and by implementing the implementation mode, the output reply content can be optimized, so that problems of ill sentences, sensitive words, wrongly written characters and the like in the reply content are reduced, readability of the reply content can be optimized, and use experience of a complaint person is improved.
Therefore, by implementing the reply content generation device described in fig. 6, the reply content can be more fit with the appeal content input by the user, so that the efficiency of replying to the appeal content is improved, and the use experience of the user is improved. In addition, the device described in fig. 6 can be implemented to make the content of the reply more match with the content of the person telling the person. In addition, the device described in fig. 6 is implemented to improve the efficiency of reply content generation. In addition, the implementation of the apparatus described in fig. 6 may increase the memory space of the electronic device. In addition, the implementation of the apparatus described in fig. 6 ensures that the reply content is more matched with the appealing content. In addition, the device described in fig. 6 is implemented, and the efficiency of generating reply content is improved. In addition, the device described in fig. 6 is implemented to improve the use experience of the claimant.
Example eight
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 7, the electronic device may include:
a memory 701 in which executable program code is stored;
a processor 702 coupled to the memory 701;
wherein, the processor 702 calls the executable program code stored in the memory 701 to execute part or all of the steps of the method in the above method embodiments.
The embodiment of the invention also discloses a computer readable storage medium, wherein the computer readable storage medium stores program codes, wherein the program codes comprise instructions for executing part or all of the steps of the method in the above method embodiments.
Embodiments of the present invention also disclose a computer program product, wherein, when the computer program product is run on a computer, the computer is caused to execute part or all of the steps of the method as in the above method embodiments.
The embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used for publishing a computer program product, and when the computer program product runs on a computer, the computer is caused to execute part or all of the steps of the method in the above method embodiments.
It should be appreciated that reference throughout this specification to "an embodiment of the present invention" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrase "in embodiments of the invention" appearing in various places throughout the specification are not necessarily all referring to the same embodiments. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are exemplary and alternative embodiments, and that the acts and modules illustrated are not required in order to practice the invention.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not imply an inevitable order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
In addition, the terms "system" and "network" are often used interchangeably herein. It should be understood that the term "and/or" herein is merely one type of association relationship describing an associated object, meaning that three relationships may exist, for example, a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood, however, that determining B from a does not mean determining B from a alone, but may also be determined from a and/or other information.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present invention, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of each embodiment of the present invention.
The method and the apparatus for generating reply content disclosed in the embodiment of the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the embodiment of the present invention, and the description of the above embodiment is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for generating reply content, the method comprising:
acquiring the appeal content of the appeal person;
analyzing the appeal content to obtain a plurality of appeal characterization data, wherein the appeal characterization data at least comprises appeal text data;
generating reply content corresponding to the appeal content through a reply generation module according to the appeal characterization data, wherein the reply content is matched with any appeal characterization data;
the generating of the reply content corresponding to the appeal content by the reply generation module based on the plurality of appeal representation data includes:
determining a data type of each of the complaint characterization data;
determining reply generation models from a reply generation module that match the data types of the complaint characterization data, wherein one data type of the complaint characterization data matches one of the reply generation models;
combining the appeal representation data according to a preset data combination model to obtain a plurality of target appeal representation data, and obtaining a target data type of each target appeal representation data; inputting the target appeal characterization data into a reply generation model matched with a target data type of the target appeal characterization data;
obtaining reply contents corresponding to the appeal contents from a plurality of reply generation models;
the method for combining the appeal representation data according to a preset data combination model to obtain a plurality of target appeal representation data and obtain the target data type of each target appeal representation data comprises the following steps:
grouping the characterization data according to data types to obtain a plurality of characterization data groups with different data types;
marking the characterization data with the same content in the same group of characterization data groups, only keeping one characterization data in the characterization data with the same content, and deleting the characterization data which is not kept so as to enable the content of the characterization data in any one characterization data group to be unique;
respectively combining the appeal characterization data in each appeal characterization data group according to a preset data combination model to obtain a plurality of target appeal characterization data;
determining a target data type of each target appeal representation data;
the preset data combination model comprises an enhanced combination, a complementary perfect combination, a similar combination and a combining repetition:
the enhanced combination, i.e., the representation for one or more of the characterization data to enhance another one or more of the characterization data;
the supplementary perfect combination means that the information of a single complaint representation data is incomplete, and a plurality of complaint representation data are combined together to express complete representation information;
the similar combination allows the simple combination of the characterization data of a certain similar type to be input into the generation model at one time;
the merging repeats: judging whether the representation contents of the two appeal data are the same, and if so, combining the two appeal data into one appeal data.
2. The method of claim 1, wherein analyzing the complaint content to obtain a plurality of complaint characterization data comprises:
determining a current data type of the complaint content, wherein the data type at least comprises any one of a text type, an audio type, a picture type and a video type;
when the current data type is the text type, analyzing the appeal content through a plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model;
when the current data type is any one of the audio type, the picture type and the video type, analyzing the appeal content through a plurality of content analysis models to obtain text appeal representation data corresponding to each content analysis model, and analyzing the text appeal representation data through a plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
3. The method of claim 1, wherein obtaining reply content corresponding to the appeal content from the reply generation models comprises:
obtaining a plurality of reply sub-contents from the plurality of reply generative models, wherein one reply sub-content is from one reply generative model;
and integrating the plurality of reply sub-contents to obtain reply contents corresponding to the appeal contents.
4. The method of claim 3, wherein the integrating the plurality of reply sub-contents to obtain the reply content corresponding to the appealing content comprises:
detecting the number of the reply sub-contents corresponding to the appeal contents;
when the number of the reply sub-contents is detected to be multiple, combining the reply sub-contents according to a preset reply combination model to obtain reply contents corresponding to the appeal contents;
and when the number of the reply sub-contents is one, determining the reply sub-contents as reply contents corresponding to the appeal contents.
5. The method of claim 4, wherein the combining the reply sub-contents according to a preset reply combination model to obtain the reply content corresponding to the appealing content comprises:
combining the reply sub-contents according to a preset reply combination model to obtain initial reply contents;
and optimizing the initial reply content to obtain final reply content corresponding to the appeal content, wherein the optimizing operation at least comprises a sentence correcting operation and/or a sensitive word replacing/deleting operation.
6. An apparatus for generating reply content, comprising:
an acquisition unit configured to acquire the content of the appealing person;
the analysis unit is used for analyzing the appeal content to obtain a plurality of appeal characterization data, and the appeal characterization data at least comprises appeal text data;
the generation unit is used for generating reply content corresponding to the appeal content through a reply generation module according to the plurality of appeal characterization data, and the reply content is matched with any one appeal characterization data;
the generation unit includes:
a second determining subunit, configured to determine a data type of each of the complaint characterization data;
a third determining subunit, configured to determine, from a reply generation module, a reply generation model that matches the data type of the characterization data, where one data type of the characterization data matches one reply generation model;
the input subunit is used for combining the representation data according to a preset data combination model to obtain a plurality of target representation data, and obtaining a target data type of each target representation data; inputting the target appeal characterization data into a reply generation model matched with a target data type of the target appeal characterization data;
the obtaining subunit is configured to obtain reply content corresponding to the appeal content from a plurality of reply generation models;
the step of combining the appeal representation data according to a preset data combination model to obtain a plurality of target appeal representation data, and obtaining the target data type of each target appeal representation data comprises the following steps:
grouping the characterization data according to data types to obtain a plurality of characterization data groups with different data types;
marking the characterization data with the same content in the same group of characterization data groups, only keeping one characterization data in the characterization data with the same content, and deleting the characterization data which is not kept so as to enable the content of the characterization data in any one characterization data group to be unique;
respectively combining the appeal characterization data in each appeal characterization data group according to a preset data combination model to obtain a plurality of target appeal characterization data;
determining a target data type of each target appeal representation data;
the preset data combination model comprises an enhanced combination, a complementary perfect combination, a similar combination and a combining repetition:
the enhanced combination, i.e., the representation for one or more of the characterization data to enhance another one or more of the characterization data;
the supplementary perfect combination means that the information of a single complaint representation data is incomplete, and a plurality of complaint representation data are combined together to express complete representation information;
the similar combination allows the simple combination of the characterization data of a certain similar type to be input into the generation model at one time;
the merging repeats: judging whether the representation contents of the two appeal data are the same, and if so, combining the two appeal data into one appeal data.
7. The apparatus for generating reply content according to claim 6, wherein the analysis unit includes:
the first determining subunit is configured to determine a current data type of the appeal content, where the data type at least includes any one of a text type, an audio type, a picture type, and a video type;
the first analysis subunit is configured to, when the current data type is the text type, analyze the content through a plurality of text content analysis models to obtain the representation data corresponding to each text content analysis model;
the second analysis subunit is configured to, when the current data type is any one of the audio type, the picture type, and the video type, analyze the content through the plurality of content analysis models to obtain the text appeal representation data corresponding to each content analysis model, and analyze the text appeal representation data through the plurality of text content analysis models to obtain the appeal representation data corresponding to each text content analysis model.
8. The apparatus for generating reply content according to claim 6, wherein the obtaining subunit comprises:
an obtaining module, configured to obtain a plurality of reply sub-contents from the plurality of reply generation models, where one reply sub-content is from one reply generation model;
and the integration module is used for integrating the reply sub-contents to obtain reply contents corresponding to the appeal contents.
9. The apparatus for generating reply content according to claim 8, wherein the integration module comprises:
the detection submodule is used for detecting the number of the reply sub-content corresponding to the appeal content;
the combining submodule is used for combining the reply sub-contents according to a preset reply combination model when the number of the reply sub-contents is detected to be multiple, so as to obtain reply contents corresponding to the appeal contents;
the determining sub-module is used for determining the reply sub-content as the reply content corresponding to the appeal content when the number of the reply sub-content is detected to be one.
10. The apparatus for generating reply content according to claim 9, wherein the combining submodule comprises:
the combination component is used for combining the reply sub-contents according to a preset reply combination model to obtain initial reply contents when the number of the reply sub-contents is detected to be multiple;
and the optimization component is used for performing optimization operation on the initial reply content to obtain final reply content corresponding to the appeal content, wherein the optimization operation at least comprises sentence correcting operation and/or sensitive word replacing/deleting operation.
CN201910322333.9A 2019-04-19 2019-04-19 Reply content generation method and device Active CN110059231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910322333.9A CN110059231B (en) 2019-04-19 2019-04-19 Reply content generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910322333.9A CN110059231B (en) 2019-04-19 2019-04-19 Reply content generation method and device

Publications (2)

Publication Number Publication Date
CN110059231A CN110059231A (en) 2019-07-26
CN110059231B true CN110059231B (en) 2021-10-19

Family

ID=67319871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910322333.9A Active CN110059231B (en) 2019-04-19 2019-04-19 Reply content generation method and device

Country Status (1)

Country Link
CN (1) CN110059231B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630917A (en) * 2015-12-22 2016-06-01 成都小多科技有限公司 Intelligent answering method and intelligent answering device
CN105893523A (en) * 2016-03-31 2016-08-24 华东师范大学 Method for calculating problem similarity with answer relevance ranking evaluation measurement
CN109446302A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Question and answer data processing method, device and computer equipment based on machine learning
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10169489B2 (en) * 2015-03-02 2019-01-01 International Business Machines Corporation Query disambiguation in a question-answering environment
CN105574133A (en) * 2015-12-15 2016-05-11 苏州贝多环保技术有限公司 Multi-mode intelligent question answering system and method
US10262062B2 (en) * 2015-12-21 2019-04-16 Adobe Inc. Natural language system question classifier, semantic representations, and logical form templates
CN105913039B (en) * 2016-04-26 2020-08-18 北京光年无限科技有限公司 Interactive processing method and device for dialogue data based on vision and voice
CN107992543B (en) * 2017-11-27 2020-11-17 上海智臻智能网络科技股份有限公司 Question-answer interaction method and device, computer equipment and computer readable storage medium
CN108874949A (en) * 2018-06-05 2018-11-23 北京玄科技有限公司 Intent classifier method, apparatus and intelligent answer method based on business corpus
CN109284363B (en) * 2018-12-03 2023-03-14 北京羽扇智信息科技有限公司 Question answering method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630917A (en) * 2015-12-22 2016-06-01 成都小多科技有限公司 Intelligent answering method and intelligent answering device
CN105893523A (en) * 2016-03-31 2016-08-24 华东师范大学 Method for calculating problem similarity with answer relevance ranking evaluation measurement
CN109446302A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Question and answer data processing method, device and computer equipment based on machine learning
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于DQN的开放域多轮对话策略学习;宋皓宇等;《中文信息学报》;20180731;第32卷(第7期);第99-108,136页 *

Also Published As

Publication number Publication date
CN110059231A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
US8843372B1 (en) Natural conversational technology system and method
Ren Affective information processing and recognizing human emotion
US8494854B2 (en) CAPTCHA using challenges optimized for distinguishing between humans and machines
McKechnie et al. Automated speech analysis tools for children’s speech production: A systematic literature review
CN109074345A (en) Course is automatically generated and presented by digital media content extraction
US20110059423A1 (en) System and method for providing scalable educational content
Griol et al. An architecture to develop multimodal educative applications with chatbots
Lipping et al. Crowdsourcing a dataset of audio captions
WO2016044879A1 (en) Teaching systems and methods
US9436676B1 (en) Written word refinement system and method
CN108470188B (en) Interaction method based on image analysis and electronic equipment
KR102418558B1 (en) English speaking teaching method using interactive artificial intelligence avatar, device and system therefor
US20190295199A1 (en) Intelligent legal simulator
CN112632242A (en) Intelligent conversation method and device and electronic equipment
Chou The Influence of Topics on Listening Strategy Use for English for Academic Purposes.
Székely et al. Facial expression-based affective speech translation
CN117252259A (en) Deep learning-based natural language understanding method and AI teaching aid system
CN116821290A (en) Multitasking dialogue-oriented large language model training method and interaction method
Prys et al. Gathering data for speech technology in the welsh language: A case study
KR20210060040A (en) Server and method for automatic assessment of oral language proficiency
CN110059231B (en) Reply content generation method and device
US20220309936A1 (en) Video education content providing method and apparatus based on artificial intelligence natural language processing using characters
Östman et al. Handbook of pragmatics
KR102395702B1 (en) Method for providing english education service using step-by-step expanding sentence structure unit
Ulisses et al. Blind/Deaf Comunication API for Assisted Translated Educational Digital Content

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210922

Address after: 423300 group 1, yancuiping, Langshi village, Santang Township, Yongxing County, Chenzhou City, Hunan Province

Applicant after: Kang Zhonghua

Address before: 510663 office card booth A127 of Greenland international maker center on the first, second and third floors, building C2, No. 72, science Avenue, high tech Industrial Development Zone, Guangzhou, Guangdong

Applicant before: Media (Guangzhou) Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant