Method, device and terminal equipment for processing session information
By obtaining auxiliary information and user-input source conversation information to generate target conversation information, it solves the problem of existing natural language generation technology being unable to meet diverse needs and understanding barriers, and achieves a more effective user experience and multi-modal information exchange.
Patent Information
- Application Number
- CN201810142498.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-02-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2038-02-11
AI Technical Summary
Existing natural language generation technology cannot meet the diverse needs of users, cannot understand whether the user understands the nouns or things in the generated sentences, and has a single target, and cannot handle complex human-to-human communication, especially when language barriers arise. or cultural background differences.
By obtaining auxiliary information and the source conversation information input by the user, the target conversation information is generated, taking into account the user's historical conversation information, user attributes, language type, professional field and cultural background, etc., to ensure that the user can understand it when generating natural language, and to expand the capabilities of language generation. Interactive objects,translation systems across language and cross-cultural contexts.
It improves the user experience, meets the diverse needs of users, enhances the practicality of language generation, helps users understand complex communication content, breaks understanding barriers in communication, and achieves more effective multi-modal information exchange.
Smart Images

Figure CN110209774B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of session information processing, and in particular to a method, an apparatus and a terminal device for processing session information. Background Art
[0002] Natural language generation is a branch of artificial intelligence and computational linguistics. It is a computer model based on language information processing. Its working process starts from the abstract concept level and generates text by selecting and executing certain semantic and grammatical rules.
[0003] Existing natural language generation technology is mainly used in question-answering systems. The task scenario is to automatically generate a corresponding answer given a question. For example, in the existing technology, Li asked: What are the fun places in Beijing? The question-answering system will automatically give fun places in Beijing. Among them, according to the different generation methods, the existing natural language generation technology can be divided into the following two types: (1) Template-based generation: Through semantic analysis, the logical expression of the question is obtained, and the template pre-defined with the logical expression is matched, and the corresponding answer is searched from the database. (2) Deep learning-based generation: In the training stage, the sequence-to-sequence generation model is trained based on the existing question-answering corpus; in the prediction stage, given a question sentence, the answer sentence is generated based on the trained generation model.
[0004] Although natural language generation in the existing technology can meet people's basic needs to a certain extent, its target of action is single, generally a simple question and answer between a machine and a user, which cannot meet the diverse needs of users. Moreover, the generated sentences rely entirely on the current given context, without considering whether the user understands the nouns or things in the generated sentences, resulting in a poor user experience. Summary of the invention
[0005] The purpose of the present invention is to solve at least one of the above-mentioned technical defects, especially the technical defect of failing to meet the diverse needs of users.
[0006] According to one aspect, an embodiment of the present invention provides a method for processing session information, including:
[0007] Acquire the auxiliary information and source session information input by the first user;
[0008] Based on the auxiliary information and the source session information, target session information is generated and output.
[0009] According to another aspect, an embodiment of the present invention further provides a device for processing session information, including:
[0010] An information acquisition module, used to acquire auxiliary information and source session information input by the first user;
[0011] The session generation module is used to generate target session information based on the auxiliary information and the source session information and output the target session information.
[0012] According to another aspect, an embodiment of the present invention further provides a terminal device, including a memory and a processor, wherein the memory stores computer executable instructions, and when the instructions are executed by the processor, the above method for processing session information is executed.
[0013] Compared with the prior art, the method for processing session information provided by the embodiment of the present invention obtains auxiliary information and source session information input by the first user, and then generates target session information based on the auxiliary information and the source session information and outputs the target session information. The technical solution of the embodiment of the present invention, when generating the target session information, not only relies on the source session information input by the first user, but also fully considers the obtained auxiliary information, so that the generated target session information can not only meet the diverse needs of users, but also ensure that users can understand the nouns or things in the generated sentences, thereby improving the user experience.
[0014] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0016] Figure 1 A schematic diagram of a flow chart of a method for processing session information according to an embodiment of the present invention;
[0017] Figure 2 A flow chart of generating session information according to an embodiment of the present invention;
[0018] Figure 3 The overall operation structure diagram of the automatic statement generation model of the embodiment of the present invention;
[0019] Figure 4 It is a workflow diagram of the sentence automatic generation system according to an embodiment of the present invention;
[0020] Figure 5 A schematic diagram of a monolingual sentence automatic generation system according to an embodiment of the present invention;
[0021] Figure 6 A schematic diagram of a multilingual sentence automatic generation system according to an embodiment of the present invention;
[0022] Figure 7 A schematic diagram of a system for automatically generating statements for loading user information according to an embodiment of the present invention;
[0023] Figure 8 A schematic diagram of a system for automatically generating sentences based on abbreviations according to an embodiment of the present invention;
[0024] Fig. 9 A schematic diagram of an analogy translation system according to an embodiment of the present invention in an entity analogy application scenario;
[0025] Fig.10 A schematic diagram of an analog translation system according to an embodiment of the present invention in another physical analog application scenario;
[0026] Fig.11 A schematic diagram of an event analogy application scenario of an analogy translation system according to an embodiment of the present invention;
[0027] Fig.12 A schematic diagram of an entity and event analogy application scenario of an analogy translation system according to an embodiment of the present invention;
[0028] Fig.13 A signaling flow chart of user context modification triggered by a centralized unit according to an embodiment of the present invention;
[0029] Fig.14 is a complete flow chart of the cross-language and cross-domain translation system according to an embodiment of the present invention;
[0030] Fig.15 A schematic diagram of a cross-language and cross-domain translation system from a special professional field expression form to a general expression form according to an embodiment of the present invention;
[0031] Fig.16 A schematic diagram of a cross-language and cross-domain translation system from a general expression form to an expression form in a special professional field according to an embodiment of the present invention;
[0032] Fig.17 is a complete flow chart of the cross-language and cross-cultural background translation system according to an embodiment of the present invention;
[0033] Fig.18 A schematic diagram of a cross-language and cross-cultural background translation system from a special cultural background domain expression form to a general expression form according to an embodiment of the present invention;
[0034] Fig.19 A schematic diagram of a cross-language and cross-cultural background translation system from a special cultural background domain expression form to a general expression form with picture output according to an embodiment of the present invention;
[0035] Fig. 20 is a complete flow chart of the picture recommendation system according to an embodiment of the present invention;
[0036] Fig.21 This is a schematic diagram of an application of a picture recommendation system according to an embodiment of the present invention;
[0037] Fig. 22 The structure of the apparatus for processing session information according to the embodiment of the present invention is intended;
[0038] Fig.23 The present invention is a block diagram of a computing system that can be used to implement the apparatus for processing session information disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0040] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0041] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0042] It will be understood by those skilled in the art that the "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "terminal" or "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to operate locally, and / or in a distributed form, at any other location on the earth and / or in space. The "terminal" or "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0043] Existing natural language generation technology has the following shortcomings:
[0044] 1) The object of action is single, and the interaction object is generally between the machine and the user, including how to make the machine understand natural language (i.e. human language) and how to encode machine language into natural language that humans can understand. However, for language generation and understanding, the actual situation is much more complicated, especially when people communicate directly or indirectly through devices. It is also possible that they cannot understand each other or convey their ideas to each other due to their own circumstances or the environment they are in. For example, for foreign language beginners, patients with language barriers, very busy and urgent situations, etc., very intelligent and humanized language generation technology is needed to help users achieve fast and convenient auxiliary communication functions. Existing technologies cannot handle the above complex situations because they do not take into account the multi-party language environment between multiple users and between multiple users and devices.
[0045] For example, in the prior art, when the questioner asks an open-ended question, such as, "What are we going to do on Saturday?", the prior question-answering system is unable to generate an answer based on the keywords given by the respondent.
[0046] 2) The generated sentences are completely dependent on the current given context, without considering whether the user understands the nouns or things in the generated sentences.
[0047] For example, suppose user C is completely unfamiliar with graphics cards. When user A and user B discuss the topic of graphics cards, the existing technology cannot generate sentences that enable user C to understand the conversation based on the conversation between user A and user B.
[0048] 3) When generating sentences, the different areas of expertise of user A and user B are not taken into account. Therefore, the generated sentences should also change according to the requirements of the output field.
[0049] For example, suppose user A is a game player who likes to use game terms, while user B only occasionally plays games and has little knowledge of game terms. When user A says to user B, "Do you want to eat chicken tonight? I'll take you to fly!" (meaning "Do you want to play games together tonight? I'll take you to win!"), user B cannot understand what user A said, and existing technologies cannot help user B understand this sentence.
[0050] 4) It does not take into account the differences in cultural backgrounds of different users.
[0051] For example, suppose user A is familiar with American slang, but user B is not familiar with American culture. When user A says to user B, "In electronic industry, Samsung can be considered the 800pound gorilla.", the original meaning is "Samsung has very strong strength in the electronics industry", but user B does not understand this sentence very well, and the existing technology cannot help user B understand this sentence.
[0052] 5) It is limited to text information and does not consider multimodal information such as images.
[0053] In order to solve the above-mentioned deficiencies in the existing natural language generation technology, an embodiment of the present invention provides a method for processing session information. Through this solution, when generating target session information, not only the source session information input by the first user is relied on, but also the auxiliary information obtained is fully considered. On the one hand, it is conducive to expanding the interactive objects of language generation, such as the interactive form of user-terminal device-user, which is no longer limited to the interaction between the machine and the user. On the other hand, when generating natural language, it no longer relies only on the current given context environment, but also fully considers the auxiliary information, so that the user can understand the generated natural language sentences, enhances the practicality of language generation, builds a bridge of communication between people who are inconvenient to communicate normally, and converts unreadable words into easy-to-understand natural language, thereby breaking the understanding barrier of users in the communication process.
[0054] The method for processing session information implemented by the present invention is as follows: Figure 1 As shown, it includes: step 110, obtaining auxiliary information and source session information input by a first user; step 120, generating target session information based on the auxiliary information and the source session information and outputting the target session information.
[0055] The method for processing session information provided by the embodiment of the present invention obtains auxiliary information and source session information input by a first user, and then generates target session information based on the auxiliary information and the source session information and outputs the target session information. The technical solution of the embodiment of the present invention, when generating the target session information, not only relies on the source session information input by the first user, but also fully considers the obtained auxiliary information, so that the generated target session information can meet the diverse needs of users and ensure that users can understand the nouns or things in the generated sentences, thereby improving the user experience.
[0056] Specifically, the auxiliary information in step 110 and step 120 includes at least one of historical session information, user information of the first user, user information of the second user, and a field to which the information belongs, wherein the field to which the information belongs includes a field to which the source information belongs and a field to which the target information belongs.
[0057] Furthermore, the user information includes at least one of the following: user attribute information; user preference information; user schedule information; user location information; user behavior information; and user device information.
[0058] Furthermore, the field to which the information belongs includes at least one of the following: language type information; professional field information; cultural background information.
[0059] Furthermore, the domain to which the source information belongs is obtained by detecting the source session information or can be set, and the domain to which the target information belongs is obtained by detecting the historical session information or can be set.
[0060] Specifically, the source conversation information in step 110 and step 120 includes at least one of the following: abbreviations, incomplete words, natural language sentences, and picture selection information.
[0061] Specifically, generating the target session information based on the auxiliary information and the source session information in step 120 specifically includes at least one of steps 1201 (not shown in the figure) to step 1204 (not shown in the figure):
[0062] Step 1201: extract session information keywords from source session information and historical session information between a first user and a second user, and generate target session information according to the session information keywords.
[0063] Step 1202: extract session information keywords from source session information and historical session information between the first user and the second user, and user information keywords from user information of the first user and / or the second user, and generate target session information according to the session information keywords and user information keywords.
[0064] Step 1203: According to the domain to which the information belongs, the source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, session information keywords of the domain to which the target information belongs and the historical session information between the first user and the second user are extracted, and target session information is generated according to the session information keywords.
[0065] Step 1204: According to the domain to which the information belongs, the source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, and session information keywords of the session information in the domain to which the target information belongs and the historical session information between the first user and the second user, as well as user information keywords of the user information of the first user and / or the second user are extracted, and the target session information is generated according to the session information keywords and the user information keywords.
[0066] Furthermore, the steps of generating target session information according to session information keywords in step 1201 and step 1203 include: generating target session information according to session information keywords based on a pre-trained sentence generation model; the steps of generating target session information according to session information keywords and user information keywords in step 1202 and step 1204 include: generating target session information according to session information keywords and user information keywords based on a pre-trained sentence generation model.
[0067] Specifically, generating the target session information based on the auxiliary information and the source session information in step 120 specifically includes at least one of steps 1205 (not shown in the figure) to step 1207 (not shown in the figure):
[0068] Step 1205: obtain source object information based on source session information, classify the source object information to obtain source category information; obtain candidate target category information based on user information of the first user; obtain target category information based on similarity between the source category information and the candidate target category information; obtain candidate target object information based on the target category information; obtain target object information based on similarity between the source object information and the candidate target object information; generate target session information based on the target object information.
[0069] Step 1206: obtain source object information based on source session information and historical session information between the first user and one or more second users; classify the source object information to obtain source category information; obtain candidate target category information based on the user information of the first user; obtain target category information based on the similarity between the source category information and the candidate target category information; obtain candidate target object information based on the target category information; obtain target object information based on the similarity between the source object information and the candidate target object information; generate target session information based on the target object information.
[0070] Step 1207: According to the field to which the information belongs, the source session information of the field to which the source information belongs is translated into the session information of the field to which the target information belongs, and the source object information is obtained according to the session information of the field to which the target information belongs and the historical session information between the first user and one or more second users; the source object information is classified to obtain source category information; according to the user information of the first user, candidate target category information is obtained; according to the similarity between the source category information and the candidate target category information, target category information is obtained; according to the target category information, candidate target object information is obtained; according to the similarity between the source object information and the candidate target object information, target object information is obtained; according to the target object information, target session information is generated.
[0071] Among them, objects include entities and / or events.
[0072] Specifically, generating target session information based on the auxiliary information and the source session information in step 120 specifically includes step 1208 (not shown in the figure), translating the source session information in the field to which the source information belongs into the target session information in the field to which the target information belongs according to the field to which the information belongs.
[0073] Furthermore, step 1208 specifically includes: according to the field to which the information belongs, based on the corresponding pre-trained translation model, translating the source conversation information in at least one of the language type, professional field and cultural background in sequence to obtain the target conversation information.
[0074] Furthermore, the method also includes step 130 (not shown in the figure), obtaining a target picture corresponding to the source session information and / or the target session information and outputting the target picture according to the semantic similarity between the source session information and / or the target session information and the candidate picture.
[0075] Specifically, generating the target session information based on the auxiliary information and the source session information in step 120 specifically includes at least one of step 1209 (not shown in the figure) and step 1210 (not shown in the figure):
[0076] Step 1209: Obtain session inference information based on the picture selection information input by the first user and the historical session information between the first user and the second user; obtain a target picture from the candidate pictures based on the semantic similarity between the session inference information and the candidate pictures, and use the target picture as the target session information.
[0077] Step 1210: Obtain session inference information based on the picture selection information input by the first user, the historical session information between the first user and the second user, and the user information of the first user; obtain a target picture from the candidate pictures based on the semantic similarity between the session inference information and the candidate pictures, and use the target picture as the target session information.
[0078] Furthermore, step 1209 obtains conversation inference information based on the picture selection information input by the first user and the historical conversation information between the first user and the second user, specifically including: obtaining conversation inference information based on a pre-trained conversation understanding model according to the picture selection information input by the first user and the historical conversation information between the first user and the second user.
[0079] Furthermore, step 1210 obtains conversation inference information based on the picture selection information input by the first user, the historical conversation information between the first user and the second user, and the user information of the first user, specifically including: obtaining conversation inference information based on a pre-trained conversation understanding model based on the picture selection information input by the first user, the historical conversation information between the first user and the second user, and the user information of the first user.
[0080] The conversation inference information includes: the conversation content that the first user wants to express and / or the conversation emotion that the first user wants to express.
[0081] According to the above description, it can be seen that the method for processing session information implemented by the present invention includes but is not limited to the following five aspects: A. Automatic sentence generation system based on natural language expression of keywords; B. Analogy translation system; C. Cross-language and cross-domain translation system; D. Cross-language and cross-cultural background translation system; E. Picture recommendation system; Among them, the generation flow chart of session information including but not limited to the above five aspects is as follows: Figure 2 shown.
[0082] The above five aspects are described in detail below in conjunction with specific embodiments, wherein the above-mentioned sentence in the form of natural language expression is the target session information, the source user in the process described below is the above-mentioned first user, the target user is the above-mentioned second user, the source user information is the user information of the above-mentioned first user, and the target user information is the user information of the above-mentioned second user.
[0083] A. A sentence automatic generation system based on natural language expression in the form of keywords (hereinafter referred to as the sentence automatic generation system) is a method for automatically generating sentences in the form of natural language expression based on external context information (i.e. user conversation information, including historical conversation information between users, source conversation information input by the first user, etc.) in order to solve the problem of generating conversation information (i.e. natural language) between users and devices in the existing natural language generation technology. The sentence automatic generation system includes: extracting conversation information keywords from the context information, generating sentences in the form of natural language expression (i.e. target conversation information) based on the conversation information keywords, and feeding back to the target user. In addition, the source user information and the target user information can also be obtained, and the sentences in the form of natural language expression can be generated based on the context information, the target user information and the source user information, and fed back to the target user. In addition, the conversation information keywords input by the source user can be translated into the conversation information keywords of the language type of the target user, and then the conversation information keywords translated into the language type of the target user can be generated into the sentences in the form of natural language expression and fed back to the target user.
[0084] When the embodiment of the present invention realizes the above-mentioned keyword-based natural language expression form sentence automatic generation system, it mainly includes two parts of work: online sentence automatic generation system (i.e., sentence generation in natural language expression form) and offline sentence automatic generation model training. Among them, the training of the offline sentence automatic generation model is to pre-train a model for automatically generating sentences in natural language expression form according to the conversation information keywords based on the existing corpus, which can be recorded as a pre-trained sentence automatic generation model. For example: the dialogue "- Zhang, what are we going to do on Saturday? - We can go play basketball and then go to see the movie "Kung Fu Panda"." is a corpus, in which the first sentence is marked as a question sentence, and "basketball" and "Kung Fu Panda" in the second sentence are marked as conversation information keywords. In the specific training process, the conversation information keywords of the first sentence and the second sentence are used as input, and the whole sentence of the second sentence is used as output for training. The online sentence automatic generation system generates sentences in natural language expression form suitable for the current context through the offline pre-trained sentence automatic generation model according to the context information. In addition, in order to cover as many complex language communication environments as possible, auxiliary information is taken into consideration in both the training process of the offline automatic sentence generation model and the online automatic sentence generation system. That is, based on the contextual information and auxiliary information, the offline pre-trained automatic sentence generation model is used to generate sentences in the form of natural language expressions suitable for the current context, and incomplete words and / or abbreviations can also be automatically identified and completed.
[0085] It should be noted that in the offline training process of the automatic sentence generation model, the deep learning algorithm is used to simplify sentences into conversation information keywords and generate sentences based on the conversation information keywords for dual learning, so as to achieve learning and using the model without relying on a large amount of manual intervention such as templates. Among them, the user information includes the user information of the first user and the user information of the second user. The automatic sentence generation model is trained offline and directly applied online. The deep learning algorithm uses the existing framework to modify the input parameters, output parameters and network parameters (such as network depth, number of nodes, etc.).
[0086] Specifically, since the online automatic sentence generation system generates sentences in the form of natural language expressions suitable for the current context based on context information and auxiliary information through an offline pre-trained automatic sentence generation model, the online automatic sentence generation system can be summarized as follows: an information extraction system and a pre-trained automatic sentence generation model. The information extraction system mainly converts context information and auxiliary information into vector representations to pre-process the information before inputting it into the pre-trained automatic sentence generation model. The pre-trained automatic sentence generation model is a sentence generation model that is trained offline based on existing corpus to automatically generate sentences based on information keywords. Its input is context information and auxiliary information represented in vector form, and its output is sentences expressed in natural language, that is, the output is the target conversation information. Among them, the context information includes historical session information and source session information input by the first user; the auxiliary information includes user information of the first user, user information of the second user, and at least one of the fields to which the information belongs; the field to which the information belongs further includes the field to which the source information belongs and the field to which the target information belongs, the field to which the source information belongs refers to the field to which the source session information belongs, and the field to which the target information belongs refers to the field to which the target session information belongs; the user information further includes at least one of the following: user attribute information, user preference information, user schedule information, user location information, user behavior information, and user device information.
[0087] Furthermore, the offline training process of the automatic sentence generation model specifically includes the following steps: Step 1: Extract keyword information from the training corpus. Step 2: Convert the keyword information in step 1 into a vector representation, and input it into the neural network model for sentence generation to generate a sentence. Next, calculate the difference between the sentence generated by the automatic sentence generation model and the original sentence, and pass the difference to the network parameters through the network. The difference refers to the difference between the vector of the sentence generated by the automatic sentence generation model and the vector of the original sentence. There are many ways to calculate the difference. The simplest way is to directly subtract the absolute value, and you can also take the square. The network parameters are weight parameters of some edges connecting neurons in the neural network, etc., which are adjustable parameters. Step 3: Repeat steps 1 and 2 until the model converges. The overall operating structure of the automatic sentence generation model is as follows. Figure 3 shown.
[0088] To further explain, the workflow of the sentence automatic generation system is as follows: Figure 4 As shown, it specifically includes: Step 1, the information extraction system receives user information and context information. First, the conversation information keywords are extracted for the context information, and then the abbreviation detection or recovery, as well as the target language detection or translation are performed on the extracted conversation information keywords. Finally, the word vectors and other parameters trained by the sentence automatic generation model are converted into the corresponding vector form of context information, that is, Figure 4; for user information, first extract the user information keywords, and then automatically generate the word vectors trained by the model according to the sentence to convert them into the corresponding vector form of user information, that is, Figure 4 Step 2: Combine the user information vector and the context information vector and input them into the sentence automatic generation model to obtain a sentence expressed in natural language, which is the final target conversation information. The user information includes the user information of the first user and the user information of the second user.
[0089] The automatic generation of the above statements is described in detail below through the following embodiments:
[0090] Example 1: Simple thing input
[0091] In the implementation of simple thing input, take the example of a user who is not familiar with Chinese using a terminal device to communicate using the automatic sentence generation system. When a user encounters a language expression barrier, such as a language beginner or using an unfamiliar language to communicate with others, he or she can often only think of a few keywords to express the content and cannot organize a complete sentence. At this time, the automatic sentence generation system can provide great help to the user. Figure 5 As shown, users use the automatic sentence generation system to complete communication with others when they are not familiar with language expressions.
[0092] exist Figure 5 In the figure, the second user on the right, “Li”, is a proficient Chinese user, and the first user on the left, “Zhang”, is a Chinese user with difficulty. Figure 5 In the user communication process shown, the sentence automatic generation system will organize the historical conversation information between the first user ("Zhang") and the second user ("Li") (e.g., the conversation content input by "Li") and the conversation information keywords of the source conversation information provided by the first user ("Zhang"), such as "basketball", "movie", "Kung Fu Panda", etc., into a complete sentence (i.e., target conversation information) and feed it back to the second user ("Li"), that is, the sentence automatic generation system extracts the conversation information keywords of the source conversation information and the historical conversation information between the first user and the second user, generates the target conversation information according to the conversation information keywords, and displays the target conversation information. Among them, the above-mentioned first user "Zhang" is the current device user, and the second user "Li" is the other user, that is, the user who is having a conversation with the current device user.
[0093] Specifically, the automatic sentence generation system in this embodiment includes two parts: an information extraction system and an automatic sentence generation model. The automatic sentence generation process of the automatic sentence generation system can be divided into the following two steps:
[0094] Step 1: Identify contextual information
[0095] This embodiment generates sentences based on the context information provided by the user to assist the user in organizing and expressing the language. The context information here refers to the historical conversation information between the first user and the second user cached in the terminal device or social software, as well as the source conversation information input by the first user (for example, the keywords "basketball", "movie", "Kung Fu Panda", etc.). In the process of automatic sentence generation in this embodiment, it is first necessary to extract the conversation information keywords of the context information, wherein the method of obtaining the conversation information keywords includes but is not limited to the following two methods: 1) Direct acquisition, if the text content input in a specific query format is detected, the system automatically performs word segmentation and keyword extraction operations on the text; 2) Obtaining context information for enriching sentence generation from the user's previous historical conversation information, and extracting conversation information keywords from the context information. Then, the word vector parameters in the offline pre-trained sentence automatic generation model are used to vectorize the conversation information keywords to obtain the vectors of the conversation information keywords of the context information.
[0096] Step 2: Generate natural language sentences using contextual information
[0097] In this step, the vector of the conversation information keyword of the context information extracted in step 1 is input into the sentence automatic generation model that has been trained offline, and the sentence in the form of natural language expression is obtained as the final target conversation information, and the target conversation information is output at the same time. The target conversation information can be directly displayed to the second user in text form, or the target conversation information can be played to the second user when the second user clicks the voice playback related button.
[0098] Among them, the implementation scenario of the above embodiment is on a social platform, and the automatic sentence generation system can be embedded in the input method or the social platform, so that the user only needs to enter the source session information such as session information keywords, and the social platform will provide historical session information such as the contextual information of the user communication, so as to realize the automatic sentence generation process more conveniently.
[0099] Embodiment 2: System for automatically generating sentences in multiple fields of information
[0100] The application scenario of this embodiment is that tourists who travel abroad or language beginners want to express their inner thoughts, but can only think of a few keywords in their native language, so they encounter obstacles in communication. In this case, the automatic sentence generation system can detect the source language used by the user and the target language type that the user wants to express, translate the source language keywords provided by the user into the target language keywords, and combine the context information to organize appropriate sentences and feedback to the user. Figure 6 The communication scenario is introduced as an example:
[0101] exist Figure 6In the example, the second user “Li” on the right is a proficient Chinese user, and the first user “Tom” on the left is a user whose native language is English and is not very familiar with the use of Chinese. At this time, “Tom” uses the sentence automatic generation system to complete the dialogue exchange with “Li”. “Li” asks “Tom” about his plan for Saturday, and “Tom” can only think of source conversation information such as “basketball” and “The Mummy” in English. Then, these source conversation information (such as keywords “basketball”, “The Mummy”, etc.) are input into the sentence automatic generation system. The sentence automatic generation system uses the contextual information (i.e., historical conversation information) and the source conversation information provided by “Tom” (e.g., keywords “basketball”, “The Mummy”, etc.) to generate sentences in a suitable natural language expression form, i.e., target conversation information, and applies it to the conversation content between the two, so as to assist “Tom” in achieving normal communication with “Li”. Among them, the first user "Tom" is the current device user, and the second user "Li" is the other user, that is, the user who has a conversation with the current device user.
[0102] In this embodiment, it is necessary to generate a sentence in the form of natural language expression based on the source session information provided by the first user, the field to which the source information belongs, the field to which the target information belongs, and the historical session information between the first user and the second user. The specific processing process is as follows:
[0103] Step 1: Identify contextual information and unify the domain to which the information belongs
[0104] The field to which the information belongs includes the field to which the source information belongs and the field to which the target information belongs, and the field to which the information belongs includes at least one of language type information, professional field information and cultural background information.
[0105] For example, when the language type of the source conversation information provided by the first user is inconsistent with the language type used by the interlocutor (i.e., the second user), the sentence automatic generation system will detect the language type of the source conversation information based on the source conversation information input by the first user, detect the language type of the target conversation information based on the historical conversation information between the first user and the second user, and confirm the language type of the source conversation information and the language type of the target conversation information. In the multi-language scenario, the sentence automatic generation system can also allow the user to freely set the language type of the source conversation information and the language type of the target conversation information. Then, the sentence automatic generation system loads the corresponding translation model and translates all the source conversation information of the source conversation information language type into the conversation information of the target conversation information language type.
[0106] For another example, when the professional field, cultural background, etc. of the source conversation information provided by the first user are different from the professional field, cultural background, etc. of the second user, the sentence automatic generation system will detect the professional field, cultural background, etc. of the source conversation information based on the source conversation information input by the first user, detect the professional field, cultural background, etc. of the target conversation information based on the historical conversation information between the first user and the second user, and confirm the professional field, cultural background of the source conversation information, and the professional field, cultural background, etc. of the target conversation information, wherein, in the scenario of multiple professional fields and multiple cultural backgrounds, the sentence automatic generation system can also allow the user to freely set the professional field, cultural background of the source conversation information, and the professional field, cultural background of the target conversation information. Then, the sentence automatic generation system loads the corresponding translation model, such as a professional field translation module, a cultural translation model, etc., and translates all the source conversation information of the professional field and cultural background of the source conversation information into the conversation information of the professional field and cultural background of the target conversation information.
[0107] It can be seen from the above description that the automatic sentence generation system at this time first determines the language type, professional field, cultural background and other information fields of the source conversation information based on the source conversation information input by the first user, and determines the language type, professional field, cultural background and other target information fields of the target conversation information based on the historical conversation information (such as context information) between the first user and the second user. Then, the source conversation information of the field to which the source conversation information input by the first user belongs is translated into conversation information of the field to which the target information belongs. Then, conversation information keywords are extracted from the conversation information of the field to which the target information belongs and the historical conversation information between the first user and the second user. Then, the word vector parameters in the offline pre-trained automatic sentence generation model are used to vectorize the conversation information keywords to obtain the corresponding conversation information keyword vectors.
[0108] Step 2: Generate statements
[0109] The automatic sentence generation system identifies context information and generates sentences. This process is roughly the same as step one and step two in the above-mentioned implementation one, and will not be repeated here.
[0110] The implementation scenario of the above embodiment is on a social platform, and the automatic sentence generation system can be embedded in the input method or social platform, so that the user only needs to input source session information such as keywords, and the social platform provides historical session information such as the context information of the user's communication, so as to more conveniently implement the sentence generation process. The automatic sentence generation system can be executed on the terminal side or on the server side. Considering that the system may have a large amount of computation and may occupy a large amount of physical memory, it is generally executed on the server side.
[0111] Example 3: Automatically generating a statement for loading user information
[0112] The application scenario of this embodiment is similar to that of the first embodiment, but the sentence automatic generation system is loaded with richer user information, such as user schedule information, user location information, etc. At this time, the sentence automatic generation system will comprehensively consider the source session information input by the user (such as the provided keywords) and other attribute keywords related to the user information collected by the system to generate sentences that are more suitable for the current context and assist users in language expression.
[0113] by Figure 7 For example, Figure 7 The dialogue scenario is consistent with that of Example 1 and will not be repeated here. What is different from Example 1 is that the automatic sentence generation system at this time not only utilizes the source conversation information (such as the provided keywords) input by the first user "Zhang", but also automatically collects the user information of the first user "Zhang" through the terminal device or network device, such as the user's schedule information, the user's geographical location, etc., and then generates a sentence content that is more suitable for the first user "Zhang" to express based on the source conversation information (such as the provided keywords) input by the first user "Zhang" and the user information of the first user "Zhang" automatically collected by the system. The operating steps of the automatic sentence generation system at this time are as follows:
[0114] Step 1: Identify context and user information
[0115] Context information is information about communication between users cached in a terminal device or social software, including historical session information between a first user and a second user and source session information (such as keyword information) input by the first user. User information is a description of the user's environment and some personalized attribute information of the user, and the personalized attribute information of the user includes but is not limited to: the user's schedule, geographical location and other information. In the process of automatic sentence generation in this embodiment, it is necessary to extract the session information keywords of the context information and the user information keywords of the user information of the first user, wherein the method of obtaining the session information keywords includes but is not limited to the following two methods: 1) Direct acquisition, if the text content input in a specific query format is detected, the system automatically performs word segmentation and keyword extraction operations on the text; 2) Obtain context information for enriching sentence generation from the user's previous historical session information, and extract session information keywords from the context information. At the same time, it is necessary to obtain user information keywords from the acquired user information of the first user. Then, the word vector parameters in the offline pre-trained sentence automatic generation model are used to vectorize the above-mentioned session information keywords and user information keywords to obtain the vectors of the session information keywords of the context information and the vectors of the user information keywords.
[0116] Step 2: System generates statements
[0117] In this step, the vectors of the conversation information keywords of the context information provided in step 1 and the vectors of the user information keywords (including the user information keywords of the user information of the first user) are merged, and then input into the sentence automatic generation model that has been trained offline to obtain a sentence in the form of natural language expression, which is the final target conversation information, and the target conversation information is output at the same time. The target conversation information can be directly displayed to the second user ("Li") in text form, and can also be played to the second user ("Li") when the second user ("Li") clicks a voice playback related button.
[0118] It should be noted that, in the application scenario of the third embodiment, if the second user is willing to share his / her user information, such as user attribute information, user preference information, user schedule information, user location information, and other user information, to share information among friends, then in the process of identifying the context information and user information in step one, it is necessary not only to extract the user information keywords of the first user's user information, but also to extract the user information keywords of the second user's user information, that is, in step one, extract the session information keywords of the source session information and the historical session information between the first user and the second user, and the user information keywords of the first user's user information and the second user's user information; in step two, the vector of the session information keywords of the context information provided in step one and the vector of the user information keywords (including the user information keywords of the first user's user information and the user information keywords of the second user's user information) are still merged, and then input into the sentence automatic generation model that has been trained offline to obtain a sentence in the form of natural language expression, which is the final target session information. In addition, if the second user is willing to share his or her user information, such as user attribute information, user preference information, user schedule information, user location information, and other user information, to share information among friends, and the first user does not share his or her user information, that is, the user information of the first user cannot be obtained, then in the process of identifying the context information and user information in step one, the user information keywords of the user information of the second user can be extracted, that is, in step one, the session information keywords of the source session information and the historical session information between the first user and the second user, and the user information keywords of the user information of the second user are extracted; in step two, the vector of the session information keywords of the context information provided in step one and the vector of the user information keywords (including the user information keywords of the user information of the second user) are still merged, and then input into the sentence automatic generation model that has been trained offline to obtain a sentence in the form of natural language expression, which is the final target session information.
[0119] Embodiment 4: System for automatically generating sentences for loading user information in multiple information fields
[0120] The application scenario of this embodiment is a combination of the second embodiment and the third embodiment. At this time, the source session information provided by the first user ("Zhang") does not belong to the same field as the session information of the second user ("Li"), and the sentence automatic generation system is loaded with richer user information, such as user schedule information, user location information, etc. The operation steps of the sentence automatic generation system at this time are as follows:
[0121] Step 1: Identify contextual information and user information, and unify the fields to which the information belongs
[0122] The automatic sentence generation system first determines the language type, professional field, cultural background and other fields of the source conversation information based on the source conversation information input by the first user, and determines the language type, professional field, cultural background and other fields of the target conversation information based on the historical conversation information (such as context information) between the first user and the second user, and then translates the source conversation information of the field to which the source conversation information input by the first user belongs into the conversation information of the field to which the target information belongs. Then, the conversation information keywords are extracted from the conversation information of the field to which the target information belongs and the historical conversation information between the first user and the second user. At the same time, the user information keywords need to be obtained from the user information of the first user. Next, the word vector parameters in the offline pre-trained automatic sentence generation model are used to vectorize the conversation information of the field to which the target information belongs, the historical conversation information between the first user and the second user, and the user information keywords obtained from the user information of the first user, and the corresponding conversation information keyword vector and user information keyword vector are generated in turn.
[0123] Step 2: System generates statements
[0124] In this step, the vector of the session information keyword and the vector of the user information keyword (including the user information keyword of the user information of the first user) provided in step 1 are merged, and then input into the sentence automatic generation model that has been trained offline, and the sentence in the form of natural language expression is obtained, which is the final target session information. At the same time, the target session information is output. The target session information can be directly displayed to the second user in text form, and can also be played to the second user when the second user clicks a voice playback related button.
[0125] It should be noted that, in the application scenario of the fourth embodiment, if the second user is willing to share his user information, such as user attribute information, user preference information, user schedule information, user location information and other user information, to share information among friends, then at this time, in step one, it is necessary not only to obtain user information keywords from the obtained user information of the first user, but also to obtain the user information of the second user, and then obtain the user information keywords of the user information of the second user, that is, in step one, according to the field to which the information belongs, the source session information in the field to which the source information belongs is translated into session information in the field to which the target information belongs, and the session information in the field to which the target information belongs and the session information keywords of the historical session information between the first user and the second user, as well as the user information keywords of the user information of the first user and the user information of the second user are extracted; in step two, the vector of the session information keywords provided in step one and the vector of the user information keywords (including the user information keywords of the user information of the first user and the user information keywords of the user information of the second user) are still merged, and then input into the sentence automatic generation model that has been trained offline to obtain a sentence in the form of natural language expression, which is the final target session information.
[0126] In addition, if the second user is willing to share his own user information, such as user attribute information, user preference information, user schedule information, user location information and other user information, to share information among friends, and the first user does not share his own user information, that is, the user information of the first user cannot be obtained, then in step one, the user information of the second user can be obtained, and then the user information keywords of the user information of the second user can be obtained, that is, in step one, according to the field to which the information belongs, the source session information of the field to which the source information belongs is translated into the session information of the field to which the target information belongs, and the session information of the field to which the target information belongs and the session information keywords of the historical session information between the first user and the second user, as well as the user information keywords of the user information of the second user are extracted; in step two, the vector of the session information keywords provided in step one and the vector of the user information keywords (including the user information keywords of the user information of the second user) are still merged, and then input into the sentence automatic generation model that has been trained offline to obtain a sentence in the form of natural language expression, which is the final target session information.
[0127] Example 5: Automatic generation of sentences with abbreviations and / or incomplete words
[0128] The application scenario of this embodiment is that when the user is in a busy state or does not have the energy to focus on chatting with others, he often just wants to make a brief reply. However, such an answer will appear inappropriate. At this time, the automatic sentence generation system can generate a complete natural language sentence expression based on the source conversation information input by the user (such as the provided keywords), to assist the user in making a reasonable expression. Figure 8 For example.
[0129] exist Figure 8 In the example, the first user "Zhang" is busy at work and has no time to organize a reply to the second user "Li". However, the first user "Zhang" wants to go to "Pizza Hut" but has to wait a while, so "Zhang" provides the content of the idea to the automatic sentence generation system. The automatic sentence generation system generates a complete sentence to reply based on the historical conversation information at that time (such as the conversation context information), that is, to help "Zhang" to answer. At this time, the operating steps of the automatic sentence generation system are the same as those in the aforementioned embodiment 1, and will not be repeated here. Among them, the first user "Zhang" in this embodiment is the current device user, and the second user "Li" is the other user, that is, the user who has a conversation with the current device user.
[0130] B. Analogy Translation System
[0131] Since the existing automatic sentence generation technology does not take into account whether the user can truly understand the terms or proper nouns in the generated natural language sentences, the present invention is implemented on the basis of the automatic sentence generation system based on the natural language expression form of keywords, and proposes an analogy translation system, which generates proper nouns and / or entities and / or events in the generated natural language sentences through an analogy algorithm to generate nouns and / or entities and / or events that the user can understand. The application scenario of the analogy translation system is: when the user is confused about the understanding of certain things, the analogy translation system can analogize the explanation of things that the current user is familiar with based on the questions and user information provided by the user.
[0132] The overall operation process of the analog translation system is as follows: Fig. 9 As shown, including:
[0133] Step 1: Based on the source session information input by the first user, Fig. 9 The expression content in the source object information, which can be a question sentence, identifies the key entities and / or events in the source conversation information, that is, Fig. 9The source end entity / event detection in the source object information is carried out, and the collected source object information such as entities and / or events is classified according to the predefined category labels through the classification model to obtain the source category information of the source object information. Among them, the identification method is to perform syntactic and semantic role annotation on the source session information input by the first user, and extract its syntactic and semantic features to identify the source object information such as key entities and / or events described.
[0134] Step 2: Each divided source category information and source object information is represented by a feature vector, that is, Fig. 9 Source-side category feature representation and source-side entity / event feature representation in .
[0135] Step 3: Collect the user information of the first user, that is Fig. 9 The user logs in the dataset include user attribute information such as the user's personal profile, user device information such as the device the user has recently used, user operation logs, social logs and other user behavior information, and may also include user preference information such as interests and hobbies. Next, extract the features of the user information and express them in vector form, i.e. Fig. 9 Then, based on the features of the extracted user information, the N candidate target categories that the user is most familiar with are predicted. The candidate target categories here are Fig. 9 The target category in the , and the candidate target category information is also represented in vector form, that is Fig. 9 The category feature representation in . Wherein, the user information of the first user is collected in the terminal device after the user provides permission.
[0136] Step 4: By calculating the source category information (i.e. Fig. 9 The source category feature representation in Fig. 9 The similarity of the category feature representation in is obtained to obtain the candidate target category information that is most similar to the source category information (i.e. Fig. 9The most similar target category in the source category is obtained and recorded as the target category information. In other words, the similarity between categories is calculated through the feature vectors of the source category (i.e., source category information) and the target category (i.e., candidate target category information), and the target category that is most similar to each source category is obtained. There are two specific implementation methods: Scheme 1: Calculate through the DNN (Deep Neural Networks) model, take the source category and each target category as the input of the DNN model, and then calculate a probability value representing the similarity of the two categories. After calculating all the probability values, sort the probability values. The target category with the largest probability value is the target category that is most similar to the source category, i.e., the target category information. Scheme 2: Calculate the distance metric of the feature vectors of the source category and the target category through the similarity calculation model. In the space represented by the feature vector, the smaller the spatial distance between the two categories, the greater the similarity. In this way, the target category with the smallest distance in the feature space of the source category is obtained, i.e., the target category that is most similar to the source category, i.e., the target category information.
[0137] Step 5: Obtain candidate target object information based on target category information. First, list the candidate entities in the target category, i.e. Fig. 9 The candidate target end entity / event feature representation in is then obtained based on the similarity between the source object information and the candidate target object information, that is, by calculating the source end entity and / or event (i.e. Fig. 9 The source entity / event feature representation in the source side) and the candidate entities and / or events in the target side (i.e. Fig. 9 The similarity between the candidate target entities / events in the source entity and / or event is calculated to obtain the target entity that is most similar to the source entity and / or event, that is, the target object information. The method for calculating the similarity between entities here is the same as the method for calculating the similarity between categories in step 4.
[0138] Step 6: Generate target conversation information based on target object information. Specifically, use the predefined sentence template to replace the source entity (i.e., source object information) with the most similar target entity (i.e., target object information) calculated in step 5, and interpret the target entity. Figure 8 The entity / event analogy in .
[0139] Specifically, the core idea of the analog translation system is to collect source object information such as key entities and / or events of the source conversation information based on the source conversation information of the first user, and classify the collected source object information such as entities and / or events through a classification model according to predefined category labels to obtain source category information. The similarity between categories is calculated by the feature vectors of the source category information and the candidate target category information, and the target category information most similar to the source category information is calculated. Then, by calculating the similarity between the source object information and the candidate target object information, the target object information most similar to the source object information is obtained. Finally, using a predefined sentence template, the source object information is replaced with the calculated target object information to generate entities and / or events that the user can understand, which plays a role in interpreting the source object information in the source conversation information, that is, generating the target conversation information based on the target object information.
[0140] Furthermore, when a user chats with more than one other user, for example, the first user D chats with more than one second user (such as user A, user B and user C, etc.), in this application scenario, the analog translation system, in step 1, identifies the source object information such as key entities and / or events in the source conversation information based on the source conversation information input by the first user and the historical conversation information between the first user and more than one second user, and obtains the source object information. At the same time, the other processing procedures of the analog translation system are the same as the above-mentioned steps 2 to 6, that is, classifying the source object information to obtain source category information; then obtaining candidate target category information based on the user information of the first user; then obtaining target category information based on the similarity between the source category information and the candidate target category information; then obtaining candidate target object information based on the target category information; then obtaining target object information based on the similarity between the source object information and the candidate target object information; finally, generating target conversation information based on the target object information.
[0141] Furthermore, when a user chats with more than one other user, and the language type, professional field, cultural background and other information fields of the conversation information of one of the users belong to different fields from those of the conversation information of other users, for example, the first user D chats with more than one second user (such as user A, user B and user C, etc.), and the language type, professional field, cultural background and other information fields of the source conversation information of the first user D belong to different fields from those of the language type, professional field, cultural background and other information fields of the conversation information of user A or user B or user C, etc., in this application scenario, the analog translation system first translates the source conversation information of the field to which the source information belongs into the conversation information of the field to which the target information belongs according to the field to which the information belongs in step one, and then obtains the source object information according to the conversation information of the field to which the target information belongs and the historical conversation information between the first user and more than one second users. At the same time, the other processing procedures of the analog translation system are the same as the above-mentioned steps 2 to 6, that is, the source object information is classified to obtain source category information; then, based on the user information of the first user, the candidate target category information is obtained; then, based on the similarity between the source category information and the candidate target category information, the target category information is obtained; then, based on the target category information, the candidate target object information is obtained; then, based on the similarity between the source object information and the candidate target object information, the target object information is obtained; finally, based on the target object information, the target session information is generated.
[0142] The analogy translation system is described in detail below through the following embodiments:
[0143] Example 6: Analogy Translation of Entities
[0144] In this embodiment, when a user wants to learn about a product in a field that he is not familiar with, it is difficult for the user to understand clearly if the information is only explained through the attributes, parameters, etc. of the product. Therefore, in the sixth embodiment of the present invention, the attributes, parameters, etc. of the product are explained by analogy to the product scene that the user is familiar with, so as to meet the needs of the user. The specific application scenario is as follows: Fig.10 , 11 shown.
[0145] exist Fig.10In the video, a user wants to buy a TV and wants to know about the market situation of TVs. Through user information collection, it is learned that the user is a housewife. If only the display resolution, screen quality, sound quality parameters, etc. are described, the housewife who is not familiar with electronic equipment will be confused and will not understand how to evaluate the quality of a TV. The analog translation system collects the user information of the housewife and compares the brand and cost-effectiveness of the TV to the kitchen products that the housewife is familiar with, so that the housewife can have a more intuitive understanding of TV products of various brands, including price, quality, features, etc. Among them, Fig.10 The housewife in the example is the first user, that is, the user of the current device. Fig.10 In the figure, italics indicate the TV product that the user wants to know about, and bold indicates the analogy explanation recommended by the analogy translation system.
[0146] Fig.11 The analogy translation system also solves a similar problem. When a user wants to buy a TV, the user is a car enthusiast. The analogy translation system compares the TV product to the car brands that the user is familiar with, so that the user can more clearly understand the price, quality, characteristics, etc. of each TV product. Fig.11 The car enthusiasts in the first user are the current device users. Fig.11 In the figure, italics indicate the TV product that the user wants to know about, and bold indicates the analogy explanation recommended by the analogy translation system.
[0147] Among them, Fig.10 and Fig.11 In the application scenario shown, the analog translation system is based on the first user (i.e. Fig.10 Housewives in Fig.11For example, the source conversation information "I want to buy a TV, but I don't know which brand to buy" is input by a car enthusiast in the user group. On the one hand, the key entities of the source end can be collected from the Internet, that is, some entity information that can answer the source conversation information. For example, if the source conversation information is which TV to buy, the key entities may include Samsung TV, Hisense TV, Xiaomi TV, etc. The entity information includes not only the entity name, but also some characteristic information such as price and parameters of the entity. On the other hand, the key entities can be collected from the questions and answers of users in the open community. On the other hand, their prices, parameters and other information can be collected from the official websites of these key entities. Then, the collected entities are classified according to the predefined category labels through the classification model and represented by feature vectors. Then, the N target categories that the user is most familiar with are predicted, and the features of the target categories are also represented in vector form. Then, the similarity between the categories is calculated through the feature vectors of the source category and the target category, and the target category that is most similar to each source category is calculated. Finally, the candidate entities in the target category are listed, and the target entity that is most similar to the source entity is obtained by calculating the similarity between the source entity and the candidate entity in the target.
[0148] It should be noted that Fig.10 and Fig.11 In the embodiment shown, the execution process of the analog translation system is similar to that of Fig. 9 The overall operation process of the analog translation system is the same and will not be repeated here.
[0149] Example 7: Analogy translation system for events
[0150] When users are faced with chat content in unfamiliar fields, they often feel confused. At this time, the analogy translation system can be used to explain the chat content by analogizing it to the fields that the users are familiar with, thereby helping users to understand the chat content more easily. Fig.12 The scene shown.
[0151] exist Fig.12 In the example, user A, user B and user C are communicating about the GPU (Graphics Processing Unit) of a computer device. For user D who does not know about the device, it is difficult to understand their chat content. At this time, the analog translation system can use entities familiar to user D to explain the chat content between user A, user B and user C based on the chat content and user D's user information, and help user D participate in the mutual communication. Among them, the above-mentioned user D is the first user, that is, the user of the current device user end, and user A, user B and user C are the second users, that is, the other party users, that is, the users who have a conversation with the current device user end.
[0152] In this case, the analogical translation process of events can be summarized as the following steps:
[0153] Step 1: The analogy translation system collects chat content through the chat platform, extracts key events in the chat content, and constructs source event descriptions related to the chat content.
[0154] Step 2: Obtain user information, including personal profile (ie, user attribute information), user behavior information such as social logs and operation logs, and user device information of the device used by the user, and construct a corresponding target-side event description.
[0155] Step 3: By calculating the similarity between the source-end event description and the target-end event description, the target-end event that is familiar to the user and can reflect the chat content is obtained.
[0156] Step 4: Based on the pre-defined sentence pattern, use the target-side events to interpret the source-side events to help users understand the chat content.
[0157] Embodiment 8: Enhanced analogy translation system
[0158] The application scenario of this embodiment comprehensively considers entities and events, and analogizes source-side entities and events to target-side entities and events that users are familiar with. The enhanced analogy translation system comprehensively utilizes the analogy information of entities and events to provide a more comprehensive explanation of the entities and events that users want to know, such as Fig.13 The application scenario shown.
[0159] exist Fig.13 In the enhanced analogy translation system, not only the logical content of the chat is collected, but also the entity content in the chat content. By analogy with the event logic and entity content in the user's familiar field, a reasonable analogy combination is found to explain the chat content. Among them, the entity content refers to the entity described by the user (such as NVIDIA, GPU, etc.), and the logical content refers to the logical thinking in the user's chat content (such as xx launched the latest xx, which is the upgraded version of xxx and xxx, etc.).
[0160] Among them, the execution process of this embodiment is similar to that of embodiment seven, except that: this embodiment adds the collection of entity information in step one and step two, and comprehensively considers the similarity of entity content and the similarity of event logic in step three, so as to select a suitable entity event combination to perform an analogical interpretation on the current chat content.
[0161] C. Cross-language and cross-domain translation system
[0162] Because different users are familiar with different languages and professional fields, the existing natural language generation technology does not really take into account the communication barriers caused by the different fields of expertise of different users when generating sentences. The cross-language and cross-field translation system proposed in the embodiment of the present invention uses the conversion models from general fields to special fields and from special fields to general fields respectively for the expression forms of different professional fields to help users in different fields communicate.
[0163] The cross-language and cross-domain translation system of the embodiment of the present invention adopts the basic idea that: according to the field to which the information belongs, the source session information of the field to which the source information belongs input by the first user is translated into the target session information of the field to which the target information belongs. That is, the source session information input by the source end is received, and the field to which the professional field, the language type used, and other information belongs is obtained or detected, and then the corresponding field translation model is loaded to translate the source session information, and the translation result is presented to the target user, that is, the target session information of the field to which the target information belongs is translated. It can also be described as: the cross-language and cross-domain translation system automatically detects the field to which the professional field, the language type, and other information belongs according to the multimodal information input by the source end user (that is, the source session information input by the first user), and combines some special expressions of the professional field to translate the input source session information accordingly, so as to achieve the purpose of translating from the special expression form of some professional fields to the general expression form; at the same time, the information of the general expression form input by the source end user can also be used as the source session information, and the source session information of the general expression form can be translated into the information of the special expression form under the specified target field by specifying the target field. In other words, the cross-language and cross-domain translation system translates the source conversation information into different languages and professional fields in order based on the corresponding pre-trained translation model according to the field to which the information belongs, and obtains the target conversation information. The complete process of the cross-language and cross-domain translation system is as follows: Fig.14 shown.
[0164] Specifically, the core idea of the cross-language and cross-domain translation system of the embodiment of the present invention is to detect the professional field to which the multimodal information is input from the source, and to translate the input information accordingly through a domain translation model in combination with some special expressions of the professional field.
[0165] The multimodal information includes but is not limited to at least one of the following: user text input, user voice input, user image input, etc. The fields to which the information belongs include but are not limited to at least one of the following: politics, military, programming, gaming, physics, chemistry, mathematics, animation, architecture, music, etc.
[0166] The following are some examples of cross-language and cross-domain translation systems:
[0167] Example 9: From special professional field expression to general expression
[0168] like Fig.15 As shown, the source conversation information input by the first user at the source end is an expression in a special professional field (such as the game field), but the first user wants to express it in a general way at the output end. In this case, the cross-language and cross-domain translation system processes it as follows:
[0169] Step 1: receiving source session information input by the first user at the source end, and detecting the field to which the source session information belongs, such as a professional field, a language type, etc., wherein the source session information input by the first user at the source end is the source end input information described below, and the first user is the source end user described below.
[0170] Specifically, there are many ways for the first user to input source conversation information at the source end, including but not limited to: text, voice, and picture. When the first user clicks the text box, he can directly input text information; when clicking the camera button in the upper left corner, he can select the corresponding picture from the album of the terminal device, or directly use the terminal device to take a picture. The cross-language and cross-domain translation system will obtain the text information in the picture through optical character recognition technology and display it in the text box; when clicking the voice button in the upper right corner, he can select the corresponding voice clip from the recording of the terminal device, or directly use the terminal device to input voice. The cross-language and cross-domain translation system will translate the voice input into corresponding text information through voice recognition technology and display it in the text box.
[0171] Furthermore, the cross-language and cross-domain translation system will first classify different input texts through the text domain classifier, find out the special professional field to which the input text is most likely to belong, and display feedback to the source end user in real time. Fig.15 The "Field" option refers to the special professional field that the input text information may belong to. At the same time, the source-end user is provided with the function of manually selecting the professional field to which the input information belongs, in order to correct a small number of field discrimination errors that occur in the cross-language and cross-field translation system. That is, when the source-end user believes that the cross-language and cross-field translation system makes an inaccurate judgment, he or she can click the "Reselect" button next to "Field". At this time, a field list will pop up, and the source-end user can reselect the professional field of the input text based on his or her subjective judgment. At the same time, the cross-language and cross-field translation system can also detect the language type of the source input information and provide feedback to the source-end user through real-time display. Similar to the field information, the language type can also be reselected by the source-end user.
[0172] Furthermore, the text domain classifier is a pre-trained classifier model, and the classifier model includes but is not limited to: logistic regression model, support vector machine (SVM) model, neural network model, etc. The generation process of the text domain classifier is as follows: the vector converted from the text is used as input, the professional field to which the text belongs is used as output, and the offline model of the text domain classifier of different languages is obtained by continuously correcting the output errors and adjusting the classifier parameters.
[0173] Among them, Fig.15 In the example, the source user input is "Want to play games tonight? I'll take you to play PUBG!" This input can be the source input information obtained by the source user scanning the text on the picture, or the source input information obtained by the user using voice input, or the source input information obtained through other possible input methods; the cross-language and cross-domain translation system will first detect that the language type of the source input information is "Chinese", and then detect that the professional field of the source input information is "game field" through the text field classifier of "Chinese", and display the detected language type, professional field and other information on the terminal device in real time. Fig.15 "Source language" and "Domain" in the text file.
[0174] Step 2: Translate the source input information according to the field to which the information belongs
[0175] The cross-language and cross-domain translation system loads the corresponding domain translation model to translate the source input information according to the professional field information, language type and other information of the source input information.
[0176] Specifically, the domain translation model is a trained sequence to sequence translation model. The method of constructing the domain translation model is: take the corresponding sentences or phrases as input and output in units of words or characters. Since most of the sentences in special professional fields are composed of ordinary words or characters, in order to retain their professional domain information, it is necessary to take the domain label as input or output label at the same time and train them together in the form of word vectors. By continuously correcting the output errors, the model parameters are adjusted until the final convergence. When the expression method of the special professional field is used as the input of the training model and the information expression method of the general field is used as the output of the training model, the domain translation model is a "special->general" domain translation model; when the information expression method of the general field is used as the input of the training model and the information expression method of the special professional field is used as the output of the training model, the domain translation model is a "general->special" domain translation model.
[0177] Furthermore, given the domain translation model trained by the above method, input information with special expressions in special professional fields, such as Fig.15"Want to play games tonight? Let me help you win PUBG!" in the video will be translated into text information in the form of general domain expressions in the same language as the source input information, for example Fig.15 In the sentence “Will you play games together at night? I’ll help you win?”, that is, according to the input information of the special professional field at the source end “Will you play games together at night? I’ll help you win!”, the domain translation model of “Game domain expression -> General domain expression” of “Chinese” is loaded, and the input information at the source end “Will you play games together at night? I’ll help you win!” is translated into “Will you play games together at night? I’ll help you win!”.
[0178] Furthermore, in terms of language type, the cross-language and cross-domain translation system will load the corresponding basic language translation model to translate general text information in the same language as the source input information, such as "Let's play games together tonight? I'll help you win!", into target conversation information in the target language. Fig.15 In the example above, when the target language is set to English, the cross-language and cross-domain translation system will load the basic language translation model of "Chinese->English" and translate "Do you want to play games together at night? Take you to win" into "Do you play games together at night? Take you to win!".
[0179] The language type of the “source language” and the language type of the “target language” may be the same or different, and the language types include but are not limited to the following examples: Chinese, English, Korean, Japanese, etc.
[0180] Furthermore, the basic language translation model is also a sequence to sequence translation model. The method of constructing the basic language translation model is: taking one language type as the input of the training model, and using the result of translating this language type into other languages as the output of the training model, and by continuously adjusting the model parameters, the purpose of mutual translation between different languages can be achieved.
[0181] It should be noted that the above-mentioned languages include but are not limited to: Chinese, English, Korean, Japanese, etc.; the above-mentioned fields include but are not limited to: politics, military, programming, games, physics, chemistry, mathematics, animation, architecture, music, etc. In addition, in terms of multiple fields, since the default selection of "target field" is "none", the cross-language and cross-field translation system will skip this option, so the final translation result is "Do you play games together at night? Take you to win!".
[0182] Step 3: Results presentation
[0183] Finally, the cross-language and cross-domain translation system presents the final translation results to the target user in the form of text through the terminal device, such as Fig.15 As shown, the final translation result presented by the terminal device is “Do you play games together at night? Take you to win!”.
[0184] Furthermore, when the "auto read aloud" button is activated, the terminal device can also convert the text into voice and play it to the user.
[0185] Furthermore, according to the description of steps 1 to 3 above, it can be seen that the processing of the cross-language and cross-domain translation system can be summarized as follows: according to the domain to which the information belongs, based on the corresponding pre-trained translation model, the source conversation information is translated into professional fields and languages in order to obtain the target conversation information.
[0186] It should be noted that in the ninth embodiment, the source user (ie, the first user) is the current device user, and the target user (ie, the second user) is the other user, that is, the user having a conversation with the current device user.
[0187] Example 10: From general expression to special professional field expression
[0188] like Fig.16 As shown, the source conversation information input by the first user at the source end is in a general expression form, that is, there is no special professional field, but the output end wants to express it in a special professional field. At this time, the cross-language and cross-field translation system processes it as follows:
[0189] Step 1: receiving source session information input by the first user at the source end, and detecting the field to which the source session information belongs, such as a professional field, a language type, etc., wherein the source session information input by the first user at the source end is the source end input information described below, and the first user is the source end user described below.
[0190] Specifically, the source end inputs information and detects information in the same manner as in the ninth embodiment above, and will not be described in detail here. Fig.16, the source input information is "Let's play games together at night!", this source input information can be the information obtained by the source user scanning the text on the picture, or it can be the information obtained by the source user using voice input, or it can be the information obtained by other feasible input methods. The cross-language and cross-domain translation system will first detect that the language type of the source input information is "English", then load the text field classifier of "English", and detect that the expression method of the source input information has no special professional field background, so the "belonging field" at this time is "none". Similarly, the above detected information will also be displayed in real time on the terminal device, similar to the above embodiment nine.
[0191] The method for constructing the text domain classifier is the same as the description of step 1 in Example 9.
[0192] Step 2: Translate the source input information according to the field to which the information belongs
[0193] exist Fig.16 In the example, since the "Domain" option of the source input information is "None", the cross-language and cross-domain translation system does not process the source input information in this option, that is, the translation result at this time is the same as the source input information, which is still "Let's play games together at night!".
[0194] Specifically, in terms of language type, since the language type of the input information on the source end is "English" and the language type on the target end is "Chinese", that is, the "target language" is selected as "Chinese", at this time, the cross-language and cross-domain translation system will load the "English->Chinese" basic language translation model and translate the current translation result "Let's play games together at night!" into Chinese "Let's play games together at night!", that is, in this step, "Let's play games together at night!" is further translated into "Let's play games together at night!".
[0195] The language type of the “source language” and the language type of the “target language” may be the same or different, and the language types include but are not limited to the following examples: Chinese, English, Korean, Japanese, etc.
[0196] In addition, the method for constructing the basic language translation model is the same as the description of step 2 in the above-mentioned ninth embodiment.
[0197] Furthermore, in terms of multiple fields, when the "target field" is selected as the "game field", the cross-language and cross-field translation system will select the domain translation model of "general expression -> game field expression" for "Chinese", and based on the Chinese translation result "Let's play games together at night!", the translation result will be translated into the corresponding professional field translation, that is, the translation result "Let's play games together at night!" will be translated into the Chinese expression "Let's play games together at night!" under the "game field", that is, in this step, "Let's play games together at night!" is further translated into the expression in the professional field of games "Let's play games together at night!".
[0198] The method for constructing the domain translation model is the same as the description of step 2 in the ninth embodiment above.
[0199] Step 3: Results presentation
[0200] Finally, the cross-language and cross-domain translation system presents the final translation results to the target user in the form of text through the terminal device, such as Fig.16 As shown, the final translation result presented by the terminal device is "Let's go play games tonight!".
[0201] Furthermore, when the "auto read aloud" button is activated, the terminal device can also convert the text into voice and play it to the user.
[0202] It should be noted that in the tenth embodiment, the source user (ie, the first user) is the current device user, and the target user (ie, the second user) is the other user, that is, the user having a conversation with the current device user.
[0203] D. Cross-language and cross-cultural translation system
[0204] The existing natural language generation technology does not take into account the differences in cultural backgrounds of different users. The cross-language and cross-cultural background translation system provided by the present invention can help target users understand sentences with cultural backgrounds.
[0205] The cross-language and cross-cultural background translation system of the embodiment of the present invention adopts the basic idea of translating the source conversation information of the field to which the source information input by the first user belongs into the target conversation information of the field to which the target information belongs, according to the field to which the information belongs. That is, the source conversation information input by the source end is received, and the field to which the information belongs, such as the cultural background to which it belongs and the type of language used, is obtained or detected, and then the corresponding cultural background translation model is loaded to translate the source conversation information, and the translation result is presented to the target user, that is, the target conversation information of the field to which the target information belongs. Among them, the core idea of the cross-language and cross-cultural background translation system is to automatically detect the cultural background to which the source conversation information belongs, and to translate the source conversation information accordingly in combination with certain special expressions under the cultural background, so as to achieve the purpose of translating special expressions of certain cultural backgrounds into general expressions.
[0206] Specifically, the cross-language and cross-cultural background translation system automatically detects the cultural background, language type and other fields of information input by the source end user (i.e., the source conversation information input by the first user) based on the multimodal information input by the source end user, and translates the input source conversation information accordingly in combination with certain special expressions of the cultural background, so as to achieve the purpose of translating from special expressions in certain cultural background fields to general expressions. In other words, the cross-language and cross-cultural background translation system translates the source conversation information in terms of language type and cultural background in a sequential order based on the field to which the information belongs and the corresponding pre-trained translation model to obtain the target conversation information.
[0207] The multimodal information includes but is not limited to at least one of the following: user text input, voice input, image input, etc. The cultural background includes but is not limited to at least one of the following: local cultures of various regions in China, local cultures of various regions in South Korea, local cultures of various regions in the United States, local cultures of various regions in Japan, etc.
[0208] In addition, the complete process of the cross-language and cross-cultural background translation system is as follows Fig.17 As shown in the figure, the cultural translation system is an offline pre-trained cultural translation model. After the cultural translation model is trained, it can be used directly online. Fig.17 The upper part of the figure represents the online process, and the lower part represents the offline training process of the cultural translation system.
[0209] The following examples will introduce the cross-language and cross-cultural background translation system in detail:
[0210] Example 11: From special cultural background domain expression to general expression
[0211] like Fig.18As shown, the source conversation information input by the first user at the source end is an expression of a special cultural background (such as American slang), but the output end wants to express it in a general way. At this time, the cross-language and cross-cultural background domain translation system processes it as follows:
[0212] Step 1: Receive source session information input by the first user at the source end, and detect the field to which the source session information belongs, such as cultural background, language type, etc., wherein the source session information input by the first user at the source end is the source end input information described below, and the first user is the source end user described below.
[0213] There are many ways to input information at the source end, including but not limited to: text, voice, and pictures. When the source end user clicks the text box, the text information can be directly input; when the source end user clicks the camera button in the upper left corner, the corresponding picture can be selected from the album of the terminal device, or the terminal device can be used to take a photo directly. The cross-language and cross-cultural background translation system will obtain the text information in the picture through optical character recognition technology and display it in the text box; when the source end user clicks the voice button in the upper right corner, the corresponding voice clip can be selected from the recording of the terminal device, or the terminal device can be used to input voice directly. The cross-language and cross-cultural background translation system will use voice recognition technology to translate the voice input into corresponding text information and display it in the text box.
[0214] The cross-language and cross-cultural background translation system detects the source input information, loads the cultural background classifier of the corresponding language, classifies the cultural background of the source input information, and provides feedback to the source end user through real-time display. Fig.18 The "Cultural Background" option in the text box is the possible cultural background of the source input information. At the same time, the source user is provided with the function of manually selecting the cultural background of the input information to correct a small number of cultural background judgment errors that occur in the cross-language and cross-cultural background translation system. That is, if the source user believes that the cross-language and cross-cultural background translation system has made an inaccurate judgment, he or she can click the "Reselect" button next to "Cultural Background". At this time, a cultural background list will pop up, and the source user can reselect the cultural background of the input text based on his or her subjective judgment. The cross-language and cross-cultural background translation system can also detect the language type of the source input information and provide feedback to the source user through real-time display. Similar to the cultural background information, the language type can also be reselected by the source user.
[0215] The cultural background classifier is a pre-trained cultural background classifier model, which includes but is not limited to: logistic regression model, support vector machine (SVM) model, neural network model, etc. The generation process of the cultural background classifier is as follows: the vector converted from text information is used as input, the field to which the text belongs is used as output, and the offline models of cultural background classifiers of different languages are obtained by continuously correcting output errors and adjusting classifier parameters.
[0216] exist Fig.18 In the example above, when the source user inputs "In electronic industry, Samsung can be considered the 800pound gorilla.", the cross-language and cross-cultural background translation system first detects that the language of the source input information is English, then loads the cultural background classifier of "English", and detects that the cultural background of this expression is American slang culture, so it sets the "source language" to "English" and the "cultural background" to "American slang". At this time, the source user can also manually select the types of "source language" and "cultural background". It should be noted here that the "source language" option and the "cultural background" option have a certain correlation, that is, when the "cultural background" is "American slang", the source language cannot have options such as "Chinese" and "Korean" that have nothing to do with "American slang".
[0217] Step 2: Translate the source input information according to the field to which the information belongs
[0218] The cross-language and cross-cultural background translation system loads the corresponding cultural translation model according to the cultural background information and translates the source input information.
[0219] Among them, the cultural translation model is a trained sequence to sequence translation model. The method of constructing the cultural translation model is: take the corresponding sentences or phrases as input and output in units of words or characters. Since most of the sentences in the special cultural background expression form are composed of ordinary words or characters, in order to retain their domain information, it is necessary to take the cultural background label as input or output label at the same time and train them together in the form of word vectors. By continuously correcting the output errors, the model parameters are adjusted until the final convergence. Among them, when the information of the special cultural background expression form is used as the input of the training model and the information of the general expression form is used as the output of the training model, the cultural translation model is a "special cultural background->general" cultural translation model; when the information of the general expression form is used as the input of the training model and the information of the special cultural background expression form is used as the output of the training model, the cultural translation model is a "general->special cultural background" cultural translation model.
[0220] Specifically, given the cultural translation model trained by the above method, the input information in the form of expression with a special cultural background, such as Fig.18 The sentence “In electronic industry, Samsung can be considered the 800pound gorilla.” will be translated into a general text message in the same language as the source input message, for example Fig.18 The translation system first loads the cultural translation system of "American slang-general" and translates the source user's input "In electronic industry, Samsung can be considered the 800pound gorilla." into "In electronic industry, Samsung has quite powerful strength.".
[0221] Further, in Fig.18 In terms of language type, the cross-language and cross-cultural background translation system will load the corresponding basic language translation model and further translate the above translation result "In electronic industry, Samsung has quite powerful strength." into the target language type. Since the "target language" is selected as "Chinese", the cross-language and cross-cultural background translation system will load the basic language translation model of "English->Chinese" and translate "In electronic industry, Samsung has quite powerful strength." into "In the electronic industry, Samsung has very powerful strength.", which is the target conversation information.
[0222] Among them, the basic language translation model is also a sequence to sequence translation model. The method of constructing the basic language translation model is: using the information of one language as the input of the training model, using the result of translating the information of the language in other languages as the output of the training model, and continuously adjusting the model parameters to achieve the purpose of mutual translation between different languages. In addition, the above-mentioned languages include but are not limited to: Chinese, English, Korean, Japanese, etc.
[0223] Step 3: Results presentation
[0224] Finally, the cross-language and cross-cultural background translation system presents the final translation results to the target user in the form of text through the terminal device, such as Fig.18 As shown, the final translation result presented by the terminal device is "In the electronics industry, Samsung has very strong strength.".
[0225] Furthermore, when the "auto read aloud" button is activated, the terminal device can also convert the text into voice and play it to the user.
[0226] It should be noted that in the eleventh embodiment, the source user (ie, the first user) is the current device user, and the target user (ie, the second user) is the other user, that is, the user having a conversation with the current device user.
[0227] Example 12: Converting the expression form in a special cultural background field to a general expression form (outputting pictures and characters)
[0228] When the cross-language and cross-cultural background translation system detects that the translation result (i.e., the target conversation information) can be more intuitively displayed using images, the cross-language and cross-cultural background translation system will not only output the text translation result (i.e., the target conversation information) on the target end, but will also output an image that can vividly describe the target conversation information, so that the user can more intuitively understand the output target conversation information. At this time, the cross-language and cross-cultural background translation system operates as follows:
[0229] Step 1: receiving source session information input by the first user at the source end, and detecting the field to which the source session information belongs, such as cultural background, language type, etc. This step is the same as step 1 in embodiment 11 and will not be described in detail here.
[0230] Step 2: Translate the source input information according to the field to which the information belongs
[0231] The cross-language and cross-cultural background translation system loads the corresponding cultural translation model to translate the source input information according to the cultural background information of the source input information. First, the input information with a special expression form with a special cultural background input from the source is translated into text information with a general expression form and the same language as the source input information. Then, the corresponding basic language translation model is loaded to further translate the above translation results into conversation information of the target language.
[0232] The method for constructing the cultural translation model is the same as the description of step 2 in the eleventh embodiment, and will not be repeated here.
[0233] exist Fig.19In the cross-language and cross-cultural background translation system, the "American slang-general" cultural translation system is first loaded to translate the user's input "Hi, Zhang, Give me five!" into "Hi, Zhang, Clap your hands!". Then, since the "target language" is "Chinese" and the "source language" is "English", the cross-language and cross-cultural background translation model will load the "English->Chinese" basic language translation model and further translate the translation result "Hi, Zhang, Clap your hands!" into "Hi, classmate Zhang, give me five!".
[0234] The method for constructing the basic language translation model is the same as the description of step 2 in Example 11, and will not be repeated here.
[0235] Step 3: Results presentation
[0236] Finally, the cross-language and cross-cultural background translation system presents the final translation results to the user in the form of text through the terminal device, such as Fig.19 As shown, the final translation result presented by the terminal device is the target conversation information "Hi, Zhang, let's give each other a high five!"
[0237] Furthermore, when the "auto read aloud" button is activated, the terminal device can also convert the text into voice and play it to the user.
[0238] Furthermore, when the target conversation information can be intuitively expressed through pictures, the cross-language and cross-cultural background translation system will query the picture database based on the target conversation information, calculate the semantic similarity between the target conversation information and the candidate pictures, find the picture that can most accurately express the meaning of the target conversation information, and display it on the terminal device. The semantics of the candidate pictures (i.e., picture description information) can be displayed on the pictures or generated based on the pictures.
[0239] It should be noted that the aforementioned automatic sentence generation system based on keyword-based natural language expression, analogy translation system, cross-language and cross-domain translation system, etc. can also query the image database according to the target conversation information, and find the image that can most accurately express the meaning of the target conversation information by calculating the semantic similarity between the target conversation information and the candidate images, and display it on the terminal device.
[0240] In addition, the above-mentioned keyword-based natural language expression form automatic sentence generation system, analogy translation system, cross-language and cross-domain translation system, and cross-language and cross-cultural background translation system, etc., can also query the image database according to the source conversation information, and find the image that can most accurately express the meaning of the source conversation information by calculating the semantic similarity between the source conversation information and the candidate images, and supplement it on the terminal device.
[0241] Similarly, the above-mentioned keyword-based natural language expression form automatic sentence generation system, analogy translation system, cross-language and cross-domain translation system, and cross-language and cross-cultural background translation system, etc., can also query the image database according to the source conversation information and the target conversation information, and find the image that can most accurately express the meaning of the source conversation information and the target conversation information by calculating the semantic similarity between the source conversation information and the target conversation information and the candidate images respectively, and supplement the display on the terminal device.
[0242] The image database includes, but is not limited to, an image library in a user's terminal device, an image library stored in a user's network cloud, an image library searchable on a network search engine, etc.
[0243] E. Image Recommendation System
[0244] In order to enable users to better communicate through multimodal information, an embodiment of the present invention provides a picture recommendation system. The complete flow chart of the picture recommendation system is as follows: Fig. 20 shown.
[0245] The picture recommendation system selects pictures based on the picture selection information (e.g. Fig.21 The smiley face next to the "Send" button in the picture recommendation system is the "Picture" button. When the user clicks the button, it indicates that the picture recommendation system is activated) and the historical conversation information between the first user and the second user, predicting the conversation content and / or conversation emotion that the first user wants to express, and obtaining the target picture from the candidate pictures according to the semantic similarity between the conversation speculation information and the candidate pictures, and using the target picture as the target conversation information, that is, predicting the emotion of the first user according to the text information, picture information and previous historical conversation information input by the first user, so as to recommend a suitable expression or picture. Among them, the semantics of the candidate picture (that is, the picture description information) can be displayed on the picture or generated according to the picture. The first user (that is, the source end user) is the user of the current device user, and the second user is the other user, that is, the user who is having a conversation with the user of the current device user.
[0246] In addition, in order to recommend more appropriate expressions or pictures, the picture recommendation system can also obtain the user information of the first user, such as the user's age, gender, preferences, occupation, etc., and further combine the obtained user information of the first user to predict the conversation content and / or conversation emotions that the first user wants to express, that is, the picture recommendation system predicts the conversation content and / or conversation emotions that the first user wants to express based on the picture selection information input by the first user, the historical conversation information between the first user and the second user, and the user information of the first user, and then obtains the target picture from the candidate pictures according to the semantic similarity between the conversation speculation information and the candidate pictures, and uses the target picture as the target conversation information. Among them, the semantics of the candidate picture (i.e., the picture description) can be displayed on the picture or generated based on the picture.
[0247] Specifically, during the implementation process, the picture recommendation system calls a pre-trained conversation understanding model to infer the content and emotional tendency that the second user may want to express based on the source conversation information and historical conversation information input by the first user, or based on the source conversation information, historical conversation information and user information of the first user input by the first user, and then calls the picture database and loads the picture recommendation model to recommend pictures to the first user.
[0248] Among them, the source user mentioned below is the first user mentioned above, and the target user is the second user mentioned above. The above-mentioned picture recommendation system can understand the meaning of the conversation based on the source conversation information, historical conversation information, user information of the source user, etc., without the target user inputting keywords and other information, and can infer the pictures that the target user may need to express his emotions from the picture database, and push the pictures to the target user, so as to reduce the time for the target user to search for pictures when the target user's picture library is relatively large. Since the picture recommendation system relies on user information, the user needs to open the permission for the picture recommendation system to obtain part of the user's information.
[0249] The image database includes, but is not limited to, image libraries in user terminal devices, image libraries in user network cloud storage, image libraries searchable on network search engines, etc.
[0250] The following is a detailed description of the picture recommendation system through the following embodiments:
[0251] Example 13: Image Recommendation System
[0252] like Fig.21 As shown in FIG. 1 , part of the operation process of the picture recommendation system on the user terminal device is shown, in which the user who inputs the source session information "Ah dear, let me tell you a joke~..." is the source user, and the other user is the target user. The operation steps of the picture recommendation system are as follows:
[0253] Step 1: Understand the user conversation and infer the message the target user wants to send
[0254] When the target user needs to send a picture to express his or her emotions, he or she will click the smiley face next to the "Send" button, that is, the "Picture" button, which is the picture selection information, and the picture recommendation system will be activated. The picture recommendation system first calls the dialogue understanding model to fully understand the user dialogue based on the user dialogue information and user information, and infer the content and emotional tendency that the source user may want to express. The user dialogue information includes the source session information input by the source user and the historical session information between the source user and the target user. The user information refers to the user information of the source user.
[0255] Among them, the dialogue understanding model is a pre-trained sequence-to-sequence model. The method of constructing the dialogue understanding model is: take the dialogue as input and output in units of words or characters, and continuously correct the output errors (words or characters are represented in the form of vectors at the input and output ends, and the output error is the error between the calculated network output vector and the original result vector), and adjust the model parameters (weights between nodes in the network, error adjustment rate, etc.) until the final convergence (convergence is a mathematical definition, which means that the model parameters reach the local optimum). Assume that a(i) is the i-th sentence of the conversation between source user A and b(i) is the i-th sentence of the conversation between target user B. Assume that source user A starts speaking first. Then the input and output of the first parameter update are a(1) and b(1), and the input and output of the second parameter update are b(1) and a(2). Similarly, the input and output of the i*2-1th parameter update are a(i) and b(i), and the input and output of the i*2th parameter update are b(i) and a(i+1). This process ends when the next conversation parameter is iterated. Repeat the iteration of all conversation training sets until the parameters converge (all parameters in the network reach a local optimum). This conversation understanding model is a new model that adds features such as user emotions to the existing model.
[0256] exist Fig.21 In the example, the image recommendation system uses the pre-trained dialogue understanding system to infer that the source user may express conversation content and / or conversation emotions such as "happy" and "laughing".
[0257] Step 2: Recommend pictures
[0258] After the image recommendation system infers the source user's conversational emotions, it will call the image database and load the image recommendation model to recommend images that match the source user's conversational emotions to the source user.
[0259] Specifically, the image database stores images that have been converted into images containing text descriptions. This conversion is based on an image translation model. The image translation model is a trained encoder-decoder model. The method for constructing the image translation model is to take the image pixel matrix as input and the image description as output, and adjust the model parameters by continuously correcting output errors until convergence, so as to achieve the purpose of image-to-text conversion.
[0260] Furthermore, the input of the image recommendation model is the text description. By loading the word embedding (Word2Vec) model, the text description is converted into a vector, and the similarity is calculated with the text description of the image in the database. The frequency of user use of the image is used as a weight reference, the images are sorted by similarity and the top K images with the greatest similarity are marked as output.
[0261] The language types of the above source input information include but are not limited to: Chinese, English, Korean, Japanese, etc.
[0262] In addition, Fig. 20 In the example, the picture recommendation system calls the picture recommendation model and takes the emotional content such as "happy" and "laughing" as input. Since the number of recommendations set by the user is 4, the picture recommendation model will select the four pictures with the highest similarity representing "happy" and "laughing" as the recommended pictures, that is, as the target session information.
[0263] Step 3: Results presentation
[0264] Finally, the image recommendation system arranges the final recommended image results and presents them to the target user through the terminal device, such as Fig.21 As shown, the terminal device finally presents four pictures representing "happy" and "laughing". When the user clicks on a picture, the corresponding picture will be sent out as the user's answer.
[0265] Furthermore, when the user believes that the recommendation of the image recommendation system is inaccurate, he or she can also click the "Search" button in the lower right corner to manually search for the image he or she wants.
[0266] It can be seen from the description of the above-mentioned embodiments 1 to 13 that the method for processing session information provided by the implementation of the present invention, when generating target session information, not only relies on the source session information input by the first user, but also fully considers the acquired auxiliary information, so that the second user can understand the generated natural language sentence, enhance the practicality of language generation, build a bridge of communication between people who are inconvenient to communicate normally, convert unreadable words into natural language that is easy to understand, thereby breaking the understanding barrier of users in the communication process.
[0267] In addition, the above-mentioned analogy translation system can convert key entities or events that are difficult for users to understand into understandings that users can understand, thereby enhancing users' understanding of generated content; the above-mentioned cross-language and cross-domain translation system can meet users' understanding of special expressions in unfamiliar professional fields; the above-mentioned cross-language and cross-cultural background translation system can help users understand special expressions with different cultural backgrounds; the above-mentioned picture recommendation system facilitates users to better use multimodal information for communication.
[0268] According to another aspect, an embodiment of the present invention further provides a device for processing session information, including: an information acquisition module 201 and a session generation module 211; wherein: the information acquisition module 201 is used to acquire auxiliary information and source session information input by a first user; the session generation module 211 is used to generate target session information based on the auxiliary information and the source session information and output the target session information.
[0269] Specifically, the auxiliary information includes at least one of historical session information, user information of the first user, user information of the second user, and a field to which the information belongs, wherein the field to which the information belongs includes a field to which the source information belongs and a field to which the target information belongs.
[0270] Furthermore, the user information includes at least one of the following:
[0271] User attribute information;
[0272] User preference information;
[0273] User schedule information;
[0274] User location information;
[0275] User behavior information;
[0276] User device information.
[0277] Furthermore, the field to which the information belongs includes at least one of the following:
[0278] Language information;
[0279] Information on professional fields;
[0280] Cultural background information.
[0281] Furthermore, the domain to which the source information belongs is obtained by detecting the source session information or can be set, and the domain to which the target information belongs is obtained by detecting the historical session information or can be set.
[0282] Furthermore, the source conversation information includes at least one of the following: abbreviations, incomplete words, natural language sentences, and picture selection information.
[0283] Furthermore, the session generation module 211 is specifically used for at least one of the following:
[0284] Extracting session information keywords from source session information and historical session information between the first user and the second user, and generating target session information according to the session information keywords;
[0285] Extracting session information keywords from source session information and historical session information between the first user and the second user, and user information keywords from user information of the first user and / or the second user, and generating target session information according to the session information keywords and the user information keywords;
[0286] According to the domain to which the information belongs, source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, session information keywords of the domain to which the target information belongs and historical session information between the first user and the second user are extracted, and target session information is generated according to the session information keywords;
[0287] According to the field to which the information belongs, source session information in the field to which the source information belongs is translated into session information in the field to which the target information belongs, session information keywords of the session information in the field to which the target information belongs and the historical session information between the first user and the second user, as well as user information keywords of the user information of the first user and / or the second user are extracted, and target session information is generated based on the session information keywords and the user information keywords.
[0288] Furthermore, the conversation generation module 211 is specifically used to generate target conversation information based on the conversation information keywords and the pre-trained sentence generation model;
[0289] Generating target conversation information according to conversation information keywords and user information keywords includes: generating target conversation information based on a pre-trained sentence generation model according to the conversation information keywords and user information keywords.
[0290] Furthermore, the session generation module 211 is specifically used for at least one of the following:
[0291] According to the source session information, source object information is obtained, and the source object information is classified to obtain source category information; according to the user information of the first user, candidate target category information is obtained; according to the similarity between the source category information and the candidate target category information, target category information is obtained; according to the target category information, candidate target object information is obtained; according to the similarity between the source object information and the candidate target object information, target object information is obtained; according to the target object information, target session information is generated;
[0292] According to the source session information and the historical session information between the first user and one or more second users, the source object information is obtained; the source object information is classified to obtain source category information; according to the user information of the first user, the candidate target category information is obtained; according to the similarity between the source category information and the candidate target category information, the target category information is obtained; according to the target category information, the candidate target object information is obtained; according to the similarity between the source object information and the candidate target object information, the target object information is obtained; according to the target object information, the target session information is generated;
[0293] According to the domain to which the information belongs, source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, and source object information is obtained according to the session information in the domain to which the target information belongs and the historical session information between the first user and one or more second users; the source object information is classified to obtain source category information; candidate target category information is obtained according to the user information of the first user; target category information is obtained according to the similarity between the source category information and the candidate target category information; candidate target object information is obtained according to the target category information; target object information is obtained according to the similarity between the source object information and the candidate target object information; target session information is generated according to the target object information;
[0294] Objects include entities and / or events.
[0295] Furthermore, the session generating module 211 is specifically configured to translate source session information in the field to which the source information belongs into target session information in the field to which the target information belongs, according to the field to which the information belongs.
[0296] Furthermore, the conversation generation module 211 is specifically used to translate the source conversation information in at least one of the language type, professional field and cultural background in sequence according to the field to which the information belongs and based on the corresponding pre-trained translation model to obtain the target conversation information.
[0297] Furthermore, the device also includes: an image acquisition module 212 (not shown in the figure), which is used to acquire a target image corresponding to the source session information and / or the target session information and output the target image based on the semantic similarity between the source session information and / or the target session information and the candidate image.
[0298] Furthermore, the session generation module 211 is specifically used for at least one of the following:
[0299] Acquire session speculation information according to the picture selection information input by the first user and the historical session information between the first user and the second user; acquire a target picture from the candidate pictures according to the semantic similarity between the session speculation information and the candidate pictures, and use the target picture as the target session information;
[0300] According to the picture selection information input by the first user, the historical conversation information between the first user and the second user, and the user information of the first user, the conversation inference information is obtained; according to the semantic similarity between the conversation inference information and the candidate pictures, the target picture is obtained from the candidate pictures, and the target picture is used as the target conversation information.
[0301] Furthermore, the conversation generation module 211 is specifically used to obtain conversation speculation information based on the pre-trained conversation understanding model according to the picture selection information input by the first user and the historical conversation information between the first user and the second user;
[0302] According to the picture selection information input by the first user, the historical conversation information between the first user and the second user, and the user information of the first user, conversation inference information is acquired based on a pre-trained conversation understanding model.
[0303] Furthermore, the conversation inference information includes: the conversation content that the second user wants to express and / or the conversation emotion that the first user wants to express.
[0304] According to another aspect, an embodiment of the present invention further provides a terminal device, including: a processor; and a memory configured to store machine-readable instructions, which, when executed by the processor, causes the processor to execute the above-described method for configuring random access information.
[0305] Fig.23 A block diagram of a computing system that can be used to implement a base station or user equipment according to an embodiment of the present disclosure is schematically shown.
[0306] like Fig.23 As shown, the computing system 2300 includes a processor 2310, a computer-readable storage medium 2320, an output interface 2330, and an input interface 2340. The computing system 2300 can execute the above reference Figure 1 Describe the method.
[0307] Specifically, the processor 2310 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 2310 may also include an onboard memory for cache purposes. The processor 2310 may be a processor for executing reference Figure 1 A single processing unit or multiple processing units may be used for different actions of the described method flow.
[0308] Computer readable storage medium 2320, for example, can be any medium capable of containing, storing, conveying, propagating or transmitting instructions. For example, readable storage media can include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices, devices or propagation media. Specific examples of readable storage media include: magnetic storage devices, such as magnetic tapes or hard disks (HDD); optical storage devices, such as compact disks (CD-ROMs); memory, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0309] The computer readable storage medium 2320 may include a computer program, which may include code / computer executable instructions, which when executed by the processor 2310 causes the processor 2310 to perform, for example, the above-mentioned combination Figure 1 The described method sequences and any variations thereof.
[0310] The computer program may be configured to have, for example, computer program code including computer program modules. For example, in an example embodiment, the code in the computer program may include one or more program modules, such as module 1, module 2, ... It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or program module combinations according to actual conditions. When these program module combinations are executed by the processor 2310, the processor 2310 may execute, for example, the above combination of Figure 1 The described method sequences and any variations thereof.
[0311] According to an embodiment of the present disclosure, the processor 2310 may use the output interface 2330 and the input interface 2340 to perform the above combination. Figure 1 The described method sequences and any variations thereof.
[0312] It will be appreciated by those skilled in the art that the present invention includes devices for performing one or more of the operations described in the present application. These devices may be specially designed and manufactured for the desired purpose, or may include known devices in general-purpose computers. These devices have computer programs stored therein, which are selectively activated or reconfigured. Such computer programs may be stored in a device (e.g., computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, the computer readable medium including but not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (e.g., computer).
[0313] Those skilled in the art will appreciate that each block in these structure diagrams and / or block diagrams and / or flow charts and combinations of blocks in these structure diagrams and / or block diagrams and / or flow charts can be implemented using computer program instructions. Those skilled in the art will appreciate that these computer program instructions can be provided to a general-purpose computer, a professional computer, or a processor of other programmable data processing methods to implement, thereby executing the scheme specified in the block or multiple blocks of the structure diagram and / or block diagram and / or flow chart disclosed in the present invention through the processor of the computer or other programmable data processing method.
[0314] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes discussed in the present invention may be alternated, modified, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and schemes discussed in the present invention may also be alternated, modified, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in the present invention may also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0315] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method performed by an electronic device, It is characterized in that include: Acquire the auxiliary information and source session information input by the first user; The auxiliary information includes at least one of historical conversation information between the first user and at least one second user, user information of the first user, user information of the second user, and a field to which the information belongs; Generating target session information based on the auxiliary information and the source session information, including: acquiring session-related information based on the source session information and the auxiliary information, and generating target session information based on the session-related information; Outputting the target session information; The session-related information includes at least one of the following: Session information keywords; Target object information, where the object includes an entity and / or an event; The conversation inference information includes the conversation content that the first user wants to express and / or the conversation emotion that the first user wants to express.
2. The method according to claim 1, It is characterized in that The domain to which the information belongs includes the domain to which the source information belongs and the domain to which the target information belongs.
3. The method according to claim 2, It is characterized in that The user information includes at least one of the following: User attribute information; User preference information; User schedule information; User location information; User behavior information; User device information.
4. According to the method of claim 1, the field to which the information belongs includes at least one of the following: Language information; Information on professional fields; Cultural background information.
5. The method according to claim 2, wherein the domain to which the source information belongs is obtained by detecting or setting source session information, and the domain to which the target information belongs is obtained by detecting or setting historical session information.
6. The method according to claim 1, It is characterized in that The source session information includes at least one of the following: Abbreviations, incomplete words, natural language sentences, and picture selection information.
7. The method according to claim 1, wherein generating target session information based on the auxiliary information and the source session information comprises at least one of the following: Extracting session information keywords from source session information and historical session information between the first user and the second user, and generating target session information according to the session information keywords; Extracting session information keywords from source session information and historical session information between the first user and the second user, and user information keywords from user information of the first user and / or the second user, and generating target session information according to the session information keywords and the user information keywords; According to the domain to which the information belongs, source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, session information keywords of the domain to which the target information belongs and historical session information between the first user and the second user are extracted, and target session information is generated according to the session information keywords; According to the field to which the information belongs, source session information in the field to which the source information belongs is translated into session information in the field to which the target information belongs, session information keywords of the session information in the field to which the target information belongs and the historical session information between the first user and the second user, as well as user information keywords of the user information of the first user and / or the second user are extracted, and target session information is generated based on the session information keywords and the user information keywords.
8. The method according to claim 7, wherein the target session information is generated according to the session information keywords. include: Generate target conversation information based on conversation information keywords and pre-trained sentence generation model; The generating target conversation information according to the conversation information keywords and the user information keywords includes: generating the target conversation information according to the conversation information keywords and the user information keywords based on a pre-trained sentence generation model.
9. The method according to claim 1, wherein generating target session information based on the auxiliary information and the source session information comprises at least one of the following: According to the source session information, the source object information is obtained, and the source object information is classified to obtain source category information; according to the user information of the first user, the candidate target category information is obtained ; According to the similarity between the source category information and the candidate target category information, the target category information is obtained; Obtain candidate target object information according to target category information; According to the similarity between the source object information and the candidate target object information, the target object information is obtained; Generate target session information according to target object information; Obtain source object information based on source session information and historical session information between the first user and one or more second users; classify the source object information to obtain source category information; obtain candidate target category information based on user information of the first user; According to the similarity between the source category information and the candidate target category information, the target category information is obtained; Obtain candidate target object information according to target category information; According to the similarity between the source object information and the candidate target object information, the target object information is obtained; Generate target session information according to target object information; According to the domain to which the information belongs, source session information in the domain to which the source information belongs is translated into session information in the domain to which the target information belongs, and source object information is obtained according to the session information in the domain to which the target information belongs and historical session information between the first user and one or more second users; source object information is classified to obtain source category information; and candidate target category information is obtained according to the user information of the first user; According to the similarity between the source category information and the candidate target category information, the target category information is obtained; Obtain candidate target object information according to target category information; According to the similarity between the source object information and the candidate target object information, the target object information is obtained; Generate target session information according to target object information; The objects include entities and / or events.
10. The method according to claim 1, wherein the target session information is generated based on the auxiliary information and the source session information. include: According to the domain to which the information belongs, source session information in the domain to which the source information belongs is translated into target session information in the domain to which the target information belongs.
11. The method according to claim 10, wherein the source session information of the domain to which the source information belongs is translated into the target session information of the domain to which the target information belongs according to the domain to which the information belongs. include: According to the field to which the information belongs, based on the corresponding pre-trained translation model, the source conversation information is translated in at least one of the language type, professional field and cultural background in sequence to obtain the target conversation information.
12. The method according to any one of claims 7 to 11, It is characterized in that Also includes: According to the semantic similarity between the source session information and / or the target session information and the candidate picture, a target picture corresponding to the source session information and / or the target session information is acquired and the target picture is output.
13. The method according to claim 1, wherein generating target session information based on the auxiliary information and the source session information comprises at least one of the following: Acquire session speculation information according to the picture selection information input by the first user and the historical session information between the first user and the second user; acquire a target picture from the candidate pictures according to the semantic similarity between the session speculation information and the candidate pictures, and use the target picture as the target session information; Acquire session speculation information according to the picture selection information input by the first user, the historical session information between the first user and the second user, and the user information of the first user; According to the semantic similarity between the conversation inference information and the candidate pictures, the target picture is obtained from the candidate pictures, and the target picture is used as the target conversation information.
14. The method according to claim 13, wherein the session inference information is obtained based on the picture selection information input by the first user and the historical session information between the first user and the second user. include: Acquire conversation inference information based on a pre-trained conversation understanding model according to the picture selection information input by the first user and the historical conversation information between the first user and the second user; The method of obtaining conversation inference information according to picture selection information input by the first user, historical conversation information between the first user and the second user, and user information of the first user includes: obtaining conversation inference information based on a pre-trained conversation understanding model according to picture selection information input by the first user, historical conversation information between the first user and the second user, and user information of the first user.
15. An electronic device comprising a memory and a processor, wherein the memory stores computer executable instructions, and when the instructions are executed by the processor, the method according to any one of claims 1 to 14 is executed.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is executed.
Citation Information
Patent Citations
Abbreviation operating method and hand-hold communication terminal
CN101365012A
Establishing and translating within multilingual group messaging sessions using multiple messaging protocols
CN101542462A
Information processing device and information processing method
CN102165437A
Method, device and terminal for processing picture
CN103488630A
Voice conversation translation method, device and system
CN104679733A
