CN114553803A - Quick reply method, device and system for instant messaging - Google Patents

Quick reply method, device and system for instant messaging Download PDF

Info

Publication number
CN114553803A
CN114553803A CN202210074595.XA CN202210074595A CN114553803A CN 114553803 A CN114553803 A CN 114553803A CN 202210074595 A CN202210074595 A CN 202210074595A CN 114553803 A CN114553803 A CN 114553803A
Authority
CN
China
Prior art keywords
corpus
information
instant messaging
tool
reply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210074595.XA
Other languages
Chinese (zh)
Inventor
陶丽媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yuer Network Technology Co ltd
Original Assignee
Shanghai Yuer Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Yuer Network Technology Co ltd filed Critical Shanghai Yuer Network Technology Co ltd
Priority to CN202210074595.XA priority Critical patent/CN114553803A/en
Publication of CN114553803A publication Critical patent/CN114553803A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/02User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a quick reply method, a device and a system for instant messaging, wherein the method comprises the following steps: s101, collecting historical communication records between a local end and an opposite end of an instant communication tool through a quick reply tool; s102, extracting the corpus text information in the historical communication record; s103, inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; s104, carrying out relevance evaluation on the corpus inference result and a basic corpus of a determined scene, and calculating a similarity score of corpus information; and S105, sorting the corpus information according to the similarity score, extracting a plurality of preset corpus information in sequence to form a reply information option list of the local end of the instant messaging, and sending the selected corpus information to the opposite end of the instant messaging as the communication information after the user triggers and selects. According to the method, after model prediction is utilized, the corpus similarity of a determined scene is calculated, and the corpus to be replied is screened out for the user to select and send.

Description

