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

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

Info

Publication number
CN113609275B
CN113609275B CN202110975913.5A CN202110975913A CN113609275B CN 113609275 B CN113609275 B CN 113609275B CN 202110975913 A CN202110975913 A CN 202110975913A CN 113609275 B CN113609275 B CN 113609275B
Authority
CN
China
Prior art keywords
information
replied
consultation
reply
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110975913.5A
Other languages
Chinese (zh)
Other versions
CN113609275A (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

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

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 vehicle-mounted scenes, 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, generating the candidate quick replies according to consultation objects of the information to be replied and consultation information types of the information to be replied, determining the consultation information types of the information to be replied according to the information to be replied and a pre-trained classification model, wherein the classification model is obtained by training a plurality of first sample data, each first sample data comprises a sample sentence and the consultation information types of the sample sentence, and displaying the candidate quick replies corresponding to the information to be replied. 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 text and multimedia information with other people (e.g., clients, family, friends, or colleagues) via an instant messaging application to effect communication.
At present, in order to improve the efficiency of information reply, a shortcut reply function is provided in the existing instant messaging application, and the shortcut reply function can acquire candidate shortcut reply information according to the information of a sender, so that a user can conveniently select required shortcut reply information from the candidate shortcut reply information to reply. The specific process for acquiring the candidate shortcut reply information comprises the following steps: when the fact that the preset keywords exist in the information of the sender is determined, the shortcut reply information matched with the keywords is found out from a preset shortcut reply information list, and the candidate shortcut reply information is obtained.
However, in the method, the keyword and the shortcut reply information list are formulated through manual arrangement, the expression mode of one sentence is various, the accurate semantics of the information can not be identified only through the keyword in the information of the sender, and further the candidate shortcut reply information matched through the keyword has deviation from the intention of the user, so that the accuracy of the shortcut reply is lower.
Disclosure of Invention
The application provides an information processing method, an information processing device, information processing equipment and a storage medium, so as to solve the problem that the accuracy of the existing quick reply is low.
In a first aspect, the present application provides an information processing method, including:
Obtaining 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 shortcut replies corresponding to the information to be replied.
In a second aspect, the present application provides an information processing apparatus including:
the first acquisition module is used for acquiring information to be replied;
the second acquisition module is used for 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 the display module is used for displaying candidate shortcut replies corresponding to the information to be replied.
In a third aspect, the present application provides a terminal device, including: a processor and a memory for storing a computer program, the processor being for invoking and running 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 storing a computer program that causes 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 response of the information to be recovered is obtained, the consultation information type of the information to be recovered can be determined according to the information to be recovered and the classification model, then the candidate quick response is generated according to the consultation object of the information to be recovered and the consultation information type of the information to be recovered, and as the classification model learns the consultation information types of different sample sentences and sample sentences, the consultation information type of the information to be recovered can be accurately obtained through the classification model, the user intention corresponding to the information to be recovered can be accurately obtained, and further the accurate candidate quick response can be generated according to the consultation object of the information to be recovered and the consultation information type of the information to be recovered, so that the accuracy of the quick response is improved.
Further, in the application, the classification model is trained in advance to learn each sample sentence and the consultation information type of the sample sentence, and the number of the sample sentences and the types of the sample sentences can be increased during training, so that 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, so that the consultation object corresponding to the image can be accurately identified, the information to be replied including the image can be rapidly replied, and compared with the prior art, the application range of the rapid reply is enlarged due to the fact that only the text can be rapidly replied.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario of an information processing method provided in an embodiment of the present application;
Fig. 2 is a schematic diagram of another application scenario of the information processing method provided in 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 diagram of an interface for 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 session according to an embodiment of the present application;
fig. 6 is a schematic diagram of a shortcut reply interface provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a classification model according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a shortcut reply model according to an embodiment of the present application;
FIG. 9 is an interactive 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 following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise 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 or inherent to such process, method, article, or apparatus, 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 following description is made on the related knowledge of the application:
1. artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include 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 other directions.
2. Natural language processing (Nature Language processing, NLP) is an important direction in the fields of computer science and artificial intelligence. It is studying various theories and methods that enable effective communication between a person and a computer in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Thus, the research in this field will involve natural language, i.e. language that people use daily, so it has a close relationship with the research in linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic questions and answers, knowledge graph techniques, and the like.
The information processing method provided by the embodiment of the application relates to an artificial intelligence natural language processing method, and specifically is described by the following embodiment.
In the prior art, keywords and shortcut reply information lists are formulated through manual arrangement, the expression mode of a sentence is various, the accurate semantics of the information can not be identified only through the keywords in the information of a sender, and further the candidate shortcut reply information matched through the keywords has deviation from the intention of a user, so that the accuracy of shortcut reply is lower. For example, the sender's information is "hello, please ask about how long a XX model car can be lifted? The key words in the information comprise XX vehicle type and lifting vehicle, the lifting vehicle comprises lifting vehicle time and lifting vehicle place, the quick reply information corresponding to the lifting vehicle time and the lifting vehicle place can be matched through the existing method, or the quick reply information corresponding to the lifting vehicle time or the lifting vehicle place is matched, the user actually aims at inquiring the lifting vehicle time, if the quick reply information corresponding to the lifting vehicle time and the lifting vehicle place is matched, the user is not required to search very quickly, and if the quick reply information corresponding to the lifting vehicle place is matched, deviation exists between the quick reply information corresponding to the lifting vehicle place and the user intention, and in a word, the accuracy is low. In order to solve the technical problem, 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, and as 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, and further 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.
On the other hand, in the prior art, the keyword and the shortcut reply information list are formulated through manual arrangement, the number of the keyword and the number of the shortcut reply information in the shortcut reply information list are limited, and the information beyond the preset keyword range cannot be quickly replied, so that the application range of the shortcut reply function is narrower. According to the method and the device, the classification model is trained in advance to learn each sample sentence and the consultation information type 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, so that the consultation object corresponding to the image can be accurately identified, the information to be replied including the image can be rapidly replied, and compared with the prior art, the application range of the rapid reply is enlarged due to the fact that only the text can be rapidly replied.
The application scenario to which the technical solution of the embodiment of the present application may be applied will be described in some simple ways, and it should be noted that the application scenario described below is only for illustrating the embodiment of the present application and is not limited thereto. 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 requiring quick reply even in communication application, and can improve the information reply efficiency. For example, it can be applied to a scene of customer service or sales of consultation information in reply to one or more customers, etc.
For example, fig. 1 is a schematic view of an application scenario of the information processing method provided in the embodiment of the present application, as shown in fig. 1, where the application scenario of the 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 through the browser or an application program (APP) installed and running in the terminal device 2. The instant messaging application may be an application with an instant messaging function, such as a micro-messaging application, a Tencel QQ application, or an enterprise office application (such as an enterprise micro-messaging application) for providing an office management service 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 home appliance, a vehicle-mounted terminal, and the like. Optionally, when the user needs to perform the shortcut reply, the shortcut reply is triggered by operating the client on the terminal device 2, the client responds to the operation that the user triggers the shortcut reply by the terminal device 2, obtains the information to be replied, then sends the information to be replied to the server, the server 1 executes the information processing method provided by the embodiment of the application, obtains the candidate shortcut reply corresponding to the information to be replied, the server 1 sends the candidate shortcut reply corresponding to the information to be replied to the client, and the client displays the candidate shortcut reply corresponding to the information to be replied on the current interface. Therefore, the user can select the required shortcut reply from the shortcut replies to be selected, can edit and then send or directly send the shortcut reply, and can improve the efficiency of information reply.
Fig. 2 is a schematic diagram of another application scenario of the information processing method provided in the embodiment of the present application, as shown in fig. 2, where 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 through 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 home appliance, a vehicle-mounted terminal, and the like. Optionally, when the user needs to perform the shortcut reply, the shortcut 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 frame, where the operation options include "shortcut reply", and when the user needs to perform the information reply, the "shortcut reply" option may be triggered (e.g. clicked), and the client responds to the operation that the user triggers the shortcut reply through the terminal device 2 to obtain the information to be replied, and executes the information processing method provided in the embodiment of the present application to obtain the candidate shortcut reply corresponding to the information to be replied, and then the client displays the candidate shortcut reply corresponding to the information to be replied on the current interface (for example, the candidate shortcut reply 1 and the candidate shortcut reply 2 are displayed in fig. 2). Therefore, the user can select the required shortcut reply from the shortcut replies to be selected, can edit and then send or directly send the shortcut reply, and can improve the efficiency of information reply.
The technical scheme of the application will be described 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 performed 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 the shortcut reply, the shortcut reply can be triggered by operating the instant communication client on the terminal device, for example, the shortcut reply can be triggered by the current session interface of the instant communication application, and the terminal device responds to the operation of triggering the shortcut reply by the user to acquire the information to be replied.
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 (such as private chat), as an implementation manner, the obtaining the information to be replied in S101 may specifically be:
s1011, determining the last information from the sender in the current session as the information to be replied.
For S1011, in conjunction with 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 information from sender a in the session shown in fig. 4 is "oil consumption is high", and the information is determined as the information to be replied. I.e. the last information from the sender in the current session is determined as the information to be replied to.
If the current session is a one-to-one session (e.g. private chat), as another implementation manner, the obtaining the information to be replied in S101 may specifically include:
s1011', displays at least one information from the sender in the current session.
S1012' determining the target information as the information to be replied in response to an operation of selecting one target information from the at least one information by the user.
For example, for S1011'-S1012', the user a sends three pieces of information that are not replied to, and after the user B triggers the quick reply, the three pieces of information from the sender a are displayed for the user B to select the target information as the information to be replied from.
If the current session is a one-to-many session or a many-to-many session (e.g. group chat), as an implementation manner, the obtaining the information to be replied in S101 may specifically include S1011"-S1012":
s1011", displaying the target sender for selection by the user, the target sender being at least one information sender of a one-to-many session or a many-to-many session.
For S1011″ and illustrated in fig. 5, fig. 5 is a schematic diagram of a multi-to-multi-session interface provided by an embodiment of the present application, and fig. 6 is a schematic diagram of a shortcut reply interface provided by an embodiment of the present application, for example, two information senders a and C are in the current session interface shown in fig. 5, after the user B clicks the shortcut reply button shown in fig. 5, the interface jumps to the interface shown in fig. 6, and the interface shown in fig. 6 displays the information senders a and C for the user to select one sender as the sender to be replied.
S1012', determining the last information from the sender to be replied to be the information to be replied in response to the operation of the user selecting the sender to be replied from the target senders, or displaying at least one information from the sender to be replied in the current session, and determining the target information to be the information to be replied in response to the operation of the user selecting one target information from the at least one information.
Specifically, after determining the sender to be replied, the information to be replied needs to be determined, and the specific process is similar to one-to-one, which is not repeated here.
S102, acquiring candidate quick replies corresponding to information to be replied, wherein the candidate quick replies are generated according to an advisory object of the information to be replied and an advisory information type of the information to be replied, the advisory 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 an advisory information type of the sample sentence.
The consulting object is a commodity of a certain type, and the consulting information type is the type of attribute information of the commodity. Taking the automobile industry as an example, the consultation object can be a vehicle type (comprising brands and specific vehicle types), and the consultation information type can be common purchasing problems associated with the vehicle type, such as vehicle type bottom price, vehicle lifting time, vehicle type use scenes, similar vehicle type recommendation and vehicle type parameters and the like. Note that, the consultation object and the consultation information type may also be information corresponding to other commodities, which is not limited in this embodiment.
Specifically, the execution body of the embodiment may be a terminal device, in an implementation manner, the obtaining the candidate shortcut reply corresponding to the information to be replied may be specifically performed by a target device, and the target device may be, for example, a server, where step S102 may specifically include:
s1021, the information to be replied is sent to the target equipment.
The method comprises the steps of sending information to be replied to target equipment, determining the type of the consulting information of the information to be replied according to the information to be replied and a pre-trained classification model by the target equipment, generating candidate quick replies according to the consulting object of the information to be replied and the type of the consulting information of the information to be replied, and then sending the generated candidate quick replies to the terminal equipment.
S1022, receiving the candidate shortcut reply sent by the target device.
In another implementation manner, the obtaining, in S102, the candidate shortcut reply corresponding to the information to be replied may be performed by the terminal device, where S102 may specifically include:
s1021', obtaining the consultation object of the information to be replied.
Specifically, the information to be replied may include text or image, or the information to be replied may include text and image, if the information to be replied includes text, the text in the information to be replied may be subjected to word segmentation processing to obtain at least one word, the counseling object is identified from the at least one word, the counseling object is generally a noun, and the counseling object is identified from the at least one word, for example, the noun in the word obtained after word segmentation may be specifically identified as the counseling object.
In this embodiment, optionally, word segmentation is performed on the text in the to-be-replied message, which may be performed by using a word segmentation library (e.g., an open-source jieba word segmentation library), and if a quick reply scene in a specific field is aimed at, for example, the automobile sales industry, an automobile industry vocabulary may be added in the word segmentation library so as to facilitate better word segmentation. Optionally, a word segmentation tool (such as qqseg word segmentation tool) may be used to segment the text in the information to be replied.
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. Specifically, if the quick reply scene is specific to a specific field, for example, the automobile sales industry, the corresponding relation between the automobile image and the automobile model can be pre-stored, and the automobile model corresponding to the automobile image can be quickly identified according to the pre-stored corresponding relation between the automobile image and the automobile model, and the automobile model is the consultation object.
In this embodiment, by identifying the counseling object corresponding to the image in the information to be replied according to the corresponding relationship between the pre-stored image and the counseling object, the counseling object corresponding to the image can be accurately identified, and the information to be replied including the image can be quickly replied.
It should be noted that, when the user sends information, multiple pieces of information may be sent simultaneously, and multiple pieces of information are sent separately, and when the consulting object of the information to be replied and the type of the consulting information of the information to be replied are obtained, if the two parameters cannot be obtained according to one piece of information to be replied, the two parameters may be obtained according to the selected last piece or pieces of information of the information to be replied, for example, the order in which the user sends the information is the first piece of information: "how long the XX car can be lifted", the second piece of information: the method includes the steps that a user can ask which color can be selected, only the type of the consultation information can be obtained according to the second information, then the consultation object is obtained according to the first information, and the specific mode of obtaining 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, where each first sample data includes a sample sentence and a consultation information type of the sample sentence, where the sample sentence may be selected according to a history sentence of a service scenario corresponding to an instant messaging application, for example, the service scenario is an automobile sales, and the sample sentence may be a question sentence of a customer in an automobile sales session record.
When the classification model is trained, each first sample data comprises a sample sentence and a consultation information type of the sample sentence, the consultation information type of the sample sentence can be marked manually, the input of the classification model is the sample sentence, the output of the classification model is the consultation information type of the sample sentence, after the classification model is trained, the classification model can be tested and verified by adopting a historical sentence, and the accuracy of the classification model is ensured. For example, taking an automobile sales scene as an example, selecting 10 ten thousand question sentences of a client in a session record, marking the consultation information type of each question sentence, and training, testing and verifying the classification model according to the proportion of 7:2:1 of a sample set, a test set and a verification set to finally obtain the classification model.
Alternatively, the classification model may be a neural network model.
S1023', generating candidate shortcut replies according to the consultation objects in the information to be replied and the consultation information types of the consultation objects.
Specifically, in one implementation manner, the generating the candidate shortcut reply according to the consultation object in the information to be replied and the consultation information type of the consultation object in S1023' may specifically include:
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 candidate quick reply.
For example, taking the automotive industry as an example, the counseling object may be a vehicle type (including brands and specific vehicle types), and the preset counseling information type set may include information of purchasing vehicles commonly associated with the vehicle type, and the preset counseling information type set includes a vehicle type base 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, for example, XX model, the consultation information type of the information to be replied is, for example, model bottom price, the 'model bottom price' can be found from the preset consultation information type set, and then the query information corresponding to the XX model and the 'model bottom price' is found from the pre-stored database, namely, the bottom price of the XX model is found. Alternatively, the database may store different consultants and different types of consultation information with each consultant, for example, the automotive industry, and the database may be as shown in the following table one:
form one database
It should be noted that table one is only an example, and in other business scenarios, databases in other business scenarios may be pre-stored.
Further, if the consultation information type of the information to be replied is not found from the preset consultation information type set, determining candidate shortcut replies according to the information to be replied and a pre-trained shortcut reply model, wherein the shortcut reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample sentence and a reply sentence of the sample sentence.
Specifically, the statement of the user question may also be other types of information to be consulted, which is not in the preset consultation information type set, so as to avoid that the quick reply cannot be performed under the condition, and at this time, the candidate quick reply may be determined according to the information to be replied and the pre-trained quick reply model. The shortcut reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample sentence and a reply sentence of the sample sentence.
Specifically, determining the candidate shortcut replies according to the information to be replied and the pre-trained shortcut reply model may be: inputting the information to be replied into the shortcut 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 shortcut reply.
In this embodiment, the shortcut reply model is obtained by training a plurality of second sample data, where each second sample data includes a sample sentence and a reply sentence of the sample sentence, where the sample sentence may be selected according to a history sentence of a service scenario corresponding to an instant messaging application and a history sentence of a daily session, for example, the service scenario is an automobile sales, and the sample sentence may be a history chat record and an open-source daily history chat record in an automobile sales session record, where the chat record includes a sentence and a reply sentence of the sentence.
When the quick reply model is trained, each second sample data comprises a sample sentence and a reply sentence of the sample sentence, the input of the quick reply model is the sample sentence, the output of the quick reply model is the reply sentence of the sample sentence, for example, the sample sentence is "please ask for 4S store in XX region of XX city to have vehicle maintenance service", the reply sentence of the sample sentence is "have", the context information can be effectively utilized by training the quick reply model according to the second sample data, and the problem that the quick reply cannot be carried out when the consultation information type of the sentence of the user question is not in the preset consultation information type set is avoided.
The statement of the user question may also be information of other types of consultation, which is not in the preset consultation information type set, for example, vehicle type recommendation, and in order to avoid that the quick reply cannot be performed under the condition, optionally, in another implementation manner, the generating candidate quick reply according to the consultation object in the information to be replied and the consultation information type of the consultation object in S1023' specifically may include:
s1, 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.
The user attribute information is, for example, a user portrait, 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. Alternatively, the user attribute information may specifically be queried from a user attribute information base. The preset type of the consultation information may be information that can be determined according to the user attribute information, for example, the service scene is automobile sales, the preset type of the consultation information is automobile type recommendation, and when the type of the consultation information of the information to be replied is automobile type recommendation, the user attribute information of the sender of the information to be replied is obtained.
S2, determining the user grade of the sender of the information to be replied according to the user attribute information.
For example, the user's user rating, such as the consumption level, may be estimated based on the user's age, territory, and consumption rating.
S3, determining the information matched with the user grade of the sender in a pre-stored information list of a preset type as candidate shortcut replies.
For example, when the type of the consultation information of the information to be replied is a vehicle type recommendation, after determining the consumption level of the sender of the information to be replied, a vehicle type matching the consumption level of the sender may be recommended to the user.
Further, after S3, it 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 shortcut reply can be obtained conveniently and accurately.
Optionally, the quick reply model can be retrained according to the candidate quick replies of the information to be replied, which are of the preset type, according to the preset period, so that the following quick replies of the information to be replied, which are of 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, the candidate shortcut reply can be determined according to the information to be replied and the shortcut reply model trained in advance, so as to obtain the candidate shortcut reply more quickly and accurately.
S103, displaying candidate shortcut replies corresponding to the information to be replied.
Further, after S103, it may further include:
And responding to the operation of selecting the target shortcut reply in the candidate shortcut replies by the user, and displaying the target shortcut reply in a dialogue input box for the user to edit and then send or directly send.
According to the information processing method provided by the embodiment, 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 response of the information to be recovered is obtained, the consultation information types of the information to be recovered can be determined according to the information to be recovered and the classification model, then the candidate quick response is generated according to the consultation object of the information to be recovered and the consultation information types of the information to be recovered, and as the classification model learns the consultation information types of different sample sentences and sample sentences, the consultation information types of the information to be recovered can be accurately obtained through the classification model, the user intention corresponding to the information to be recovered can be accurately obtained, and further accurate candidate quick response can be generated according to the consultation object of the information to be recovered and the consultation information types of the information to be recovered, so that the accuracy of the quick response is improved.
The structure and training process of a classification model is exemplarily shown below in connection with fig. 7.
As an implementation manner, fig. 7 is a schematic structural diagram of a classification model provided in the embodiment of the present application, and as shown in fig. 7, the classification model includes a first training model 10 and a logistic regression classifier 20, and the process of training a plurality of first sample data to obtain the classification model includes:
the following training is carried out according to the preset training wheel number to obtain a classification model:
and loading the first training model by taking the serialization identification of the sample sentence of each first sample data as input to obtain the sentence vector of the sample sentence of each first sample data.
Taking sentence vectors of sample sentences of each first sample data as input of the logistic regression classifier, taking consultation information types of the sample sentences of each first sample data as output of the logistic regression classifier, and training the logistic regression classifier.
Taking a first sample data as an example, in connection with FIG. 7, [ CLS ]]Beginning with special symbology, W 1 、W 2 And W is 3 For the serialization identification of the sample sentence of the first sample data, the sample sentence is serialized to obtain the serialization identification of the sample sentence, and the specific process of serialization is as follows: the method comprises the steps of firstly segmenting 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. Alternatively, a token (a word segmentation and serialization tool) may be specifically used to serialize the sample sentence, to obtain the serialization identifier of the sample sentence. For example, 3 words are obtained after a sample sentence is segmented, and the 3 words are assigned with identifiers to obtain W 1 、W 2 And W is 3 ,W 1 、W 2 And W is 3 After the input to the first training model, word vectors of 3 words and sentence vectors of sample sentences are output, then sentence vectors of the sample sentences of each first sample data are used as input of a logistic regression classifier, and consultation information types of the sample sentences of each first sample data are used as 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 (Convolutional Neural Network, CNN) text classification model.
In this embodiment, the preset training round number epochs may be 10, the batch size (batch size) may be set to 256, the maximum sentence length (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 is exemplarily shown in the following in connection with fig. 8.
As an implementation manner, fig. 8 is a schematic structural diagram of a shortcut reply model provided in an embodiment of the present application, and as shown in fig. 8, the shortcut 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 shortcut reply model includes:
The following training is carried out according to the preset training wheel number, and a quick recovery model is obtained:
and loading a second training model by taking the position embedding and word embedding of the sample sentence of each second sample data as input to obtain the hidden vector of the sample sentence of each second sample data, wherein the position embedding is the position of the word forming the sample sentence in the sample sentence, and the word embedding is the serialization identification of the sample sentence.
Taking the hidden vector of the sample sentence of each second sample data as the input of the logistic regression classifier, taking the reply sentence of the sample sentence of each second sample data as the output of the logistic regression classifier, training the logistic regression classifier, and carrying out text prediction on the hidden vector of the sample sentence of each second sample data by taking the reply sentence of the sample sentence of each second sample data as the logistic regression classifier.
Taking a second sample data as an example, and combining with fig. 7, serializing a sample sentence of the second sample data to obtain a position embedding of the sample sentence and a word embedding of the sample sentence, wherein the position embedding of the sample sentence is a position of a word forming the sample sentence in the sample sentence, the word embedding of the sample sentence is a serialization identification of the sample sentence, the serialization identification of the sample sentence comprises an identification of each word forming the sample sentence, and the specific process of serialization is as follows: firstly, word segmentation is carried out on a sample sentence to obtain one or more words, then, identification (ID) is allocated to each word obtained after the word segmentation according to a pre-stored dictionary, and meanwhile, the position of each word in the sample sentence is marked. Alternatively, a token (a word segmentation and serialization tool) may be specifically used to serialize the sample sentence, so as to obtain the position embedding of the sample sentence and the word embedding of the sample sentence. Next, embedding the position of the sample sentence and embedding, assembling and inputting the words of the sample sentence into a second training model, outputting hidden vectors of the sample sentence, wherein the hidden vectors of the sample sentence comprise word vectors of each word, carrying out text prediction on the hidden vectors of the sample sentence by a logistic regression classifier to obtain a reply sentence of the sample sentence, taking the hidden vectors of the sample sentence as the input of the logistic regression classifier, 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 network (Recurrent Neural Networks, RNN) model.
In this embodiment, the preset training round number epochs may be 40, the batch size (batch size) may be set to 256, the maximum sentence length (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 detailed procedure of the information processing method provided in the embodiment of the present application will be described below with reference to two specific embodiments.
Fig. 9 is an interaction flow chart of an information processing method according to an embodiment of the present application, where in this embodiment, a target device is taken as an example of a server to be described. As shown in fig. 9, the method of the present embodiment may include the steps of:
s201, the terminal equipment responds to the operation of triggering the shortcut reply by the user, and acquires the information to be replied.
Specifically, when the user needs to perform the shortcut reply, the shortcut reply can be triggered by operating the instant communication client on the terminal device, for example, the shortcut reply can be triggered by the current session interface of the instant communication application, and the terminal device responds to the operation of triggering the shortcut reply by the user to acquire the information to be replied.
The specific process of obtaining the information to be replied can be described in the embodiment shown in fig. 3, and will not be described herein.
S202, the terminal equipment sends the information to be replied to the server.
S203, the server acquires the consultation object of the information to be replied.
Specifically, the information to be replied may include text or image, or the information to be replied may include text and image, if the information to be replied includes text, the text in the information to be replied may be subjected to word segmentation processing to obtain at least one word, the counseling object is identified from the at least one word, the counseling object is generally a noun, and the counseling object is identified from the at least one word, for example, the noun in the word obtained after word segmentation may be specifically identified as the counseling object.
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. Specifically, if the quick reply scene is specific to a specific field, for example, the automobile sales industry, the corresponding relation between the automobile image and the automobile model can be pre-stored, and the automobile model corresponding to the automobile image can be quickly identified according to the pre-stored corresponding relation between the automobile image and the automobile model, and the automobile model is the consultation object.
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 shortcut 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 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 candidate quick reply.
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 a shortcut reply model, outputting reply sentences of the information to be replied, and determining the reply sentences of the information to be replied as candidate shortcut replies.
S2053, 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 a 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 shortcut replies.
Further, after S2053, it 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 may further include: and retraining the quick reply model according to the quick reply of the information to be recovered of the preset type according to the type of the consultation information. Namely, adding the quick reply of the information to be replied into the quick reply model online learning. The shortcut reply can be the shortcut reply edited by the user or the candidate shortcut reply selected by the user.
S206, the server sends the candidate shortcut replies of the information to be replied to the terminal equipment.
S207, the terminal equipment displays candidate shortcut replies corresponding to the information to be replied.
In the embodiment shown in fig. 9, the candidate shortcut replies corresponding to the information to be replied are obtained by the server, and optionally, the candidate shortcut replies corresponding to the information to be replied may also be obtained by the terminal device, which is described below in connection with fig. 10.
Fig. 10 is a schematic process diagram of an information processing method provided in this embodiment, as shown in fig. 10, a user a and a user communicate through an instant messaging application, the user a sends information to be replied, the user B selects a quick reply, the quick reply is triggered by operating a terminal device B used by the user B, for example, the quick reply may be triggered by a current session interface of the instant messaging application, and the terminal device B used by the user B obtains the information to be replied (that is, the information to be replied sent by the user a) in response to the operation of triggering the quick reply by the user. The terminal device B recognizes the counseling object through at least one of image recognition and text recognition, and obtains the counseling information type (specifically, may input the information to be replied to the classification model, output the counseling information type of the information to be replied), then generates a candidate shortcut reply according to the counseling object and the counseling information type, and when generating the candidate shortcut reply according to the counseling object and the counseling information type, may specifically include:
1) 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 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 a shortcut 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 shortcut reply.
3) If the type of the consultation information of the information to be replied is a preset type, acquiring the user attribute information of the sender of the information to be replied, which may be acquiring the user attribute information of the sender of the information to be replied 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 the information matched with the user grade of the sender in a pre-stored information list of the preset type as the candidate quick reply.
After the terminal equipment B generates the candidate shortcut replies, displaying the candidate shortcut replies on a current session interface of the instant messaging application of the terminal equipment B, wherein the user B can select a required shortcut reply from the candidate shortcut replies, and the terminal equipment B displays the shortcut replies selected by the user in a dialogue input box for the user B to edit and then send or directly send, namely send reply information to the user A.
The following are device embodiments of the present application, which may be used to perform the method embodiments described above. For details not disclosed in the device embodiments of the present application, reference may be made to the method embodiments 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 candidate quick replies corresponding to the information to be replied, where 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, and each first sample data includes a sample sentence and a consultation information type of the sample sentence;
the display module 13 is used for displaying candidate shortcut replies corresponding to the information to be replied.
Optionally, the classification model includes a first training model and a logistic regression classifier, and the second acquisition module 12 is further configured to: the following training is carried out according to the preset training wheel number to obtain a classification model:
Taking the serialization identification of the sample sentence of each first sample data as input, loading a first training model, and obtaining the sentence vector of the sample sentence of each first sample data;
taking sentence vectors of sample sentences of each first sample data as input of the logistic regression classifier, taking consultation information types of the sample sentences of each first sample data as 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 candidate shortcut replies 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 a classification model, and outputting the consultation information type of the information to be replied;
and generating candidate shortcut 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 candidate shortcut replies.
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 shortcut replies according to the information to be replied and a pre-trained shortcut reply model, wherein the shortcut reply model is obtained by training a plurality of second sample data, and each second sample data comprises a sample sentence and a reply sentence of the sample sentence.
Optionally, the first obtaining module 11 is specifically configured to: inputting the information to be replied into a quick reply model, and outputting a reply sentence of the information to be replied;
and determining the reply statement of the information to be replied to be a candidate shortcut reply.
Optionally, the shortcut reply model includes a second training model and a logistic regression classifier, and the first obtaining module 11 is specifically configured to:
the following training is carried out according to the preset training wheel number, and a quick recovery model is obtained:
taking the position embedding and word embedding of the sample sentence of each second sample data as input, loading a second training model to obtain the hidden vector of the sample sentence of each second sample data, wherein the position embedding is the position of the word forming the sample sentence in the sample sentence, and the word embedding is the serialization identification of the sample sentence;
Taking the hidden vector of the sample sentence of each second sample data as the input of the logistic regression classifier, taking the reply sentence of the sample sentence of each second sample data as the output of the logistic regression classifier, training the logistic regression classifier, and carrying out text prediction on the hidden vector of the sample sentence of each second sample data by taking the reply sentence of the sample sentence of each second sample data as 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 a pre-stored information list of a preset type as candidate shortcut replies.
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, word segmentation processing is carried out on the text in the information to be replied to obtain at least one word;
Identifying a consultation object from the at least one word;
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.
Optionally, if the current session is a one-to-one session, the first obtaining module 11 is configured to:
determining the last information from a sender in the current session as information to be replied;
or,
displaying at least one message from the sender in the current session;
and determining the target information as information to be replied in response to an operation of selecting one target information from the at least one information by the user.
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 selection by a user, wherein the target sender is at least one information sender in a one-to-many session or a many-to-many session;
and determining the last information from the sender to be replied to be the information to be replied in response to the operation of selecting the sender to be replied from the target senders by the user, or displaying at least one piece of information from the sender to be replied in the current session, and determining the target information to be the information to be replied in response to the operation of selecting one piece of target information from the at least one piece of information by the user.
Optionally, the display module 13 is further configured to:
and responding to the operation of selecting the target shortcut reply in the candidate shortcut replies by the user, and displaying the target shortcut reply in a dialogue input box for the user to edit and then send or directly send.
The device provided in the embodiment of the present application may execute the above method embodiment, and the specific implementation principle and technical effects of the device may refer to the above method embodiment, and this embodiment is not repeated herein.
It should be understood that apparatus embodiments and method embodiments may correspond with each other and that similar descriptions may refer to the method embodiments. To avoid repetition, no further description is provided here. Specifically, the information processing apparatus 100 shown in fig. 9 may execute a method embodiment corresponding to a terminal device, and the foregoing and other operations and/or functions of each module in the information processing apparatus 100 are respectively for implementing a method embodiment corresponding to a terminal device, which is not described herein for brevity.
The information processing apparatus of the embodiment of the present application is described above in terms of functional blocks with reference to the accompanying drawings. It should be understood that the functional module may be implemented in hardware, or may be implemented by instructions in software, or may be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiments in the embodiments of the present application may be implemented by an integrated logic circuit of hardware in a processor and/or an instruction in software form, and the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented as 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 a well-established storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads information in the memory, and in combination with hardware, performs the steps in the above method embodiments.
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 methods of embodiments 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:
a general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
In some embodiments of the present application, the memory 210 includes, but is not limited to:
volatile memory and/or nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DR RAM).
In some embodiments of the present application, the computer program may be partitioned into one or more modules that 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 the specified functions, the instruction segments being for describing the execution 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 in particular, may send information or data to other devices or receive information or data sent by other devices. Transceiver 230 may include a transmitter and a receiver. Transceiver 230 may further include antennas, the number of which may be one or more.
It will be appreciated that the individual components in the terminal device are connected by a bus system comprising, in addition to a data bus, a power bus, a control bus and a status signal 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. Alternatively, embodiments of the present application also provide a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the method of the method embodiments described above.
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. When loaded and executed on a computer, produces, in whole or in part, a flow or function consistent with embodiments of the present application. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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 disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
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 solution. 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 this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. An information processing method, characterized by comprising:
obtaining information to be replied;
acquiring a consultation object of the information to be replied according to the information to be replied or at least one piece of information of which the sending time from a sender is before the information to be replied in the current session;
Inputting the information to be replied into a classification model, and outputting the consultation information type of the information to be replied, wherein the classification model is obtained by training a plurality of first sample data, each first sample data comprises a sample sentence and the consultation information type of the sample sentence, and the consultation information type is the type of attribute information of the consultation object;
if the consultation information type of the information to be replied is not found from the preset consultation information type set, determining candidate shortcut replies according to the information to be replied and a pre-trained shortcut reply model, wherein the shortcut reply model is obtained by training a plurality of second sample data, each second sample data comprises a sample sentence and a reply sentence of the sample sentence, the shortcut reply model comprises a second training model and a logistic regression classifier, and the training process of the shortcut reply model comprises the following steps: according to the preset training round number, taking the position embedding and word embedding of the sample sentence of each second sample data as input, loading the second training model to obtain the hidden vector of the sample sentence of each second sample data, taking the hidden vector of the sample sentence of each second sample data as the input of the logistic regression classifier, and taking the reply sentence of the sample sentence of each second sample data as the output of the logistic regression classifier, and training the logistic regression classifier;
And displaying the candidate shortcut replies 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 wherein training the plurality of first sample data to obtain the classification model comprises:
the following training is carried out according to the preset training round number to obtain the classification model:
loading the first training model by taking the serialization identification of the sample sentence of each first sample data as input to obtain the sentence vector of the sample sentence of each first sample data;
taking sentence vectors of sample sentences of each first sample data as input of a logistic regression classifier, taking consultation information types of the sample sentences of each first sample data as output of the logistic regression classifier, and training the logistic regression classifier.
3. The method according to claim 1, wherein the method further 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 shortcut reply.
4. The method of claim 1, wherein the determining candidate quick replies according to the information to be replied and a pre-trained quick reply model comprises:
inputting the information to be replied into the shortcut reply model, and outputting a reply sentence of the information to be replied;
and determining the reply statement of the information to be replied as the candidate shortcut reply.
5. The method of claim 1, wherein the position embedding is a position in the sample sentence of words that make up the sample sentence, the words embedding being a serialized identification of the sample sentence;
and carrying out text prediction on hidden vectors of the sample sentences of each second sample data by using the reply sentences of the sample sentences of each second sample data as the logistic regression classifier.
6. The method according to claim 1, wherein the method further 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 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 the pre-stored information list of the preset type as the candidate shortcut reply.
7. The method of claim 6, wherein the method further comprises:
and updating the user attribute information of the sender according to the information matched with the user grade of the sender.
8. The method of claim 1, wherein the acquiring the consulting object for the information to be replied to comprises:
if the information to be replied comprises a text, word segmentation processing is carried out on the text in the information to be replied to obtain at least one word;
identifying a consultation object from the at least one word;
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.
9. 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 information from a sender in the current session as the information to be replied;
or,
displaying at least one message from the sender in the current session;
And responding to the operation of selecting one target information from the at least one information by a user, and determining the target information as the information to be replied.
10. The method of claim 1, wherein the obtaining the information to be replied to if the current session is a one-to-many session or a many-to-many session comprises:
displaying a target sender for selection by a user, wherein the target sender is at least one information sender in the one-to-many session or the many-to-many session;
and determining the last information from the sender to be replied as the information to be replied in response to the operation of selecting the sender to be replied from the target senders by a user, or displaying at least one piece of information from the sender to be replied in a current session, and determining the target information as the information to be replied in response to the operation of selecting one target information from the at least one piece of information by the user.
11. The method according to any one of claims 1-10, further comprising:
and responding to the operation of selecting the target shortcut reply in the candidate shortcut replies by the user, and displaying the target shortcut reply in a dialogue input box for the user to edit and then send or directly send.
12. An information processing apparatus, characterized by comprising:
the first acquisition module is used for acquiring information to be replied, wherein the information to be replied is information from a sender to be replied in a current session;
a second acquisition module, configured to: acquiring a consultation object of the information to be replied according to the information to be replied or at least one piece of information of which the sending time from a sender is before the information to be replied in the current session;
inputting the information to be replied into a classification model, and outputting the consultation information type of the information to be replied, wherein the classification model is obtained by training a plurality of first sample data, each first sample data comprises a sample sentence and the consultation information type of the sample sentence, and the consultation information type is the type of attribute information of the consultation object;
if the consultation information type of the information to be replied is not found from the preset consultation information type set, determining candidate shortcut replies according to the information to be replied and a pre-trained shortcut reply model, wherein the shortcut reply model is obtained by training a plurality of second sample data, each second sample data comprises a sample sentence and a reply sentence of the sample sentence, the shortcut reply model comprises a second training model and a logistic regression classifier, and the training process of the shortcut reply model comprises the following steps: according to the preset training round number, taking the position embedding and word embedding of the sample sentence of each second sample data as input, loading the second training model to obtain the hidden vector of the sample sentence of each second sample data, taking the hidden vector of the sample sentence of each second sample data as the input of the logistic regression classifier, and taking the reply sentence of the sample sentence of each second sample data as the output of the logistic regression classifier, and training the logistic regression classifier;
And the display module is used for displaying candidate shortcut replies corresponding to the information to be replied.
13. A terminal device, comprising:
a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory to perform the method of any of claims 1 to 11.
14. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1 to 11.
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 CN113609275A (en) 2021-11-05
CN113609275B true 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 (19)

* 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
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
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
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885756B (en) * 2016-09-30 2020-05-08 华为技术有限公司 Deep learning-based dialogue method, device and equipment
CN107612814A (en) * 2017-09-08 2018-01-19 北京百度网讯科技有限公司 Method and apparatus for generating candidate's return information
CN111339268B (en) * 2020-02-19 2023-08-15 北京百度网讯科技有限公司 Entity word recognition method and device

Patent Citations (19)

* 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
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
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
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深度学习实战》.机械工业出版社,2020,第279-281页. *

Also Published As

Publication number Publication date
CN113609275A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN110046221B (en) Machine dialogue method, device, computer equipment and storage medium
CN109543030B (en) Method, device, equipment and storage medium for classifying session texts of customer service robot
CN111026842B (en) Natural language processing method, natural language processing device and intelligent question-answering system
CN111428010B (en) Man-machine intelligent question-answering method and device
US11295727B2 (en) Conversation-based chatbot training
CN112732911A (en) Semantic recognition-based conversational recommendation method, device, equipment and storage medium
CN111783903B (en) Text processing method, text model processing method and device and computer equipment
CN111737432A (en) Automatic dialogue method and system based on joint training model
CN113377936A (en) Intelligent question and answer method, device and equipment
CN111666416A (en) Method and apparatus for generating semantic matching model
CN117079299B (en) Data processing method, device, electronic equipment and storage medium
CN110377733A (en) A kind of text based Emotion identification method, terminal device and medium
CN111639162A (en) Information interaction method and device, electronic equipment and storage medium
EP4060517A1 (en) System and method for designing artificial intelligence (ai) based hierarchical multi-conversation system
CN110059172B (en) Method and device for recommending answers based on natural language understanding
CN110659351B (en) Method and device for mining context relationship of entity
Sonawane et al. ChatBot for college website
CN113609275B (en) Information processing method, device, equipment and storage medium
US20220358572A1 (en) Device and method to provide data associated with shopping mall web page
KR20210074246A (en) Method for recommending object, neural network and training method thereof, device, and medium
CN113888216A (en) Advertisement information pushing method and device, electronic equipment and storage medium
CN111046151B (en) Message processing method and device
CN112818084A (en) Information interaction method, related device, equipment and computer readable medium
CN116383027B (en) Man-machine interaction data processing method and server
CN114841471B (en) Knowledge point prediction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
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