CN113609275A - Information processing method, device, equipment and storage medium - Google Patents

Information processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113609275A
CN113609275A CN202110975913.5A CN202110975913A CN113609275A CN 113609275 A CN113609275 A CN 113609275A CN 202110975913 A CN202110975913 A CN 202110975913A CN 113609275 A CN113609275 A CN 113609275A
Authority
CN
China
Prior art keywords
information
replied
consultation
sample
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.)
Granted
Application number
CN202110975913.5A
Other languages
Chinese (zh)
Other versions
CN113609275B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110975913.5A priority Critical patent/CN113609275B/en
Publication of CN113609275A publication Critical patent/CN113609275A/en
Application granted granted Critical
Publication of CN113609275B publication Critical patent/CN113609275B/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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides an information processing method, an information processing device, information processing equipment and a storage medium, relates to the technical field of Internet, and can be applied to a vehicle-mounted scene, wherein the method comprises the following steps: the method comprises the steps of obtaining information to be replied, obtaining candidate quick replies corresponding to the information to be replied, wherein the candidate quick replies are generated according to a consultation object of the information to be replied and a consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, each first sample data comprises a sample statement and a consultation information type of the sample statement, and the candidate quick replies corresponding to the information to be replied are displayed. Therefore, the accuracy of quick reply is improved.

Description

Information processing method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to an information processing method, an information processing device, information processing equipment and a storage medium.
Background
With the development of communication technology, instant messaging applications have been used by more and more users. For example, a user may communicate with another person (e.g., a client, family, friend, or colleague) via an instant messaging application to communicate text and multimedia information.
Currently, in order to improve the efficiency of information reply, a quick reply function is provided in an existing instant messaging application, and the quick reply function can acquire candidate quick reply information according to the information of a sender, so that a user can conveniently select required quick reply information from the candidate quick reply information for reply. The specific process of acquiring the candidate shortcut reply information is as follows: when the information of the sender is determined to have the preset keyword, the quick reply information matched with the keyword is found from the preset quick reply information list, namely the candidate quick reply information is obtained.
However, in the method, the keyword and the quick reply information list are formulated through manual arrangement, the expression mode of one sentence is various, the accurate semantics of the information cannot be identified only through the keywords in the information of the sender, and further the candidate quick reply information matched through the keywords has deviation from the user intention, so that the quick reply accuracy is low.
Disclosure of Invention
The application provides an information processing method, an information processing device, information processing equipment and a storage medium, and aims to solve the problem that the existing quick reply is low in accuracy.
In a first aspect, the present application provides an information processing method, including:
acquiring information to be replied;
acquiring candidate quick replies corresponding to the information to be replied, wherein the candidate quick replies are generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data comprises a sample sentence and the consultation information type of the sample sentence;
and displaying the candidate quick reply corresponding to the information to be replied.
In a second aspect, the present application provides an information processing apparatus comprising:
the first acquisition module is used for acquiring the information to be replied;
the second obtaining module is used for obtaining a candidate quick reply corresponding to the information to be replied, the candidate quick reply is generated according to a consultation object of the information to be replied and a consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data comprises a sample statement and the consultation information type of the sample statement;
and the display module is used for displaying the candidate quick reply corresponding to the information to be replied.
In a third aspect, the present application provides a terminal device, including: a processor and a memory, the memory for storing a computer program, the processor for invoking and executing the computer program stored in the memory to perform the method of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program for causing a computer to perform the method of the first aspect.
In summary, in the application, the classification model is trained in advance to learn the consultation information types of each sample sentence and each sample sentence, when the candidate quick reply of the information to be replied is obtained, the consultation information type of the information to be replied can be determined according to the information to be replied and the classification model, then the candidate quick reply is generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, because the classification model learns the consultation information types of different sample sentences and sample sentences, the consultation information type of the information to be replied can be accurately obtained through the classification model, the user intention corresponding to the information to be replied can be accurately obtained, the accurate candidate quick reply can be generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, and the accuracy of the quick reply is improved.
Further, in the application, the classification model is trained in advance to learn each sample sentence and the type of the consulting information of the sample sentence, so that the number of the sample sentences and the types of the sample sentences can be increased during training, and the application range of the quick reply function can be expanded.
Furthermore, in the application, the consultation object corresponding to the image in the information to be replied is identified according to the corresponding relation between the pre-stored image and the consultation object, the consultation object corresponding to the image can be accurately identified, the information to be replied including the image can be replied quickly, and compared with the prior art, only the text can be replied quickly, so that the application range of quick reply is expanded.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an information processing method according to an embodiment of the present application;
fig. 2 is a schematic view of another application scenario of the information processing method according to the embodiment of the present application;
fig. 3 is a flowchart of an information processing method according to an embodiment of the present application;
FIG. 4 is a schematic interface diagram of a one-to-one session according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an interface of a many-to-many conversation provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a quick reply interface according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a classification model provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a quick reply model according to an embodiment of the present application;
fig. 9 is an interaction flowchart of an information processing method according to an embodiment of the present application;
fig. 10 is a schematic process diagram of an information processing method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an information processing apparatus 100 according to an embodiment of the present application;
fig. 12 is a schematic block diagram of a terminal device 200 provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Before the technical scheme of the application is introduced, the related knowledge of the application is introduced as follows:
1. artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
2. Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like.
The information processing method provided by the embodiment of the application relates to an artificial intelligence natural language processing method, and is specifically explained by the following embodiment.
In the prior art, the keyword and quick reply information list are formulated through manual arrangement, the expression mode of one sentence is various, the accurate semantics of the information cannot be identified only through the keywords in the information of the sender, and then the candidate quick reply information matched through the keywords has deviation from the intention of the user, so that the accuracy of quick reply is low. For example, the sender's message is "how long do you ask for a vehicle of the XX model? The keywords in the information include "XX vehicle type" and "lift car", the lift car includes lift car time and a lift car location, the quick reply information corresponding to the lift car time and the lift car location may be matched through the existing method, or the quick reply information corresponding to the lift car time or the lift car location is matched, the actual intention of the user is to inquire the lift car time, if the quick reply information corresponding to the lift car time and the lift car location is matched, the user is not required to search for the information quickly, if the quick reply information corresponding to the lift car location is matched, the intention of the user is deviated, and in short, the accuracy is low. In order to solve the technical problem, the method learns each sample sentence and the type of the consulting information of the sample sentence by training a classification model in advance, when the candidate quick reply of the information to be replied is obtained, the type of the consultation information of the information to be replied can be determined according to the information to be replied and the classification model, then the candidate quick reply is generated according to the consultation object of the information to be replied and the type of the consultation information of the information to be replied, because the classification model learns different sample sentences and the consultation information types of the sample sentences, the consultation information types of the information to be replied can be accurately obtained through the classification model, the user intention corresponding to the information to be replied can be accurately obtained, and then accurate candidate quick reply can be generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, so that the accuracy of the quick reply is improved.
On the other hand, in the prior art, the keywords and the quick reply information list are formulated through manual sorting, the number of the keywords and the number of the quick reply information in the quick reply information list are limited, and information beyond the preset keyword range cannot be quickly replied, so that the application range of the quick reply function is narrow. According to the method and the device, the classification model is trained in advance to learn the sample sentences and the consultation information types of the sample sentences, the number of the sample sentences and the types of the sample sentences can be increased during training, and therefore the application range of the quick reply function can be expanded.
Further, in the application, the consultation object corresponding to the image in the information to be replied is identified according to the corresponding relation between the pre-stored image and the consultation object, the consultation object corresponding to the image can be accurately identified, the information to be replied including the image can be replied quickly, and compared with the prior art, only the text can be replied quickly, so that the application range of quick reply is expanded.
Some brief descriptions will be given below to application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The information processing method provided by the embodiment of the application can be applied to a scene needing quick reply even in communication application, and the efficiency of replying information can be improved. For example, it may be applied to a scenario where a customer serves or sells consultation information in reply to one or more customers, and so on.
Fig. 1 is a schematic view of an application scenario of the information processing method according to an embodiment of the present disclosure, as shown in fig. 1, the application scenario of this embodiment relates to a server 1 and a terminal device 2, and the terminal device 2 may be a terminal device running an instant messaging application (also referred to as a client), where the instant messaging application may be a web page running in a browser of the terminal device 2 and displayed by the browser, or an application program (APP) installed and running in the terminal device 2. The instant messaging application can be an application with an instant messaging function, such as a WeChat application, an Tencent QQ application, and an enterprise office application (such as an enterprise WeChat application) for providing office management business for an enterprise. The terminal device 2 includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent household appliance, a vehicle-mounted terminal, and the like. Optionally, when the user needs to perform quick reply, the client on the terminal device 2 may be operated to trigger the quick reply, the client responds to an operation of the user that triggers the quick reply through the terminal device 2 to obtain the information to be replied, and then sends the information to be replied to the server, the server 1 executes the information processing method provided in the embodiment of the present application to obtain a candidate quick reply corresponding to the information to be replied, the server 1 sends the candidate quick reply corresponding to the information to be replied to the client, and the client displays the candidate quick reply corresponding to the information to be replied on the current interface. Therefore, the user can select the required quick response from the quick responses to be selected, and the quick response can be sent after being edited or directly sent, so that the efficiency of information response can be improved.
For example, fig. 2 is a schematic view of another application scenario of the information processing method provided in the embodiment of the present application, as shown in fig. 2, the application scenario of the embodiment relates to a terminal device 2, and the terminal device 2 may be a terminal device running an instant messaging application (also referred to as a client), where the instant messaging application may be a web page running in a browser of the terminal device 2 and displayed by the browser, or an APP installed and running in the terminal device 2. The terminal device 2 includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent household appliance, a vehicle-mounted terminal, and the like. Optionally, when the user needs to perform a quick reply, the quick reply may be triggered by operating the client on the terminal device 2, for example, in a session interface of the instant messaging application shown in fig. 2, a plurality of operation options are displayed above the session input box, where the operation options include "quick reply," and when the user needs to perform an information reply, the "quick reply" option may be triggered (e.g., clicked), the client obtains information to be replied in response to an operation of the user triggering the quick reply through the terminal device 2, executes the information processing method provided in the embodiment of the present application, obtains a candidate quick reply corresponding to the information to be replied, and then the client displays the candidate quick reply corresponding to the information to be replied on the current interface (e.g., candidate quick reply 1 and candidate quick reply 2 are displayed in fig. 2). Therefore, the user can select the required quick response from the quick responses to be selected, and the quick response can be sent after being edited or directly sent, so that the efficiency of information response can be improved.
The technical scheme of the application is explained in detail as follows:
fig. 3 is a flowchart of an information processing method according to an embodiment of the present application, where the method may be executed by an information processing apparatus, and the information processing apparatus may be implemented by software and/or hardware. The information processing apparatus may be a terminal device or a chip or a circuit of the terminal device. As shown in fig. 3, the method comprises the steps of:
s101, obtaining information to be replied.
Specifically, when the user needs to perform a quick reply, the quick reply may be triggered by operating an instant messaging client on the terminal device, for example, the quick reply may be triggered by a current session interface of an instant messaging application, and the terminal device obtains the information to be replied in response to an operation of triggering the quick reply by the user.
Optionally, the current session may be any one of a one-to-one session, a one-to-many session, and a many-to-many session, and if the current session is a one-to-one session (e.g., private chat), as an implementable manner, the obtaining of the information to be replied in S101 may specifically be:
s1011, the last message from the sender in the current session is determined as the message to be replied.
For the example of S1011 and fig. 4, fig. 4 is an interface schematic diagram of a one-to-one session provided in the embodiment of the present application, for example, the last message from the sender a in the session shown in fig. 4 is "do high oil consumption", and the message is determined as a message to be replied. Namely, the last message from the sender in the current session is determined as the message to be replied.
If the current session is a one-to-one session (e.g., private chat), as another implementable manner, the step S101 of acquiring the information to be replied may specifically include steps S1011 '-S1012':
s1011', displaying at least one message from the sender in the current session.
S1012', in response to an operation of the user selecting one target information from the at least one information, determining the target information as the information to be replied.
For example, for S1011 '-S1012', the user a sends three pieces of information, none of which is replied, and after the user B triggers the quick reply, the three pieces of information from the sender a are displayed, so that the user B can select the target information as the information to be replied from the target information.
If the current session is a one-to-many session or a many-to-many session (such as group chat), as an implementable manner, the obtaining of the information to be replied in S101 may specifically include S1011 "-S1012":
and S1011', displaying the target sender for the user to select, wherein the target sender is at least one information sender in one-to-many conversation or many-to-many conversation.
For S1011 ″, which is illustrated in conjunction with fig. 5, fig. 5 is an interface schematic diagram of a many-to-many session provided in the embodiment of the present application, and fig. 6 is an interface schematic diagram of a quick reply provided in the embodiment of the present application, for example, after a user B clicks a quick reply button shown in fig. 5, the interface jumps to the interface shown in fig. 6, and the interface shown in fig. 6 displays information senders a and C for the user to select one sender as the sender to be replied.
S1012', in response to the operation of the user selecting a sender to be replied from the target senders, the last message from the sender to be replied is determined as the message to be replied, or at least one message from the sender to be replied in the current session is displayed, and in response to the operation of the user selecting one target message from the at least one message, the target message is determined as the message to be replied.
Specifically, after the sender to be replied is determined, the information to be replied needs to be determined, and the specific process is similar to one-to-one, and is not described herein again.
S102, candidate quick replies corresponding to the information to be replied are obtained, the candidate quick replies are generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data comprises a sample sentence and the consultation information type of the sample sentence.
The consultation object is, for example, a certain type of commodity, and the consultation information type is, for example, the type of attribute information of the commodity. Taking the automobile industry as an example, the consultation object may be an automobile model (including a brand and a specific automobile model), and the consultation information type may be a common automobile purchasing problem associated with the automobile model, such as an automobile model base price, an automobile lifting time, an automobile model using scene, similar automobile model recommendation, an automobile model parameter, and the like. It should be noted that the consultation object and the type of consultation information may also be information corresponding to other commodities, which is not limited in this embodiment.
Specifically, the executing entity of this embodiment may be a terminal device, and in an implementable manner, the obtaining of the candidate quick reply corresponding to the information to be replied may be specifically executed by a target device, where the target device may be a server, for example, and then S102 may specifically include:
and S1021, sending the information to be replied to the target equipment.
The method comprises the steps of sending information to be replied to target equipment, determining the type of consultation information of the information to be replied by the target equipment according to the information to be replied and a pre-trained classification model, generating candidate quick replies according to the consultation object of the information to be replied and the type of the consultation information of the information to be replied, and sending the generated candidate quick replies to the terminal equipment.
And S1022, receiving the candidate shortcut reply sent by the target device.
In another implementable manner, the obtaining of the candidate quick reply corresponding to the to-be-replied information in S102 may be performed by the terminal device, where S102 specifically includes:
s1021', a consultation object of the information to be replied is obtained.
Specifically, the information to be replied may include a text or an image, or the information to be replied may include a text and an image, and if the information to be replied includes a text, it may specifically be that the text in the information to be replied is participled to obtain at least one word, a consulting object is identified from the at least one word, the consulting object is generally a noun, and the consulting object is identified from the at least one word, for example, it may specifically be that a noun in the word obtained after the participle is identified as the consulting object.
In this embodiment, optionally, the word segmentation processing may be performed on the text in the information to be replied, and the word segmentation processing may be performed by using a word segmentation library (for example, an open-source jieba word segmentation library), and if the context is a quick reply scenario in a specific field, for example, in an automobile sales industry, automobile industry vocabularies may be added to the word segmentation library to facilitate better word segmentation. Optionally, a word segmentation tool (such as a qqseg word segmentation tool) may be used to perform word segmentation on the text in the message to be replied.
And if the information to be replied comprises the image, identifying the consultation object corresponding to the image in the information to be replied according to the corresponding relation between the pre-stored image and the consultation object. Specifically, if the scene is a quick reply scene in a specific field, for example, in the automobile sales industry, the corresponding relationship between the automobile image and the automobile type may be prestored, and the automobile type corresponding to the automobile image may be quickly identified according to the prestored corresponding relationship between the automobile image and the automobile type, where the automobile type is the consultation object.
In the embodiment, the consultation object corresponding to the image in the information to be replied is identified according to the corresponding relation between the pre-stored image and the consultation object, the consultation object corresponding to the image can be accurately identified, the information to be replied including the image can be quickly replied, compared with the prior art, only the text can be quickly replied, and the application range of quick reply is expanded.
It should be noted that, when sending a message, a user may send multiple messages at the same time, where multiple messages are sent separately, and when obtaining a consultation object of a message to be replied and a consultation information type of the message to be replied, if these two parameters cannot be obtained according to one piece of message to be replied, the two parameters may be obtained according to the previous piece or pieces of the selected message to be replied, for example, the order in which the user sends the message is the first piece of the message: "how long you can pick up a car in the XX model", the second piece of information: the query of which colors can be selected is requested, at this time, only the type of the query information can be obtained according to the second piece of information, and then the query object is obtained according to the first piece of information, and the specific obtaining mode is similar and is not repeated.
S1022', inputting the information to be replied into the classification model, and outputting the consultation information type of the information to be replied.
Specifically, the classification model in this embodiment is obtained by training a plurality of first sample data, each of which includes a sample statement and a consultation information type of the sample statement, where the sample statement may be selected according to a history statement of a service scenario corresponding to the instant messaging application, for example, the service scenario is car sales, and the sample statement may be a question statement of a client in a car sales session record.
When the classification model is trained, each first sample datum comprises a sample statement and a consultation information type of the sample statement, the consultation information type of the sample statement can be labeled manually, the input of the classification model is the sample statement, the output of the classification model is the consultation information type of the sample statement, and after the classification model is trained, the classification model can be tested and verified by using a history statement, so that the accuracy of the classification model is ensured. For example, taking an automobile sales scene as an example, 10 ten thousand question sentences of a client in the conversation records are selected, the consultation information type of each question sentence is labeled, training, testing and verification of the classification model are performed according to the proportion of 7:2:1 of the sample set, the test set and the verification set, and finally the classification model is obtained.
Alternatively, the classification model may be a neural network model.
S1023', and generating candidate quick replies according to the consultation objects in the information to be replied and the consultation information types of the consultation objects.
Specifically, in an implementable manner, the generating a candidate shortcut reply in S1023' according to the advisory object in the information to be replied and the advisory information type of the advisory object may specifically include:
if the consultation information type of the information to be replied is found from the preset consultation information type set, searching the inquiry information corresponding to the consultation object of the information to be replied and the consultation information type of the information to be replied from a pre-stored database, and determining the inquiry information as candidate quick reply.
For example, in the automobile industry as an example, the consultation object may be a vehicle type (including a brand and a specific vehicle type), the preset consultation information type set may include common vehicle purchasing information associated with the vehicle type, and the preset consultation information type set includes, for example, a vehicle type reserve price, a vehicle lifting time, a vehicle type use scene, a similar vehicle type recommendation, and a vehicle type parameter. The consultation object in the information to be replied is the XX vehicle type, the consultation information type of the information to be replied is the vehicle type base price, and the vehicle type base price can be found from the preset consultation information type set, so that the inquiry information corresponding to the XX vehicle type and the vehicle type base price is found from the prestored database, namely the base price of the XX vehicle type is found. Alternatively, different consulting objects and different types of consulting information with each consulting object may be stored in the database, for example, in the automobile industry, the database may be as shown in the following table one:
table-database
Figure BDA0003227607880000101
It should be noted that the table one is only an example, and in other service scenarios, the database in other service scenarios may be prestored.
Further, if the consultation information type of the information to be replied is not found from the preset consultation information type set, determining candidate quick reply according to the information to be replied and a pre-trained quick reply model, wherein the quick reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample statement and a reply statement of the sample statement.
Specifically, the statement asked by the user may also be a statement that consults other types of information, and is not in a preset consultation information type set, and in order to avoid that a quick reply cannot be performed under such a condition, a candidate quick reply may be determined according to the information to be replied and a pre-trained quick reply model. The quick reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample statement and a reply statement of the sample statement.
Specifically, the candidate quick reply is determined according to the information to be replied and the quick reply model trained in advance, and may be: inputting the information to be replied into the quick reply model, outputting the reply sentence of the information to be replied, and determining the reply sentence of the information to be replied as a candidate quick reply.
In this embodiment, the quick reply model is obtained by training a plurality of second sample data, each second sample data includes a sample statement and a reply statement of the sample statement, the sample statement may be selected according to a history statement of a service scenario and a history statement of a daily session corresponding to the instant messaging application, for example, the service scenario is an automobile sale, the sample statement may be a history chat record and an open-source daily history chat record in an automobile sale session record, and the chat record includes a reply statement of a statement and a statement.
When the quick reply model training is carried out, each second sample datum comprises a sample statement and a reply statement of the sample statement, the input of the quick reply model is the sample statement, the output of the quick reply model is the reply statement of the sample statement, for example, the sample statement is the reply statement of the sample statement, for example, the 4S shop in XX district of asking questions city has vehicle maintenance service, the reply statement of the sample statement is 'available', the quick reply model training according to the second sample datum can effectively utilize context information, and the problem that quick reply cannot be carried out when the type of the consultation information of the statement asked for questions by a user is not in a preset consultation information type set is solved.
The statement asked by the user may also be information of other types, which is not in a preset consulting information type set, for example, vehicle type recommendation, in order to avoid that a quick reply cannot be performed under such a condition, optionally, in another implementable manner, in S1023', a candidate quick reply is generated according to a consulting object in the information to be replied and a consulting information type of the consulting object, which specifically may include:
and S1, if the consultation information type of the information to be replied is a preset type, acquiring the user attribute information of the sender of the information to be replied.
The user attribute information is, for example, a user representation, and the user attribute information may include information such as a user identifier, a consumption level of the user, an age, a user preference, and a region. Optionally, the user attribute information may be specifically queried from a user attribute information library. The preset type of consultation information can be information which can be determined according to user attribute information, for example, a service scene is automobile sales, the preset type of consultation information is vehicle type recommendation, for example, and when the type of consultation information of the information to be replied is vehicle type recommendation, user attribute information of a sender of the information to be replied is acquired.
And S2, determining the user level of the sender of the information to be replied according to the user attribute information.
For example, a user rating of a user, such as a consumption level, may be estimated based on the user's age, location, and consumption rating.
And S3, determining the information matched with the user level of the sender in the pre-stored information list of the preset type as a candidate quick reply.
For example, when the type of the consultation information of the information to be replied is vehicle type recommendation, after the consumption level of the sender of the information to be replied is determined, a vehicle type matched with the consumption level of the sender can be recommended to the user.
Further, after S3, the method may further include:
and S4, updating the user attribute information of the sender according to the information matched with the user grade of the sender.
Specifically, by updating the user attribute information of the sender according to the information matched with the user level of the sender, for example, the information matched with the user level of the sender can be stored in the user attribute information of the sender, so that the candidate quick reply can be conveniently and accurately obtained in a subsequent quick manner.
Optionally, the quick reply model can be retrained according to the candidate quick reply of the to-be-replied information of which the consultation information type is the preset type according to the preset period, so that the subsequent quick reply of the to-be-replied information of which the consultation information type is the preset type can be more accurate.
Through the above process of retraining the shortcut reply model, optionally, in the method of this embodiment, if the type of the advisory information of the information to be replied is a preset type, a candidate shortcut reply can be determined according to the information to be replied and the pre-trained shortcut reply model, so that the candidate shortcut reply can be obtained more quickly and accurately.
S103, displaying the candidate quick reply corresponding to the information to be replied.
Further, after S103, the method may further include:
and responding to the operation of selecting the target quick reply in the candidate quick replies by the user, and displaying the target quick reply in a dialog input box for the user to edit and then send or directly send.
The information processing method provided by this embodiment learns each sample sentence and the type of the consulting information of the sample sentence by training the classification model in advance, when the candidate quick reply of the information to be replied is obtained, the type of the consultation information of the information to be replied can be determined according to the information to be replied and the classification model, then the candidate quick reply is generated according to the consultation object of the information to be replied and the type of the consultation information of the information to be replied, because the classification model learns different sample sentences and the consultation information types of the sample sentences, the consultation information types of the information to be replied can be accurately obtained through the classification model, the user intention corresponding to the information to be replied can be accurately obtained, and then accurate candidate quick reply can be generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, so that the accuracy of the quick reply is improved.
The structure and training process of a classification model is exemplarily shown below in connection with fig. 7.
As an implementable manner, fig. 7 is a schematic structural diagram of a classification model provided in the embodiment of the present application, as shown in fig. 7, the classification model includes a first training model 10 and a logistic regression classifier 20, and a process of training a plurality of first sample data to obtain the classification model includes:
training according to a preset number of training rounds to obtain a classification model as follows:
and loading the first training model by taking the serialization identification of the sample statement of each first sample data as input to obtain the statement vector of the sample statement of each first sample data.
And (3) taking the sentence vector of each sample sentence of the first sample data as the input of the logistic regression classifier, and taking the consultation information type of each sample sentence of the first sample data as the output of the logistic regression classifier, and training the logistic regression classifier.
Taking a first sample data as an example, as shown in FIG. 7, [ CLS]For special symbols indicating start, W1、W2And W3Serializing a sample statement of a first sample datum to obtain a serialized identifier of the sample statement, wherein the serialized identifier comprises the following specific processes: the method comprises the steps of segmenting words of a sample sentence to obtain one or more words, and then assigning an Identification (ID) to each word obtained after segmentation according to a pre-stored dictionary. Optionally, the sample sentence may be serialized by using token rank (a word segmentation and serialization tool), so as to obtain a serialization identifier of the sample sentence. For example, a sample sentence is segmented to obtain 3 words, and the 3 words are all assigned with marks to obtain W1、W2And W3,W1、W2And W3After the input of the first training model, the word vectors of 3 words and the sentence vectors of the sample sentences are output, then, the sentence vector of the sample sentence of each first sample data is used as the input of the logistic regression classifier, and the counseling information type of the sample sentence of each first sample data is used as the output of the logistic regression classifier, so that the logistic regression classifier is trained.
In this embodiment, optionally, the first training model may be a BERT-Chinese pre-training model, and the first training model may also be a word2vec word vector text classification model or a Convolutional Neural Network (CNN) text classification model.
In this embodiment, the preset number of training rounds epochs may be 10, the batch size (batch size) may be set to 256, the maximum length of sentence (max _ seq _ len) may be set to 128, the learning rate may be set to 0.001, and the accuracy of the classification model may reach 0.89 through the training of the classification model.
The structure and training process of a quick reply model are exemplarily shown in the following with reference to fig. 8.
As an implementable manner, fig. 8 is a schematic structural diagram of a quick reply model provided in the embodiment of the present application, as shown in fig. 8, the quick reply model includes a second training model 30 and a logistic regression classifier 40, and a process of training a plurality of second sample data to obtain the quick reply model includes:
and (3) carrying out the following training according to the preset number of training rounds to obtain a quick reply model:
and loading a second training model by taking the position embedding and the word embedding of the sample statement of each second sample data as input to obtain the implicit vector of the sample statement of each second sample data, wherein the position embedding is the position of the word forming the sample statement in the sample statement, and the word embedding is the serialization identification of the sample statement.
And training the logistic regression classifier by taking the hidden vector of the sample statement of each second sample data as the input of the logistic regression classifier and taking the reply statement of the sample statement of each second sample data as the output of the logistic regression classifier, wherein the reply statement of the sample statement of each second sample data is obtained by text prediction of the hidden vector of the sample statement of each second sample data by taking the logistic regression classifier.
Taking a second sample datum as an example, with reference to fig. 7, serializing a sample sentence of a second sample datum to obtain a position embedding of the sample sentence and a word embedding of the sample sentence, where the position embedding of the sample sentence is a position of a word constituting the sample sentence in the sample sentence, the word embedding of the sample sentence is a serialization flag of the sample sentence, the serialization flag of the sample sentence includes a flag of each word constituting the sample sentence, and the concrete process of serialization is as follows: the method comprises the steps of segmenting words of a sample sentence to obtain one or more words, then assigning an Identification (ID) to each word obtained after segmentation according to a pre-stored dictionary, and meanwhile labeling the position of each word in the sample sentence. Optionally, the sample sentence may be serialized using tokenize (a segmentation and serialization tool), so as to obtain the position embedding of the sample sentence and the word embedding of the sample sentence. And then, embedding the position of the sample sentence and embedding and assembling the words of the sample sentence into a second training model, outputting the hidden vector of the sample sentence, wherein the hidden vector of the sample sentence comprises the word vector of each word, performing text prediction on the hidden vector of the sample sentence by using a logistic regression classifier to obtain a reply sentence of the sample sentence, taking the hidden vector of the sample sentence as the input of the logistic regression classifier, and taking the reply sentence of the sample sentence as the output of the logistic regression classifier, and training the logistic regression classifier.
In this embodiment, optionally, the second training model may be a GPT2-Chinese pre-training model or a GPT3 pre-training model, and the second training model may also be a Recurrent Neural Networks (RNN) model.
In this embodiment, the preset number of training rounds epochs may be 40, the batch size (batch size) may be set to 256, the maximum length of a sentence (max _ seq _ len) may be set to 128, the learning rate may be set to 0.001, and the accuracy of the quick reply model may reach 1.5 through the training of the quick reply model.
The following describes a detailed process of the information processing method provided in the embodiment of the present application with reference to two specific embodiments.
Fig. 9 is an interaction flowchart of an information processing method provided in the embodiment of the present application, and the embodiment takes a target device as an example for description. As shown in fig. 9, the method of this embodiment may include the following steps:
s201, the terminal equipment responds to the operation that the user triggers the quick reply, and obtains the information to be replied.
Specifically, when the user needs to perform a quick reply, the quick reply may be triggered by operating an instant messaging client on the terminal device, for example, the quick reply may be triggered by a current session interface of an instant messaging application, and the terminal device obtains the information to be replied in response to an operation of triggering the quick reply by the user.
The specific process of acquiring the to-be-replied message may refer to the description in the embodiment shown in fig. 3, and is not described herein again.
S202, the terminal equipment sends the information to be replied to a server.
S203, the server acquires the consultation object of the information to be replied.
Specifically, the information to be replied may include a text or an image, or the information to be replied may include a text and an image, and if the information to be replied includes a text, it may specifically be that the text in the information to be replied is participled to obtain at least one word, a consulting object is identified from the at least one word, the consulting object is generally a noun, and the consulting object is identified from the at least one word, for example, it may specifically be that a noun in the word obtained after the participle is identified as the consulting object.
And if the information to be replied comprises the image, identifying the consultation object corresponding to the image in the information to be replied according to the corresponding relation between the pre-stored image and the consultation object. Specifically, if the scene is a quick reply scene in a specific field, for example, in the automobile sales industry, the corresponding relationship between the automobile image and the automobile type may be prestored, and the automobile type corresponding to the automobile image may be quickly identified according to the prestored corresponding relationship between the automobile image and the automobile type, where the automobile type is the consultation object.
And S204, inputting the information to be replied into the classification model, and outputting the consultation information type of the information to be replied.
S205, generating candidate quick replies according to the consultation objects in the information to be replied and the consultation information types of the consultation objects.
Specifically, S205 may include:
s2051, if the consultation information type of the information to be replied is found from the preset consultation information type set, searching the inquiry information corresponding to the consultation object of the information to be replied and the consultation information type of the information to be replied from a pre-stored database, and determining the inquiry information as candidate quick reply.
And S2052, if the consultation information type of the information to be replied is not found from the preset consultation information type set, inputting the information to be replied into the quick reply model, outputting a reply sentence of the information to be replied, and determining the reply sentence of the information to be replied as a candidate quick reply.
And S2053, if the consultation information type of the information to be replied is a preset type, acquiring the user attribute information of the sender of the information to be replied, determining the user grade of the sender of the information to be replied according to the user attribute information, and determining the information matched with the user grade of the sender in a pre-stored information list of the preset type as candidate quick reply.
Further, after S2053, the method may further include: and updating the user attribute information of the sender according to the information matched with the user grade of the sender.
Further, the method can also comprise the following steps: and according to a preset period, retraining the quick reply model according to the quick reply of the to-be-replied information of which the type of the consultation information is a preset type. Namely, the quick reply of the information to be replied is added into the quick reply model for on-line learning. The quick reply can be a quick reply edited by the user or a candidate quick reply selected by the user.
S206, the server sends the candidate quick reply of the information to be replied to the terminal equipment.
And S207, the terminal equipment displays the candidate quick reply corresponding to the information to be replied.
In the embodiment shown in fig. 9, the candidate quick reply corresponding to the information to be replied is obtained by the server, optionally, the candidate quick reply corresponding to the information to be replied may also be obtained by the terminal device, which is described below with reference to fig. 10.
Fig. 10 is a process schematic diagram of an information processing method according to an embodiment of the present application, as shown in fig. 10, when a user a and a user communicate through an instant messaging application, the user a sends a message to be replied, the user B selects a quick reply, and the quick reply is triggered by operating a terminal device B used by the user B, for example, the quick reply may be triggered on a current session interface of the instant messaging application, and the terminal device B used by the user B obtains the message to be replied (that is, the message to be replied sent by the user a) in response to an operation of triggering the quick reply by the user. The terminal device B identifies the query object through at least one of image identification and text identification, acquires a type of the query information (specifically, the type of the query information of the information to be replied is input into the classification model and output), then generates a candidate quick reply according to the query object and the type of the query information, and when generating the candidate quick reply according to the query object and the type of the query information, specifically, the method may include:
1) if the consultation information type of the information to be replied is found from the preset consultation information type set, searching the inquiry information corresponding to the consultation object of the information to be replied and the consultation information type of the information to be replied from a pre-stored database, and determining the inquiry information as candidate quick reply.
2) If the consultation information type of the information to be replied is not found from the preset consultation information type set, inputting the information to be replied into the quick reply model, outputting a reply sentence of the information to be replied, and determining the reply sentence of the information to be replied as a candidate quick reply.
3) If the type of the consultation information of the information to be replied is a preset type, acquiring user attribute information of a sender of the information to be replied, wherein the user attribute information of the sender of the information to be replied can be acquired from a user attribute information base, determining the user grade of the sender of the information to be replied according to the user attribute information, and determining information matched with the user grade of the sender in a pre-stored information list of the preset type as candidate quick reply.
After the terminal device B generates candidate quick replies, the candidate quick replies are displayed on a current session interface of the instant messaging application of the terminal device B, the user B can select the required quick replies from the candidate quick replies, and the terminal device B displays the quick replies selected by the user in a dialog input box for the user B to edit and then send or directly send, namely, send reply information back to the user A.
The following are embodiments of the apparatus of the present application that may be used to perform the above-described embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method described above in the present application.
Fig. 11 is a schematic structural diagram of an information processing apparatus 100 according to an embodiment of the present application, and as shown in fig. 11, the apparatus according to the embodiment may include: a first acquisition module 11, a second acquisition module 12 and a display module 13, wherein,
the first obtaining module 11 is configured to obtain information to be replied;
the second obtaining module 12 is configured to obtain a candidate quick reply corresponding to the information to be replied, where the candidate quick reply is generated according to a consultation object of the information to be replied and a consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data includes a sample sentence and a consultation information type of the sample sentence;
the display module 13 is configured to display the candidate quick reply corresponding to the message to be replied.
Optionally, the classification model includes a first training model and a logistic regression classifier, and the second obtaining module 12 is further configured to: training according to a preset number of training rounds to obtain a classification model as follows:
loading a first training model by taking the serialization identification of the sample statement of each first sample data as input to obtain a statement vector of the sample statement of each first sample data;
and (3) taking the sentence vector of each sample sentence of the first sample data as the input of the logistic regression classifier, and taking the consultation information type of each sample sentence of the first sample data as the output of the logistic regression classifier, and training the logistic regression classifier.
Optionally, the first obtaining module 11 is configured to:
sending the information to be replied to the target equipment;
and receiving the candidate shortcut reply sent by the target equipment.
Optionally, the first obtaining module 11 is configured to: acquiring a consultation object of information to be replied;
inputting the information to be replied into the classification model, and outputting the consultation information type of the information to be replied;
and generating candidate quick replies according to the consultation objects in the information to be replied and the consultation information types of the consultation objects.
Optionally, the first obtaining module 11 is specifically configured to: if the consultation information type of the information to be replied is found from the preset consultation information type set, searching query information corresponding to the consultation object of the information to be replied and the consultation information type of the information to be replied from a pre-stored database;
and determining the query information as a candidate quick reply.
Optionally, the first obtaining module 11 is further configured to: if the consultation information type of the information to be replied is not found from the preset consultation information type set, determining candidate quick reply according to the information to be replied and a quick reply model trained in advance, wherein the quick reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample statement and a reply statement of the sample statement.
Optionally, the first obtaining module 11 is specifically configured to: inputting the information to be replied into the quick reply model, and outputting a reply sentence of the information to be replied;
and determining the reply sentences of the information to be replied as candidate quick replies.
Optionally, the quick reply model includes a second training model and a logistic regression classifier, and the first obtaining module 11 is specifically configured to:
and (3) carrying out the following training according to the preset number of training rounds to obtain a quick reply model:
the position embedding and the word embedding of the sample statement of each second sample data are used as input, a second training model is loaded to obtain a hidden vector of the sample statement of each second sample data, the position embedding is the position of the word forming the sample statement in the sample statement, and the word embedding is the serialization identification of the sample statement;
and training the logistic regression classifier by taking the hidden vector of the sample statement of each second sample data as the input of the logistic regression classifier and taking the reply statement of the sample statement of each second sample data as the output of the logistic regression classifier, wherein the reply statement of the sample statement of each second sample data is obtained by text prediction of the hidden vector of the sample statement of each second sample data by taking the logistic regression classifier.
Optionally, the first obtaining module 11 is specifically configured to:
if the type of the consultation information of the information to be replied is a preset type, acquiring user attribute information of a sender of the information to be replied;
determining the user grade of a sender of the information to be replied according to the user attribute information;
and determining the information matched with the user grade of the sender in the pre-stored information list of the preset type as a candidate quick reply.
Optionally, the first obtaining module 11 is further configured to:
and updating the user attribute information of the sender according to the information matched with the user grade of the sender.
Optionally, the second obtaining module 12 is specifically configured to:
if the information to be replied comprises a text, performing word segmentation processing on the text in the information to be replied to obtain at least one word;
identifying a consulting object from the at least one word;
and if the information to be replied comprises the image, identifying the consultation object corresponding to the image in the information to be replied according to the corresponding relation between the pre-stored image and the consultation object.
Optionally, if the current session is a one-to-one session, the first obtaining module 11 is configured to:
determining the last message from a sender in the current session as a message to be replied;
alternatively, the first and second electrodes may be,
displaying at least one message from the sender in the current session;
and in response to the operation that the user selects one piece of target information from at least one piece of information, determining the target information as the information to be replied.
Optionally, if the current session is a one-to-many session or a many-to-many session, the first obtaining module 11 is configured to:
displaying a target sender for a user to select, wherein the target sender is at least one information sender in one-to-many conversation or many-to-many conversation;
and in response to the operation of selecting a sender to be replied from the target senders by the user, determining the last message from the sender to be replied as the message to be replied, or displaying at least one message from the sender to be replied in the current session, and in response to the operation of selecting one target message from the at least one message by the user, determining the target message as the message to be replied.
Optionally, the display module 13 is further configured to:
and responding to the operation of selecting the target quick reply in the candidate quick replies by the user, and displaying the target quick reply in the dialog input box for the user to edit and then send or directly send.
The apparatus provided in the embodiment of the present application may implement the method embodiment, and specific implementation principles and technical effects thereof may be referred to the method embodiment, which is not described herein again.
It is to be understood that apparatus embodiments and method embodiments may correspond to one another and that similar descriptions may refer to method embodiments. To avoid repetition, further description is omitted here. Specifically, the information processing apparatus 100 shown in fig. 9 may execute a method embodiment corresponding to the terminal device, and the foregoing and other operations and/or functions of each module in the information processing apparatus 100 are respectively for implementing the method embodiment corresponding to the terminal device, and are not described herein again for brevity.
The information processing apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the drawings. It should be understood that the functional modules may be implemented by hardware, by instructions in software, or by a combination of hardware and software modules. Specifically, the steps of the method embodiments in the present application may be implemented by integrated logic circuits of hardware in a processor and/or instructions in the form of software, and the steps of the method disclosed in conjunction with the embodiments in the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Alternatively, the software modules may be located in random access memory, flash memory, read only memory, programmable read only memory, electrically erasable programmable memory, registers, and the like, as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps in the above method embodiments in combination with hardware thereof.
Fig. 12 is a schematic block diagram of a terminal device 200 provided in an embodiment of the present application.
As shown in fig. 12, the terminal device 200 may include:
a memory 210 and a processor 220, the memory 210 being configured to store a computer program and to transfer the program code to the processor 220. In other words, the processor 220 may call and run a computer program from the memory 210 to implement the method in the embodiment of the present application.
For example, the processor 220 may be configured to perform the above-described method embodiments according to instructions in the computer program.
In some embodiments of the present application, the processor 220 may include, but is not limited to:
general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like.
In some embodiments of the present application, the memory 210 includes, but is not limited to:
volatile memory and/or non-volatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
In some embodiments of the present application, the computer program may be partitioned into one or more modules, which are stored in the memory 210 and executed by the processor 220 to perform the methods provided herein. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the terminal device.
As shown in fig. 12, the terminal device may further include:
a transceiver 230, the transceiver 230 being connectable to the processor 220 or the memory 210.
The processor 220 may control the transceiver 230 to communicate with other devices, and specifically, may transmit information or data to the other devices or receive information or data transmitted by the other devices. The transceiver 230 may include a transmitter and a receiver. The transceiver 230 may further include one or more antennas.
It should be understood that the various components in the terminal device are connected by a bus system, wherein the bus system includes a power bus, a control bus and a status signal bus in addition to a data bus.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a computer, enables the computer to perform the method of the above-described method embodiments. In other words, the present application also provides a computer program product containing instructions, which when executed by a computer, cause the computer to execute the method of the above method embodiments.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application occur, in whole or in part, when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the module is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. For example, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and all the changes or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (17)

1. An information processing method characterized by comprising:
acquiring information to be replied;
acquiring candidate quick replies corresponding to the information to be replied, wherein the candidate quick replies are generated according to the consultation object of the information to be replied and the consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data comprises a sample sentence and the consultation information type of the sample sentence;
and displaying the candidate quick reply corresponding to the information to be replied.
2. The method of claim 1, wherein the classification model comprises a first training model and a logistic regression classifier, and the training of the plurality of first sample data to obtain the classification model comprises:
training according to a preset number of training rounds to obtain the classification model as follows:
loading the first training model by taking the serialization identification of the sample statement of each first sample data as input to obtain a statement vector of the sample statement of each first sample data;
and taking a sentence vector of each sample sentence of the first sample data as the input of a logistic regression classifier, and taking the type of the consulting information of each sample sentence of the first sample data as the output of the logistic regression classifier, and training the logistic regression classifier.
3. The method according to claim 1, wherein the obtaining of the candidate quick reply corresponding to the message to be replied includes:
sending the information to be replied to target equipment;
and receiving the candidate shortcut reply sent by the target equipment.
4. The method according to claim 1, wherein the obtaining of the candidate quick reply corresponding to the message to be replied includes:
acquiring a consultation object of the information to be replied;
inputting the information to be replied into the classification model, and outputting the consultation information type of the information to be replied;
and generating the candidate quick reply according to the consultation object in the information to be replied and the consultation information type of the consultation object.
5. The method according to claim 4, wherein the generating the candidate shortcut reply according to the consultation object of the information to be replied and the consultation information type of the information to be replied comprises:
if the consultation information type of the information to be replied is found from a preset consultation information type set, searching query information corresponding to the consultation object of the information to be replied and the consultation information type of the information to be replied from a pre-stored database;
and determining the query information as the candidate quick reply.
6. The method of claim 5, further comprising:
if the consultation information type of the information to be replied is not found from a preset consultation information type set, determining the candidate quick reply according to the information to be replied and a pre-trained quick reply model, wherein the quick reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample statement and a reply statement of the sample statement.
7. The method of claim 6, wherein the determining the candidate quick reply according to the message to be replied and a pre-trained quick reply model comprises:
inputting the information to be replied into the quick reply model, and outputting a reply sentence of the information to be replied;
and determining the reply sentence of the information to be replied as the candidate quick reply.
8. The method of claim 6, wherein the quick reply model comprises a second training model and a logistic regression classifier, and the training of the plurality of second sample data to obtain the quick reply model comprises:
and training according to a preset training round number to obtain the quick reply model as follows:
loading the second training model by taking position embedding and word embedding of each sample statement of the second sample data as input, so as to obtain a hidden vector of each sample statement of the second sample data, wherein the position embedding is the position of a word forming the sample statement in the sample statement, and the word embedding is a serialization identifier of the sample statement;
and training the logistic regression classifier by taking the hidden vector of each sample statement of the second sample data as the input of the logistic regression classifier and taking the reply statement of each sample statement of the second sample data as the output of the logistic regression classifier, wherein the reply statement of each sample statement of the second sample data is obtained by performing text prediction on the hidden vector of each sample statement of the second sample data by the logistic regression classifier.
9. The method according to claim 4, wherein the generating the candidate shortcut reply according to the consultation object of the information to be replied and the consultation information type of the information to be replied comprises:
if the type of the consultation information of the information to be replied is a preset type, acquiring user attribute information of a sender of the information to be replied;
determining the user grade of a sender of the information to be replied according to the user attribute information;
and determining the information matched with the user level of the sender in the pre-stored information list of the preset type as the candidate quick reply.
10. The method of claim 9, further comprising:
and updating the user attribute information of the sender according to the information matched with the user grade of the sender.
11. The method of claim 4, wherein the obtaining of the consulting object of the information to be replied comprises:
if the information to be replied comprises a text, performing word segmentation processing on the text in the information to be replied to obtain at least one word;
identifying a consulting object from the at least one word;
and if the information to be replied comprises an image, identifying the consultation object corresponding to the image in the information to be replied according to the corresponding relation between the pre-stored image and the consultation object.
12. The method of claim 1, wherein if the current session is a one-to-one session, the obtaining the information to be replied comprises:
determining the last message from the sender in the current session as the message to be replied;
alternatively, the first and second electrodes may be,
displaying at least one message from the sender in the current session;
and responding to the operation of selecting one target message from the at least one message by the user, and determining the target message as the message to be replied.
13. The method of claim 1, wherein if the current session is a one-to-many session or a many-to-many session, the obtaining the information to be replied comprises:
displaying a target sender for a user to select, wherein the target sender is at least one information sender in the one-to-many session or the many-to-many session;
and in response to the operation that the user selects a sender to be replied from the target senders, determining the last message from the sender to be replied as the message to be replied, or displaying at least one message from the sender to be replied in the current session, and in response to the operation that the user selects one target message from the at least one message, determining the target message as the message to be replied.
14. The method according to any one of claims 1-13, further comprising:
and responding to the operation of selecting the target quick reply in the candidate quick replies by the user, and displaying the target quick reply in a dialog input box for the user to edit and then send or directly send.
15. An information processing apparatus characterized by comprising:
the first acquisition module is used for acquiring the information to be replied;
the second obtaining module is used for obtaining a candidate quick reply corresponding to the information to be replied, the candidate quick reply is generated according to a consultation object of the information to be replied and a consultation information type of the information to be replied, the consultation information type of the information to be replied is determined according to the information to be replied and a pre-trained classification model, the classification model is obtained by training a plurality of first sample data, and each first sample data comprises a sample statement and the consultation information type of the sample statement;
and the display module is used for displaying the candidate quick reply corresponding to the information to be replied.
16. A terminal device, comprising:
a processor and a memory for storing a computer program, the processor for invoking and executing the computer program stored in the memory to perform the method of any one of claims 1 to 14.
17. A computer-readable storage medium for storing a computer program which causes a computer to perform the method of any one of claims 1 to 14.
CN202110975913.5A 2021-08-24 2021-08-24 Information processing method, device, equipment and storage medium Active CN113609275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975913.5A CN113609275B (en) 2021-08-24 2021-08-24 Information processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975913.5A CN113609275B (en) 2021-08-24 2021-08-24 Information processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113609275A true CN113609275A (en) 2021-11-05
CN113609275B CN113609275B (en) 2024-03-26

Family

ID=78341825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975913.5A Active CN113609275B (en) 2021-08-24 2021-08-24 Information processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113609275B (en)

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682387A (en) * 2016-10-26 2017-05-17 百度国际科技(深圳)有限公司 Method and device used for outputting information
CN106789595A (en) * 2017-01-17 2017-05-31 北京诸葛找房信息技术有限公司 Information-pushing method and device
CN107040450A (en) * 2016-07-20 2017-08-11 平安科技(深圳)有限公司 Automatic reply method and device
WO2018036555A1 (en) * 2016-08-25 2018-03-01 腾讯科技(深圳)有限公司 Session processing method and apparatus
CN109189902A (en) * 2018-08-09 2019-01-11 珠海格力电器股份有限公司 The method and device of automatic-answering back device consulting
US20190081914A1 (en) * 2017-09-08 2019-03-14 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for generating candidate reply message
CN109710739A (en) * 2018-12-24 2019-05-03 联想(北京)有限公司 A kind of information processing method and device, storage medium
US20190228070A1 (en) * 2016-09-30 2019-07-25 Huawei Technologies Co., Ltd. Deep learning based dialog method, apparatus, and device
CN110263247A (en) * 2019-05-20 2019-09-20 话媒(广州)科技有限公司 A kind of return information recommended method and electronic equipment
CN110688454A (en) * 2019-09-09 2020-01-14 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for processing consultation conversation
CN111339283A (en) * 2020-05-15 2020-06-26 支付宝(杭州)信息技术有限公司 Method and device for providing customer service answers aiming at user questions
CN111414457A (en) * 2020-03-20 2020-07-14 深圳前海微众银行股份有限公司 Intelligent question-answering method, device, equipment and storage medium based on federal learning
CN111581360A (en) * 2020-04-21 2020-08-25 上海明略人工智能(集团)有限公司 Method, system and equipment for assisting customer service
CN112084317A (en) * 2020-09-23 2020-12-15 支付宝(杭州)信息技术有限公司 Method and apparatus for pre-training a language model
CN112118169A (en) * 2019-06-21 2020-12-22 腾讯科技(深圳)有限公司 Message reply method, device, terminal and storage medium
CN112182229A (en) * 2020-11-05 2021-01-05 江西高创保安服务技术有限公司 Text classification model construction method, text classification method and device
CN112182180A (en) * 2020-09-27 2021-01-05 京东方科技集团股份有限公司 Question and answer processing method, electronic equipment and computer readable medium
CN113076403A (en) * 2021-04-21 2021-07-06 深圳追一科技有限公司 User message processing method and related equipment
WO2021143206A1 (en) * 2020-07-16 2021-07-22 平安科技(深圳)有限公司 Single-statement natural language processing method and apparatus, computer device, and readable storage medium
CN113220851A (en) * 2021-04-28 2021-08-06 山东师范大学 Human-machine personalized dialogue method and system based on reasoning dialogue model
CN113239169A (en) * 2021-06-01 2021-08-10 平安科技(深圳)有限公司 Artificial intelligence-based answer generation method, device, equipment and storage medium
US20210256038A1 (en) * 2020-02-19 2021-08-19 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for recognizing entity word, and storage medium

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040450A (en) * 2016-07-20 2017-08-11 平安科技(深圳)有限公司 Automatic reply method and device
WO2018036555A1 (en) * 2016-08-25 2018-03-01 腾讯科技(深圳)有限公司 Session processing method and apparatus
US20190228070A1 (en) * 2016-09-30 2019-07-25 Huawei Technologies Co., Ltd. Deep learning based dialog method, apparatus, and device
CN106682387A (en) * 2016-10-26 2017-05-17 百度国际科技(深圳)有限公司 Method and device used for outputting information
CN106789595A (en) * 2017-01-17 2017-05-31 北京诸葛找房信息技术有限公司 Information-pushing method and device
US20190081914A1 (en) * 2017-09-08 2019-03-14 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for generating candidate reply message
CN109189902A (en) * 2018-08-09 2019-01-11 珠海格力电器股份有限公司 The method and device of automatic-answering back device consulting
CN109710739A (en) * 2018-12-24 2019-05-03 联想(北京)有限公司 A kind of information processing method and device, storage medium
CN110263247A (en) * 2019-05-20 2019-09-20 话媒(广州)科技有限公司 A kind of return information recommended method and electronic equipment
CN112118169A (en) * 2019-06-21 2020-12-22 腾讯科技(深圳)有限公司 Message reply method, device, terminal and storage medium
CN110688454A (en) * 2019-09-09 2020-01-14 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for processing consultation conversation
US20210256038A1 (en) * 2020-02-19 2021-08-19 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for recognizing entity word, and storage medium
CN111414457A (en) * 2020-03-20 2020-07-14 深圳前海微众银行股份有限公司 Intelligent question-answering method, device, equipment and storage medium based on federal learning
CN111581360A (en) * 2020-04-21 2020-08-25 上海明略人工智能(集团)有限公司 Method, system and equipment for assisting customer service
CN111339283A (en) * 2020-05-15 2020-06-26 支付宝(杭州)信息技术有限公司 Method and device for providing customer service answers aiming at user questions
WO2021143206A1 (en) * 2020-07-16 2021-07-22 平安科技(深圳)有限公司 Single-statement natural language processing method and apparatus, computer device, and readable storage medium
CN112084317A (en) * 2020-09-23 2020-12-15 支付宝(杭州)信息技术有限公司 Method and apparatus for pre-training a language model
CN112182180A (en) * 2020-09-27 2021-01-05 京东方科技集团股份有限公司 Question and answer processing method, electronic equipment and computer readable medium
CN112182229A (en) * 2020-11-05 2021-01-05 江西高创保安服务技术有限公司 Text classification model construction method, text classification method and device
CN113076403A (en) * 2021-04-21 2021-07-06 深圳追一科技有限公司 User message processing method and related equipment
CN113220851A (en) * 2021-04-28 2021-08-06 山东师范大学 Human-machine personalized dialogue method and system based on reasoning dialogue model
CN113239169A (en) * 2021-06-01 2021-08-10 平安科技(深圳)有限公司 Artificial intelligence-based answer generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘祥龙等: "《飞桨PaddlePaddle深度学习实战》", 机械工业出版社, pages: 279 - 281 *

Also Published As

Publication number Publication date
CN113609275B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
US10853577B2 (en) Response recommendation system
US11551007B2 (en) Determining intent from a historical vector of a to-be-analyzed statement
US20190171928A1 (en) Dynamically managing artificial neural networks
CN113590776B (en) Knowledge graph-based text processing method and device, electronic equipment and medium
US20150379087A1 (en) Apparatus and method for replying to query
US11295727B2 (en) Conversation-based chatbot training
US20220358292A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
US11321580B1 (en) Item type discovery and classification using machine learning
CN111737432A (en) Automatic dialogue method and system based on joint training model
CN112925898B (en) Question-answering method and device based on artificial intelligence, server and storage medium
EP4060517A1 (en) System and method for designing artificial intelligence (ai) based hierarchical multi-conversation system
CN114090755A (en) Reply sentence determination method and device based on knowledge graph and electronic equipment
Kaur et al. Review of artificial intelligence with retailing sector
CN112364622B (en) Dialogue text analysis method, device, electronic device and storage medium
CN110377733A (en) A kind of text based Emotion identification method, terminal device and medium
CN113569017A (en) Model processing method and device, electronic equipment and storage medium
CN117421398A (en) Man-machine interaction method, device, equipment and storage medium
WO2017036341A1 (en) Random index pattern matching based email relations finder system
CN111199421B (en) Social relationship-based user recommendation method and device and electronic equipment
CN112148939A (en) Data processing method and device and electronic equipment
CN113609275B (en) Information processing method, device, equipment and storage medium
CN116775815B (en) Dialogue data processing method and device, electronic equipment and storage medium
CN110083687A (en) A kind of information conversion method, equipment and storage medium
CN111241236B (en) Task-oriented question-answering method, system, electronic device and readable storage medium
CN111046151B (en) Message processing method and device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40055385

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant