WO2017035985A1 - 字符串保存方法及装置 - Google Patents

字符串保存方法及装置 Download PDF

Info

Publication number
WO2017035985A1
WO2017035985A1 PCT/CN2015/097610 CN2015097610W WO2017035985A1 WO 2017035985 A1 WO2017035985 A1 WO 2017035985A1 CN 2015097610 W CN2015097610 W CN 2015097610W WO 2017035985 A1 WO2017035985 A1 WO 2017035985A1
Authority
WO
WIPO (PCT)
Prior art keywords
character string
string
specified
specified character
context information
Prior art date
Application number
PCT/CN2015/097610
Other languages
English (en)
French (fr)
Inventor
陈志军
汪平仄
张涛
Original Assignee
小米科技有限责任公司
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 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to MX2016001359A priority Critical patent/MX2016001359A/es
Priority to RU2016103155A priority patent/RU2636673C2/ru
Priority to JP2017536998A priority patent/JP2017531889A/ja
Priority to KR1020167003792A priority patent/KR20170037862A/ko
Publication of WO2017035985A1 publication Critical patent/WO2017035985A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/123Storage facilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Definitions

  • the present disclosure relates to the field of network technologies, and in particular, to a string saving method and apparatus.
  • the text information includes Chinese information and foreign language information.
  • Chinese information and foreign language information In order to realize the exchange of culture and technology in different countries, you can learn about other countries by reading foreign language information.
  • Technology development and customs culture when users do not have all the knowledge of foreign languages, they need translation services to provide translation services to help users understand foreign language information.
  • the translation application obtains the string that the user needs to translate, the translation is performed on the string, and the translation result is displayed on the screen. Further, for the convenience of the user, the translation application also uses the string and the string thereof. The translation result is stored, and when the user's viewing instruction is detected, the character string and its translation result are displayed.
  • the user can be informed of the translation result of the character string, and when the review is needed, the history preservation information can be quickly obtained.
  • the character string and the translation result thereof are displayed, and it is difficult for the user to recall the context information of the character string. Therefore, it is impossible to achieve a good learning effect.
  • the present disclosure provides a string saving method and apparatus.
  • a string saving method including:
  • the specified string, the translation result of the specified string, and the contextual letter of the specified string The information is saved to the preset string database.
  • the acquiring the specified character string to be saved includes:
  • the string is determined to be the specified string to be saved; or,
  • the string is determined as the specified character string to be saved.
  • the The method also includes:
  • the specified character string When a view instruction for the specified character string in the preset character string database is detected, the specified character string, the translation result of the specified character string, and the context information of the specified character string are displayed.
  • the method further includes:
  • the save time information is correspondingly stored in the preset character string database.
  • the obtaining the context information of the specified character string includes:
  • the context information of the specified string is identified.
  • a string saving apparatus including:
  • a first acquiring module configured to acquire a specified character string to be saved
  • a second obtaining module configured to obtain a translation result of the specified string
  • the first obtaining module is further configured to obtain context information of the specified character string
  • a saving module configured to save the specified character string, the translation result of the specified character string, and the context information of the specified character string to the preset string database.
  • the first acquiring module is configured to:
  • the string is determined to be a pointer to be saved.
  • the string is determined as the specified character string to be saved.
  • the device further includes:
  • a display module configured to: when the view instruction of the specified character string in the preset string database is detected, display the specified character string, the translation result of the specified character string, and the context information of the specified character string.
  • the first obtaining module is further configured to obtain the specified character string, the translation result of the specified character string, and the save time of the context information where the specified character string is located. information;
  • the saving module is further configured to save the save time information correspondingly to the preset character string database when the specified character string, the translation result of the specified character string, and the context information of the specified character string are saved.
  • the second acquiring module is configured to:
  • the context information of the specified string is identified.
  • a string saving device including:
  • a memory for storing instructions executable by the processor
  • processor is configured to:
  • the character string and the character string can be simultaneously displayed. Contextual information, which improves the alerting effect and enables users to quickly Recall the string and its usage scenarios.
  • FIG. 1 is a flowchart of a method for saving a character string according to an exemplary embodiment.
  • FIG. 2A is a flowchart of a method for saving a character string according to an exemplary embodiment.
  • FIG. 2B is a schematic diagram showing a character string display according to an exemplary embodiment.
  • FIG. 2C is a schematic diagram showing a character string display according to an exemplary embodiment.
  • FIG. 3 is a block diagram of a string saving device according to an exemplary embodiment.
  • FIG. 4 is a block diagram of a character string holding apparatus 400, according to an exemplary embodiment.
  • FIG. 5 is a block diagram of a character string holding apparatus 500, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a method for saving a character string according to an exemplary embodiment.
  • a network communication method is used in a terminal, and includes the following steps.
  • step 101 a specified character string to be saved is obtained.
  • step 102 a translation result of the specified character string is obtained.
  • step 103 the context information of the specified character string is obtained.
  • step 104 the specified character string, the translation result of the specified character string, and the context information of the specified character string are correspondingly saved to the preset character string database.
  • the present disclosure saves the context information of the specified character string while saving the specified character string, so that when the user views the view instruction of the character string stored in the preset character string database, the character string and the The context information of the string, which improves the reminder effect, enabling the user to quickly recall the string and its usage scenarios.
  • the acquiring the specified character string to be saved includes:
  • the string is determined to be the specified string to be saved; or,
  • the string is determined as the specified character string to be saved.
  • the method further includes :
  • the specified character string When a view instruction for the specified character string in the preset character string database is detected, the specified character string, the translation result of the specified character string, and the context information of the specified character string are displayed.
  • the method further includes:
  • the save time information is correspondingly stored in the preset character string database.
  • the obtaining context information of the specified character string includes:
  • the context information of the specified string is identified.
  • FIG. 2A is a flowchart of a method for saving a character string according to an exemplary embodiment.
  • the executor of the embodiment may be a terminal. Referring to FIG. 2A, the embodiment specifically includes:
  • step 201 a specified character string to be saved is obtained.
  • the specified string can be a word that needs to be translated, or it can be saved after translation. Continued to view the words.
  • the method for determining the specified string to be saved can be as follows:
  • the first type when detecting a truncation operation of the mouse on any string, determining the string as a specified string to be saved; the truncation operation refers to capturing the complete content of the string by the cursor of the mouse Usually, there are three operations: when the cursor stops at the beginning or end of the string, press the left mouse button, drag the cursor to the end or the end of the string, and release the left mouse button. Complete the truncation of the string.
  • the dwell position of the cursor may be the display position of the character string on the screen, or the character string may be displayed on the screen.
  • the string is determined to be the specified string to be saved; the preset duration can be in seconds.
  • the string to be saved can be determined by the specific location and the dwell time of the touch operation, and the specific method and the above confirmation using the mouse The method is similar and will not be described here.
  • step 202 a translation result of the specified character string is obtained.
  • the specified character string obtained in step 201 is determined as a character string to be translated, and the translation result of the character string is searched by the translation engine by using the character string as an index.
  • the method of obtaining the translation result may include the following two types:
  • the first type when the terminal is in an unconnected state, searches the basic lexicon for the translation result of the string, and the basic vocabulary is used to store the basic definition of the string, and the translation result obtained from the basic vocabulary is The final translation result.
  • the translation result of the string can also be found in the network vocabulary for storing the string.
  • the stored content in the network thesaurus can be periodically updated to provide updated, more complete string translation results, the translation results including the translation results obtained from the basic thesaurus and obtained from the network thesaurus Translation results.
  • the translation result of the character string can be directly searched from the network vocabulary, and the method for acquiring the translation result is not limited in the embodiment of the present disclosure.
  • the translation result may be displayed next to the corresponding character string, or may be displayed in the vicinity of the cursor of the mouse, and the display position of the translation result is not limited in the embodiment of the present disclosure.
  • step 203 the context information of the specified character string is obtained.
  • the context information refers to the sentence or paragraph information in which the specified string is currently located, and the method for obtaining the context information may include the following two steps:
  • Step 1 Perform a screenshot of the current location of the specified string.
  • the display position information of the specified character string on the screen is obtained through a screenshot, and the display position information may be pixel point coordinate information of the screenshot rectangle.
  • Step 2 According to the screenshot result, identify the context information of the specified string.
  • the specific method may be: using OCR (Optical Character Recognition) technology
  • Context information identification when the context information is the sentence in which the specified character string is currently located, the left side is identified from the coordinate position on the left side of the screenshot rectangle, and when the punctuation symbol indicating the end of the sentence is recognized, the recognition is stopped, and Determining the identification content as context information, and simultaneously identifying from the coordinate position on the right side of the screenshot rectangle to the right, and when identifying the punctuation symbol indicating the end of the sentence, stopping the recognition, and determining the identification content as context information;
  • the recognition content is a foreign language
  • the punctuation symbol indicating the end of the sentence may be “.” “!” “?”, etc.
  • the recognition content when the recognition content is Chinese, the punctuation symbol indicating the end of the sentence may be “.” “!” “? "Wait.
  • the left side is identified from the coordinate position on the left side of the screenshot rectangle, and when the continuous space symbol is recognized, the recognition is stopped, and the identification content is determined as the context information.
  • the recognition is performed rightward from the coordinate position on the right side of the screenshot rectangle, and when the continuous space symbol is recognized, the recognition is stopped, and the identification content is determined as the context information.
  • step 204 the specified character string, the translation result of the specified character string, and the context information of the specified character string are correspondingly saved to the preset character string database.
  • the preset string database is used to save the string, the translation result of the string, and the context information of the string, so as to facilitate subsequent viewing and review by the user.
  • the specific saving method may be: determining the string according to the string to be saved. Whether the string is included in the preset string database, and when the string is not included in the preset string database, the string, the translation result of the string, and the context information of the string are saved; When the string is included in the preset string database, it is determined whether the context information of the corresponding saved string in the preset string database is in the context in which the string is currently located. The information is the same. If they are the same, they are not saved. If they are different, the corresponding location of the string storage location in the preset string database saves the context information of the string.
  • the preset string may also be used to save the save time information of the context information of the string.
  • the specific save method may be: determining the preset character according to the string to be saved. Whether the string is included in the string database, when the string is not included in the preset string database, the string is saved, the translation result of the string, the context information of the string, and the language of the string. The storage time information of the environment information; when the string is included in the preset string database, it is determined whether the context information of the corresponding saved string in the preset string database and the context in which the string is currently located The information is the same.
  • the save time information of the context information where the string is located is updated, that is, the string in the preset string database is replaced by the save time of the context information in which the string is located. If the save time information of the context information is different, the character is saved in the corresponding position of the string save location in the preset string database. Contextual information and save the time information is currently located.
  • the preset string database may also store other information related to the to-be-saved string, and may be saved by other methods in addition to the foregoing saving method, which is not limited by the embodiment of the present disclosure.
  • step 205 when a view instruction for the specified character string in the preset character string database is detected, the specified character string, the translation result of the specified character string, and the context information of the specified character string are displayed.
  • the method for determining the order of displaying the string may be: when the specified string is a foreign word, the order may be displayed according to the first letter of the foreign word.
  • the specified string is Chinese
  • it may be sequentially displayed according to the first letter of the Chinese first character;
  • the saved content includes the save time information of the context information where the string is located, the display may be sequentially displayed according to the save time sequence.
  • other methods may be used for sequential display, which are not limited in the embodiments of the present disclosure.
  • the context information of the string may be displayed in a folded display manner, as shown in FIG. 2B, and the string in FIG. 2B
  • the icon on the left of the context information of 1 is an expanded display operation icon.
  • the display interface switches to the interface shown in FIG. 2C, that is, the display area is expanded at the corresponding position, and the display area is displayed.
  • the details of the context information of string 1 are displayed, when the content package is saved
  • the save information time may also be displayed at the corresponding position;
  • the icon to the left of "the context information of the string 1" in FIG. 2C is the stowage display operation icon, when it is detected
  • the display interface switches to the interface shown in FIG. 2B.
  • the method provided by the embodiment of the present disclosure saves the context information of the string when the string is saved, so that when the user detects the view instruction of the string stored in the preset string database, the string can be simultaneously displayed. And the context information of the string, thereby improving the reminding effect, enabling the user to quickly recall the character string and its use scene; further, by adopting a folding display manner, enabling as many as possible in one display interface Display the string saved in the preset string database to make it easier for users to view.
  • FIG. 3 is a block diagram of a string saving device according to an exemplary embodiment.
  • the apparatus includes a first obtaining module 301, a second obtaining module 302, and a saving module 303.
  • a first acquiring module configured to acquire a specified character string to be saved
  • a second obtaining module configured to obtain a translation result of the specified string
  • the first obtaining module is further configured to obtain context information of the specified character string
  • a saving module configured to save the specified character string, the translation result of the specified character string, and the context information of the specified character string to the preset string database.
  • the first acquiring module is configured to:
  • the string is determined to be the specified string to be saved; or,
  • the string is determined as the specified character string to be saved.
  • the device further includes:
  • a display module configured to: when the view instruction of the specified character string in the preset string database is detected, display the specified character string, the translation result of the specified character string, and the context information of the specified character string.
  • the first obtaining module is further configured to acquire the specified character string, the translation result of the specified character string, and the save time of the context information where the specified character string is located.
  • the saving module is further configured to save the save time information correspondingly to the preset character string database when the specified character string, the translation result of the specified character string, and the context information of the specified character string are saved.
  • the second acquiring module is configured to:
  • the context information of the specified string is identified.
  • FIG. 4 is a block diagram of a character string holding apparatus 400, according to an exemplary embodiment.
  • device 400 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 400 can include one or more of the following components: processing component 402, memory 404, power component 406, multimedia component 404, audio component 410, input/output (I/O) interface 412, sensor component 414, and Communication component 416.
  • Processing component 402 typically controls the overall operation of device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 402 can include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above.
  • processing component 402 can include one or more modules to facilitate interaction between component 402 and other components.
  • processing component 402 can include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
  • Memory 404 is configured to store various types of data to support operation at device 400. Examples of such data include instructions for any application or method operating on device 400, contact data, phone book data, messages, pictures, videos, and the like. Memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable. Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 406 provides power to various components of device 400.
  • Power component 406 can include electricity The source management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 400.
  • the multimedia component 408 includes a screen between the device 400 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 408 includes a front camera and/or a rear camera. When the device 400 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 410 is configured to output and/or input an audio signal.
  • audio component 410 includes a microphone (MIC) that is configured to receive an external audio signal when device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 404 or transmitted via communication component 416.
  • audio component 410 also includes a speaker for outputting an audio signal.
  • the I/O interface 412 provides an interface between the processing component 402 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 414 includes one or more sensors for providing status assessment of various aspects to device 400.
  • sensor assembly 414 can detect an open/closed state of device 400, a relative positioning of components, such as the display and keypad of device 400, and sensor component 414 can also detect a change in position of one component of device 400 or device 400. The presence or absence of user contact with device 400, device 400 orientation or acceleration/deceleration, and temperature variation of device 400.
  • Sensor assembly 414 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 414 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 416 is configured to facilitate wired or wireless communication between device 400 and other devices letter.
  • the device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 416 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 416 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • device 400 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above described geographic location information identification method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the above described geographic location information identification method.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 404 comprising instructions executable by processor 420 of apparatus 400 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a non-transitory computer readable storage medium that, when executed by a processor of a mobile terminal, enables the mobile terminal to perform the above described geographic location information identifying method.
  • FIG. 5 is a block diagram of a character string holding apparatus 500, according to an exemplary embodiment.
  • device 500 can be provided as a server.
  • apparatus 500 includes a processing component 522 that further includes one or more processors, and memory resources represented by memory 532 for storing instructions executable by processing component 522, such as an application.
  • An application stored in memory 532 can include one or more modules each corresponding to a set of instructions.
  • processing component 522 is configured to execute instructions to perform the content item display method described above.
  • Apparatus 500 can also include a power supply component 526 configured to perform power management of apparatus 500, a wired or wireless network interface 550 configured to connect apparatus 500 to the network, and an input/output (I/O) interface 558.
  • Device 500 can operate based on an operating system stored in the memory 532, such as Windows Server TM, Mac OS X TM , Unix TM, Linux TM, FreeBSD TM or the like.

Abstract

一种字符串保存方法及装置,所述方法包括:获取待保存的指定字符串(101);获取所述指定字符串的翻译结果(102);获取所述指定字符串所在的语境信息(103);将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库(104)。通过在保存指定字符串的同时保存该指定字符串所在的语境信息,使得在检测到用户对保存在预设字符串数据库中的字符串的查看指令时,能够同时显示字符串及该字符串所在的语境信息,从而改善了提醒效果,使用户能够快速回忆起该字符串及其使用场景。

Description

字符串保存方法及装置
本申请基于申请号为201510546607.4、申请日为2015年8月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及网络技术领域,尤其涉及一种字符串保存方法及装置。
背景技术
随着网络技术的发展,用户通过网络获得的信息种类越来越多,其中文字信息包括中文信息和外文信息,为了实现不同国家的文化、技术等的交流,可以通过阅读外文信息了解其他国家的技术发展及风俗文化等,当用户未具备外文语言的全部知识时,就需要翻译应用提供翻译服务,以帮助用户理解外文信息。
目前,翻译应用在获取到用户需要翻译的字符串之后,对该字符串进行翻译,并将翻译结果显示在屏幕上,进一步地,为方便用户查看,该翻译应用还会将该字符串及其翻译结果进行存储,在检测到用户的查看指令时,显示该字符串及其翻译结果。
通过上述方法能够使用户获知字符串的翻译结果,在需要复习时,也能够快速获取历史保存信息,但是,只显示字符串及其翻译结果,很难使用户回想起该字符串的语境信息,从而不能达到很好的学习效果。
发明内容
为克服相关技术中存在的问题,本公开提供一种字符串保存方法及装置。
根据本公开实施例的第一方面,提供一种字符串保存方法,包括:
获取待保存的指定字符串;
获取该指定字符串的翻译结果;
获取该指定字符串所在的语境信息;
将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信 息对应保存至预设字符串数据库。
在本公开的第一方面的第一种可能实现方式中,该获取待保存的指定字符串包括:
当检测到鼠标对任一字符串的截词操作时,将该字符串确定为待保存的指定字符串;或,
当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将该字符串确定为待保存的指定字符串。
在本公开的第一方面的第二种可能实现方式中,将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库之后,该方法还包括:
当检测到对该预设字符串数据库中的指定字符串的查看指令时,显示该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息。
在本公开的第一方面的第三种可能实现方式中,该方法还包括:
获取该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息的保存时间信息;
在对该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息进行保存时,将该保存时间信息对应保存至该预设字符串数据库。
在本公开的第一方面的第四种可能实现方式中,该获取该指定字符串所在的语境信息包括:
对该指定字符串当前所在位置进行屏幕截图;
根据截图结果,识别该指定字符串所在的语境信息。
根据本公开实施例的第二方面,提供一种字符串保存装置,包括:
第一获取模块,用于获取待保存的指定字符串;
第二获取模块,用于获取该指定字符串的翻译结果;
该第一获取模块还用于获取该指定字符串所在的语境信息;
保存模块,用于将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库。
在本公开的第二方面的第一种可能实现方式中,该第一获取模块用于:
当检测到鼠标对任一字符串的截词操作时,将该字符串确定为待保存的指 定字符串;或,
当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将该字符串确定为待保存的指定字符串。
在本公开的第二方面的第二种可能实现方式中,该装置还包括:
显示模块,用于当检测到对该预设字符串数据库中的指定字符串的查看指令时,显示该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息。
在本公开的第二方面的第三种可能实现方式中,该第一获取模块还用于获取该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息的保存时间信息;
该保存模块还用于在对该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息进行保存时,将该保存时间信息对应保存至该预设字符串数据库。
在本公开的第二方面的第四种可能实现方式中,该第二获取模块用于:
对该指定字符串当前所在位置进行屏幕截图;
根据截图结果,识别该指定字符串所在的语境信息。
第三方面,还提供了一种字符串保存装置,包括:
处理器;
用于存储处理器可执行的指令的存储器;
其中,该处理器被配置为:
获取待保存的指定字符串;
获取所述指定字符串的翻译结果;
获取所述指定字符串所在的语境信息;
将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库。
本公开实施例提供的技术方案带来的有益效果是:
通过在保存指定字符串的同时保存该指定字符串所在的语境信息,使得在检测到用户对保存在预设字符串数据库中的字符串的查看指令时,能够同时显示字符串及该字符串所在的语境信息,从而改善了提醒效果,使用户能够快速 回忆起该字符串以及其使用场景。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种字符串保存方法的流程图。
图2A是根据一示例性实施例示出的一种字符串保存方法的流程图。
图2B是根据一示例性实施例示出的一种字符串显示示意图。
图2C是根据一示例性实施例示出的一种字符串显示示意图。
图3是根据一示例性实施例示出的一种字符串保存装置框图。
图4是根据一示例性实施例示出的一种字符串保存装置400的框图。
图5是根据一示例性实施例示出的一种字符串保存装置500的框图。
具体实施方式
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种字符串保存方法的流程图,如图1所示,网络通信方法用于终端中,包括以下步骤。
在步骤101中,获取待保存的指定字符串。
在步骤102中,获取该指定字符串的翻译结果。
在步骤103中,获取该指定字符串所在的语境信息。
在步骤104中,将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库。
本公开通过在保存指定字符串的同时保存该指定字符串所在的语境信息,使得在检测到用户对保存在预设字符串数据库中的字符串的查看指令时,能够同时显示字符串及该字符串所在的语境信息,从而改善了提醒效果,使用户能够快速回忆起该字符串以及其使用场景。
在本公开的第一种可能实现方式中,该获取待保存的指定字符串包括:
当检测到鼠标对任一字符串的截词操作时,将该字符串确定为待保存的指定字符串;或,
当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将该字符串确定为待保存的指定字符串。
在本公开的第二种可能实现方式中,该将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库之后,该方法还包括:
当检测到对该预设字符串数据库中的指定字符串的查看指令时,显示该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息。
在本公开的第三种可能实现方式中,该方法还包括:
获取该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息的保存时间信息;
在对该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息进行保存时,将该保存时间信息对应保存至该预设字符串数据库。
在本公开的第四种可能实现方式中,该获取该指定字符串所在的语境信息包括:
对该指定字符串当前所在位置进行屏幕截图;
根据截图结果,识别该指定字符串所在的语境信息。
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。
图2A是根据一示例性实施例示出的一种字符串保存方法的流程图。该实施例的执行主体可以为终端,参照图2A,该实施例具体包括:
在步骤201中,获取待保存的指定字符串。
该指定字符串可以是需要翻译的字词,也可以是翻译后需要保存以方便后 续查看的字词。确定该待保存的指定字符串的方法可以为以下两种:
第一种、当检测到鼠标对任一字符串的截词操作时,将该字符串确定为待保存的指定字符串;该截词操作是指通过鼠标的光标划取该字符串的完整内容,通常有以下三个操作构成:当光标停在该字符串的首端或者末端时按下鼠标左键,将光标拖拽至该字符串的末端或者首端后,松开鼠标左键,从而完成对该字符串的截词操作。
第二种、当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,光标的停留位置可以是该字符串在屏幕上显示位置,也可以是该字符串在屏幕上显示位置的指定范围内;将该字符串确定为待保存的指定字符串;该预设时长可以为秒级。
上述两种待保存字符串确定方法只针对鼠标取词而言,对于具有触摸屏的终端,可以通过触摸操作的具体位置和停留时间等来确定待保存字符串,其具体方法与上述采用鼠标的确认方法相类似,在此不作赘述。
在步骤202中,获取该指定字符串的翻译结果。
将步骤201中获取到的指定字符串确定为待翻译的字符串,以该字符串为索引,通过翻译引擎查找该字符串的翻译结果。翻译结果的获取方法可以包括以下两种:
第一种、当终端处于未联网状态时,在基本词库中查找该字符串的翻译结果,该基本词库用于存储字符串的基本释义,从该基本词库中获得的翻译结果即作为最终的翻译结果。
第二种、当终端处于联网状态时,除了在基本词库中查找该字符串的翻译结果,还可以在网络词库中查找该字符串的翻译结果,该网络词库用于存储字符串的网络释义,网络词库中的存储内容可以进行周期性更新,以提供更新、更完整的字符串翻译结果,该翻译结果包括从该基本词库中获得的翻译结果和从该网络词库中获得的翻译结果。
进一步地,当终端处于联网状态时,还可以直接从网络词库中查找字符串的翻译结果,本公开实施例对翻译结果的获取方法不作限定。
需要说明的是,获取翻译结果后,可以将该翻译结果显示在对应字符串的旁边,也可以显示在鼠标的光标附近,本公开实施例对翻译结果的显示位置不作限定。
在步骤203中,获取该指定字符串所在的语境信息。
该语境信息是指该指定字符串当前所在的句子或段落信息,语境信息的获取方法可以包括以下两个步骤:
步骤一、对该指定字符串当前所在位置进行屏幕截图。
通过屏幕截图获得该指定字符串在屏幕上的显示位置信息,该显示位置信息可以是截图矩形框的像素点坐标信息。
步骤二、根据截图结果,识别该指定字符串所在的语境信息。
也即是,根据步骤一获得的该指定字符串在屏幕上的显示位置信息,识别该指定字符串所在的语境信息;具体方法可以为:采用OCR(Optical Character Recognition,光学字符识别)技术进行语境信息识别,当该语境信息为该指定字符串当前所在的句子时,从截图矩形框左边的坐标位置开始向左进行识别,当识别到表示句子结束的标点符号时,停止识别,并将识别内容确定为语境信息,同时,从截图矩形框右边的坐标位置开始向右进行识别,当识别到表示句子结束的标点符号时,停止识别,并将识别内容确定为语境信息;当识别内容为外文时,该表示句子结束的标点符号可以为“.”“!”“?”等,当识别内容为中文时,该表示句子结束的标点符号可以为“。”“!”“?”等。
当该语境信息为该指定字符串当前所在的段落时,从截图矩形框左边的坐标位置开始向左进行识别,当识别到连续空格符号时,停止识别,并将识别内容确定为语境信息,同时,从截图矩形框右边的坐标位置开始向右进行识别,当识别到连续空格符号时,停止识别,并将识别内容确定为语境信息。
除了采用OCR技术完成语境信息的识别外,也可以采用其他识别技术对字符串所在语境信息进行识别,本公开实施例对此不作限定。
在步骤204中,将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库。
该预设字符串数据库用于保存字符串、该字符串的翻译结果和该字符串所在的语境信息,以方便用户后续查看及复习,具体保存方法可以为:根据待保存字符串,判断该预设字符串数据库中是否包括该字符串,当该预设字符串数据库中不包括该字符串时,保存该字符串、该字符串的翻译结果和该字符串所在的语境信息;当该预设字符串数据库中包括该字符串时,判断该预设字符串数据库中对应保存的该字符串所在的语境信息是否与该字符串当前所在的语境 信息相同,若相同,则不保存,若不同,则在预设字符串数据库中该字符串保存位置的对应位置保存该字符串当前所在的语境信息。
进一步地,为了更好地起到提醒作用,该预设字符串还可以用于保存字符串所在语境信息的保存时间信息,具体保存方法可以为:根据待保存字符串,判断该预设字符串数据库中是否包括该字符串,当该预设字符串数据库中不包括该字符串时,保存该字符串、该字符串的翻译结果、该字符串所在的语境信息和该字符串所在语境信息的保存时间信息;当该预设字符串数据库中包括该字符串时,判断该预设字符串数据库中对应保存的该字符串所在的语境信息是否与该字符串当前所在的语境信息相同,若相同,则更新字符串所在的语境信息的保存时间信息,也即是,用本次该字符串所在的语境信息的保存时间替代该预设字符串数据库中的该字符串所在的语境信息的保存时间信息,若不同,则在预设字符串数据库中该字符串保存位置的对应位置保存该字符串当前所在的语境信息以及保存时间信息。
该预设字符串数据库中还可以保存与该待保存字符串相关的其他信息,且除了采用上述保存方法外,也可以采用其他方法进行保存,本公开实施例对此不作限定。
在步骤205中,当检测到对该预设字符串数据库中的指定字符串的查看指令时,显示该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息。
如图2B所示为一种显示字符串所在的语境信息的示意图,确定字符串显示顺序的方法可以为:当该指定字符串为外单词时,可以根据外文单词的首字母进行顺序显示,当该指定字符串为中文时,可以根据中文首字的拼音首字母进行顺序显示;当保存内容包括字符串所在的语境信息的保存时间信息时,还可以根据该保存时间顺序进行顺序显示,除上述方法外,还可以采用其他方法进行顺序显示,本公开实施例对此不作限定。
进一步地,为了在一个界面中尽量多的显示预设字符串数据库中保存的字符串,可以采用折叠显示的方式显示字符串所在的语境信息,如图2B所示,图2B中“字符串1的语境信息”左边的图标为展开显示操作图标,当检测到用户对该图标的点击操作时,显示界面切换至图2C所示的界面,即在相应位置展开显示区域,在该显示区域内显示字符串1的语境信息的详细内容,当保存内容包 括字符串所在的语境信息的保存时间信息时,还可以在相应位置显示该保存信息时间;图2C中“字符串1的语境信息”左边的图标为收起显示操作图标,当检测到用户对该图标的点击操作时,显示界面切换至图2B所示的界面。
除上述方法外,还可以采用其他方法显示字符串所在语境信息,本公开实施例对此不作限定。
本公开实施例提供的方法,通过保存字符串时保存该字符串所在的语境信息,使得在检测到用户对保存在预设字符串数据库中的字符串的查看指令时,能够同时显示字符串及该字符串所在的语境信息,从而改善了提醒效果,使用户能够快速回忆起该字符串及其使用场景;进一步地,通过采用折叠显示的方式,使得在一个显示界面中能够尽量多的显示该预设字符串数据库中保存的字符串,使用户查看更方便。
图3是根据一示例性实施例示出的一种字符串保存装置框图。参照图3,该装置包括第一获取模块301,第二获取模块302,保存模块303。
第一获取模块,用于获取待保存的指定字符串;
第二获取模块,用于获取该指定字符串的翻译结果;
该第一获取模块还用于获取该指定字符串所在的语境信息;
保存模块,用于将该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息对应保存至预设字符串数据库。
在本公开提供的第一种可能实现方式中,该第一获取模块用于:
当检测到鼠标对任一字符串的截词操作时,将该字符串确定为待保存的指定字符串;或,
当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将该字符串确定为待保存的指定字符串。
在本公开提供的第二种可能实现方式中,该装置还包括:
显示模块,用于当检测到对该预设字符串数据库中的指定字符串的查看指令时,显示该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息。
在本公开提供的第三种可能实现方式中,该第一获取模块还用于获取该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息的保存时 间信息;
该保存模块还用于在对该指定字符串、该指定字符串的翻译结果、该指定字符串所在的语境信息进行保存时,将该保存时间信息对应保存至该预设字符串数据库。
在本公开提供的第四种可能实现方式中,该第二获取模块用于:
对该指定字符串当前所在位置进行屏幕截图;
根据截图结果,识别该指定字符串所在的语境信息。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图4是根据一示例性实施例示出的一种字符串保存装置400的框图。例如,装置400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图4,装置400可以包括以下一个或多个组件:处理组件402,存储器404,电源组件406,多媒体组件404,音频组件410,输入/输出(I/O)接口412,传感器组件414,以及通信组件416。
处理组件402通常控制装置400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件402可以包括一个或多个处理器420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件402可以包括一个或多个模块,便于处理组件402和其他组件之间的交互。例如,处理组件402可以包括多媒体模块,以方便多媒体组件408和处理组件402之间的交互。
存储器404被配置为存储各种类型的数据以支持在装置400的操作。这些数据的示例包括用于在装置400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件406为装置400的各种组件提供电力。电源组件406可以包括电 源管理系统,一个或多个电源,及其他与为装置400生成、管理和分配电力相关联的组件。
多媒体组件408包括在所述装置400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件408包括一个前置摄像头和/或后置摄像头。当装置400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件410被配置为输出和/或输入音频信号。例如,音频组件410包括一个麦克风(MIC),当装置400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件416发送。在一些实施例中,音频组件410还包括一个扬声器,用于输出音频信号。
I/O接口412为处理组件402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件414包括一个或多个传感器,用于为装置400提供各个方面的状态评估。例如,传感器组件414可以检测到装置400的打开/关闭状态,组件的相对定位,例如所述组件为装置400的显示器和小键盘,传感器组件414还可以检测装置400或装置400一个组件的位置改变,用户与装置400接触的存在或不存在,装置400方位或加速/减速和装置400的温度变化。传感器组件414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件416被配置为便于装置400和其他设备之间有线或无线方式的通 信。装置400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件416还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述地理位置信息识别方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器404,上述指令可由装置400的处理器420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行上述地理位置信息识别方法。
图5是根据一示例性实施例示出的一种字符串保存装置500的框图。例如,装置500可以被提供为一服务器。参照图5,装置500包括处理组件522,其进一步包括一个或多个处理器,以及由存储器532所代表的存储器资源,用于存储可由处理部件522的执行的指令,例如应用程序。存储器532中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件522被配置为执行指令,以执行上述内容项显示方法。
装置500还可以包括一个电源组件526被配置为执行装置500的电源管理,一个有线或无线网络接口550被配置为将装置500连接到网络,和一个输入输出(I/O)接口558。装置500可以操作基于存储在存储器532的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化, 这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (11)

  1. 一种字符串保存方法,其特征在于,所述方法包括:
    获取待保存的指定字符串;
    获取所述指定字符串的翻译结果;
    获取所述指定字符串所在的语境信息;
    将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库。
  2. 根据权利要求1所述的方法,其特征在于,所述获取待保存的指定字符串包括:
    当检测到鼠标对任一字符串的截词操作时,将所述字符串确定为待保存的指定字符串;或,
    当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将所述字符串确定为待保存的指定字符串。
  3. 根据权利要求1所述的方法,其特征在于,所述将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库之后,所述方法还包括:
    当检测到对所述预设字符串数据库中的指定字符串的查看指令时,显示所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息的保存时间信息;
    在对所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息进行保存时,将所述保存时间信息对应保存至所述预设字符串数据库。
  5. 根据权利要求1所述的方法,其特征在于,所述获取所述指定字符串所在的语境信息包括:
    对所述指定字符串当前所在位置进行屏幕截图;
    根据截图结果,识别所述指定字符串所在的语境信息。
  6. 一种字符串保存装置,其特征在于,所述装置包括:
    第一获取模块,用于获取待保存的指定字符串;
    第二获取模块,用于获取所述指定字符串的翻译结果;
    所述第一获取模块还用于获取所述指定字符串所在的语境信息;
    保存模块,用于将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库。
  7. 根据权利要求6所述的装置,其特征在于,所述第一获取模块用于:
    当检测到鼠标对任一字符串的截词操作时,将所述字符串确定为待保存的指定字符串;或,
    当检测到鼠标的光标在任一字符串的停留时间超过预设时长时,将所述字符串确定为待保存的指定字符串。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    显示模块,用于当检测到对所述预设字符串数据库中的指定字符串的查看指令时,显示所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息。
  9. 根据权利要求6所述的装置,其特征在于,所述第一获取模块还用于获取所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息的保存时间信息;
    所述保存模块还用于在对所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息进行保存时,将所述保存时间信息对应保存至所述预设字符串数据库。
  10. 根据权利要求6所述的装置,其特征在于,所述第二获取模块用于:
    对所述指定字符串当前所在位置进行屏幕截图;
    根据截图结果,识别所述指定字符串所在的语境信息。
  11. 一种字符串保存装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行的指令的存储器;
    其中,所述处理器被配置为:
    获取待保存的指定字符串;
    获取所述指定字符串的翻译结果;
    获取所述指定字符串所在的语境信息;
    将所述指定字符串、所述指定字符串的翻译结果、所述指定字符串所在的语境信息对应保存至预设字符串数据库。
PCT/CN2015/097610 2015-08-31 2015-12-16 字符串保存方法及装置 WO2017035985A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
MX2016001359A MX2016001359A (es) 2015-08-31 2015-12-16 Metodo y dispositivo para guardado de cadenas.
RU2016103155A RU2636673C2 (ru) 2015-08-31 2015-12-16 Способ и устройство для сохранения строки
JP2017536998A JP2017531889A (ja) 2015-08-31 2015-12-16 文字列記憶方法及び装置
KR1020167003792A KR20170037862A (ko) 2015-08-31 2015-12-16 문자열 저장방법 및 장치

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510546607.4 2015-08-31
CN201510546607.4A CN105159893A (zh) 2015-08-31 2015-08-31 字符串保存方法及装置

Publications (1)

Publication Number Publication Date
WO2017035985A1 true WO2017035985A1 (zh) 2017-03-09

Family

ID=54800751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/097610 WO2017035985A1 (zh) 2015-08-31 2015-12-16 字符串保存方法及装置

Country Status (8)

Country Link
US (1) US20170060822A1 (zh)
EP (1) EP3136258A1 (zh)
JP (1) JP2017531889A (zh)
KR (1) KR20170037862A (zh)
CN (1) CN105159893A (zh)
MX (1) MX2016001359A (zh)
RU (1) RU2636673C2 (zh)
WO (1) WO2017035985A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291703B (zh) * 2017-05-17 2021-06-08 百度在线网络技术(北京)有限公司 翻译服务应用中的发音方法及装置
CN110610090B (zh) * 2019-08-28 2022-05-03 北京小米移动软件有限公司 信息处理方法及装置、存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008191912A (ja) * 2007-02-05 2008-08-21 Sharp Corp 電子機器、定型文出力方法、プログラム、及び、記録媒体
CN101504639A (zh) * 2008-12-24 2009-08-12 无敌科技(西安)有限公司 电子阅读笔记方法及其系统
CN102314412A (zh) * 2010-06-30 2012-01-11 汉王科技股份有限公司 记录语境信息以及追溯生词语境的方法和系统
CN102930263A (zh) * 2012-09-27 2013-02-13 百度国际科技(深圳)有限公司 一种信息处理方法及装置
CN103294665A (zh) * 2012-02-22 2013-09-11 汉王科技股份有限公司 电子阅读器文本翻译的方法及电子阅读器
CN104252483A (zh) * 2013-06-28 2014-12-31 英业达科技有限公司 具情景记忆功能的词汇记录系统及其方法
CN104636326A (zh) * 2014-12-30 2015-05-20 小米科技有限责任公司 一种文字信息的翻译方法及装置

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1176432C (zh) * 1999-07-28 2004-11-17 国际商业机器公司 提供本国语言查询服务的方法和系统
CN1302030B (zh) * 1999-12-24 2010-04-21 纽昂斯通讯公司 词义消歧的机器翻译方法和系统
US20020091509A1 (en) * 2001-01-02 2002-07-11 Yacov Zoarez Method and system for translating text
US20040148591A1 (en) * 2003-01-23 2004-07-29 International Business Machines Corporation Method, apparatus, and program for automated application context delivery to translators
US7366653B2 (en) * 2003-12-22 2008-04-29 Siebel Systems, Inc. Methods and apparatuses for string translation
US7983896B2 (en) * 2004-03-05 2011-07-19 SDL Language Technology In-context exact (ICE) matching
US20050234700A1 (en) * 2004-04-15 2005-10-20 International Business Machines Corporation Autonomic method, system and program product for translating content
US7987087B2 (en) * 2005-06-15 2011-07-26 Xerox Corporation Method and system for improved software localization
EP1870804A1 (en) * 2006-06-22 2007-12-26 Microsoft Corporation Dynamic software localization
US8606607B2 (en) * 2007-01-03 2013-12-10 Vistaprint Schweiz Gmbh Translation processing using a translation memory
US8725490B2 (en) * 2007-10-18 2014-05-13 Yahoo! Inc. Virtual universal translator for a mobile device with a camera
JP5007977B2 (ja) * 2008-02-13 2012-08-22 独立行政法人情報通信研究機構 機械翻訳装置、機械翻訳方法、及びプログラム
KR101263332B1 (ko) * 2009-09-11 2013-05-20 한국전자통신연구원 모바일 기기에서 사용자 상호작용을 이용한 자동 번역 장치 및 그 방법
US8527259B1 (en) * 2011-02-28 2013-09-03 Google Inc. Contextual translation of digital content
US9760566B2 (en) * 2011-03-31 2017-09-12 Microsoft Technology Licensing, Llc Augmented conversational understanding agent to identify conversation context between two humans and taking an agent action thereof
US8260615B1 (en) * 2011-04-25 2012-09-04 Google Inc. Cross-lingual initialization of language models
RU2453916C1 (ru) * 2011-05-05 2012-06-20 Игорь Викторович Лебедев Способ поиска информационных ресурсов с использованием переадресаций
KR101694286B1 (ko) * 2012-05-02 2017-01-09 한국전자통신연구원 양방향 자동 통역 및 번역 서비스 제공 장치 및 그 방법
CN103853707A (zh) * 2012-12-06 2014-06-11 英业达科技有限公司 一次性翻译多个目标字词的系统及其方法
US9817821B2 (en) * 2012-12-19 2017-11-14 Abbyy Development Llc Translation and dictionary selection by context
US8761513B1 (en) * 2013-03-15 2014-06-24 Translate Abroad, Inc. Systems and methods for displaying foreign character sets and their translations in real time on resource-constrained mobile devices
US9436682B2 (en) * 2014-06-24 2016-09-06 Google Inc. Techniques for machine language translation of text from an image based on non-textual context information from the image
US10140293B2 (en) * 2015-05-18 2018-11-27 Google Llc Coordinated user word selection for translation and obtaining of contextual information for the selected word
US9852131B2 (en) * 2015-05-18 2017-12-26 Google Llc Techniques for providing visual translation cards including contextually relevant definitions and examples
US9778929B2 (en) * 2015-05-29 2017-10-03 Microsoft Technology Licensing, Llc Automated efficient translation context delivery

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008191912A (ja) * 2007-02-05 2008-08-21 Sharp Corp 電子機器、定型文出力方法、プログラム、及び、記録媒体
CN101504639A (zh) * 2008-12-24 2009-08-12 无敌科技(西安)有限公司 电子阅读笔记方法及其系统
CN102314412A (zh) * 2010-06-30 2012-01-11 汉王科技股份有限公司 记录语境信息以及追溯生词语境的方法和系统
CN103294665A (zh) * 2012-02-22 2013-09-11 汉王科技股份有限公司 电子阅读器文本翻译的方法及电子阅读器
CN102930263A (zh) * 2012-09-27 2013-02-13 百度国际科技(深圳)有限公司 一种信息处理方法及装置
CN104252483A (zh) * 2013-06-28 2014-12-31 英业达科技有限公司 具情景记忆功能的词汇记录系统及其方法
CN104636326A (zh) * 2014-12-30 2015-05-20 小米科技有限责任公司 一种文字信息的翻译方法及装置

Also Published As

Publication number Publication date
KR20170037862A (ko) 2017-04-05
JP2017531889A (ja) 2017-10-26
US20170060822A1 (en) 2017-03-02
RU2636673C2 (ru) 2017-11-27
MX2016001359A (es) 2017-06-29
RU2016103155A (ru) 2017-09-26
EP3136258A1 (en) 2017-03-01
CN105159893A (zh) 2015-12-16

Similar Documents

Publication Publication Date Title
US11120078B2 (en) Method and device for video processing, electronic device, and storage medium
WO2016206292A1 (zh) 文本输入方法和装置
WO2017020482A1 (zh) 票务信息展示方法及装置
RU2663709C2 (ru) Способ и устройство для обработки информации
WO2017092121A1 (zh) 信息处理的方法及装置
WO2016065814A1 (zh) 信息选取方法及装置
CN107229403B (zh) 一种信息内容选择方法及装置
CN105447109A (zh) 关键字词搜索方法及装置
WO2018188410A1 (zh) 反馈的响应方法及装置
CN106331328B (zh) 信息提示的方法及装置
CN107360322B (zh) 信息提示方法及装置
EP3104282A1 (en) Search method and search apparatus
WO2017035985A1 (zh) 字符串保存方法及装置
CN109799916B (zh) 一种候选项联想方法和装置
WO2019095812A1 (zh) 界面展示方法及装置
CN108108356B (zh) 一种文字翻译方法、装置及设备
CN112667852B (zh) 基于视频的搜索方法、装置、电子设备及存储介质
CN111597325B (zh) 一种文本查询方法及装置
CN111414766B (zh) 一种翻译方法及装置
CN109145151B (zh) 一种视频的情感分类获取方法及装置
US10423706B2 (en) Method and device for selecting information
CN112068793A (zh) 一种语音输入方法及装置
WO2017166635A1 (zh) 一种联系人创建方法、装置及移动设备
CN111414768A (zh) 一种信息展示方法、装置和电子设备
CN109145310B (zh) 一种搜索方法、装置和设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: MX/A/2016/001359

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 20167003792

Country of ref document: KR

Kind code of ref document: A

Ref document number: 2017536998

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2016103155

Country of ref document: RU

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15902791

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15902791

Country of ref document: EP

Kind code of ref document: A1