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 some, not all, embodiments of the present invention. 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.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a translation method according to the present invention is shown, which may specifically include the following steps:
step 101, receiving session information;
the session information can be received by a communication device such as a mobile terminal, and the session information can be a message composed of one or more words.
102, detecting first target vocabulary information in the session information;
and detecting the session information by adopting an existing algorithm to acquire first target vocabulary information in the session information, wherein the first target vocabulary information can be dialect vocabularies.
103, judging whether the first target vocabulary information is matched with preset identification information of a mobile terminal user; the preset identification information is associated with region information;
the mobile terminal user may correspond to preset identification information, and the preset identification information is used for representing the region information to which the user belongs. And judging whether the region information to which the user belongs is consistent with the first target vocabulary information or not by judging whether the first target vocabulary information is matched with the preset identification information of the user or not, and further judging whether the user understands the first target vocabulary information or not.
And 104, if the first target vocabulary information is not matched with the preset identification information of the mobile terminal user, converting the first target vocabulary information into second target vocabulary information.
And when the first target vocabulary information is judged not to be matched with the preset identification information of the user, determining that the user cannot correctly understand the first target vocabulary information. Translating the first target vocabulary information in the session information into universal vocabulary information and generating second target vocabulary information. Therefore, the first target vocabulary information is translated into the second target vocabulary information, the dialect vocabularies are converted into the universal vocabularies, users who do not understand the dialect vocabularies can accurately understand the session information, and communication obstacles are eliminated.
For example, the session information may be "he went to the store yesterday to buy something, and the bad point was to take the mouse. The method comprises the steps of detecting conversation information, determining that 'eating mouse medicine' is dialect vocabulary in Nanjing regions, determining 'eating mouse medicine' as first target vocabulary information, translating the first target vocabulary information into general vocabulary information when preset identification information of a user is in the region of non-Nanjing regions, and translating conversation information into 'buying things in a store yesterday', wherein the fact that 'eating mouse medicine' means 'being cheated' means that conversation information is translated into 'buying things in the store yesterday', and the difference is cheated. "by converting the first target vocabulary information into the second target vocabulary information," even if the user does not know the meaning of the first target vocabulary information in the conversation information, the user can accurately understand the substantial meaning of the conversation information.
In the embodiment of the invention, the session information is acquired; detecting first target vocabulary information in the session information; judging whether the first target vocabulary information is matched with preset identification information of a mobile terminal user; the preset identification information is associated with region information; and if the first target vocabulary information is not matched with the preset identification information of the mobile terminal user, converting the first target vocabulary information into second target vocabulary information. When the preset identification information of the user is not matched with the first target vocabulary information, namely when the user cannot understand the meaning of the first target vocabulary information in the session information, the first target vocabulary information in the session information is converted into the general vocabulary information, and the second target vocabulary information which can be understood by the user is generated, so that the communication obstacle is eliminated, and the communication efficiency is improved.
Referring to fig. 2, a flowchart illustrating steps of a second embodiment of the translation method of the present invention is shown, which may specifically include the following steps:
step 201, receiving session information;
the session information can be received by a communication device such as a mobile terminal, and the session information can be a message composed of one or more words.
Step 202, detecting first target vocabulary information in the session information;
and detecting the session information by adopting an existing algorithm to acquire first target vocabulary information in the session information, wherein the first target vocabulary information can be dialect vocabularies.
In a preferred embodiment, step 202 may comprise:
identifying one or more lexical information in the session information; judging whether vocabulary information consistent with preset characteristic vocabulary information exists in the one or more vocabulary information or not; and if so, determining the vocabulary information consistent with the characteristic information as the first target vocabulary information.
The session information may be detected according to a preset information base, where the preset information base includes one or more feature vocabulary information, and the feature vocabulary information may be dialect vocabularies of one or more regions. The existing algorithm can be adopted to identify one or more vocabulary information in the session information, the preset information base is adopted to judge whether one or more vocabulary information in the session information is consistent with the preset characteristic vocabulary information, if yes, the vocabulary information consistent with the characteristic information is determined to be the first target vocabulary information, and the dialect words in the session information can be determined to be the first target vocabulary information.
For example, the session information may be "he went to the store yesterday to buy something, and the bad point was to take the mouse. "can detect the multiword information, can include" go shop "," buy things "," eat mouse poison ", etc." eat mouse poison "with one preserve characteristic vocabulary information unanimous, confirm" eat mouse poison "as the first goal vocabulary information.
Step 203, judging whether the first target vocabulary information is matched with preset identification information of a mobile terminal user; the preset identification information is associated with region information;
the user may correspond to preset identification information, and the preset identification information is used to represent the region information to which the user belongs. And judging whether the region information to which the user belongs is consistent with the first target vocabulary information or not by judging whether the first target vocabulary information is matched with the preset identification information of the mobile terminal user or not, and further judging whether the user understands the first target vocabulary information or not.
In a preferred embodiment, step 203 may comprise:
acquiring the preset identification information; determining preset region information matched with the first target vocabulary information as second identification information; judging whether the preset identification information is consistent with the second identification information;
in this preferred embodiment, the preset characteristic vocabulary information in the preset information base may correspond to preset region information, and the region information corresponding to the first target vocabulary information may be determined by the preset information base, and the region information is determined as the second identification information. For example, the preset information base records preset characteristic vocabulary information of 'rat poison eating' and corresponds to the preset characteristic vocabulary information of 'Nanjing area'. When the fact that the 'rat poison eating' exists in the conversation information is detected, the 'rat poison eating' is determined to be preset characteristic vocabulary information, and a 'Nanjing area' corresponding to the 'rat poison eating' is set to be second identification information.
And comparing the second identification information with the preset identification information of the user, and judging whether the first target vocabulary information is matched with the preset identification information of the user by judging whether the preset identification information is consistent with the second identification information.
In this preferred embodiment, the preset identification information may be generated by:
calculating a usage frequency value of the one or more preset feature vocabulary information; obtaining a maximum value of the use frequency values; judging whether the maximum value is larger than a preset threshold value or not; and if the maximum value is larger than the preset threshold value, determining that the preset region information corresponding to the maximum value is the preset identification information.
The use frequency value of each preset feature vocabulary information may be calculated based on the number of times the user uses each preset feature vocabulary information and the total number of times the preset feature vocabulary information is used.
The maximum value of the use frequency value of each preset feature vocabulary information can be obtained by adopting an existing algorithm (such as a bubbling method, a quick sorting method and the like).
A preset threshold value may be set, and when the maximum value is greater than the preset threshold value, a preset information base is used to obtain preset region information corresponding to preset feature vocabulary information corresponding to the maximum value, and the preset feature vocabulary information is determined to be the preset identification information.
And 204, if the first target vocabulary information is not matched with the preset identification information of the mobile terminal user, converting the session information into second target vocabulary information.
If the first target vocabulary information is judged not to be matched with the preset identification information of the user, (for example, if the first target vocabulary information corresponds to the Nanjing area and the preset identification information is the Hunan area, the first target vocabulary information is judged not to be matched with the preset identification information of the user), the first target vocabulary information can be converted into second target vocabulary information by adopting a preset information base. Each preset characteristic vocabulary information in the preset information base can correspond to a universal vocabulary information, and the universal vocabulary information is used for expressing the real meaning of the preset characteristic vocabulary information.
After the first target vocabulary information is judged to be not matched with the preset identification information of the user, the preset characteristic information in the session information is converted into the general vocabulary information, and the second target vocabulary information is generated, so that the user can obtain the real meaning of the preset characteristic information, the real meaning of the session information is obtained, the communication obstacle is eliminated, and the communication efficiency is improved.
For example, the session information is "he went to the store yesterday to buy something, and the bad point is to take the mouse. The method can adopt a preset information base to determine that the preset characteristic vocabulary information ' eating the rodenticide ' can correspond to the real meaning of the general vocabulary information ' cheating ', the ' cheating ' is used for expressing the real meaning of the preset characteristic vocabulary information ' eating the rodenticide ', and the ' buying things in a store yesterday and eating the rodenticide in different places can be realized. "convert to" he went to the store yesterday to buy something, the bad point was just deceived. "
In a preferred embodiment, after the first target vocabulary information is converted into the second target vocabulary information, only the information obtained by converting the first target vocabulary information into the second target vocabulary information may be displayed, or the session information and the information obtained by converting the first target vocabulary information into the second target vocabulary information may be displayed simultaneously.
For example, the session information is "he went to the store yesterday to buy something, and the bad point is to take the mouse. "after converting the first target vocabulary information into the second target vocabulary information, the user can obtain" he went to the store yesterday to buy something, and the user is just cheated. "or get" he went to the store yesterday to buy something, bad to eat the mouse. "and" when he went to the store to buy something yesterday, the bad point was just deceived. ".
In another preferred embodiment, the generating of the user preset identification information may further include:
and if the maximum value is not larger than the preset threshold value, converting the first target vocabulary information into the second target vocabulary information.
And if the maximum value is not larger than the preset threshold value, setting the preset identification information as a default value. And when the preset identification information is a default value, judging that the user cannot understand all preset characteristic vocabulary information, and converting the first target vocabulary information into second character information.
In the embodiment of the invention, the session information is received; identifying one or more vocabulary information in the session information, and determining vocabulary information consistent with preset characteristic vocabulary information of a preset information base as first target vocabulary information, wherein the first target vocabulary information can be dialect vocabularies; calculating the use frequency value of the one or more preset feature vocabulary information, then obtaining the maximum value in the use frequency values, and judging whether the maximum value is larger than a preset threshold value, when the maximum value is larger than the preset threshold value, determining preset region information corresponding to the maximum value as the preset identification information, wherein the preset identification information is used for representing the region information of the user. According to a preset information base, the region information corresponding to the first target vocabulary information can be determined, and when the region information corresponding to the first target vocabulary information is judged not to be matched with the region information of the user; and determining that the user cannot understand the first target vocabulary information, and translating the first target vocabulary information into second target vocabulary information according to general vocabulary information corresponding to preset characteristic vocabulary information in a preset information base, wherein the general vocabulary information is used for expressing the real meaning of the preset characteristic information, so that the user can accurately understand the real meaning of the received session information when not understanding the first target vocabulary information, communication obstacles are eliminated, and the communication efficiency is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a first embodiment of a mobile terminal according to the present invention is shown, which may specifically include the following modules:
a receiving module 301, configured to receive session information;
a detecting module 302, configured to detect first target vocabulary information in the session information;
the judging module 303 is configured to judge whether the first target vocabulary information matches with preset identification information of a mobile terminal user; the preset identification information is associated with region information;
a conversion module 304, configured to convert the session information into second target vocabulary information if the first target vocabulary information does not match with the user preset identification information.
In a preferred embodiment, the detection module 302 may include:
the recognition unit is used for recognizing one or more vocabulary information in the session information;
the first judgment unit is used for judging whether vocabulary information consistent with preset characteristic vocabulary information exists in the one or more vocabulary information or not;
the first determining unit is configured to determine that the vocabulary information consistent with the preset characteristic vocabulary information is the first target vocabulary information if the vocabulary information consistent with the preset characteristic vocabulary information exists in the one or more vocabulary information.
In a preferred embodiment, the determining module 303 may include:
an obtaining unit, configured to obtain the preset identification information;
the second determining unit is used for determining that the preset region information matched with the first target vocabulary information is second identification information;
and the second judging unit is used for judging whether the preset identification information is consistent with the second identification information.
In a preferred embodiment, the obtaining unit may include:
a frequency value determining unit, configured to determine a usage frequency value of the one or more preset feature vocabulary information;
a maximum value obtaining subunit, configured to obtain a maximum value in the use frequency values;
the judgment subunit is used for judging whether the maximum value is greater than a preset threshold value or not;
and the determining subunit is configured to determine, if the maximum value is greater than the preset threshold value, that the preset region information corresponding to the maximum value is the preset identification information.
In a preferred embodiment, the obtaining unit may further include:
and the conversion subunit is configured to convert the first target vocabulary information into second target vocabulary information if the maximum value is not greater than the preset threshold value.
The mobile terminal provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In the embodiment of the invention, the session information is received; identifying one or more vocabulary information in the session information, and determining vocabulary information consistent with preset characteristic vocabulary information of a preset information base as first target vocabulary information, wherein the first target vocabulary information can be dialect vocabularies; calculating the use frequency value of the one or more preset feature vocabulary information, then obtaining the maximum value in the use frequency values, and judging whether the maximum value is larger than a preset threshold value, when the maximum value is larger than the preset threshold value, determining preset region information corresponding to the maximum value as the preset identification information, wherein the preset identification information is used for representing the region information of the user. According to a preset information base, the region information corresponding to the first target vocabulary information can be determined, and when the region information corresponding to the first target vocabulary information is judged not to be matched with the region information of the user; and determining that the user cannot understand the first target vocabulary information, and translating the first target vocabulary information into second target vocabulary information according to general vocabulary information corresponding to the preset characteristic vocabulary information in the preset information base, wherein the general vocabulary information is used for expressing the real meaning of the preset characteristic information, so that the user can accurately understand the real meaning of the received session information when not understanding the first target vocabulary information, communication obstacles are eliminated, and the communication efficiency is improved.
Figure 4 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The radio frequency unit 401 is configured to receive session information;
a processor 410, configured to detect first target vocabulary information in the session information; judging whether the first target vocabulary information is matched with preset identification information of a mobile terminal user; the preset identification information is associated with region information; and if the first target vocabulary information is not matched with the preset identification information of the mobile terminal user, converting the first target vocabulary information into second target vocabulary information.
In the embodiment of the invention, the session information is acquired; detecting first target vocabulary information in the session information; judging whether the first target vocabulary information is matched with preset identification information of a mobile terminal user; and if the first target vocabulary information is not matched with the preset identification information of the mobile terminal user, converting the first target vocabulary information into second target vocabulary information. When the preset identification information of the mobile terminal user is not matched with the first target vocabulary information, namely when the user cannot understand the meaning of the first target vocabulary information in the session information, the first target vocabulary information in the session information is converted into the general vocabulary information, and the second target vocabulary information which can be understood by the user is generated, so that the communication obstacle is eliminated, and the communication efficiency is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program 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 (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 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.
The processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the foregoing translation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the above-mentioned photographing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the descriptions thereof are omitted here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.