Quick reply method, device and system for instant messaging
Technical Field
The present invention relates to the field of instant messaging technologies, and in particular, to a method, an apparatus, and a system for fast reply in instant messaging.
Background
With the development of communication technology, instant messaging application technology has been accepted by wide users. The users can communicate in a mode of characters, images, voice and the like through the social application.
In the existing instant messaging tool, corresponding information is replied according to user reply setting, for example, in a QQ, fixed automatic reply information is set, for example, "you are good, I do not have things at present, and contact you again. When the state is set as the state of no disturbance, any user automatically replies the preset fixed message after sending the message. For some users, this setting is rigid. In the actual communication process, the content in any field can be communicated through the instant messaging tool, and the current instant messaging tool cannot assist the user in communication and exchange, can only be used as a transmission medium, and cannot bring better chat experience to the user.
Disclosure of Invention
The embodiment of the application provides a quick reply method, a quick reply device and a quick reply system for instant messaging, solves the technical problems that an instant messaging tool in the prior art automatically replies a rigid board and cannot assist a user in replying, can give a plurality of preferable reply suggestions through the design of the quick reply tool, and can select proper reply sentences in the quick reply tool, so that the communication experience of the instant messaging tool is improved.
In a first aspect, the present application provides a quick reply method for instant messaging, where the method includes:
s101, responding to a target event triggered by a local instant messaging tool, and associating the instant messaging tool with a quick reply tool according to the target event; acquiring historical communication records between the local end and the opposite end of the instant communication tool through the quick reply tool;
s102, extracting the corpus text information in the historical communication record by using a filtering rule;
s103, inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model;
s104, performing relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus;
and S105, sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
Further, in step S102, the filtering rule is to remove non-text information after collecting the historical communication record, and screen out text information required by the dialogue processing model as the corpus text information.
Further, in step S103, the method for forming the dialogue processing model based on the natural language dialogue sentences of a certain scene through retraining the initial-order model includes:
receiving a primary model, wherein the primary model is formed by adopting a natural language training structure including but not limited to a BERT structure to perform pre-training;
determining a target scene, acquiring a basic corpus under the target scene, and taking corpus dialogue information in the basic corpus as a training sample;
using the formula:
p (Y | X) ═ p (Y1| X) p (Y2| X, Y1) p (Y3| X, Y1, Y2) … p (Yn | X, Y1, Y2, …, Yn-1) modeling,
and performing retraining on the initial model based on a determined scene to find out the maximum probability Y to obtain a dialogue processing model required by final prediction, and inferring the screened text data through the dialogue processing model to obtain an inference result.
Further, in the step S104, the method for performing relevance evaluation on the corpus inference result and the basic corpus of the determined domain by using the similarity calculation rule includes performing similarity calculation on the corpus inference result and the corpus information in the basic corpus by using a route-L algorithm to obtain a similarity score of each corpus information.
In a second aspect, the present application provides a quick reply device for instant messaging, which employs the method of any one of the first aspect, and the device includes:
the system comprises an information acquisition module, a shortcut reply tool and a shortcut reply module, wherein the information acquisition module is configured to respond to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to the shortcut reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool;
the corpus extraction module is configured to extract corpus text information in the historical communication record by using a filtering rule;
the model inference module is configured to input the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model;
the score calculation module is configured to perform relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculate and acquire a similarity score of each piece of corpus information in the basic corpus;
and the information reply module is configured to sort the corpus information according to the similarity degree value, extract a plurality of preset corpus information in sequence to form a reply information option list of the local end of instant messaging, and send the selected corpus information as communication information to the opposite end of instant messaging after the user triggers and selects.
In a third aspect, the present application provides a quick reply system for instant messaging, which employs the method of any one of the first aspect, and the system includes:
the system comprises an opposite end, a local end and a cloud end, wherein the cloud end is respectively in communication connection with the opposite end and the local end, the opposite end and the local end are both provided with instant communication tools, and the local end is also provided with a quick reply tool; the cloud end responds to a remote user to carry out instant messaging with an instant messaging tool on the local end through the instant messaging tool on the opposite end;
the local end responds to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to a quick reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool; extracting the corpus text information in the historical communication record by using a filtering rule; inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model; carrying out relevance evaluation on the corpus inference result and a basic corpus of a determined scene by utilizing a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus; and sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
In a fourth aspect, the present application provides an electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as in any one of the first aspects.
In a fifth aspect, the present application provides a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method according to any one of the first aspects.
The technical scheme provided in the embodiment of the application has at least the following technical effects:
1. because the adopted dialogue processing model is a secondary model formed on the basis of the primary model of the natural language pre-training, manufacturers do not need to start the model training of the natural language repeatedly, and can directly perform the secondary training on the corpus training data of the determined scene by using the pre-trained primary model, thereby reducing the labor and time cost required by the model training.
2. Because the model is adopted to train the corpus inference result and the basic corpus of the determined scene for similarity calculation, the corpus information to be replied is obtained, and some non-compliant vocabularies of the user can be replaced, and the experience of chatting is improved. And the corpus information to be replied is pre-stored in the basic corpus, so that in some scenes, the user can directly select the most appropriate corpus to be replied without considering, thereby improving the social ability among the users.
Drawings
Fig. 1 is a flowchart illustrating a quick reply method for instant messaging according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a fast recovery apparatus for instant messaging according to a second embodiment of the present application;
fig. 3 is a structural diagram of a quick reply system for instant messaging according to a third embodiment of the present application.
Detailed Description
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
Referring to fig. 1, an embodiment of the present application provides a quick reply method for instant messaging, which is applied to an instant messaging tool. The method comprises the following steps.
S101, responding to a target event triggered by a local instant messaging tool, and associating the instant messaging tool with a quick reply tool according to the target event; and acquiring historical communication records between the local end and the opposite end of the instant communication tool through the quick reply tool.
The instant messenger in this embodiment may be, but is not limited to, WeChat, QQ, BigAnt, instant messenger with certain degree, instant messenger such as streaming (original hundred degree HI), Skype, Gtalk, Xinlange UC, MSN, nailing, enterprise WeChat, 360 weave, and other instant messenger, and these instant messenger are loaded on a client terminal, such as a mobile phone, a notebook computer, and a desktop computer. When the instant messaging tool on the local end is used for communicating with a certain field/scene, the quick reply tool in the embodiment can replace an input method for typing so as to be quickly adapted to the reply information of the first communication information.
In this embodiment, the shortcut reply tool is associated with the instant messaging tool, and after the shortcut reply tool is triggered and opened, the shortcut reply tool is associated with the instant messaging tool. And then, acquiring historical communication records of the user between the local end and the opposite end of the instant communication tool through the quick reply tool. The opposite end can be any end communicating with the local end.
And S102, extracting the corpus text information in the historical communication record by using a filtering rule.
In step S102, the filtering rule is to remove non-text information after collecting the historical communication record, and screen out text information required by the dialogue processing model as the corpus text information. In this embodiment, after the quick reply tool collects the historical communication record, the historical communication record is filtered, and non-text information is filtered, for example, information such as voice, pictures, expressions, videos, and the like is filtered and removed, and only text information is extracted. For example, the game scene dialog and the historical communication record include the following three items:
a: miss, in?
B: in the field of
A: is playing today?
It can be seen that the scene is determined to be 'playing games' and 'playing games today' is replied in the historical communication record.
S103, inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial-order model.
The determined scene in this embodiment may be understood as a dialog processing model that is pre-trained for different scenes, and therefore, according to the use requirement of the user, the used shortcut reply tool may be understood as a shortcut reply tool in the installed determined scene. Of course, the determination of the scene is not limited to one scene, and multiple scenes may be loaded simultaneously, that is, it is determined that corpus information in the basic corpus of the scene matches the scene.
In step S103, the method for forming the dialogue processing model based on natural language dialogue sentences of a certain scene through retraining the initial-order model includes:
a preliminary model is received, which is pre-trained using a natural language training structure including, but not limited to, a BERT structure.
Determining a target scene, acquiring a basic corpus under the target scene, and taking corpus dialogue information in the basic corpus as a training sample. For example, the target scene is a game scene of the electronic contest, and the dialogue data of the game player is directly pulled from the database of the game server according to the basic corpus. Therefore, when the plug-in of the quick reply method in the embodiment is applied to the game terminal, the quick reply of the communication information can be realized.
Using the formula:
p (Y | X) ═ p (Y1| X) p (Y2| X, Y1) p (Y3| X, Y1, Y2) … p (Yn | X, Y1, Y2, …, Yn-1) modeling,
and performing retraining on the initial model based on a determined scene to find out the maximum probability Y to obtain a dialogue processing model required by final prediction, and inferring the screened text data through the dialogue processing model to obtain an inference result.
To further illustrate, in order to reduce training cost and time, the initial-stage model in this embodiment may directly use an existing published natural language model, such as an ELMo, OpenAIGPT, or BERT model.
The natural language model is simply a probability distribution of a string of words, and functions to determine a probability distribution P through a text of length m, indicating the likelihood of the text being present. For example, when the length of the text is long, the estimation of P (wi | w1, w 2.., wi-1) is very difficult, and the calculation is performed by an n-gram model (n-gram model), and only the first n-1 words of the current word need to be calculated when the conditional probability is estimated in the n-gram model. The BERT model uses a Transformer coder as a language model, two new target tasks are proposed when the language model is pre-trained, SOTA is finally obtained on an NLP task, and the BERT model uses the Transformer coder on the language model, and the upper layer and the lower layer of the model are directly and completely connected with each other due to a self-attribute mechanism. Thus, all layers in the BERT model are bi-directional. Further, WordPiece embedding is used as a word vector, a position vector and a sentence segmentation vector are added, a CLS vector is added before each text is input, and the CLS vector is used as a specific classification vector later.
And S104, performing relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus.
In the step S104, the method for performing relevance evaluation on the corpus inference result and the basic corpus of the determined field by using the similarity calculation rule is to perform similarity calculation on the corpus inference result and the corpus information in the basic corpus by using a route-L algorithm to obtain a similarity score of each corpus information.
Further, in the ROUGE-L (L is LCS, Long Common Subsequence) algorithm, the Longest Common Subsequence is used in the ROUGE-L. The relevance evaluation in this embodiment may be understood as that the longest common sequence between two texts is compared to obtain a corresponding score to measure the "similarity" between the two texts, which has the greatest advantage that it does not depend on language processing tools, and in the following texts, for simplicity of description, this method is expressed as a method for calculating the similarity. Rouge-L is calculated as follows:
Figure BDA0003483377290000081
wherein the content of the first and second substances,
sub-sequences are represented as sub-sequences of a given sequence, i.e., zero or more elements are removed from the given sequence. A common subsequence is represented given two sequences X and Y, and if Z is both a subsequence of X and a subsequence of Y, then sequence Z is a common subsequence of X and Y. LCS (longest common subsequence): two sequences X and Y are given such that the sequence with the largest common subsequence length is the longest common subsequence of X and Y. In this embodiment, X is expressed as a corpus inference result, length is m, Y is corpus information in the basic corpus, length is n, F value is used to measure similarity score between corpus information and candidate corpus information, and only R → ∞ is consideredlcs
And S105, sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
It can be seen that, after the similarity score of the corpus information is calculated by the quick response tool in this embodiment, according to a preset extraction rule, the corpus information is sorted according to the similarity, the corpus information with a high similarity score is sorted in front of the corpus information, and the corpus information with a low similarity score is sorted behind the corpus information, then based on a preset extraction quantity, for example, the corpus information with the score top4 is obtained and transmitted to the instant messaging tool, and then a response information option list formed by a plurality of corpus information can be seen on a display interface of the instant messaging tool. The user can select the corresponding corpus information to reply according to the habit or the subsequent plan.
Example two
Referring to fig. 2, an embodiment of the present application provides a quick reply device for instant messaging, which employs a method according to any one of the embodiments, and the device includes:
the system comprises an information acquisition module 101, a shortcut reply tool and a shortcut reply module, wherein the information acquisition module is configured to respond to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to the shortcut reply tool according to the target event; and acquiring historical communication records between the local end and the opposite end of the instant communication tool through the quick reply tool.
And the corpus extraction module 102 is configured to extract corpus text information in the historical communication record by using a filtering rule.
The model inference module 103 is configured to input the corpus text information into a dialogue processing model for reply inference prediction, and generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial-order model.
And the score calculation module 104 is configured to perform relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculate and acquire a similarity score of each piece of corpus information in the basic corpus.
And the information reply module 105 is configured to sort the corpus information according to the similarity degree value, extract a plurality of preset corpus information in sequence to form a reply information option list of the local end of instant messaging, and send the selected corpus information as communication information to the opposite end of instant messaging after the user triggers and selects.
EXAMPLE III
Referring to fig. 3, an embodiment of the present application provides a quick reply system for instant messaging, which employs the method according to any one of the embodiments. The system comprises:
the system comprises an opposite end, a local end and a cloud end, wherein the cloud end is respectively in communication connection with the opposite end and the local end, the opposite end and the local end are both provided with instant communication tools, and the local end is also provided with a quick reply tool; the cloud end responds to a remote user to carry out instant messaging with the instant messaging tool on the local end through the instant messaging tool on the opposite end.
The local end responds to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to a quick reply tool according to the target event; acquiring historical communication records between the local end and the opposite end of the instant communication tool through the quick reply tool; extracting the corpus text information in the historical communication record by using a filtering rule; inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial-order model; carrying out relevance evaluation on the corpus inference result and a basic corpus of a determined scene by utilizing a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus; and sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
Example four
In a first aspect, an embodiment of the present application provides an electronic device, including: one or more processors;
a memory for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of embodiment one.
In a second aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any one of the first embodiment.
Therefore, when the processor executes the method in the first embodiment in the process of executing the method, the following steps are executed:
s101, responding to a target event triggered by a local instant messaging tool, and associating the instant messaging tool with a quick reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool;
s102, extracting the corpus text information in the historical communication record by using a filtering rule;
s103, inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial-order model;
s104, performing relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus;
and S105, sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A quick reply method for instant messaging is characterized by comprising the following steps:
s101, responding to a target event triggered by a local instant messaging tool, and associating the instant messaging tool with a quick reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool;
s102, extracting the corpus text information in the historical communication record by using a filtering rule;
s103, inputting the corpus text information into a dialogue processing model for replying inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model;
s104, performing relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus;
and S105, sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
2. The quick reply method of instant messaging according to claim 1, wherein in said step S102, said filtering rule is that after said historical messaging records are collected, non-text type information is removed, and text type information required by said dialogue processing model is screened out as said corpus text information.
3. The method for quick reply of instant messaging according to claim 1, wherein in the step S103, the method of forming the dialogue processing model based on natural language dialogue sentences of a certain scene through retraining the initial model comprises:
receiving a primary model, wherein the primary model is formed by adopting a natural language training structure including but not limited to a BERT structure to perform pre-training;
determining a target scene, acquiring a basic corpus under the target scene, and taking corpus dialogue information in the basic corpus as a training sample;
using the formula:
p (Y | X) ═ p (Y1| X) p (Y2| X, Y1) p (Y3| X, Y1, Y2) … p (Yn | X, Y1, Y2, …, Yn-1) modeling,
and performing retraining on the initial model based on a determined scene to find out the maximum probability Y to obtain a dialogue processing model required by final prediction, and inferring the screened text data through the dialogue processing model to obtain an inference result.
4. The method as claimed in claim 1, wherein in step S104, the method for evaluating the relevance between the corpus inference result and the basic corpus of the determined domain by using the similarity calculation rule includes using a route-L algorithm to calculate the similarity between the corpus inference result and the corpus information in the basic corpus to obtain the similarity score of each corpus information.
5. A quick reply device for instant messaging, which adopts the method of any one of claims 1 to 4, characterized in that the device comprises:
the system comprises an information acquisition module, a shortcut reply tool and a shortcut reply module, wherein the information acquisition module is configured to respond to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to the shortcut reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool;
the corpus extraction module is configured to extract corpus text information in the historical communication record by using a filtering rule;
the model inference module is configured to input the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model;
the score calculation module is configured to perform relevance evaluation on the corpus inference result and a basic corpus of a determined scene by using a similarity calculation rule, and calculate and acquire a similarity score of each piece of corpus information in the basic corpus;
and the information reply module is configured to sort the corpus information according to the similarity degree value, extract a plurality of preset corpus information in sequence to form a reply information option list of the local end of instant messaging, and send the selected corpus information as communication information to the opposite end of instant messaging after the user triggers and selects.
6. A quick reply system for instant messaging, which adopts the method of any one of claims 1 to 4, and is characterized in that the system comprises:
the system comprises an opposite end, a local end and a cloud end, wherein the cloud end is respectively in communication connection with the opposite end and the local end, the opposite end and the local end are both provided with instant communication tools, and the local end is also provided with a quick reply tool; the cloud end responds to a remote user to carry out instant messaging with an instant messaging tool on the local end through the instant messaging tool on the opposite end;
the local end responds to a target event triggered by a local instant messaging tool, and the instant messaging tool is associated to a quick reply tool according to the target event; acquiring historical communication records between a local end and an opposite end of the instant communication tool through the quick reply tool; extracting the corpus text information in the historical communication record by using a filtering rule; inputting the corpus text information into a dialogue processing model for reply inference prediction to generate a corpus inference result; wherein the dialogue processing model is formed based on natural language dialogue sentences of a determined scene and through retraining of the initial model; carrying out relevance evaluation on the corpus inference result and a basic corpus of a determined scene by utilizing a similarity calculation rule, and calculating and acquiring a similarity score of each piece of corpus information in the basic corpus; and sorting the corpus information according to the similarity degree, extracting a plurality of preset corpus information in sequence to form a reply information option list of the instant messaging local end, and sending the selected corpus information as communication information to the opposite end of the instant messaging after the user triggers and selects.
7. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-4.
8. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202210074595.XA 2022-01-21 2022-01-21 Quick reply method, device and system for instant messaging Pending CN114553803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210074595.XA CN114553803A (en) 2022-01-21 2022-01-21 Quick reply method, device and system for instant messaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210074595.XA CN114553803A (en) 2022-01-21 2022-01-21 Quick reply method, device and system for instant messaging

Publications (1)

Publication Number Publication Date
CN114553803A true CN114553803A (en) 2022-05-27

Family

ID=81671972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210074595.XA Pending CN114553803A (en) 2022-01-21 2022-01-21 Quick reply method, device and system for instant messaging

Country Status (1)

Country Link
CN (1) CN114553803A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178623A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Automatically Generating Test/Training Questions and Answers Through Pattern Based Analysis and Natural Language Processing Techniques on the Given Corpus for Quick Domain Adaptation
US20160132773A1 (en) * 2014-11-06 2016-05-12 International Business Machines Corporation Method for Automatic Near-Real-Time Prediction, Classification, and Notification of Events in Natural Language Systems
CN109995642A (en) * 2017-12-29 2019-07-09 Tcl集团股份有限公司 A kind of method and device automatically generating quickly revert, instant communicating system
CN110532554A (en) * 2019-08-26 2019-12-03 南京信息职业技术学院 A kind of Chinese abstraction generating method, system and storage medium
CN112380331A (en) * 2020-11-16 2021-02-19 北京京东尚科信息技术有限公司 Information pushing method and device
CN112445906A (en) * 2019-08-28 2021-03-05 北京搜狗科技发展有限公司 Method and device for generating reply message

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178623A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Automatically Generating Test/Training Questions and Answers Through Pattern Based Analysis and Natural Language Processing Techniques on the Given Corpus for Quick Domain Adaptation
US20160132773A1 (en) * 2014-11-06 2016-05-12 International Business Machines Corporation Method for Automatic Near-Real-Time Prediction, Classification, and Notification of Events in Natural Language Systems
CN109995642A (en) * 2017-12-29 2019-07-09 Tcl集团股份有限公司 A kind of method and device automatically generating quickly revert, instant communicating system
CN110532554A (en) * 2019-08-26 2019-12-03 南京信息职业技术学院 A kind of Chinese abstraction generating method, system and storage medium
CN112445906A (en) * 2019-08-28 2021-03-05 北京搜狗科技发展有限公司 Method and device for generating reply message
CN112380331A (en) * 2020-11-16 2021-02-19 北京京东尚科信息技术有限公司 Information pushing method and device

Similar Documents

Publication Publication Date Title
JP7127106B2 (en) Question answering process, language model training method, apparatus, equipment and storage medium
CN110717339B (en) Semantic representation model processing method and device, electronic equipment and storage medium
CN109657054B (en) Abstract generation method, device, server and storage medium
US11068519B2 (en) Conversation oriented machine-user interaction
CN109857844B (en) Intent recognition method and device based on ordering dialogue text and electronic equipment
CN110162698B (en) User portrait data processing method, device and storage medium
CN110427461A (en) Intelligent answer information processing method, electronic equipment and computer readable storage medium
CN110222182B (en) Statement classification method and related equipment
JP2019504413A (en) System and method for proposing emoji
CN108960574A (en) Quality determination method, device, server and the storage medium of question and answer
CN111666400B (en) Message acquisition method, device, computer equipment and storage medium
CN110457711B (en) Subject word-based social media event subject identification method
CN114757176A (en) Method for obtaining target intention recognition model and intention recognition method
CN110597968A (en) Reply selection method and device
CN111368066B (en) Method, apparatus and computer readable storage medium for obtaining dialogue abstract
CN113590810A (en) Abstract generation model training method, abstract generation device and electronic equipment
CN113486143A (en) User portrait generation method based on multi-level text representation and model fusion
CN116775815B (en) Dialogue data processing method and device, electronic equipment and storage medium
CN109062900B (en) Friend circle generation method and device
CN116304014A (en) Method for training entity type recognition model, entity type recognition method and device
CN115577109A (en) Text classification method and device, electronic equipment and storage medium
CN112507214B (en) User name-based data processing method, device, equipment and medium
CN115587192A (en) Relationship information extraction method, device and computer readable storage medium
CN114553803A (en) Quick reply method, device and system for instant messaging
CN111488473B (en) Picture description generation method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination