CN110691028B - Message processing method, device, terminal and storage medium - Google Patents

Message processing method, device, terminal and storage medium Download PDF

Info

Publication number
CN110691028B
CN110691028B CN201910873020.2A CN201910873020A CN110691028B CN 110691028 B CN110691028 B CN 110691028B CN 201910873020 A CN201910873020 A CN 201910873020A CN 110691028 B CN110691028 B CN 110691028B
Authority
CN
China
Prior art keywords
word
word unit
control
user
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910873020.2A
Other languages
Chinese (zh)
Other versions
CN110691028A (en
Inventor
刘立强
何丹
李明
柳欲浚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910873020.2A priority Critical patent/CN110691028B/en
Publication of CN110691028A publication Critical patent/CN110691028A/en
Application granted granted Critical
Publication of CN110691028B publication Critical patent/CN110691028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Abstract

The embodiment of the application discloses a message processing method, a message processing device, a terminal and a storage medium, wherein the message processing method, the device, the terminal and the storage medium can display an instant messaging session page, the instant messaging session page comprises an instant messaging message sent by a user, and the instant messaging message comprises text content; when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control; displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit. The word unit is obtained by dividing the text content, so that part of the text content in the communication message can be accurately and efficiently selected.

Description

Message processing method, device, terminal and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a message processing method, an apparatus, a terminal, and a storage medium.
Background
In recent years, with the expansion of the functions of instant messaging services, in some instant messaging services, a user can process a sent or received text message, for example, copy, forward, withdraw, reply, and the like, but the user can only process all text contents in the text message, and cannot process part of text contents in the text message. In other instant messaging services, a user can select part of the text content for processing, but only continuous selection is supported, and the user is required to drag a cursor to cover the content to be selected for selection, so that the operation is time-consuming and inefficient, and the selection and processing of the text content are not accurate and convenient.
Disclosure of Invention
In view of this, embodiments of the present application provide a message processing method, an apparatus, a terminal, and a storage medium, which can accurately and efficiently select a part of text contents in a communication message.
In one aspect, an embodiment of the present application provides a message processing method, including:
displaying an instant messaging session page, wherein the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control;
displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit.
In one implementation, the message processing method further includes:
when the selection operation of a user for the word unit is detected, displaying a word unit processing control in the word unit detail page;
and displaying a word unit processing result based on the triggering operation of the word unit processing control by the user, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
In an embodiment, the word unit detail page further includes a word unit setting control, and the message processing method further includes:
when the triggering operation of a user for the word unit setting control is detected, displaying a word unit setting page, wherein the word unit setting page comprises a basic setting control for setting basic information of the word unit;
and displaying the word unit after updating the basic information in the word unit detail page based on the basic information setting operation of the user for the basic setting control.
In an embodiment, the word unit comprises a related word unit;
based on the triggering operation of the word segmentation control by the user, displaying a word unit detail page, further comprising:
displaying a word unit detail page based on the triggering operation of the user for the word segmentation control, wherein the word unit detail page comprises a plurality of associated word units with associated marks, and the associated word units are word units with semantic association;
when the selection operation of the user for the word unit is detected, a word unit processing control is displayed in the word unit detail page, and the method comprises the following steps:
when the selection operation of the user for the relevant word unit is detected, triggering and selecting other relevant word units relevant to the relevant word unit;
and displaying a word unit processing control for processing the selected associated word unit in the word unit detail page.
In one embodiment, the text content includes a plurality of word units, and the word unit processing control includes an editing control;
based on the triggering operation of the word unit processing control by the user, displaying a word unit processing result, wherein the word unit processing result is a processing result obtained after the selected word unit is processed, and the processing result comprises the following steps:
displaying an editing page based on the triggering operation of the user on the editing control, wherein the editing page comprises a word unit selection control displayed with the word units;
when the selection operation of a user for the word unit selection control is detected, displaying an editing control list, wherein the editing control list comprises a plurality of editing controls;
and displaying edited text content in the editing page based on the selection operation of the user for the editing control, wherein the edited text content is obtained by selecting the word unit corresponding to the control for the selected word unit and performing the editing operation corresponding to the editing control.
In an embodiment, the word unit processing control further includes a sending control, and the processing result of the word unit is displayed based on a triggering operation of the user on the word unit processing control, where the processing result of the word unit is a processing result obtained after the selected word unit is processed, and the processing result includes:
when the triggering operation of a user for the sending control is detected, displaying a message sending object selection page, wherein the message sending object selection page comprises a plurality of objects to be sent;
selecting an information sending object from a plurality of objects to be sent based on the object selection operation of the user on the information sending object selection page;
and sending the selected word unit to the message sending object.
In an embodiment, the word unit processing control further includes a search control, and the processing result of the word unit is displayed based on a trigger operation of a user on the word unit processing control, where the processing result of the word unit is a processing result obtained after the selected word unit is processed, and the processing result includes:
and displaying the search result of the selected word unit based on the triggering operation of the user on the search control.
In an embodiment, the message processing method further includes:
when the triggering operation of the user on the search control is detected, displaying a search word setting control, wherein the selected word unit is displayed on the search word setting control;
when the triggering operation of the user for the search term setting control is detected, displaying a search term editing page;
updating the search terms in the search term setting control based on the editing operation of the user on the search term editing page;
and displaying the search result corresponding to the updated search term on the search page.
In an embodiment, the word unit processing control includes a translation control, and the processing result of the word unit is displayed based on a trigger operation of a user on the word unit processing control, where the processing result of the word unit is a processing result obtained after the selected word unit is processed, and the processing result includes:
and displaying the translation result of the selected word unit based on the triggering operation of the translation control by the user.
In an embodiment, the message processing method further includes:
when the triggering operation of the user on the translation control is detected, displaying a translation word setting control, wherein the selected word unit is displayed on the translation word setting control;
when the triggering operation of the translation word setting control is detected, displaying a translation word editing page;
updating the translation words in the translation word setting control based on the editing operation of the user on the translation word editing page;
and displaying the translation result of the updated translation word on the translation page.
In another aspect, an embodiment of the present application provides a message processing terminal, including: a processor and a memory; the memory stores a plurality of instructions, and the processor loads the instructions stored in the memory to execute the steps in the message processing method provided by any embodiment of the application.
An embodiment of the present application further provides a message processing apparatus, including:
the system comprises a session display unit, a display unit and a display unit, wherein the session display unit is used for displaying an instant messaging session page, the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
the detail display unit is used for displaying a word segmentation control when the triggering operation aiming at the instant communication message is detected;
a word unit display unit, configured to display a word unit detail page based on a trigger operation of a user on the word segmentation control, where the word unit detail page includes a word unit, the word unit is a word unit obtained after the text content is subjected to word segmentation processing, and the word unit is set to: allowing manipulation by a user to select the word unit.
In one embodiment, the message processing apparatus further includes:
the word unit selecting unit is used for displaying a word unit processing control in the word unit detail page when the selection operation of a user for the word unit is detected;
and the word unit processing unit is used for displaying a word unit processing result based on the triggering operation of the user on the word unit processing control, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
Embodiments of the present application provide a storage medium having a computer program stored thereon, which, when run on a computer, causes the computer to perform a message processing method as provided in any of the embodiments of the present application.
The method and the device for displaying the instant messaging conversation page can display the instant messaging conversation page, wherein the communication conversation page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents; when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control; displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit. The word unit is obtained by dividing the text content, so that part of the text content in the communication message can be accurately and efficiently selected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic structural diagram of a message processing system according to an embodiment of the present invention;
FIG. 1b is a schematic diagram of an interaction of a message processing system (local) provided by an embodiment of the present invention;
fig. 2a is a first flowchart of a message processing method according to an embodiment of the present invention;
fig. 2b is a second flowchart of a message processing method according to an embodiment of the present invention;
fig. 2c is a schematic flow chart of a message processing method according to an embodiment of the present invention;
fig. 3a is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 3b is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 3c is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message processing terminal according to an embodiment of the present invention;
FIG. 5a is a schematic diagram of a communication session page provided by an embodiment of the present invention;
FIG. 5b is a schematic diagram of a text content detail page provided by an embodiment of the present invention;
fig. 5c is a schematic diagram of a text content editing page provided in an embodiment of the present invention;
fig. 5d is a schematic diagram of a basic information setting page of the instant messaging message provided in the embodiment of the present invention;
FIG. 5e is a schematic diagram of a word unit detail page provided by an embodiment of the present invention;
FIG. 5f is a schematic diagram of a word unit detail page when a word unit is selected according to an embodiment of the present invention;
FIG. 5g is a schematic diagram of a word unit detail page when multiple word units are selected according to an embodiment of the present invention;
FIG. 6a is a schematic diagram of a word unit detail page when multiple word units are selected according to an embodiment of the present invention;
FIG. 6b is a schematic diagram of an editing page provided by an embodiment of the present invention;
FIG. 6c is a schematic diagram of an editing page displaying a list of editing controls according to an embodiment of the present invention;
FIG. 6d is a schematic diagram of an editing page after editing a selected word unit according to an embodiment of the present invention;
FIG. 7a is a schematic diagram of a search page provided by an embodiment of the present invention;
FIG. 7b is a schematic diagram of a search page after a search term setting control is triggered according to an embodiment of the present invention;
FIG. 8a is a diagram of a translation page provided by an embodiment of the present invention;
fig. 8b is a schematic diagram of a translation page after a translation word setting control is triggered according to an embodiment of the present invention;
fig. 9a is a schematic diagram of a word unit detail page of a selection control displaying word unit basic information according to an embodiment of the present invention;
FIG. 9b is a diagram of a word unit detail page showing color buttons provided by an embodiment of the present invention;
FIG. 9c is a schematic diagram of a details page displaying word units after a color button is selected according to an embodiment of the present invention;
FIG. 9d is a schematic diagram illustrating a word unit details page when the selection control is selected after the word unit color is set according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a work flow of a segmentation model provided by an embodiment of the present invention;
FIG. 11a is a schematic diagram of a word unit processing page labeled with key word units according to an embodiment of the present invention;
FIG. 11b is a schematic diagram of a word unit processing interface after a relevant word unit is selected according to an embodiment of the present invention;
FIG. 11c is a diagram illustrating a word unit processing page labeled with an associated tag according to an embodiment of the present invention;
fig. 11d is a schematic view of a search interface obtained after searching a related word unit according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a message processing method, a message processing device, a terminal and a storage medium.
An embodiment of the present invention provides a message processing system, including a message processing apparatus (may be referred to as a first message processing apparatus) suitable for a terminal, and a message processing apparatus (may be referred to as a second message processing apparatus) suitable for a server, which may be linked via a network.
The terminal (the terminal integrated with the first message processing device) may be a terminal device such as a mobile phone, a tablet computer, a notebook computer, or an intelligent terminal such as a wearable device, an intelligent sound box, an intelligent household appliance, or the like.
The server can comprise a message background server, a search server, a translation server, a word segmentation server and other servers.
For example, referring to fig. 1a, the message processing system may include servers (message backend server, search server, translation server, word segmentation server) and terminals (which may include a current terminal used by a current user and a target terminal used by a target object, and other terminals participating in a communication session). The message processing method of the present invention will be described below by taking an example in which the message background server, the search server, the translation server, the word segmentation server, the current terminal, and the target terminal are located in the same message processing system.
The current terminal may be configured to select a portion of text content in a communication message in the communication session. In practical applications, the current terminal may be specifically configured to: displaying an instant messaging session page, wherein the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control;
displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit.
In an embodiment, the processing result of the selected word unit may also be displayed in the terminal page, and specifically includes: when the selection operation of a user for the word unit is detected, displaying a selection mark in the selected word unit;
displaying a word unit processing control in the word unit detail page;
and displaying a word unit processing result based on the triggering operation of the word unit processing control by the user, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
The message background server is configured to implement a message (including text content and a word message) between the current terminal and the target terminal, generate the word message based on a word unit selection operation of a word unit performed by a user, and send the word message to one or more target terminals, or certainly send the word message to the current terminal at the same time. Of course, the message backend server can also be used to send text content and picture messages.
The segmentation server can be used for training the segmentation model offline. In an embodiment, a terminal in the message processing system may obtain the trained word segmentation model through a network link. In another embodiment, the current terminal may send the text content to the word segmentation server, and in the word segmentation server, the text content is divided by using the trained word segmentation model to obtain a word unit sequence.
The search server can crawl and capture webpage information on the internet, store the crawled webpage information in an original webpage database, extract and organize the information in the original webpage, establish an index database, when the current terminal detects the triggering operation of a user on a search control, the current terminal sends a word selection unit of the user to the search server, and the search server can quickly find related information according to the word selection unit, sort the found information and return the inquired result to the current terminal.
In which, the translation server may be used to train the translation model offline, and referring to fig. 1b, in an embodiment, a terminal in the message processing system may obtain the trained translation model through a network link. In another embodiment, when the current terminal detects the triggering operation of the user on the translation control, the current terminal sends the word unit selected by the user to the translation server, and the translation server can translate the word unit by using a trained translation model and then return the translation result to the current terminal.
The target terminal is used for receiving the message sent by the current terminal.
The following are detailed below. The order of the following examples is not intended to limit the preferred order of the examples.
In an embodiment, referring to fig. 2a, a flow of a message processing method will be described from the perspective of a first message processing apparatus, which may be specifically integrated in a current terminal.
101. Displaying an instant messaging session page, wherein the messaging session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents.
The instant messaging refers to a terminal service, which can allow two communication objects or a plurality of communication accounts to transmit information such as characters, archives, voice, video and the like in real time through a network. Accordingly, the communication session page on the terminal is a page for displaying the communication object, and information delivered by the communication object.
The text content is information in a text format transmitted by the communication object, and the text content can be regarded as a word unit sequence formed by combining a plurality of word units according to a certain sequence. The text content may be the content of the message sent by the current user, or the content of the message sent by other users in the conversation.
The instant messaging message is an instruction interface for setting text content, the instant messaging message can be represented as a text content box, and text information sent by a communication object is arranged in the text content box.
In this embodiment, referring to fig. 5a, a communication object identifier and a text content box are set in the communication session page, and text content is set in the text content box. The communication object identifier may include a nickname, a head portrait, and the like of the communication object. And the text content box corresponds to the head portrait position of the communication object sending the text content.
In an embodiment, a session instruction of a user operation page acting on a communication client may be acquired, and the communication session page may be displayed according to the session instruction.
In an embodiment, in order to facilitate triggering the session command, a command interface may be set in the communication client operation page. The command interface may have various expressions, such as a selection box, a button, an input box, and the like. In this embodiment, a session button may be provided on the user operation page, and the user may trigger the display of the communication session page by clicking the session button.
In one embodiment, before displaying the communication session page, a communication object (hereinafter referred to as a session object) participating in a session needs to be determined, for example, before a chat is performed in the communication client, the user may select the session object from communication contacts, where the session object may be all communication contacts within a certain communication range, such as a communication group, or may be one communication contact.
In one embodiment, in order to provide a uniform interactive experience for users, a public chat window component can be used, a shared chat window component is provided for group conversation and single conversation, and the input, click operation and other behavior habits of users in the component are consistent.
In one embodiment, when initiating a session to a communication contact, the following steps are performed: an object setting control is arranged on a user operation page, for example, the object setting control can be a contact button, when a user is detected to click the contact button, an object acquisition request is sent to a server, and the object acquisition request carries current terminal user account information; and receiving relation chain data of the target terminal user account returned by the server based on the object acquisition request, and displaying a communication object selection page, namely a communication contact list page, according to the relation chain data. When the selection operation of a user on the communication object selection page is detected, a session object is determined, a communication detail page corresponding to the session object is displayed, a session button is arranged in the communication detail page, the user clicks the session button, a session instruction is triggered, and the session page corresponding to the session object is displayed.
In one embodiment, a communication contact identifier may be displayed in the communication contact list to facilitate a user to select a session object in the communication contact list for a conversation. The communication contact person identifier may include notes set by the user or a nickname or a head portrait set by the communication contact person.
102. And when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control.
The instant messaging message is an instruction interface set by text content, and can be in the forms of buttons, icons, input boxes, message boxes and the like. In this embodiment, the instant messaging message includes a message box, and text content shared in the conversation is displayed in the message box.
In one embodiment, the instant messaging message may be used to trigger a variety of instructions, such as a word segmentation instruction, a message setting instruction, a text editing instruction, and the like.
In an embodiment, in order to facilitate the user to trigger a corresponding instruction, different trigger modes may be set for different instructions, for example, clicking an instant messaging message, triggering a message setting instruction, double clicking an instant messaging message to trigger a word segmentation instruction, long-pressing an instant messaging message to trigger a text editing instruction, and the like.
In one embodiment, different triggering modes can be set for different instructions through the CoreText component. Where CoreText is the underlying technology used to process words and fonts.
In an embodiment, after the user triggers the message setting instruction, a message setting page may be displayed, and the message setting page includes a plurality of message setting controls, where the message setting controls may include deletion, withdrawal, collection, and the like controls. The terminal can trigger the message setting of the text content based on the selection operation of the user on the message setting control. For example, when it is detected that the user clicks a delete control, the text content is deleted in the communication session page.
In an embodiment, after the user triggers the text editing instruction, a text editing page may be displayed, and the text editing page includes a plurality of text editing controls, wherein the text editing controls may include copy, cut, paste, and the like controls. The terminal can trigger the text editing operation on the text content based on the selection operation of the user on the text editing control. For example, when it is detected that the user clicks the copy control, the entire text content is copied.
In an embodiment, the instant messaging message may also be triggered in other manners, and a basic information setting page of the instant messaging message is displayed, where the page includes a setting control of a message box and a setting control of text content in the message box, for example, referring to fig. 5d, a bubble setting control, a pendant setting control, a font setting control, and a font special effect setting control of the text content in the message box, and the instant messaging message may be set based on a selection operation of a user. For example, when it is detected that the user clicks the font setting control, a font obtaining request may be sent to the server, font data returned by the server based on the font obtaining request may be obtained, then a font list may be displayed based on the font data, and then a font of text content in the instant messaging message may be set based on a font selection operation of the user on the font list.
In an embodiment, the messaging session page further includes message contents in other forms and an instant messaging message corresponding to the message contents, and a user can perform message setting and text editing on the message contents based on the instant messaging message. Other forms of message content may include picture, video, text content, audio, moving picture, etc.
The word segmentation control is an interface of a word segmentation instruction and can be in the forms of buttons, icons, input boxes, message boxes and the like. In this embodiment, referring to fig. 5b, the word segmentation control is a button, and in order to intuitively display the function of the button, function prompt information, such as a word "segmentation", may be added in or near the button.
In one embodiment, when an instant messaging message is triggered, the word segmentation control can be directly displayed in the instant messaging session page.
In another embodiment, in order to facilitate the user to distinguish the message being processed, when a trigger operation for the instant messaging message is detected, a text content detail page may be jumped to display, wherein the text content detail page may include text content in the instant messaging message, and the word segmentation control may be displayed in the text content page, referring to fig. 5 b.
In an embodiment, referring to fig. 5b, the text detail page may further include an audio conversion control, when it is detected that the user clicks the audio conversion control, an audio conversion instruction is triggered, and the terminal may obtain an audio file corresponding to the text content according to the text content and play the audio file on the terminal.
In one embodiment, the text content detail page may trigger message setting on the text content, for example, referring to fig. 5c, a message setting control list may be displayed by pressing the text content for a long time, wherein the message setting control list may include a plurality of controls of copy, forward, favorite, reply, and the like.
103. Displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit.
Wherein a word unit is a meaningful short sequence of word units consisting of adjacent word units in the text content.
In this embodiment, the text content may be identified and divided based on a pre-trained word segmentation model, so as to obtain a plurality of word units corresponding to the text content. The training of the word segmentation model relates to Machine Learning, Machine Learning (ML) is a multi-field cross subject, and relates to multiple subjects such as probability theory, statistics, approximation theory, convex analysis and algorithm complexity theory. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
The word segmentation module is used for identifying and dividing text contents essentially through sequence marking, and a Chinese character string taking characters as a unit is given, for example, three points of tomorrow and afternoon are not scattered in the first international airport. "the word segmentation model can predict whether each word should be used as the beginning (labeled B), middle (labeled I) or end (labeled E) of a word unit, or should be used as a word alone (labeled S) and output the prediction result. Wherein, the output sequence corresponding to the character string of the input word segmentation model is ' BEBEBEBEBEBESBIIIIEBIIES ', and the word unit sequence corresponding to the Chinese character string can be obtained by marking the corresponding relation with the Chinese character string, namely ' tomorrow/afternoon/three-point/at/capital international airport/indifference/. "
In an embodiment, the HMM (Hidden Markov Model) may be used to perform sequence labeling on the text content, so as to obtain a word unit sequence corresponding to the text content. Referring to fig. 10, X1 to X3 in the drawing represent hidden states, (X1, X2, and X3) may correspond to three marks (B, I, and E), each state may generate a transmission signal (which may be denoted as y _ I), each transmission signal may correspond to a certain chinese character, and B _ ij may represent a probability that the ith state transmits a chinese character j, that is, an emission probability. There is a possibility of mutual transition between states, for example, a word may be converted from a single word to the end of a word depending on the context of the text content. The probability of transition from the ith state to the jth state is denoted here by a _ ij. The process of recognizing and dividing the text content into word unit sequences by using the HMM model is actually a process of predicting hidden states corresponding to the observation sequences (y1 to y4) (i.e., the chinese character sequences in the text content) when all a _ ij and b _ ij are known. In actual operation, the transmission probability and the transition probability may be obtained through corpus statistics or training, and under the condition that these conditions are known, the Viterbi decoding algorithm may be invoked to obtain the final word segmentation result (i.e., the hidden state sequence). The Viterbi decoding algorithm uses recursion to reduce the amount of computation and uses the context of the entire sequence to make a decision, so that a sequence containing "noise" can be well analyzed. In use, the Viterbi decoding algorithm computes a local probability for each cell in the trellis and includes a back pointer to indicate the most likely path to reach that cell. After the whole calculation process is completed, the most possible state is found at the termination time, and then the backtracking is carried out to the time t equal to 1 through the back pointer, so that the state sequence on the backtracking path is the most possible hidden state sequence.
In an embodiment, the segmentation model may be trained in a segmentation server, and the initial model and the text segments required for training may be downloaded from a database via a network.
In an embodiment, the current terminal may obtain the trained segmentation model from the segmentation server through a network, and the segmentation model may be downloaded in the current terminal in advance when software is updated, or downloaded from the segmentation server through a network link when a segmentation control is triggered.
In an embodiment, the text content includes a plurality of word units, and the displaying of the word unit detail page is based on a triggering operation of the user on the word segmentation control may specifically include the following steps:
predicting the position state of each word unit in the text content in the word unit based on the triggering operation of the word segmentation control by the user;
acquiring a word unit sequence corresponding to the text content based on the position state;
and displaying a word unit detail page according to the word unit sequence.
In another embodiment, referring to fig. 1b, the text content may be identified and divided in a segmentation server, and then the terminal obtains the word unit sequence from the segmentation server, specifically, the method may include the following steps:
sending a word segmentation request to a server based on the triggering operation of the word segmentation control by the user, wherein the word segmentation request carries the text content;
receiving a word unit sequence corresponding to the text content returned by the server based on the word segmentation request;
and displaying the word unit detail page according to the word unit sequence.
In an embodiment, the text content may be converted into a data format that is convenient for the server to parse, and then sent to the word segmentation server for recognition and division, for example, the text content may be converted into a JSON format, where JSON (JSON Object Notation) is a lightweight data exchange format. It is based on a subset of ECMAScript (js specification set by the european computer association) and uses a text format completely independent of the programming language to store and represent data. The machine analysis and generation are convenient, and the network transmission efficiency can be effectively improved.
The word unit sequence may be a set of word unit sets including word unit length, sequence, and content.
When it is detected that the terminal acquires the word unit sequence, a word unit detail page display instruction can be triggered, in an embodiment, a coretext component can be adopted to execute the word unit detail page display instruction, and the word unit detail page is laid out according to the word unit sequence.
Specifically, the coretext component may convert characters corresponding to the word unit sequence into glyphs, establish a coordinate system, create a region where the glyphs are located, determine the position of each glyph in the region according to the coordinate system, render the glyphs into a display screen of the terminal according to the coordinate positions, and display a word unit detail page. When a user clicks a certain position, the terminal can determine the word unit selected by the user according to the coordinate of the clicked position.
In an embodiment, the word unit detail page includes a word unit selection control, where the form of the word unit selection control may be multiple, for example, a selection frame, an icon, a button, and the like, and in this embodiment, referring to fig. 11a, the word unit selection control may be set as a button, and a word unit is labeled in the button.
In one embodiment, to facilitate the user to distinguish the beginning and end positions of a word unit, an underline may be placed below the word unit (see fig. 5 e).
For example, referring to fig. 6a and 5e, the word unit detail page includes word units and discontinuous underlines disposed below the word unit sequences, and the word sequence corresponding to each underline is used as a word unit, so that the user can distinguish the word units.
The embodiment of the invention can also perform personalized setting on the selection of the word unit. Namely, the word units are marked through the color buttons, and the color display is highlighted.
In an embodiment, the word unit detail page further includes a word unit setting control, and after the word unit detail page is displayed based on the word unit sequence, basic attributes such as color, font, size, and the like of the word unit may also be set, which specifically includes the following steps:
when the triggering operation of a user for the word unit setting control is detected, displaying a word unit setting page, wherein the word unit setting page comprises a basic setting control for setting basic information of the word unit;
and displaying the word unit after updating the basic information in the word unit detail page based on the basic information setting operation of the user for the basic setting control.
The word unit basic information refers to basic attributes of a word unit, and may include attribute information such as color, font, size, and the like of underlines in the word unit, or attribute information such as color, font, size, and the like of the word unit in the word unit.
The basic setting control is an interface of an instruction for setting basic information of word units.
In an embodiment, a word unit setting instruction may be triggered based on a word unit basic information selection operation of the selection control performed by a user, so as to set the word unit.
In an embodiment, referring to fig. 9a, the basic setting controls may include a color setting control, a font setting control, and a size setting control.
In an embodiment, referring to fig. 9b, when the user clicks the color setting control, a plurality of color selection lists including a plurality of different color buttons may be displayed, and referring to fig. 9c, when it is detected that the user selects a certain color in the color list, underlining is displayed as the corresponding color.
In an embodiment, in order to facilitate a user to visually recognize a color corresponding to a color button, the color button may be configured to be filled with a frame with a corresponding color, where the color corresponding to the color button may be a single color or multiple colors. For example, referring to fig. 9c, the color button may be filled with two colors, and when the user selects the color button, underlining may be alternately arranged for the two colors.
In one embodiment, referring to fig. 9c, in order to facilitate the user to confirm whether the color button has been selected and the selected color, when the user selects a color button, the selected color button may be updated to a color button having a larger size.
In one embodiment, the terminal may employ a coretext component to execute the word unit setting instructions.
In an embodiment, the word unit includes a relevant word unit, and based on the word unit sequence, a word unit detail page is displayed, where the word unit detail page includes the word unit, and the method may further include the following steps:
displaying a word unit detail page based on the triggering operation of the user for the word segmentation control, wherein the word unit detail page comprises a plurality of associated word units with associated marks, and the associated word units are word units with semantic association;
when the selection operation of the user for the word unit is detected, a word unit processing control is displayed in the word unit detail page, and the method comprises the following steps:
when the selection operation of the user for the relevant word unit is detected, triggering and selecting other relevant word units relevant to the relevant word unit;
and displaying a word unit processing control for processing the selected associated word unit in the word unit detail page.
In an embodiment, when the degree of association between word units is greater than a preset threshold, the word units may be set as associated word units, and if a certain word unit is associated with multiple word units, a word unit group with the largest degree of association may be selected and the word unit group may be used as an associated word unit group.
In one embodiment, the word unit detail page includes a plurality of groups of related word units, the same group of related word units display the same association flag, and the related word units of different groups display different association flags.
In an embodiment, a self-attention mechanism may be used to obtain the degree of association between the word units, specifically, each word unit may be encoded to obtain a feature vector, and then a weight matrix with unshared parameters may be first multiplied by the feature vector to obtain three matrices, which may be respectively denoted as q, k, and v, in an embodiment, the similarity between two matrices (such as q and k) may be used to represent the weight of another matrix (such as v), that is, the weight represents the degree of association between the current word unit and other word units, so that the degree of association between each word unit and other word units in the word unit sequence may be obtained; according to the association degree, dividing the word unit sequence into an associated word unit group with semantic association relation and a common word unit group without semantic association relation; and displaying the association marks in a word unit line detail page according to the associated word unit groups and the common word unit groups.
Referring to fig. 11c, association marks may be displayed in the word unit detail page in the vicinity of the related word unit corresponding to the related word unit.
Referring to fig. 11d, when one related word unit is selected, another related word unit related to the related word unit is also triggered and selected, and at this time, a long press is continued, so that the selection control is triggered, the word unit detail page is displayed, and a plurality of word units corresponding to one group of related word units can be processed simultaneously. Of course, the selection of another related word unit related to the related word unit may be cancelled based on the user operation.
In an embodiment, when one word unit is processed, the processing result is further filtered according to the related word unit of the word unit, and the filtered processing result is displayed in the search result, referring to fig. 11d, when the search control is triggered, the search server may filter the search result based on other word units in the related word unit group, and return the filtered search result to the terminal.
In an embodiment, the importance parameter of each word unit in the word unit sequence may be obtained, then the word unit with the importance parameter larger than a preset value is used as a feature word, and according to the feature word, the selection control corresponding to the feature word is filled with a specific color in the word unit detail page, as shown in fig. 11 a.
In an embodiment, referring to fig. 11b, when the user selects the selection control corresponding to the feature word and continues to press for a long time, the word unit processing control may be displayed.
In an embodiment, the feature words of the word unit sequence can be obtained through a TF-IDF (Term-Inverse Document Frequency) technology, wherein TF means Term Frequency (Term Frequency) and IDF means Inverse text Frequency index (Inverse text Frequency). The TF-IDF technique may evaluate the importance of a word unit to a text content. The importance of a word unit increases in proportion to the number of times it appears in a text content, but at the same time decreases in inverse proportion to the frequency with which it appears in a history text content record.
Referring to fig. 2b, in an embodiment, the message processing method further includes the following steps:
104. and when the selection operation of the user for the word unit is detected, displaying a word unit processing control in the word unit detail page.
In one embodiment, in order to make the user intuitively recognize whether a word unit has been selected and the selected word unit, referring to fig. 5f, 5g and 9d, when the user selects the word unit, a selection mark may be displayed in the selected word unit, wherein the selection mark may be represented as a color mark, for example, the selected word unit may be updated to a color different from that of the unselected word unit.
In one embodiment, referring to FIG. 9d, when a word unit is selected, the word unit may be updated to the same color as the underline.
For example, referring to fig. 5f, the selection control may be clicked to select the word unit, or referring to fig. 5g, the word unit may be slid on the screen to select a plurality of word units in the word unit detail page.
In one embodiment, when the word unit is selected, the word unit processing control may be displayed in the word unit detail page.
105. And displaying a word unit processing result based on the triggering operation of the word unit processing control by the user, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
In one implementation, the text content includes a plurality of word units, and referring to fig. 6a, the word unit processing control includes an editing control, and a word unit processing page is displayed based on a trigger operation of a user on the word unit processing control, which specifically includes the following steps:
displaying an editing page based on the triggering operation of the user on the editing control, wherein the editing page comprises a word unit selection control displayed with the word units;
when the selection operation of a user for the word unit selection control is detected, displaying an editing control list, wherein the editing control list comprises a plurality of editing controls;
and displaying edited text content in the editing page based on the selection operation of the user for the editing control, wherein the edited text content is obtained by selecting the word unit corresponding to the control for the selected word unit and performing the editing operation corresponding to the editing control.
The word unit selection control is an instruction interface for selecting a word unit in the editing page, wherein the instruction interface may include multiple representations, such as a selection box, an icon, a button, and the like. Referring to fig. 6b, in this embodiment, the word unit selection control may be a character box, and each character box is provided with a word unit.
In another embodiment, an editing page is displayed based on the triggering operation of the user on the editing control, the editing page includes word units displayed, and the terminal can determine the word unit selected by the user according to the position of the user when clicking the word unit and when clicking the editing page is clicked, and the coordinates of each word unit.
Wherein, the coretext component can be adopted to determine the coordinates of each word unit in the text content and display the editing page.
For the selection operation of the word unit selection control, reference is made to the above description of the selection operation of the word unit, and details are not repeated.
In an embodiment, after the user selects the word unit selection control, pressing the selection control for a long time may trigger displaying an editing control list, and referring to fig. 6c, the editing control list may include editing controls such as copying, deleting, and cutting.
The editing control is an instruction interface for editing and processing word units in the text content. And the user clicks the editing control, so that the selected word unit can be correspondingly edited. For example, referring to fig. 6d, the user selects the word unit selection controls of "four", "leaf", "longevity" and "department", and then clicks the cut control, so that the word units of "four", "leaf", "longevity" and "department" can be deleted from the original position and written into the new position.
In an embodiment, referring to fig. 6d, the edit page further includes a forwarding control, an edit canceling control, and a withdraw control, and a user clicks the forwarding control to forward the edited text content to the communication object in the chat session. And the user clicks the edit canceling control, and the terminal can return a word unit detail page. When the user clicks the withdrawal control, the terminal can return to the page before the current editing operation.
The specific steps of forwarding refer to the following embodiments, which are not described again.
In an embodiment, the word unit processing control further includes a sending control, and the step of displaying a word unit processing result based on a trigger operation of the user on the word unit processing control may specifically include the following steps:
when the triggering operation of a user for the sending control is detected, displaying a message sending object selection page, wherein the message sending object selection page comprises a plurality of objects to be sent;
selecting an information sending object from a plurality of objects to be sent based on the object selection operation of the user on the information sending object selection page;
and displaying a sending result of sending the selected word unit to the message sending object.
In one embodiment, sending the selected word unit to the message sending object may include the following steps: and sending a message sending request to a message background server, wherein the message sending request carries the selected word unit and the message sending object, and the message background server can generate a word unit message based on the selected word unit after receiving the message sending request and then send the word unit message to a target terminal corresponding to the message sending object.
And the sending result is a response message returned by the message background server based on the message sending request. The sending result may be expressed as that a word unit message is displayed on the instant messaging session page when the sending is successful, and a "sending failure" message may be displayed in the instant messaging session when the sending is failed.
In an embodiment, when a trigger operation of a user for the sending control is detected, a message sending object selection page is displayed, where the message sending object selection page includes a plurality of objects to be sent, and the method specifically includes the following steps:
when detecting the triggering operation of the user for the sending control, sending an object obtaining request to a server, wherein the object obtaining request carries user account information;
acquiring relationship chain data of the user account returned by the server based on the object acquisition request;
and displaying a message sending object selection page based on the relation chain data.
In another embodiment, the word message may be sent to the current communication session, and the specific steps may include: when the triggering operation of the user for the sending control is detected, a message forwarding request is sent to the message background server, wherein the message forwarding request carries current communication session information, account information of a current terminal user and a word unit corresponding to the selection control selected by the user, and the message background server can acquire communication object account information in the current communication session based on the current communication session information and the account information of the current terminal user, generate word messages according to the word unit, and then send the word messages to a target terminal corresponding to a communication object account.
In an embodiment, referring to fig. 5f and 5g, the word unit processing control further includes a search control, and the displaying a word unit processing page based on a trigger operation of the user on the word unit processing control includes:
and displaying the search result of the selected word unit based on the triggering operation of the user on the search control.
In an embodiment, referring to fig. 5f and 5g, when the triggering operation of the search control by the user is detected, the search page may be jumped to be displayed, and the search result is displayed in the search page.
Optionally, in order to facilitate the user to distinguish the functions of different controls in the word unit detail page, the search control may be set as a magnifying glass icon. When the triggering operation of the user for the search control is detected, a search request can be sent to a search server, wherein the search request carries a word unit selected by the user, the search server can quickly search the information in the database according to the word unit, rank the found information, then return the inquired result to the current terminal, and the current terminal displays a search page according to the information returned by the search server.
Referring to fig. 7a, for example, a word unit is a name of a food, when a terminal sends a search request to a search server, the search request may further carry geographic location information of a current terminal, the search server may search geographic locations of all restaurants with the food, and then the search server may sort the searched information according to the geographic location information of the current terminal and then send the result to the current terminal.
In an embodiment, the search page further includes a search term setting control, where the search term setting control includes the term unit, and the search term in the search term setting control may be updated based on an operation of a user on the search page, so as to obtain a search result corresponding to an updated search term, where the specific steps may include:
when the triggering operation of the user for the search term setting control is detected, displaying a search term editing page;
updating the search terms in the search term setting control based on the editing operation of the user on the search term editing page;
and displaying the search result corresponding to the updated search term on the search page.
The search term setting control is an interface for setting a search term, and referring to fig. 7b, in this embodiment, the search term setting control may be represented as a search term input box, the search term setting control may be triggered based on a click operation of a user on the search term setting control, a search term editing page may be represented as a text editing keyboard, the text editing keyboard further includes a confirmation button, and when the user clicks the confirmation button, the terminal sends a search request to the search server based on an updated search term.
In an embodiment, referring to fig. 5f and 5g, the word unit processing control includes a translation control, and the displaying a word unit processing page based on a trigger operation of the user on the word unit processing control may specifically include the following steps:
and displaying the translation result of the selected word unit based on the triggering operation of the translation control by the user.
The translation control is an interface of a translation instruction, and referring to fig. 5f and 5g, when a trigger operation of a user on the translation control is detected, a translation page may be jumped to be displayed, and a translation result is displayed in the translation page.
Optionally, in order to facilitate a user to distinguish controls in the word unit detail page, the translation control may be set as a button marked with a word "turn over", and when it is detected that the user clicks the translation control, a translation request may be sent to the translation server, where the translation request carries the word unit selected by the user, the translation server may translate the word unit to obtain a text in another language, and return a translation result to the terminal, and the terminal displays the translation page based on the translation result.
In an embodiment, a trained translation model is arranged in the translation server, and the translation model can perform feature extraction on an input word unit to obtain feature information, and then predict characters at each position in a text of another language according to the feature information.
In one embodiment, the translation may be performed using a trained BERT (Bidirectional Encoder characterization based on Transformers) model.
In one embodiment, referring to fig. 8a, the translation page includes word units and text in another language corresponding to the word units, and also includes language conversion form information, for example, "chinese to english" is displayed in the translation page.
In an embodiment, referring to fig. 8b, the translation page further includes a translation word setting control, where the translation word setting control includes the word unit, and the translation word in the translation word setting control may be updated based on an operation of a user on the translation page to obtain a translation result corresponding to the updated translation word, which specifically includes the following steps:
when the triggering operation of the translation word setting control is detected, displaying a translation word editing page;
updating the translation words in the translation word setting control based on the editing operation of the user on the translation word editing page;
and displaying the translation result of the updated translation word on the translation page.
Therefore, the word unit is obtained by dividing the text content, and part of the text content in the communication message can be accurately and efficiently selected.
The method described in the foregoing embodiment will be described in further detail below by way of example with the message processing apparatus being specifically integrated in a terminal.
Referring to fig. 2c, a specific flow of the message processing method according to the embodiment of the present invention is as follows:
201. and the terminal displays a communication session page, wherein the communication session page comprises text content and instant communication messages corresponding to the text content.
The communication session page is a page displayed by the communication client and used for user operation, and the communication session page can comprise a single chat session page, a group chat session page and the like.
The client is a message interaction client, such as an instant messaging client.
202. And the terminal displays a text content detail page according to the triggering operation of the instant communication message by the user, wherein the text content editing page comprises a word segmentation control.
The text content detail page is used for displaying text content details and can be used for a user to locally select and process text content.
The settings on the text content detail page refer to the above embodiments, and are not described again.
203. And the terminal displays a word unit detail page based on the triggering operation of the user on the word segmentation control, wherein the word unit detail page comprises a word unit selection control.
And the word unit selection control is a selection control corresponding to the word unit sequence.
The word unit sequence is a sequence formed by character segments obtained by identifying and dividing the text content.
The method for acquiring the word unit sequence is described in the above embodiments, and is not described in detail.
The word unit detail page refers to a page for a user to select and process word units, and the user selects the word units to be processed by clicking a selection control on the word unit detail page.
There are various methods for selection, which are described in the above embodiments and will not be described again.
204. And when the terminal detects that the user selects the word unit of the word unit selection control, displaying a word unit processing control on the word unit detail page.
The word unit processing control comprises a plurality of types, and different processing controls can realize different processing on the word unit. For details, reference is made to the above embodiments, which are not described in detail.
205. And the terminal correspondingly processes the word unit according to the triggering operation of the user on the word unit processing control, and displays a word unit processing interface according to the obtained processing result.
After the word unit processing control is triggered, the processing result can be obtained from the server, and the processing result is displayed in a skipping mode.
In an embodiment, there is also provided a message processing apparatus (i.e. a first message processing apparatus), which may be specifically integrated in a terminal, such as a terminal used by a current user, as shown in fig. 3a, and the message processing apparatus may include: the conversation display unit 301, the detail display unit 302, the word unit display unit 303, the word unit selection unit 304, and the word unit processing unit 305 are as follows:
(1) a session display unit 301, configured to display an instant messaging session page, where the instant messaging session page includes an instant messaging message sent by a user, and the instant messaging message includes text content.
(2) A detail displaying unit 302, configured to display a word segmentation control when a triggering operation for the instant messaging message is detected.
(3) A word unit display unit 303, configured to display a word unit detail page based on a trigger operation of a user on the word segmentation control, where the word unit detail page includes word units, the word units are word units obtained after word segmentation processing is performed on the text content, and the word units are set as: allowing manipulation by a user to select the word unit.
In an embodiment, the word unit display unit 303 may be specifically configured to:
when the triggering operation of a user for the word unit setting control is detected, displaying a word unit setting page, wherein the word unit setting page comprises a basic setting control for setting basic information of a word unit;
and displaying the word unit after updating the basic information in the word unit detail page based on the basic information setting operation of the user for the basic setting control.
In an embodiment, the word unit display control 303 may be further configured to:
and displaying a word unit detail page based on the triggering operation of the user for the word segmentation control, wherein the word unit detail page comprises a plurality of associated word units with associated marks, and the associated word units are word units with semantic association.
Referring to fig. 3b, in an embodiment, the first message processing apparatus further includes a word unit selecting unit 304 and a word unit processing unit 305, as follows:
(4) and a word unit selecting unit 304, when the selection operation of the user for the word unit is detected, displaying a word unit processing control in the word unit detail page.
In an embodiment, the word unit selecting unit 305 may specifically be configured to:
when the selection operation of the user for the relevant word unit is detected, triggering and selecting other relevant word units relevant to the relevant word unit;
and displaying a word unit processing control for processing the selected associated word unit in the word unit detail page.
(5) The word unit processing unit 305 is configured to perform corresponding processing on the word unit according to a triggering operation of the user on the word unit processing control.
In an embodiment, referring to fig. 3c, the word unit processing unit 305 may specifically include an editing subunit 3051, a sending subunit 3052, a searching subunit 3053, and a translating subunit 3054, as follows:
a. the editing subunit 3051 may be specifically configured to:
displaying an editing page based on the triggering operation of the user on the editing control, wherein the editing page comprises a word unit selection control displayed with the word units;
when the selection operation of a user for the word unit selection control is detected, displaying an editing control list, wherein the editing control list comprises a plurality of editing controls;
and displaying edited text content in the editing page based on the selection operation of the user for the editing control, wherein the edited text content is obtained by selecting the word unit corresponding to the control for the selected word unit and performing the editing operation corresponding to the editing control.
b. A transmitting subunit 3052 configured to:
when the triggering operation of a user for the sending control is detected, displaying a message sending object selection page, wherein the message sending object selection page comprises a plurality of objects to be sent;
selecting an information sending object from a plurality of objects to be sent based on the object selection operation of the user on the information sending object selection page;
and sending the selected word unit to the message sending object.
c. And the search subunit 3052 is configured to display a search page based on a trigger operation of the user on the search control, where the search page includes a search result for the selected word unit.
In an embodiment, the search subunit 3052 may be further specifically configured to:
when the triggering operation of the user for the search term setting control is detected, displaying a search term editing page;
updating the search terms in the search term setting control based on the editing operation of the user on the search term editing page;
and displaying the search result corresponding to the updated search term on the search page.
d. A translation sub-unit 3054, configured to display a translation page based on a trigger operation of a user on the translation control, where the translation page includes a translation result of the selected word unit.
In an embodiment, the translation subunit 3054 may be specifically configured to:
when the triggering operation of the translation word setting control is detected, displaying a translation word editing page;
updating the translation words in the translation word setting control based on the editing operation of the user on the translation word editing page;
and displaying the translation result of the updated translation word on the translation page.
Therefore, the word units are obtained by dividing the text content, and part of the text content in the communication message can be accurately and efficiently selected.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The embodiment of the application further provides a terminal, and the terminal can be a tablet computer, a micro processing box, an unmanned aerial vehicle or an image acquisition device and the like. As shown in fig. 4, it shows a schematic structural diagram of a terminal according to an embodiment of the present application, specifically:
the terminal may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the terminal. In some embodiments, processor 401 may include one or more processing cores; in some embodiments, processor 401 may integrate an application processor, which primarily handles operating systems, user pages, application programs, and the like, and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The terminal also includes a power supply 403 for powering the various components, and in some embodiments, the power supply 403 may be logically coupled to the processor 401 via a power management system, such that the power management system may perform functions of managing charging, discharging, and power consumption. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The terminal may also include an input module 404, the input module 404 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The terminal may also include a communication module 405, and in some embodiments, the communication module 405 may include a wireless sub-module through which the terminal may wirelessly transmit over short distances to provide wireless broadband internet access. For example, the communication module 405 may be used to assist a user in sending and receiving e-mails, browsing web pages, accessing streaming media, and the like.
Although not shown, the terminal may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 401 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
displaying an instant messaging session page, wherein the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control;
displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the message processing methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
displaying an instant messaging session page, wherein the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control;
displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises word units, the word units are word units obtained after the text content is subjected to word segmentation processing, and the word units are set as follows: allowing manipulation by a user to select the word unit.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any message processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any message processing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The above detailed description is given to a message processing method, a message processing apparatus, a message processing terminal, and a storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. A message processing method, adapted to a terminal, includes:
displaying an instant messaging session page, wherein the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
when the triggering operation aiming at the instant communication message is detected, displaying a word segmentation control;
displaying a word unit detail page based on a triggering operation of a user for the word segmentation control, wherein the word unit detail page comprises a plurality of associated word units displaying associated marks, the associated word units are word units with semantic association relations, and the word units are set as follows: the word unit is allowed to be selected by the user, and each of the related word units having the semantic association relation is allowed to be selected by the user at the same time by operating any one of the related word units.
2. The message processing method of claim 1, wherein the message processing method further comprises:
when the selection operation of a user for the word unit is detected, displaying a word unit processing control in the word unit detail page;
and displaying a word unit processing result based on the triggering operation of the user on the word unit processing control, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
3. The message processing method of claim 1, wherein the word unit detail page further comprises a word unit setting control, the message processing method further comprising:
when the triggering operation of a user for the word unit setting control is detected, displaying a word unit setting page, wherein the word unit setting page comprises a basic setting control for setting basic information of the word unit;
and displaying the word unit after updating the basic information in the word unit detail page based on the basic information setting operation of the user for the basic setting control.
4. The message processing method according to claim 2, wherein when a user selection operation for the word unit is detected, a word unit processing control is displayed in the word unit detail page, including:
when the selection operation of the user for the relevant word unit is detected, triggering and selecting other relevant word units relevant to the relevant word unit;
and displaying a word unit processing control for processing the selected associated word unit in the word unit detail page.
5. The message processing method of claim 2 wherein the text content comprises a plurality of word units, the word unit processing control comprising an editing control;
based on the triggering operation of the word unit processing control by the user, displaying a word unit processing result, wherein the word unit processing result is a processing result obtained after the selected word unit is processed, and the processing result comprises the following steps:
displaying an editing page based on the triggering operation of the user on the editing control, wherein the editing page comprises a word unit selection control displayed with the word units;
when the selection operation of a user for the word unit selection control is detected, displaying an editing control list, wherein the editing control list comprises a plurality of editing controls;
and displaying edited text content in the editing page based on the selection operation of the user for the editing control, wherein the edited text content is obtained by selecting the word unit corresponding to the control for the selected word unit and performing the editing operation corresponding to the editing control.
6. The message processing method according to claim 2, wherein the word unit processing control further includes a sending control, and a word unit processing result is displayed based on a triggering operation of the user on the word unit processing control, and the word unit processing result is a processing result obtained after the selected word unit is processed, and includes:
when the triggering operation of a user for the sending control is detected, displaying a message sending object selection page, wherein the message sending object selection page comprises a plurality of objects to be sent;
selecting an information sending object from a plurality of objects to be sent based on the object selection operation of the user on the information sending object selection page;
and displaying a sending result of sending the selected word unit to the message sending object.
7. The message processing method according to claim 2, wherein the word unit processing control further includes a search control, and the word unit processing result is displayed based on a trigger operation of the user on the word unit processing control, and the word unit processing result is a processing result obtained after the selected word unit is processed, and includes:
and displaying the search result of the selected word unit based on the triggering operation of the user on the search control.
8. The message processing method of claim 7, wherein the message processing method further comprises:
when the triggering operation of the user on the search control is detected, a search word setting control is displayed, and the selected word unit is displayed on the search word setting control;
when the triggering operation of the user for the search term setting control is detected, displaying a search term editing page;
updating the search terms in the search term setting control based on the editing operation of the user on the search term editing page;
and displaying the search result corresponding to the updated search term on a search page.
9. The message processing method according to claim 2, wherein the word unit processing control includes a translation control, and a word unit processing result is displayed based on a trigger operation of a user on the word unit processing control, and the word unit processing result is a processing result obtained after the selected word unit is processed, and includes:
and displaying the translation result of the selected word unit based on the triggering operation of the user on the translation control.
10. The message processing method of claim 9, wherein the message processing method further comprises:
when the triggering operation of the user on the translation control is detected, displaying a translation word setting control, wherein the selected word unit is displayed on the translation word setting control;
when the triggering operation of the translation word setting control is detected, displaying a translation word editing page;
updating the translation words in the translation word setting control based on the editing operation of the user on the translation word editing page;
and displaying the translation result of the updated translation word on a translation page.
11. A terminal, comprising: a processor and a memory; the memory stores a plurality of instructions, and the processor loads the instructions stored in the memory to perform the steps of the message processing method of any one of claims 1-10.
12. A message processing apparatus, comprising:
the system comprises a session display unit, a display unit and a display unit, wherein the session display unit is used for displaying an instant messaging session page, the communication session page comprises instant messaging messages sent by a user, and the instant messaging messages comprise text contents;
the detail display unit is used for displaying a word segmentation control when the triggering operation aiming at the instant communication message is detected;
a word unit display unit, configured to display a word unit detail page based on a trigger operation of a user on the word segmentation control, where the word unit detail page includes multiple associated word units that display associated labels, the associated word units are word units with a semantic association relationship, and the word units are set as follows: the word unit is allowed to be selected by the user, and each of the related word units having the semantic association relation is allowed to be selected by the user at the same time by operating any one of the related word units.
13. The message processing apparatus of claim 12, further comprising:
the word unit selecting unit is used for displaying a word unit processing control in the word unit detail page when the selection operation of the user for the word unit is detected;
and the word unit processing unit is used for displaying a word unit processing result based on the triggering operation of the user on the word unit processing control, wherein the word unit processing result is a processing result obtained after the selected word unit is processed.
14. A storage medium having stored thereon a computer program, characterized in that, when the computer program is run on a computer, it causes the computer to execute the method according to any one of claims 1 to 10.
CN201910873020.2A 2019-09-16 2019-09-16 Message processing method, device, terminal and storage medium Active CN110691028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910873020.2A CN110691028B (en) 2019-09-16 2019-09-16 Message processing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910873020.2A CN110691028B (en) 2019-09-16 2019-09-16 Message processing method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110691028A CN110691028A (en) 2020-01-14
CN110691028B true CN110691028B (en) 2022-07-08

Family

ID=69109240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910873020.2A Active CN110691028B (en) 2019-09-16 2019-09-16 Message processing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110691028B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764600B (en) * 2020-08-13 2022-07-12 腾讯科技(深圳)有限公司 Resource processing method, device, storage medium and computer equipment
CN112084305A (en) * 2020-09-09 2020-12-15 腾讯科技(深圳)有限公司 Search processing method, device, terminal and storage medium applied to chat application
CN114003326B (en) * 2021-10-22 2023-10-13 北京字跳网络技术有限公司 Message processing method, device, equipment and storage medium
CN114745346A (en) * 2022-04-11 2022-07-12 维沃移动通信有限公司 Message processing method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607807A (en) * 2015-12-22 2016-05-25 惠州Tcl移动通信有限公司 Mobile terminal based text processing method and system
CN108268438A (en) * 2016-12-30 2018-07-10 腾讯科技(深圳)有限公司 A kind of content of pages extracting method, device and client
CN109800352A (en) * 2018-12-30 2019-05-24 上海触乐信息科技有限公司 Method, system and the terminal device of information push are carried out based on clipbook
CN109917988A (en) * 2017-12-13 2019-06-21 腾讯科技(深圳)有限公司 Choose content display method, device, terminal and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013058745A1 (en) * 2011-10-18 2013-04-25 Soft Machines, Inc. Methods and systems for managing synonyms in virtually indexed physically tagged caches
JP5156123B1 (en) * 2011-12-28 2013-03-06 楽天株式会社 Information processing apparatus, information processing method, information processing program, and recording medium
CN102609208B (en) * 2012-02-13 2014-01-15 广州市动景计算机科技有限公司 Method and system for word capture on screen of touch screen equipment, and touch screen equipment
US20150199718A1 (en) * 2014-01-14 2015-07-16 Google Inc. Selecting content items using entities of search results
CN107229403B (en) * 2017-05-27 2020-09-15 北京小米移动软件有限公司 Information content selection method and device
CN109426662A (en) * 2017-08-25 2019-03-05 阿里巴巴集团控股有限公司 Exchange method and equipment
CN108763193A (en) * 2018-04-18 2018-11-06 Oppo广东移动通信有限公司 Literal processing method, device, mobile terminal and storage medium
CN108595445A (en) * 2018-04-23 2018-09-28 Oppo广东移动通信有限公司 Interpretation method, device and terminal
CN109101498B (en) * 2018-07-23 2023-04-18 Oppo广东移动通信有限公司 Translation method and device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607807A (en) * 2015-12-22 2016-05-25 惠州Tcl移动通信有限公司 Mobile terminal based text processing method and system
CN108268438A (en) * 2016-12-30 2018-07-10 腾讯科技(深圳)有限公司 A kind of content of pages extracting method, device and client
CN109917988A (en) * 2017-12-13 2019-06-21 腾讯科技(深圳)有限公司 Choose content display method, device, terminal and computer readable storage medium
CN109800352A (en) * 2018-12-30 2019-05-24 上海触乐信息科技有限公司 Method, system and the terminal device of information push are carried out based on clipbook

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Ranjeet Kumar ; R.C. Tripathi.A Trigram Word Selection Methodology to Detect Textual Similarity with Comparative Analysis of Similar Techniques.《2014 Fourth International Conference on Communication Systems and Network Technologies》.2014, *
即时通信的短语消息文本聚类方法研究;蔡立坤;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180615;全文 *

Also Published As

Publication number Publication date
CN110691028A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN110691028B (en) Message processing method, device, terminal and storage medium
CN107832433B (en) Information recommendation method, device, server and storage medium based on conversation interaction
CN110020411B (en) Image-text content generation method and equipment
US11176453B2 (en) System and method for detangling of interleaved conversations in communication platforms
CN107609092B (en) Intelligent response method and device
CN101395608B (en) Searching within a site of a search result
CN108027873A (en) Based on the stroke information captured come with assistant's component interaction
CN111565143B (en) Instant messaging method, equipment and computer readable storage medium
CN108768824B (en) Information processing method and device
CN113569037A (en) Message processing method and device and readable storage medium
CN112231463B (en) Session display method, apparatus, computer device and storage medium
CN112752121B (en) Video cover generation method and device
CN109460265A (en) A kind of method, user terminal and server activating application program
CN108306813B (en) Session message processing method, server and client
CN112929253B (en) Virtual image interaction method and device
CN114357278A (en) Topic recommendation method, device and equipment
CN116501960B (en) Content retrieval method, device, equipment and medium
CN111680224A (en) Cross-platform course pushing method and device, electronic equipment and storage medium
CN113315691B (en) Video processing method and device and electronic equipment
CN113676394B (en) Information processing method and information processing apparatus
CN116016421A (en) Method, computing device readable storage medium, and computing device for facilitating media-based content sharing performed in a computing device
CN111611369B (en) Interaction method and related device based on artificial intelligence
CN115378890A (en) Information input method, information input device, storage medium and computer equipment
CN112308016A (en) Expression image acquisition method and device, electronic equipment and storage medium
CN114610163A (en) Recommendation method, apparatus and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020347

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant