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.
Example one
Referring to fig. 1, a flowchart illustrating steps of an information searching method according to a first embodiment of the present invention is shown.
The information searching method of the embodiment of the invention comprises the following steps:
step 101: and receiving touch operation on a text area in the picture, and uploading the position information of the touched text area and the picture identification of the picture to a server.
The picture can be a picture in a gallery or a picture in a webpage. The picture includes text information, and the text information may be arranged in different text areas, for example: a piece of text information is arranged at the upper left corner of the picture, and a piece of text information is arranged at the lower right corner of the picture. Or may be arranged in the same text area.
When a user previews a picture, if a certain section of text information in the picture is interested, the user can touch a text area where the section of text information is located. The touch operation can be a single click, a double click or a long press operation.
The mobile terminal can upload the picture to the server in advance, the server detects the text regions in the picture, and the position information of each text region and the text recognition result corresponding to the text region are determined, so that the recognition of the text information in the picture is completed. And after receiving the picture identification and the position information sent by the mobile terminal, inquiring a corresponding text recognition result.
It should be noted that, if the mobile terminal uploads the picture to the server in advance and the server completes the identification of the text information in the picture, the picture identifier and the position information of the text region are uploaded to the server in step 101, and the text identification result returned by the server can be successfully received; on the contrary, if the mobile terminal does not upload the picture to the server in advance, the text recognition result returned by the server cannot be successfully received, but the recognition failure message returned by the server is received. When receiving the identification failure message, the user can manually define a text area in the picture, the mobile terminal uploads the defined text area to the server, and the server analyzes text information in the text area to obtain a text identification result and returns the text identification result to the mobile terminal.
Step 102: and receiving a text recognition result returned by the server, and determining the recommended application program according to a recommended field contained in the text recognition result.
The text recognition result may include, but is not limited to: text keywords and recommendation fields.
The text keywords are obtained by the mobile terminal through semantic analysis on text information contained in the text area. The recommendation field can be determined by the server according to the file keywords and semantics, then the application programs which are associated with the category are determined according to the category of the keywords, and the name or identification of the determined application programs are used as the recommendation field.
For example: the text information contained in the text area is 'A place landscape is beautiful, a tourist is welcomed', the text keyword can be determined to be A by analyzing the text information, and A is determined to be a place noun, the application program related to the place can be determined to be a map, a takeout and the like, and therefore the recommendation field can be set to be a map, a takeout and the like.
Step 103: displaying the shortcut of the recommended application program in the interface.
The number of recommended applications may be one or more, and the specific number of recommended applications may be set by those skilled in the art according to actual needs, which is not specifically limited in the embodiment of the present invention.
Step 104: and receiving a selection instruction of the shortcut of the target recommended application program, and starting the target recommended application program.
The user selects a target recommended application program from the recommended application programs, the mobile terminal can be triggered to start the target recommended application program by clicking the shortcut of the target recommended application program, and the mobile terminal automatically jumps to a keyword input box display interface in the target application program from the picture preview interface.
Step 105: and adding the text keywords contained in the text recognition result into a keyword input box of the target recommendation application program for searching.
The mobile terminal adds the text keywords to the keyword input box of the target recommendation application program to serve as search keywords, so that the search keywords do not need to be manually input by a user, and the use experience of the user can be improved. For example: if the opened target application program is a map application program, after the map application program is opened, a text keyword is added in a keyword input box, namely a place search bar, of the map application program, and the map application program can be triggered to search the position of the place indicated by the text keyword.
The information searching method provided by the embodiment of the invention uploads the position information executed by the touched text area and the picture identification of the touched picture to the server, receives the text recognition result corresponding to the text area returned by the server, determines the recommended application program according to the file recognition result and displays the shortcut of the recommended application program in the interface, and automatically starts the target recommended application program and adds the text keywords contained in the text recognition result to the keyword input box of the target recommended application program for searching when receiving the selection instruction of the shortcut of a certain recommended application program, thereby realizing convenient searching of the text information in the picture. The user does not need to jump out of the picture preview interface to manually search the target application program, and does not need to manually enter search keywords in the opened target application program, so that the operation is convenient, the search time is saved, the labor is saved, and the use experience of the user can be improved.
Example two
Referring to fig. 2, a flowchart illustrating steps of an information searching method according to a second embodiment of the present invention is shown.
The information searching method of the embodiment of the invention specifically comprises the following steps:
step 201: and receiving touch operation on a text area in the picture, and uploading the position information of the touched text area and the picture identification of the picture to a server.
For a picture, there are two possibilities, one is that the text information in the picture is already recognized in advance in the server, and at this time, the position information of each text region in the picture and the text recognition result corresponding to the text region are stored in the server. Another possibility is that the text information in the picture is not identified in advance in the server, and accordingly, the position information of each text region in the picture and the text identification result corresponding to the text region are not stored in the server.
For the two possibilities, after the text area in the picture is touched correspondingly, the mobile terminal uploads the position information of the touched text area and the picture identifier of the picture to the server, and the server may return two results, one result is that the text recognition result returned by the server is received, and the other result is that the recognition failure message returned by the server is received. When the text recognition result returned by the server is received, thestep 205 and the subsequent steps are directly executed without executing thesteps 202 to 204. When receiving the identification failure message, the user may manually define a text region in the picture, the mobile terminal uploads the defined text region to the server, and the server parses the text information in the text region to obtain a text identification result and returns the text identification result to the mobile terminal, where the specific process is as described insteps 202 to 204.
One preferable scheme is that the mobile terminal may upload a locally stored picture to the server according to a preset time interval, so that the server loads a text region in the picture in advance, and analyzes text information in the text region to obtain a text recognition result.
According to the preferred scheme, the server side recognizes the text of the picture in advance, so that when the mobile terminal sends the position information of the touched text area and the picture identification of the picture, the server can directly inquire the corresponding text recognition result, and the mobile terminal does not need to wait for a long time.
Step 202: and if receiving an identification failure message returned by the server, outputting a prompt message to prompt the user to manually circle the text area.
The mobile terminal may be preset with a text area selection box, which may be in any suitable shape, for example: rectangular, circular, or diamond shaped, etc.
Step 203: and receiving a delineation operation of a user on the text area in the picture.
When the text region is defined, the user can select a text region selection frame preset in the mobile terminal, and the text region is defined in the picture by adjusting the position and the size of the text region selection frame.
Step 204: and intercepting the defined text area, and uploading the intercepted text area to a server.
The server analyzes the text information in the text area to obtain a text recognition result.
Only the defined text area is intercepted and uploaded to the server, and compared with the method of uploading the whole picture to the server, the method not only saves browsing consumed by uploading, but also can reduce processing burden of the server and save processing time.
And when the server analyzes the text information in the text area, performing semantic analysis on the text information to determine to obtain text keywords, application program recommended fields and confidence values of the application program recommended fields, wherein the obtained information forms a text recognition result. And after the server obtains the text recognition result through analysis, returning the text recognition result to the mobile terminal.
Step 205: and receiving a text recognition result returned by the server, and determining the recommended application program according to a recommended field contained in the text recognition result.
The text recognition result may include one or more recommendation fields, and when determining the recommended application program, the first application programs matched with the locally installed recommendation fields may all be determined as the recommended application program for the user to select. The first application program can be further filtered to obtain a recommended application program.
One way to preferably determine recommended applications is to:
firstly, when a text recognition result returned by a server is received, determining recommendation fields and confidence values of the recommendation fields contained in the recognition result; secondly, determining a first application program which is installed in the mobile terminal and matched with the recommended fields aiming at each recommended field; thirdly, sequencing the first application programs according to the confidence values of the corresponding recommendation fields; and finally, selecting the first application programs with the top sequence of the preset number as recommended application programs. Wherein, the preset number can be set by the technicians in the field according to the actual requirement, for example: set to 4, 3, or 2, etc.
The method for preferentially determining the recommended application program can improve the reliability and accuracy of the recommended application program and facilitate a user to quickly find the target recommended application program.
Step 206: displaying the shortcut of the recommended application program in the interface.
And generating a shortcut for each recommended application program, and triggering the mobile terminal to start the target recommended application program by the user through selecting the shortcut of the target recommended application program.
Step 207: and receiving a selection instruction of the shortcut of the target recommended application program, and starting the target recommended application program.
The selection instruction may be a single-click instruction, a double-click instruction, a long-press instruction, or the like for a shortcut of the target recommended application program, and a specific form of the selection instruction is not limited in the embodiment of the present invention.
Step 208: and adding the text keywords contained in the text recognition result into a keyword input box of the target recommendation application program for searching.
The mobile terminal adds the text keywords to the keyword input box of the target recommendation application program to serve as search keywords, so that the search keywords do not need to be manually input by a user, and the use experience of the user can be improved.
For example: taking processing a picture containing a non-Chinese commodity name as an example, if a user knows a commodity corresponding to the commodity name, the user defines a text region containing the commodity name in the picture, the mobile terminal uploads the defined text region to the server, and the server analyzes the commodity name in the text region to obtain a text recognition result. The mobile terminal displays shortcuts of the recommended application programs, such as shortcuts of translation apps, browsers, Tianmao and the like, according to the text recognition result, and a user can directly obtain a search result based on the commodity name by clicking the shortcuts, such as a translated result, commodity information retrieved by the browser or a search result of the commodity on the Tianmao.
The information searching method provided by the embodiment of the invention has the beneficial effects that the information searching method shown in the first embodiment has, and the recommended application programs are screened according to the confidence values of the recommended fields contained in the text recognition result, so that the reliability and the accuracy of the recommended application programs can be improved, and a user can conveniently and quickly find the target recommended application program.
EXAMPLE III
Referring to fig. 3, a block diagram of a mobile terminal according to a third embodiment of the present invention is shown.
The mobile terminal of the embodiment of the invention can comprise: the uploading module 301 is configured to receive a touch operation on a text region in a picture, and upload position information of the touched text region and a picture identifier of the picture to a server; a determining module 302, configured to receive a text recognition result returned by the server, and determine a recommended application according to a recommended field included in the text recognition result; the display module 303 is configured to display a shortcut of the recommended application in the interface; a receiving module 304, configured to receive a selection instruction of a shortcut to a target recommended application program, and start the target recommended application program; an adding module 305, configured to add the text keywords included in the text recognition result to the keyword input box of the target recommendation application program for searching.
Preferably, the mobile terminal further includes: an output module 306, configured to output a prompt message to prompt a user to manually define a text region if an identification failure message returned by the server is received after the uploading module 301 uploads the position information of the touched text region and the picture identifier of the picture to the server; an operation detection module 307, configured to receive a delineating operation of a text region in the picture by a user; and the intercepting module 308 is configured to intercept the delineated text region, and upload the intercepted text region to the server.
Preferably, the determining module 302 comprises: a field determining submodule 3021, configured to receive a text recognition result returned by the server, and determine recommendation fields and confidence values of the recommendation fields included in the recognition result; an application program determining submodule 3022, configured to determine, for each recommended field, a first application program that is installed in the mobile terminal and matches the recommended field; the sequencing submodule is used for sequencing the first application programs according to the confidence values of the corresponding application program recommendation fields; a selecting submodule 3023 is configured to select a preset number of top ranked first applications as recommended applications.
Preferably, the mobile terminal further includes: the pre-loading module 309 is configured to upload a locally stored picture to the server according to a preset time interval before the uploading module 301 receives a touch operation on a text region in the picture and uploads the position information of the touched text region and the picture identifier of the picture to the server, so that the server pre-loads the text region in the picture and analyzes the text information in the text region to obtain a text recognition result.
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.
The mobile terminal provided by the embodiment of the invention uploads the position information executed by the touched text area and the picture identifier of the touched picture to the server, receives the text recognition result corresponding to the text area returned by the server, determines the recommended application program according to the file recognition result and displays the shortcut of the recommended application program in the interface, and automatically starts the target recommended application program and adds the text keywords contained in the text recognition result to the keyword input box of the target recommended application program for searching when receiving the selection instruction of the shortcut of a certain recommended application program, thereby realizing convenient searching of the text information in the picture. The user does not need to jump out of the picture preview interface to manually search the target application program, and does not need to manually enter search keywords in the opened target application program, so that the operation is convenient, the search time is saved, the labor is saved, and the use experience of the user can be improved.
Example four
Referring to fig. 4, a block diagram of a mobile terminal according to a fourth embodiment of the present invention is shown.
Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where themobile 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, andpower 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.
Theprocessor 410 is configured to receive a touch operation on a text region in a picture, and upload position information of the touched text region and a picture identifier of the picture to a server; receiving a text recognition result returned by the server, and determining a recommended application program according to a recommended field contained in the text recognition result; displaying a shortcut of a recommended application program in an interface; receiving a selection instruction of a shortcut of a target recommended application program, and starting the target recommended application program; and adding the text keywords contained in the text recognition result into a keyword input box of the target recommendation application program for searching.
The mobile terminal provided by the embodiment of the invention uploads the position information executed by the touched text area and the picture identifier of the touched picture to the server, receives the text recognition result corresponding to the text area returned by the server, determines the recommended application program according to the file recognition result and displays the shortcut of the recommended application program in the interface, and automatically starts the target recommended application program and adds the text keywords contained in the text recognition result to the keyword input box of the target recommended application program for searching when receiving the selection instruction of the shortcut of a certain recommended application program, thereby realizing convenient searching of the text information in the picture. The user does not need to jump out of the picture preview interface to manually search the target application program, and does not need to manually enter search keywords in the opened target application program, so that the operation is convenient, the search time is saved, the labor is saved, and the use experience of the user can be improved.
It should be understood that, in the embodiment of the present invention, theradio 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 theprocessor 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, theradio 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 thenetwork module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
Theaudio output unit 403 may convert audio data received by theradio frequency unit 401 or thenetwork module 402 or stored in thememory 409 into an audio signal and output as sound. Also, theaudio 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.). Theaudio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
Theinput unit 404 is used to receive audio or video signals. Theinput Unit 404 may include a Graphics Processing Unit (GPU) 4041 and amicrophone 4042, and theGraphics 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 thedisplay unit 406. The image frames processed by thegraphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via theradio frequency unit 401 or thenetwork module 402. Themicrophone 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 theradio frequency unit 401 in case of the phone call mode.
Themobile terminal 400 also includes at least onesensor 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 thedisplay panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off thedisplay panel 4061 and/or the backlight when themobile 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); thesensors 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.
Thedisplay unit 406 is used to display information input by the user or information provided to the user. TheDisplay unit 406 may include aDisplay panel 4061, and theDisplay panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Theuser 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, theuser input unit 407 includes atouch panel 4071 andother 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 neartouch panel 4071 using a finger, a stylus, or any suitable object or attachment). Thetouch 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 theprocessor 410, receives a command from theprocessor 410, and executes the command. In addition, thetouch 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 thetouch panel 4071, theuser input unit 407 may includeother input devices 4072. Specifically, theother 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, thetouch panel 4071 can be overlaid on thedisplay panel 4061, and when thetouch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to theprocessor 410 to determine the type of the touch event, and then theprocessor 410 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 4, thetouch panel 4071 and thedisplay panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, thetouch panel 4071 and thedisplay panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
Theinterface unit 408 is an interface through which an external device is connected to themobile 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. Theinterface 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 themobile terminal 400 or may be used to transmit data between themobile terminal 400 and external devices.
Thememory 409 may be used to store software programs as well as various data. Thememory 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, thememory 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.
Theprocessor 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 thememory 409 and calling data stored in thememory 409, thereby integrally monitoring the mobile terminal.Processor 410 may include one or more processing units; preferably, theprocessor 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 theprocessor 410.
Themobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, thepower supply 411 may be logically connected to theprocessor 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, themobile 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 aprocessor 410, amemory 409, and a computer program that is stored in thememory 409 and can be run on theprocessor 410, and when being executed by theprocessor 410, the computer program implements each process of the above-mentioned information search 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 each process of the above-mentioned information search method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the detailed description is 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.