CN111465918B - Method for displaying service information in preview interface and electronic equipment - Google Patents

Method for displaying service information in preview interface and electronic equipment Download PDF

Info

Publication number
CN111465918B
CN111465918B CN201880080687.0A CN201880080687A CN111465918B CN 111465918 B CN111465918 B CN 111465918B CN 201880080687 A CN201880080687 A CN 201880080687A CN 111465918 B CN111465918 B CN 111465918B
Authority
CN
China
Prior art keywords
preview
electronic device
function
character
service information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880080687.0A
Other languages
Chinese (zh)
Other versions
CN111465918A (en
Inventor
徐宏
王国英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111465918A publication Critical patent/CN111465918A/en
Application granted granted Critical
Publication of CN111465918B publication Critical patent/CN111465918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/17Image acquisition using hand-held instruments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19173Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • 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

Abstract

The embodiment of the application provides a method for displaying service information in a preview interface, relates to the technical field of electronics, and can enhance the image processing function of electronic equipment during shooting and previewing. The scheme comprises the following steps: the electronic equipment displays a shooting preview interface comprising a smart reading mode control; responding to touch operation of the comet-reading mode control, respectively displaying p function controls and q function controls, wherein a preview object exists in a preview interface; the preview object comprises a first sub-object of a text type and a second sub-object of an image type, p functional controls correspond to the first sub-object, q functional controls correspond to the second sub-object, and the p functional controls are different from the q functional controls; responding to touch operation of a first function control in the p function controls, and displaying first service information corresponding to a first function option; and responding to the touch operation of a second function control in the q function controls, and displaying second service information corresponding to the second function option. The embodiment of the application is used for preview display.

Description

Method for displaying service information in preview interface and electronic equipment
Technical Field
The present application relates to the field of electronic devices, and in particular, to a method for displaying service information in a preview interface and an electronic device.
Background
With the development of the shooting technology of electronic equipment such as a mobile phone and the like, basic hardware such as a camera and the like is higher and higher in configuration, shooting modes are richer and richer, the shooting effect is better and better, and the use experience of a user is higher and higher. However, the electronic device can only shoot an image or perform some simple processing on the image in the shooting mode, such as beautifying processing, delaying processing or adding a watermark, and cannot perform depth processing on the image.
Disclosure of Invention
The embodiment of the application provides a method for displaying service information in a preview interface and electronic equipment, which can enhance the image processing function of the electronic equipment during shooting and previewing.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in one aspect, a technical solution of the present application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and the method includes: the electronic equipment detects a first touch operation for starting a camera application; responding to the first touch operation, the electronic equipment displays a shot first preview interface on the touch screen, and the first preview interface comprises a comet reading mode control. The electronic equipment detects a second touch operation aiming at the coma reading mode control; and responding to the second touch operation, the electronic equipment respectively displays p functional controls and q functional controls corresponding to the comatic reading mode control on a second preview interface, and the second preview interface has a preview object. The preview object comprises a first sub-object and a second sub-object, the first sub-object is of a text type, the second sub-object is of an image type, p function controls correspond to the first sub-object, q function controls correspond to the second sub-object, and the p function controls are different from the q function controls. The electronic equipment detects a third touch operation aiming at a first functional control in the p functional controls; and responding to the third touch operation, the electronic equipment displays first service information corresponding to the first function option on the second preview interface, wherein the first service information is acquired after the electronic equipment processes the first sub-object in the second preview interface. The electronic equipment detects a fourth touch operation aiming at a second functional control in the q functional controls; and responding to the fourth touch operation, the electronic equipment displays second service information corresponding to the second function option on a second preview interface, wherein the second service information is acquired after the electronic equipment processes a second sub-object in the second preview interface. Wherein p and q are natural numbers; p and q may be the same or different.
In this way, in the shooting preview state, the electronic device can respond to the operation of the user on the smart read mode control, display different function options corresponding to different types of preview sub-objects respectively, and process the preview sub-objects according to the function options selected by the user to acquire service information corresponding to the function options, so that the service information corresponding to the different sub-objects and the selected function options is displayed on the preview interface. Thus, the preview processing function of the electronic device can be improved.
In a possible implementation, the first service information is obtained by the electronic device after processing characters on the first object in the second preview interface. The characters may include characters of various countries such as chinese characters, english, russian, german, french, japanese, etc., and may also include numbers, letters, symbols, etc. The service information includes summary information, keyword information, entity information, viewpoint information, classification information, emotion information, association information, or identification information.
In the scheme, the function options corresponding to the preview sub-object of the text type can be used for displaying the service information associated with the character content in the preview sub-object on the preview interface by the electronic equipment through correspondingly processing and processing the characters in the preview sub-object of the text type, converting the unstructured character content in the preview sub-object into the structured character content, simplifying the information amount, saving the time spent by a user for reading a large amount of character information on the text object, facilitating the user to read a small amount of information which is most concerned, and bringing convenience to the reading and information management of the user.
In one possible implementation, the displaying, by the electronic device, first service information corresponding to the first function option includes: and the electronic equipment superposes and displays a function interface on the second preview interface, wherein the function interface comprises first service information corresponding to the first function option.
Therefore, the user can know the service information conveniently through the functional interface displayed in the front.
In another possible implementation, when the electronic device displays service information corresponding to a plurality of function options, the function interface includes a plurality of portions, and each portion is used for displaying the service information of one function option.
Therefore, the service information corresponding to different function options can be distinguished conveniently for the user.
In another possible implementation, the displaying, by the electronic device, first service information corresponding to the first function option includes: and the electronic equipment displays the first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode.
Therefore, the service information on the preview object can be highlighted in a marking mode, and the user can browse the service information conveniently.
In another possible implementation, the electronic device displays a function control corresponding to the coma mode control in the first preview interface, including: and the electronic equipment displays a function list corresponding to the coma reading mode control in the first preview interface, wherein the function list comprises function options.
In this way, the function options can be collectively displayed in the function list.
In another possible implementation, in response to the electronic device detecting a touch operation of the user with respect to the coma mode control, the method further includes: the electronic equipment displays a language setting control on the touch screen, and the language setting control is used for setting the language type of the service information.
Thus, it is convenient for user to set and switch language type of service information
In another possible implementation, after the electronic device displays the function options on the touch screen, the method further includes: and if the electronic equipment detects the first operation of the user on the touch screen, hiding the function option.
In this way, the electronic device may hide these functional options when the user does not need to use them or they select to obscure the user's view of the preview object.
In another possible implementation, after the electronic device hides the function options, the electronic device may resume displaying the function options after detecting the second operation of the user.
In this way, the user can conveniently call the function options again when the user needs to use the function options.
In another possible implementation, before the electronic device displays the first service information corresponding to the first function option, the method further includes: the electronic equipment acquires a preview image in an RAW format of a preview object; determining standard characters corresponding to the characters to be recognized in the preview object according to the preview image; and determining first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
Therefore, the electronic equipment can directly process the RAW image in the RAW format output by the camera without performing character recognition after the RAW image is processed by an ISP (internet service provider) to generate a picture; the method saves other methods for preprocessing the picture during character recognition (including reverse processes of ISP processing), saves computing resources, can also avoid noise introduced by preprocessing, and improves recognition accuracy.
In another possible implementation, the determining, by the electronic device, a standard character corresponding to a character to be recognized in the preview object according to the preview image includes: and the electronic equipment carries out binarization processing on the preview image so as to obtain the preview image comprising black pixel points and white pixel points. And then, the electronic equipment determines at least one target black pixel point included by the character to be recognized according to the position relation of the adjacent black pixel points on the preview image. The electronic equipment carries out coding according to the coordinates of the target black pixel points so as to obtain a first coding vector of the character to be recognized. Then, the electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library. And the electronic equipment determines the standard character corresponding to the character to be recognized according to the similarity.
Therefore, the electronic equipment can calculate the similarity according to the coding vector formed by the coordinates of the pixel points so as to recognize the characters, and the accuracy of the method is higher.
In another possible implementation, the standard character has a size range that is a preset size range. The electronic equipment encodes according to the coordinate of the target black pixel point to obtain a first encoding vector of the character to be recognized, and the method comprises the following steps: the electronic equipment shrinks/zooms the size range of the character to be recognized into a preset size range. And the electronic equipment encodes according to the coordinates of the target black pixel point in the scaled character to be recognized so as to obtain a first encoding vector.
When the standard character corresponding to the character to be recognized is determined, the size range of the character to be recognized and the size range of the standard character may be inconsistent, so that the character to be recognized is usually required to be processed and then matched and compared with the standard character.
In another possible implementation, the standard character has a size range that is a preset size range. The electronic equipment encodes according to the coordinate of the target black pixel point to obtain a first encoding vector of the character to be recognized, and the method comprises the following steps: and the electronic equipment encodes according to the coordinates of the target black pixel point in the character to be recognized to obtain a third encoding vector. The electronic equipment calculates the ratio Q of the preset size range to the size range of the character to be recognized. And the electronic equipment calculates the corresponding first coding vector after the character to be recognized is scaled/scaled by Q times according to the third coding vector, the ratio Q and the image scaling/scaling algorithm.
In another possible implementation, the size range of the characters is: the size range of the area enclosed between the first straight line tangent to the left side of the black pixel point on the leftmost side of the character, the second straight line tangent to the right side of the black pixel point on the rightmost side of the character, the third straight line tangent to the upper side of the black pixel point on the uppermost side of the character and the fourth straight line tangent to the lower side of the black pixel point on the lowermost side of the character is obtained.
In this way, the size of the size range of the character to be recognized can be determined, so that the character to be recognized can be reduced or enlarged according to the size range.
In another possible implementation, the standard library includes the reference standard character and other first similarities of each of the standard characters to the reference standard character. The electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library, and comprises the following steps: the electronic equipment calculates a second similarity of the first encoding vector and a second encoding vector of the reference standard character; determining at least one target first similarity of which the absolute value of the difference value with the second similarity is smaller than or equal to a preset threshold; and calculating third similarity of second code vectors of standard characters corresponding to the first code vectors and the at least one target first similarity respectively. The electronic equipment determines standard characters corresponding to the characters to be recognized according to the similarity, and the method comprises the following steps: and the electronic equipment determines the standard character corresponding to the character to be recognized according to the third similarity.
Therefore, the electronic equipment does not need to compare the character to be recognized with each standard character in the standard library in sequence, so that the calculation range of the similarity can be reduced, the process of calculating the characters in the standard library one by one is effectively avoided, and the time for calculating the similarity is greatly shortened.
On the other hand, the technical scheme of the application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and the method comprises the following steps: the electronic equipment detects a first touch operation for starting a camera application; in response to the first touch operation, the electronic equipment displays the shot first preview interface on the touch screen. The first preview interface comprises a comet-reading mode control. The electronic equipment detects a second touch operation aiming at the coma reading mode control; and responding to the second touch operation, and displaying m function controls corresponding to the coma reading mode control on the first preview interface by the electronic equipment, wherein m is a positive integer. The electronic equipment detects a third touch operation aiming at a first functional control in the m functional controls; and responding to the third touch operation, and displaying the first service information corresponding to the first function option on a second preview interface by the electronic equipment, wherein the second preview interface has a first preview object. And the first service information is acquired after the electronic equipment processes the first preview object in the second preview interface.
In one possible implementation, the method further comprises: when a first preview object in a second preview interface is switched to a second preview object, the electronic equipment displays second service information corresponding to the first function option on the second preview interface, wherein the second service information is obtained after the electronic equipment processes the second preview object in the second preview interface; the electronic equipment stops displaying the first service information.
The display position of the second service information and the display position of the first service information can be the same or different.
In another possible implementation, the method further comprises: when a first preview object in a second preview interface is switched to a second preview object, the electronic equipment displays second service information corresponding to the first function option on the second preview interface, wherein the second service information is obtained after the electronic equipment processes the second preview object in the second preview interface; the electronic equipment displays the first service information corresponding to the first function option in a reduced mode on the upper left corner, the upper right corner, the lower left corner or the lower right corner of the second preview interface, and the display position of the first service information is different from that of the second service information; the electronic device detects a third operation; and responding to the third operation, and the electronic equipment merges and displays the first service information and the second service information.
In the scheme, the electronic device may display the first service information of the first preview object in a reduced manner, and simultaneously display the second service information of the second preview object. And the first service information and the second information can be merged and displayed, so that a user can conveniently integrate the relevant service information corresponding to a plurality of preview objects.
In another possible implementation, the method further comprises: when the first preview object in the second preview interface is switched to the second preview object, the electronic device displays third service information corresponding to the first function option on the second preview interface, wherein the third service information includes the first service information and the second service information, and the second service information is obtained after the electronic device processes the second preview object in the second preview interface.
In this scheme, the electronic device may combine and display the related service information corresponding to the plurality of preview objects.
On the other hand, the technical solution of the present application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and includes: the electronic equipment detects a first touch operation for starting a camera application; in response to the first touch operation, the electronic equipment displays the shot first preview interface on the touch screen. The electronic equipment detects a fourth operation on the touch screen; in response to the fourth operation, the electronic equipment displays m function options on the first preview interface, wherein m is a positive integer. The electronic equipment detects a third touch operation aiming at 1 of the m function controls; and responding to the third touch operation, the electronic equipment displays service information corresponding to the 1 function option on a second preview interface, wherein the second preview interface has a preview object, and the service information is acquired after the electronic equipment processes the preview object in the second preview interface.
The fourth operation may be a long-press operation, a two-finger press-and-drag operation, an upward-slide operation, a downward-slide operation, an operation of drawing a circle track, or a three-finger pull-down operation.
On the other hand, the technical solution of the present application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and includes: the electronic equipment detects a first touch operation for starting a camera application; in response to the first touch operation, the electronic equipment displays a shot first preview interface on the touch screen, wherein the first preview interface comprises m function options, and m is a positive integer. The electronic equipment detects a third touch operation aiming at 1 of the m function controls; and responding to the third touch operation, the electronic equipment displays service information corresponding to the 1 function option on a second preview interface, wherein the second preview interface has a preview object, and the service information is acquired after the electronic equipment processes the preview object in the second preview interface.
On the other hand, the technical solution of the present application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and includes: the electronic equipment detects a first touch operation for starting a camera application; responding to the first touch operation, the electronic equipment displays a shot preview interface on the touch screen, wherein the preview interface has a preview object, the preview interface also comprises m function options and k service information of the function options, the k function options are selected function options in the m function options, m is a positive integer, and k is a positive integer smaller than or equal to m. The electronic equipment detects that a user cancels the fifth touch operation of selecting a third functional option in the k functional options; and in response to the fifth touch operation, the electronic equipment stops displaying the service information of the third functional option on the preview interface.
On the other hand, the technical solution of the present application provides a method for displaying service information in a preview interface, which is applied to an electronic device with a touch screen, and includes: the electronic equipment detects a first touch operation for starting a camera application; in response to the first touch operation, the electronic equipment displays a shot first preview interface on the touch screen, wherein the shot first preview interface comprises a shooting option. The electronic equipment detects a touch operation aiming at the shooting option; in response to a touch operation for the shooting option, the electronic device displays a shooting mode interface, which includes a coma mode control. The electronic equipment detects a second touch operation aiming at the coma reading mode control; and responding to the second touch operation, and displaying m function controls corresponding to the coma reading mode control in a second preview interface by the electronic equipment, wherein m is a positive integer. The electronic equipment detects a third touch operation aiming at 1 of the m function controls; and responding to the third touch operation, the electronic equipment displays the service information corresponding to the 1 functional option on the third preview interface, wherein the service information is acquired after the electronic equipment processes the preview object in the third preview interface.
On the other hand, the technical scheme of the application provides a picture display method, which is applied to an electronic device with a touch screen and comprises the following steps: the electronic equipment displays a first interface on the touch screen, wherein the first interface comprises a picture and a comet reading mode control. The electronic equipment detects a second touch operation aiming at the coma reading mode control; and responding to the second touch operation, and displaying m function controls corresponding to the coma reading mode control on the touch screen by the electronic equipment, wherein m is a positive integer. The electronic equipment detects a third touch operation aiming at 1 of the m function controls; and responding to the third touch operation, the electronic equipment displays the business information corresponding to the 1 functional option on the touch screen, wherein the business information is acquired after the electronic equipment processes the picture.
The service information is obtained after the electronic equipment processes the characters on the picture.
On the other hand, the technical solution of the present application provides a text content display method, which is applied to an electronic device with a touch screen, and includes: and the electronic equipment displays a second interface on the touch screen, wherein the second interface comprises text content and a comet reading mode control. The electronic equipment detects a second touch operation aiming at the coma reading mode control; and responding to the second touch operation, and displaying m function controls corresponding to the coma reading mode control on the touch screen by the electronic equipment, wherein m is a positive integer. The electronic equipment detects a third touch operation aiming at 1 of the m function controls; and responding to the third touch operation, the electronic equipment displays the service information corresponding to the 1 function option on the touch screen, wherein the service information is acquired after the electronic equipment processes the text content.
The service information is obtained after the electronic equipment processes the characters in the text content.
On the other hand, the technical scheme of the application provides a character recognition method, which comprises the following steps: the electronic equipment acquires a target image in a RAW format; then, the electronic equipment determines a standard character corresponding to the character to be recognized in the target image.
Therefore, the electronic equipment can directly process the RAW image in the RAW format output by the camera without performing character recognition after the RAW image is processed by an ISP (internet service provider) to generate a picture; the method saves other methods for preprocessing the picture during character recognition (including reverse processes of ISP processing), saves computing resources, can also avoid noise introduced by preprocessing, and improves recognition accuracy.
In one possible implementation, the target image is a preview image acquired when a preview is taken.
In another possible implementation, the electronic device determines a standard character corresponding to a character to be recognized in the target image, including: the electronic equipment carries out binarization processing on the target image to obtain a target image comprising black pixel points and white pixel points; determining at least one target black pixel point included by the character to be recognized according to the position relation of adjacent black pixel points on the target image; coding is carried out according to the coordinates of the target black pixel points to obtain a first coding vector of the character to be recognized; calculating the similarity between the first coding vector and a second coding vector of at least one standard character in a preset standard library; and determining the standard character corresponding to the character to be recognized according to the similarity.
In another possible implementation, the standard character has a size range that is a preset size range. The electronic equipment encodes according to the coordinates of the target black pixel point to obtain the encoding vector of the character to be recognized, and the method comprises the following steps: the electronic equipment shrinks/zooms the size range of the character to be recognized into a preset size range; and coding according to the coordinates of the target black pixel points in the scaled/zoomed character to be recognized so as to obtain a first coding vector.
In another possible implementation, the standard character has a size range that is a preset size range. The electronic equipment encodes according to the coordinates of the target black pixel point to obtain the encoding vector of the character to be recognized, and the method comprises the following steps: the electronic equipment carries out coding according to the coordinates of the target black pixel point in the character to be recognized to obtain a third coding vector; calculating the ratio Q of the preset size range to the size range of the character to be recognized; and calculating a corresponding first coding vector after Q times of the character to be recognized is contracted/enlarged according to the third coding vector, the quantity ratio Q and the image contraction/enlargement algorithm.
In another possible implementation, the size range of the characters is: the size range of the area enclosed between the first straight line tangent to the left side of the black pixel point on the leftmost side of the character, the second straight line tangent to the right side of the black pixel point on the rightmost side of the character, the third straight line tangent to the upper side of the black pixel point on the uppermost side of the character and the fourth straight line tangent to the lower side of the black pixel point on the lowermost side of the character is obtained.
In another possible implementation, the standard library includes the reference standard character and a first similarity of the second code vector of each of the other standard characters to the second code vector of the reference standard character. The electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library, and comprises the following steps: the electronic equipment calculates a second similarity between the first encoding vector and the reference standard character; determining at least one target first similarity of which the absolute value of the difference value with the second similarity is smaller than or equal to a preset threshold; and calculating third similarity of second code vectors of standard characters corresponding to the first code vectors and the at least one target first similarity respectively. The electronic equipment determines standard characters corresponding to the characters to be recognized according to the similarity, and the method comprises the following steps: and the electronic equipment determines the standard character corresponding to the character to be recognized according to the third similarity.
In another aspect, an embodiment of the present application provides an electronic device, which includes a detection unit and a display unit. The detection unit is used for detecting a first touch operation for starting the camera application. The display unit is used for responding to the first touch operation and displaying a shot first preview interface on the touch screen, wherein the first preview interface comprises a comet reading mode control. The detection unit is further used for detecting a second touch operation aiming at the coma reading mode control. The display unit is further configured to, in response to the second touch operation, respectively display p function controls and q function controls corresponding to the coma reading mode control on a second preview interface, where the second preview interface has a preview object. The preview object comprises a first sub-object and a second sub-object, the first sub-object is of a text type, the second sub-object is of an image type, p functional controls correspond to the first sub-object, q functional controls correspond to the second sub-object, p and q are natural numbers, p and q can be the same or different, and the p functional controls are different from the q functional controls. The detection unit is further configured to detect a third touch operation for a first function control of the p function controls. The display unit is further configured to, in response to the third touch operation, display first service information corresponding to the first function option on the second preview interface, where the first service information is obtained by the electronic device after processing the first sub-object in the second preview interface. The detection unit is further configured to detect a fourth touch operation for a second function control of the q function controls. The display unit is further configured to, in response to the fourth touch operation, display second service information corresponding to the second function option on the second preview interface, where the second service information is obtained by the electronic device after processing a second child object in the second preview interface.
In one possible implementation, the electronic device further includes a processing unit to: acquiring a preview image in a RAW format of a preview object before a touch screen displays first service information corresponding to a first function option on a second preview interface; determining standard characters corresponding to the characters to be recognized in the preview object according to the preview image; and determining first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
In another possible implementation, the processing unit is specifically configured to: carrying out binarization processing on the preview image to obtain a preview image comprising black pixel points and white pixel points; determining at least one target black pixel point included by the character to be recognized according to the position relation of adjacent black pixel points on the preview image; coding is carried out according to the coordinates of the target black pixel points to obtain a first coding vector of the character to be recognized; calculating the similarity between the first coding vector and a second coding vector of at least one standard character in a preset standard library; and determining the standard character corresponding to the character to be recognized according to the similarity.
In another possible implementation, the size range of the standard character is a preset size range, and the processing unit is specifically configured to: the size range of the character to be recognized is contracted/enlarged to be a preset size range; and coding according to the coordinates of the target black pixel points in the scaled/zoomed character to be recognized so as to obtain a first coding vector.
In another possible implementation, the size range of the standard character is a preset size range, and the processing unit is specifically configured to: coding according to the coordinates of target black pixel points in the character to be recognized to obtain a third coding vector; calculating the ratio Q of the preset size range to the size range of the character to be recognized; and calculating the corresponding first coding vector after the character to be recognized is scaled/scaled by Q times according to the third coding vector, the ratio Q and the image scaling/scaling algorithm.
In another possible implementation, the standard library includes the reference standard character and a first similarity between the second code vector of each of the other standard characters and the second code vector of the reference standard character; the processing unit is specifically configured to: calculating a second similarity between the first encoded vector and a second encoded vector of the reference standard character; determining at least one target first similarity of which the absolute value of the difference value with the second similarity is smaller than or equal to a preset threshold; calculating third similarity of second coding vectors of standard characters, corresponding to the first similarity of the at least one target respectively, of the first coding vector; and determining the standard character corresponding to the character to be recognized according to the third similarity.
In another possible implementation, the display unit is specifically configured to superimpose and display a function interface on the second preview interface, where the function interface includes first service information corresponding to the first function option; or displaying the first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode.
In another possible implementation, the first service information includes summary information, keyword information, entity information, viewpoint information, classification information, emotion information, association information, or quality information.
In another aspect, an embodiment of the present application provides an electronic device, a touch screen, a memory, and a processor, where the touch screen and the at least one memory are coupled to the at least one processor. Wherein: the touch screen is used for detecting a first touch operation for starting the camera application; the processor is used for responding to the first touch operation and instructing the touch screen to display a shot first preview interface; the touch screen is also used for displaying a first preview interface according to an instruction of the processor, and the first preview interface comprises a comet reading mode control. The touch screen is also used for detecting a second touch operation aiming at the coma reading mode control; the processor is also used for responding to the second touch operation and instructing the touch screen to display a second preview interface; the touch screen is further used for displaying a second preview interface according to an instruction of the processor, p function controls and q function controls corresponding to the coma reading mode control are respectively displayed on the second preview interface, and a preview object is arranged in the second preview interface. The preview object comprises a first sub-object and a second sub-object, the first sub-object is of a text type, the second sub-object is of an image type, p functional controls correspond to the first sub-object, q functional controls correspond to the second sub-object, p and q are natural numbers, p and q can be the same or different, and the p functional controls are different from the q functional controls. The touch screen is further used for detecting a third touch operation aiming at the first functional control in the p functional controls; the processor is further used for responding to the third touch operation and instructing the touch screen to display first service information corresponding to the first function option on the second preview interface; the touch screen is further used for displaying first service information according to an instruction of the processor, wherein the first service information is acquired after the electronic equipment processes the first sub-object in the second preview interface. The touch screen is further used for detecting a fourth touch operation aiming at a second functional control in the q functional controls; the processor is further used for responding to the fourth touch operation and instructing the touch screen to display second service information corresponding to the second function option on the second preview interface; the touch screen is further used for displaying second service information corresponding to the second function option on the second preview interface according to an instruction of the processor, wherein the second service information is acquired after the electronic equipment processes a second sub-object in the second preview interface. The memory is used for storing the first preview interface and the second preview interface.
In one possible implementation, the processor is further configured to: acquiring a preview image in a RAW format of a preview object before a touch screen displays first service information corresponding to a first function option on a second preview interface; determining standard characters corresponding to the characters to be recognized in the preview object according to the preview image; and determining first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
In another possible implementation, the processor is specifically configured to: carrying out binarization processing on the preview image to obtain a preview image comprising black pixel points and white pixel points; determining at least one target black pixel point included by the character to be recognized according to the position relation of adjacent black pixel points on the preview image; coding is carried out according to the coordinates of the target black pixel points to obtain a first coding vector of the character to be recognized; calculating the similarity between the first coding vector and a second coding vector of at least one standard character in a preset standard library; and determining the standard character corresponding to the character to be recognized according to the similarity.
In another possible implementation, the size range of the standard character is a preset size range, and the processor is specifically configured to: the size range of the character to be recognized is contracted/enlarged to be a preset size range; and coding according to the coordinates of the target black pixel points in the scaled/zoomed character to be recognized so as to obtain a first coding vector.
In another possible implementation, the processor is specifically configured to: coding according to the coordinates of target black pixel points in the character to be recognized to obtain a third coding vector; calculating the ratio Q of the preset size range to the size range of the character to be recognized; and calculating the corresponding first coding vector after the character to be recognized is scaled/scaled by Q times according to the third coding vector, the ratio Q and the image scaling/scaling algorithm.
In another possible implementation, the standard library includes the reference standard character and a first similarity between the second code vector of each of the other standard characters and the second code vector of the reference standard character; the processor is specifically configured to: calculating a second similarity between the first encoded vector and a second encoded vector of the reference standard character; determining at least one target first similarity of which the absolute value of the difference value with the second similarity is smaller than or equal to a preset threshold; calculating third similarity of second coding vectors of standard characters, corresponding to the first similarity of the at least one target respectively, of the first coding vector; and determining the standard character corresponding to the character to be recognized according to the third similarity.
In another possible implementation, the touch screen is specifically configured to: according to an instruction of the processor, a function interface is superposed and displayed on the second preview interface, and the function interface comprises first service information corresponding to the first function option; or displaying the first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode according to the instruction of the processor.
In another possible implementation, the first service information includes summary information, keyword information, entity information, viewpoint information, classification information, emotion information, association information, or quality information.
In another aspect, the present disclosure provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors and the one or more memories are configured to store computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform a preview display method, a picture display method, or a character recognition method in any of the possible implementations of any of the above aspects.
On the other hand, the present technical solution provides a computer storage medium, which includes computer instructions, and when the computer instructions are run on an electronic device, the electronic device is enabled to execute a preview display method, an image display method, or a character recognition method in any one of the possible implementations of any one of the foregoing aspects.
On the other hand, the present technical solution provides a computer program product, when the computer program product runs on an electronic device, the electronic device is enabled to execute a preview display method, an image display method, or a character recognition method in any one of the possible designs of the above aspects.
Drawings
Fig. 1 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present disclosure;
3 a-3 b are schematic diagrams of a set of display interfaces provided by embodiments of the present application;
4 a-23 d are a series of schematic interfaces for shooting preview according to the embodiment of the present application;
24 a-24 c are schematic diagrams of another set of display interfaces provided by embodiments of the present application;
FIGS. 25 a-25 h are schematic diagrams of a series of interfaces for shooting previews according to an embodiment of the present disclosure;
FIGS. 26 a-27 b are schematic diagrams of a series of interfaces for displaying pictures taken according to an embodiment of the present application;
28 a-28 c are schematic diagrams of another set of display interfaces provided by embodiments of the present application;
29 a-30 b are a series of schematic interface diagrams for displaying text content according to embodiments of the present application;
fig. 31 is a schematic diagram of a character to be recognized according to an embodiment of the present application;
FIGS. 32 a-32 b are schematic diagrams illustrating a set of contraction/expansion effects of a character to be recognized according to an embodiment of the present application;
FIGS. 33-34 are flow diagrams of a method provided by embodiments of the present application;
fig. 35 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
The personalized function display method of the text image provided by the embodiment of the application can be applied to electronic equipment, and the electronic equipment can be portable electronic equipment which also comprises other functions such as functions of a personal digital assistant and/or a music player, such as a mobile phone, a tablet computer, wearable equipment (such as a smart watch) with a wireless communication function and the like. Exemplary embodiments of the portable electronic device include, but are not limited to, a mount
Figure GPA0000290031690000121
Or other operating system. The portable electronic device may also be other portable electronic devices such as laptop computers (laptop) with touch sensitive surfaces (e.g., touch panels), etc. It should also be understood that in other embodiments of the present application, the electronic device may not be a portable electronic device, but may be a desktop computer having a touch-sensitive surface (e.g., a touch panel).
Fig. 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be independent devices or may be integrated in the same processor.
Wherein the controller is a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses and reducing the latency of the processor, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor may include multiple sets of I2C buses. The processor may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. via different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication, and the sampling rates of the two interfaces may be different or the same.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via a USB interface. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna module 1, the antenna module 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the cellular network antenna may be multiplexed into a wireless local area network diversity antenna. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. Specifically, the mobile communication module 150 may include at least one filter, a switch, a power Amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules in the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLAN), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor. The wireless communication module 160 may also receive a signal to be transmitted from the processor, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160. Such that the electronic device 100 may communicate with networks and other devices via wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display an image, a Graphical User Interface (GUI), a video, or the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used for processing data fed back by the camera. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: MPEG1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. Further, the memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones to collect sound signals and reduce noise, and may further identify sound sources and perform directional recording functions.
The headphone interface 170D is used to connect a wired headphone. The earphone interface may be a USB interface, or may be an open mobile electronic device platform (OMTP) standard interface of 3.5mm, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may also be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The acceleration sensor 180E can also be used to recognize the attitude of the electronic device, and is applied to horizontal and vertical screen switching, pedometer and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize a range sensor to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a photodetector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. Infrared light is emitted outward through the light emitting diode. Infrared reflected light from nearby objects is detected using a photodiode. When sufficient reflected light is detected, the electronic device 100 may determine that there is an object near the electronic device 100. When insufficient reflected light is detected, it can be determined that there is no object near the electronic device 100. The electronic device 100 can utilize the proximity light sensor to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the display screen to achieve the purpose of saving power. The proximity light sensor can also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The electronic device 100 may adaptively adjust the display screen brightness based on the perceived ambient light level. The ambient light sensor can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor may also cooperate with the proximity light sensor to detect whether the electronic device 100 is in a pocket to prevent inadvertent contact.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 may perform a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 may heat the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". May be disposed on the display screen 194. For detecting a touch operation acting thereon or thereabout. The detected touch operation may be passed to an application processor to determine the type of touch operation and provide a corresponding visual output via the display screen. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194. The combination of the touch panel and the display screen 194 may be referred to as a touch screen.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in the headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a Subscriber Identity Module (SIM). The SIM card can be brought into and out of contact with the electronic device 100 by being inserted into the SIM card interface or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces 195, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls, such as controls to display characters, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying characters and a view for displaying pictures.
The phone manager is used to provide a communication function of the terminal 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears in the form of a dialog window on the display. For example, text information is prompted in the status bar, a prompt tone is given, the terminal vibrates, an indicator light flashes, and the like.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), Media Libraries (Media Libraries), three-dimensional graphics processing library OpenGL ES, 2D graphics engine SGL, etc.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
OpenGL ES is used to implement three-dimensional graphics drawing, image rendering, compositing, and layer processing, among others.
SGL is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following embodiments may be implemented in an electronic device having the hardware configuration shown in fig. 1 and the software configuration shown in fig. 2 described above.
For convenience of description, the graphic user interface is simply referred to as an interface hereinafter.
As shown in fig. 3a, an interface 300 displayed on a touch screen of the electronic device 100, which is embodied by the hardware configuration shown in fig. 1 and the software configuration shown in fig. 2, includes a display screen 194 and a touch panel. The interface is used for displaying a control, the control is a GUI element, and is also a software component, which is included in the application program, controls data processed by the application program and interactive operation on the data, and a user can interact with the control through direct manipulation (direct manipulation), so as to read or edit information related to the application program. Generally, a control may include a visual interface element such as an icon, button, menu, tab, text box, dialog box, status bar, navigation bar, Widget, and the like.
As shown in fig. 3a, the interface 300 may include a status bar 303, a concealable navigation bar 306, a time and weather Widget, and icons of a plurality of applications, such as a microblog icon 304, a payment treasure icon 305, a camera icon 302, a WeChat icon 301, and the like. The status bar 303 may include a name of an operator (e.g., china mobile), time, a wireless-fidelity (Wi-Fi) icon, signal strength, and current remaining power. A back key icon, home screen key icon, forward key icon, and the like may be included in the navigation bar 306. Further, it is understood that in other embodiments, a bluetooth icon, a mobile network (e.g., 4G), an alarm icon, an add-on icon, and the like may also be included in the status bar 303. It is also understood that in some other embodiments, the interface 300 may further include a Dock column, and the Dock column may include an icon of a commonly used application (App), and the like.
In other embodiments, the electronic device 100 may also include a home screen key. The main screen key may be a physical key or a virtual key (or called soft key). The home screen key is used for returning the GUI displayed on the touch screen to the home screen according to the operation of the user, so that the user can conveniently view the home screen at any time and operate controls (such as icons) in the home screen. The operation may be specifically that the user presses a home screen key, that the user presses the home screen key twice in a short time, or that the user presses the home screen key for a long time. In other embodiments of the present application, the fingerprint sensor 302 may be further integrated with the main screen key, so that the user can press the main screen key and then the electronic device performs fingerprint collection, thereby confirming the identity of the user.
After the electronic device 100 detects a touch operation of a finger (or a stylus pen, etc.) of a user on a certain App icon on the interface 300, in response to the touch operation, the electronic device may open a user interface of an App corresponding to the App icon. For example, when the electronic device detects an operation in which a finger of the user touches the camera icon 302, a camera application is opened in response to the operation in which the finger 307 of the user touches the camera icon 302, and a shooting preview interface is entered. Illustratively, the preview interface displayed by the electronic device may be specifically the preview interface 308 shown in fig. 3 b.
The workflow of the electronic device 100 software and hardware is illustrated herein in connection with capturing a photo scene. When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input operation (including touch coordinates, time stamp of the touch operation, and other information). The original input operation is stored at the kernel layer. And the application program framework layer acquires the original input operation from the kernel layer and identifies the control corresponding to the original input operation. Taking the example that the touch operation is a click operation, and the control corresponding to the click operation is a camera application icon, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
As shown in fig. 3b, one or more of a take mode control 309, a record mode control 310, a capture option control 311, a capture button 312, a tint style control 313, a thumbnail frame 314, a preview frame 315, and a focus frame 316 may be included in the preview interface 308. The photographing mode control 310 is configured to enable the electronic device to enter a photographing mode, i.e., a picture photographing mode; the record mode control 310 is used to cause the electronic device 100 to enter a video capture mode. As shown in fig. 3b, if the current shooting mode is the shooting mode, the preview interface 308 is a shooting preview interface. The shooting option control 311 is used to set a specific shooting mode adopted in the shooting mode or the video mode, such as face age shooting, professional shooting, beauty shooting, panoramic shooting, phonographic shooting, delayed shooting, night scene shooting, single-shot shooting, smiling face shooting, streamer shutter or watermark, and the like; the photographing button 312 is used to trigger the electronic apparatus 100 to photograph a picture within the current preview frame, or to trigger the electronic apparatus 100 to start or stop video photographing. The hue style control 313 is used to set the style of the picture to be taken, such as faint, hotness, searing, classical, sunrise, movie, dream, or black and white. The thumbnail frame 314 is used to display thumbnails of recently taken pictures or recorded videos. The preview pane 315 is used to display preview objects; the focus frame 316 is used to indicate whether the current state is a focus state.
In a conventional photographing mode, in a preview scene, after the electronic device detects an operation of clicking the photographing button 312 by a user, the camera 193 of the electronic device 100 acquires a preview image of a preview object, where the preview image is an original image, and the format of the original image may be a RAW format, also referred to as a RAW map, which is original image data output by a photosensitive element (or referred to as an image sensor) of the camera 193. Then, the electronic device 100 performs processing such as automatic exposure control, Black Level Correction (BLC), lens shading correction, automatic white balance, color matrix correction, and sharpness noise adjustment on the original image through the ISP, generates a picture seen by the user, and stores the picture. After the picture is taken, the electronic device 100 may also recognize the characters in the picture when the user needs to obtain the characters (characters) in the picture.
For example, in a conventional classification recognition method, a picture obtained by shooting is preprocessed to remove colors, saturation, noise, and the like in the image, and to process deformation in the size, position, shape, and the like of characters. Preprocessing is understood to include the inverse of the ISP's processing of balancing, coloring, etc. the original image. The dimensionality of the preprocessed data is high, and can be tens of thousands in general. Then, feature extraction is performed to compress the text image data and reflect the essence of the original image. Then, the recognized objects are classified into a certain class by utilizing a statistical decision method or a syntactic analysis method in the feature space, so that a character recognition result is obtained.
In another conventional text recognition method, the electronic device 100 may use a classifier or a clustering strategy in machine learning to perform operations on the features of the text in the acquired picture and the standard text features, so as to perform text result determination according to the similarity.
In this other conventional text recognition method, the electronic device 100 may also perform text recognition on the text in the picture by using a genetic algorithm and a neural network.
The following describes a personalized function display method of a text image provided in the embodiment of the present application, taking a mobile phone as an example of the electronic device 100.
The embodiment of the application provides a method for displaying personalized functions of text images, which can be used for displaying the text functions of text objects in a shooting preview state.
After the electronic equipment opens the camera function and displays the photographing preview interface, the electronic equipment enters a photographing preview state. In the photo preview state, the preview object of the electronic device may include a scene object, a character object, a text object, and the like. A text object refers to an object with characters (characters) presented on the surface, such as a newspaper, a poster, a leaflet, a book page, a paper, a blackboard, a screen, or a wall surface with characters, a touch screen with characters displayed thereon, or any other entity with characters presented on the surface. The characters in the text object may include characters of various countries such as chinese, english, russian, german, french, japanese, etc., and may also include numbers, letters, symbols, etc. The following embodiments of the present application mainly use chinese characters as characters for illustration. It will be appreciated that the content presented in the text object may comprise other content than characters, for example pictures.
In some embodiments of the present application, in a preview taking state, if the electronic device determines that the preview object is a text object, the electronic device may perform text function display on the text object in the preview taking state.
In the photographing preview state, the electronic device may acquire a preview image of a preview object, where the preview image is an original image in a RAW format and is original image data that is not processed by the ISP. The electronic equipment determines whether the preview object is a text object according to the acquired preview image. Wherein the determining, by the electronic device, whether the preview object is the text object according to the preview image may include: if the electronic equipment determines that the preview image contains characters, the preview object can be determined to be a text object; or, if the electronic device determines that the number of characters included in the preview image is greater than or equal to a first preset value, it may be determined that the preview object is a text object; or, if the electronic device determines that the area covered by the characters in the preview image is greater than or equal to a second preset value, determining that the preview object is a text object; or, if the electronic device determines that the preview object is an object such as a newspaper, a page, or a sheet according to the preview image, it may determine that the preview object is a text object; alternatively, if the electronic device sends the preview image to the server and receives indication information indicating that the preview object is the text object from the server, the electronic device may determine that the preview object is the text object. It is understood that the method for previewing whether the object is a text object includes, but is not limited to, the above-mentioned method.
Illustratively, when the user sees a recruitment inspiring event in a newspaper, a brochure, a bulletin board, a wall, or elsewhere on a computer, the user can turn on the camera function of the cell phone and display a photo preview interface as shown in fig. 3 b. At this time, the user can preview the recruitment inspiring through the mobile phone in a shooting preview state, wherein the recruitment inspiring is a text object.
As another example, when the user sees a news item in a newspaper or a computer, the user may turn on the camera function of the mobile phone and display a photo preview interface as shown in fig. 3 b. At this time, the user can preview news on the newspaper or the computer through the mobile phone in the shooting preview state, and the news on the newspaper or the computer is a text object.
As another example, when the user sees a poster including characters in a mall, movie theater, or amusement park, the user may turn on the camera function of the mobile phone and display a photo preview interface as shown in fig. 3 b. At this time, the user can preview the poster, which is a text object, through the mobile phone in the photo preview state.
As another example, when the user sees "play a strategy" or "introduction to a scene" on a billboard in a park or tourist attraction, the user can turn on the camera function of the mobile phone and display a preview interface for taking a picture as shown in fig. 3 b. At this time, the user can see "play strategy" or "introduction to scenery spot" on the billboard through mobile phone preview in the shooting preview state, and the billboard sees "play strategy" or "introduction to scenery spot" as the text object.
As another example, when the user sees the novel "xiaowangzi" on the book, the user may turn on the camera function of the mobile phone and display a photo preview interface as shown in fig. 3 b. At this time, the user can preview the content of the novel Xiaowangzi through the mobile phone in the shooting preview state, and the novel Xiaowangzi on the page is a text object.
If the electronic device determines that the preview object is a text object, as shown in fig. 4a, the electronic device may automatically display a function list 401, where the function list 401 may include function options of at least one preset text function. The functional options can be used for processing and processing characters in the text object correspondingly, so that the electronic equipment displays service information associated with the character content in the text object, converts unstructured character content in the text object into structured character content, simplifies the information amount, saves the time spent by a user for reading a large amount of character information on the text object, facilitates the user to read a small amount of information which is most concerned, and brings convenience to the reading and information management of the user.
As shown in fig. 4a, the function list 401 may include function options such as an Abstract (ABS) Option 402, a Keyword (KEY) Option 403, an entity (entry, ETY) Option 404, an Option (OPT) Option 405, a classification (TC) Option 406, a sentiment (TE) Option 407, and a association (TA) Option 408.
It should be noted that the function options included in the function list 401 shown in fig. 4a are only examples, and other function options, such as a Product Return (PR) option, may also be included in the function list. In addition, the function list may further include a previous page control and/or a next page control for switching and displaying the function options in the function list. Illustratively, as shown in fig. 4a, a next page control 410 is included in the function list 401, and when the electronic device detects that the user clicks the next page control 410 on the interface shown in fig. 4a, as shown in fig. 4b, the electronic device displays other function options not shown in fig. 4a, such as a display identification option 409, in the function list 401. As shown in fig. 4b, a previous page control 411 is included in the function list 401, and when the electronic device detects that the user clicks the previous page control 411 on the interface shown in fig. 4b, the electronic device displays the function list 401 as shown in fig. 4 a.
It is understood that the function list 401 shown in fig. 4a is merely an example, and the function list may have other forms and be located in other positions. For example, as an alternative to the function list 401 in fig. 4a, the function list provided in the embodiment of the present application may also be a function list 501 shown in fig. 5a or a function list 502 shown in fig. 5 b.
When one or more target function options in the function list are selected, the electronic device may display a function area for displaying service information of the selected target function options.
In one case, as shown in fig. 4a-5b, when the electronic device opens the preview interface, the preview interface displays a function list, and all text functions in the function list are in an unselected state. And, in response to a first operation by the user, the function list displayed on the preview interface may be hidden. For example, referring to fig. 6a, when the electronic device detects a click operation (i.e., a first operation) by the user outside the function list within the preview box, as shown in fig. 6b, the electronic device may hide the function list; when the electronic device detects the click operation of the user in the preview box shown in fig. 6b again, the electronic device may resume displaying the function list shown in fig. 4a in the preview box. For another example, as shown in fig. 6c, when the electronic device detects an operation (i.e., a first operation) in which the user holds down the function list and slides down, as shown in fig. 6d, the electronic device may hide the function list and display a resume mark 601, and when the user clicks the resume mark 601 or holds the resume mark 601 and slides up, the electronic device resumes displaying the function list as shown in fig. 4 a. Alternatively, in the case shown in fig. 6c, the electronic device hides the function list, and when the electronic device detects an operation of the user sliding upward at the bottom of the preview frame, the function list shown in fig. 4a may be restored to be displayed.
When the electronic device detects that the user selects (for example, the user manually selects through gestures or selects through input voice) one or more target function options in the function list while the electronic device displays the function area, and the electronic device displays service information of the target function options selected by the user in the function area.
In another case, when the electronic device opens the preview interface, a function list and a function area are displayed on the preview interface, a target function option is selected from the function list, the selected target function option may be a function option selected by a user last time or a default function option (for example, a summary), and service information of the selected target function option is displayed in the function area.
Specifically, the process of acquiring and displaying the service information of the target function option by the electronic device may include: the electronic equipment carries out target function option processing according to the text object so as to acquire service information of the target function option and display the service information of the target function option in the function area; or, the electronic device requests the server to perform target function option processing, and obtains the service information of the target function option from the server so as to save the resource of the electronic device, and then the electronic device displays the service information of the target function option in the function area.
The following embodiments of the present application will specifically describe each function option separately by taking the function list 401 shown in fig. 4a and the function options included in the function list 401 as examples.
(1) Abstract function
The summarization function can perform a brief summary on the described character content of the text object, so that the original redundant complex character content becomes clear and brief.
Illustratively, as shown in fig. 7a, the text object is the recruitment inspirational matter previewed through the preview interface, and when the electronic device detects that the user selects the summary function option in the function list, as shown in fig. 7b, the electronic device displays a function area 701, and a summary of the recruitment inspirational matter is displayed in the function area 701. Or, for example, the text object is the recruitment heuristic previewed through the preview interface, and when the preview interface is opened by the electronic device, as shown in fig. 7b, a function list and a function area are displayed on the preview interface, a summary function option is selected by default in the function list, and a summary of the recruitment heuristic is displayed in the function area 701. It can be understood that the displayed abstract may be content related to the text object acquired by the electronic device through the network side, or may be content generated by the electronic device through understanding the text object through artificial intelligence.
As another example, as shown in fig. 8a, the text object is the section of the novel "xiaowangzi" previewed through the preview interface, and when the electronic device detects that the user selects the summary function option in the function list, as shown in fig. 8b, the electronic device displays a function area 801, and a summary of the section is displayed in the function area 801. Or, for example, the text object is the section of the novel 'xiaowangzi' previewed through the preview interface, when the preview interface is opened by the electronic device, as shown in fig. 8b, a function list and a function area 801 are displayed on the preview interface, a summary function option is selected by default in the function list, and a summary of the section is displayed in the function area 801.
In a scene, when there are more character information to be read and a user wants to find important information concerned from the character information and record the important information, the user cannot quickly read all the contents for a while, so the user usually takes all the characters as pictures and then reads the pictures one by one to find the picture of the important information concerned, and the process is complicated and consumes a lot of time; moreover, most of the taken pictures are useless pictures which are not used, and a large amount of storage space is occupied.
In the embodiment of the application, when a user wants to extract some important information from a large amount of character information, the user can preview the large amount of character information through the abstract function in a photographing preview state, so that whether the currently previewed character is the important information concerned by the user is quickly determined according to a small amount of abstract information displayed in the functional area, if so, a picture can be taken and recorded, thereby quickly and conveniently extracting the important information from the large amount of information and photographing, reducing the operation of the user and the number of the photographed pictures, and saving the storage space of useless pictures,
in another scenario, when there is more character information to be read and the user wants to quickly know the main content of the character information, the user can preview a large amount of character information through the abstract function in the photographing preview state, so that the user can quickly know the main idea of the character information according to the simplified abstract information displayed in the functional area. That is, the user can acquire a larger amount of information using less time.
In the summary function processing process, there are various algorithms for obtaining the summary of the character information in the text object, for example, there may be an extraction (active) algorithm, an abstrative algorithm, and the like.
The explicit algorithm is based on the assumption that the main content of an article can be summarized by a sentence or sentences in the article. The task of summarizing then becomes to find the most important sentences in the article and then to perform a ranking operation to obtain a summary of the article.
The abstrative algorithm is an Artificial Intelligence (AI) algorithm that requires the system to understand what an article expresses and then briefly summarize it with human language that is very readable. For example, the Abstract algorithm can be implemented based on the framework of attribute model, rn encoder-decoder, etc.
In addition, the electronic device can hide a functional area displayed on the preview interface. For example, in the scenario shown in fig. 7b, after the electronic device detects a click operation of the user outside the function area in the preview box, the function area may be hidden, and the function list may continue to be displayed. Then, after the electronic equipment detects the clicking operation of the user in the preview frame, the display function area and the summary information in the function area can be recovered; or, when the electronic device detects that the user clicks any one of the function options in the selection function list, the display function area is resumed, and the service information corresponding to the function option selected by the user is displayed in the function area, where the function option may be a summary function option or another function option.
For another example, in the scenario shown in fig. 7b, when the electronic device detects an operation of the user sliding down within the function list or the range of the function area, the function area and the function list are hidden. And when the electronic equipment detects that the user slides upwards at the bottom of the preview frame, restoring to display the function area and the function list. Or, after hiding the function area and the function list, the electronic device may display a resume display mark, and when the user clicks the resume mark or holds the resume mark to slide upward, the electronic device resumes displaying the function area and the function list.
It should be noted that, when the user uses other function options besides the summary function, the electronic device may also hide the function area and the function list, and details will not be described later when introducing other function options.
In addition, as an alternative to the above-mentioned displaying of the summary information through the functional area, the electronic device may mark the summary information on the characters of the text object. For example, in the scenario shown in fig. 7a, as shown in fig. 9, the electronic device marks summary information on the characters of the text object by underlining.
(2) Keyword function
The keyword function is to identify, extract and display keywords in the character information of the text object, so as to help a user to quickly understand semantic information contained in the text object from the level of the keywords.
Illustratively, as shown in fig. 10a, the text object is the recruitment inspirator previewed through the preview interface, and when the electronic device detects that the user selects a keyword function option in the function list shown in fig. 4a, as shown in fig. 10b, the electronic device displays a function area 1001, and keywords of the recruitment inspirations, such as recruitment, huayi, fortune and maintenance, cloud middleware, and the like, are displayed in the function area 1001. Or, for example, the text object is the recruitment inspiring matter previewed through the preview interface, and when the preview interface is opened by the electronic device, as shown in fig. 10b, a function list and a function area are displayed on the preview interface, a keyword function option is selected by default in the function list, and a keyword of the recruitment inspiring matter is displayed in the function area.
Compared with summary information, the keyword information is more simplified. Thus, in some scenarios, the user can more quickly learn about the main content of a large number of characters currently in the preview photo state through the keyword function. And after the user shoots the text object into the picture, the electronic equipment can sort and classify the picture by the keywords. Unlike other ordering and sorting methods, such ordering and sorting has been related to the content level of the pictures themselves.
In the keyword function processing process, there may be various algorithms for acquiring keywords, such as a term frequency-inverse text frequency index (TF-IDF) extraction method, a Topic model (Topic-model) extraction method, and a Rapid Automatic Keyword Extraction (RAKE) method.
In the TF-IDF keyword extraction method, TF-IDF of a word is equal to TF (x) IDF, and the larger the TF-IDF value is, the higher the probability that the word becomes a keyword is. Where TF is (the number of times the word appears in the text object)/(the total number of words of the text object), and IDF is log (total number of documents in the corpus/(number of documents including the word + 1)).
In the method for extracting the Topic-model keywords, a document is composed of topics, and words in the document are selected from the topics with a certain probability, namely a Topic set exists between the document and the words. The probability distribution of word occurrences is different for different topics. The subject word set of the document can be obtained through the learning of the subject model.
In the RAKE keyword extraction method, the extracted keyword may not be a single word (i.e., a word or a word), but a phrase. The score of each phrase is obtained by accumulating the words forming the phrase, and the degree of the score of the word and the word frequency are related, namely the score of one word is degree/word frequency. Wherein, the more other words that appear together with a certain word, the greater the degree of the word.
In addition, as an alternative to the above-mentioned displaying of the keyword information through the functional area, the electronic device may mark the keyword information on the character of the text object. For example, in the scenario shown in fig. 10a, as shown in fig. 11, the electronic device marks the keyword information on the characters of the text object in the form of a circle.
(3) Entity function
The entity function is to identify, extract and display entities in the character information of the text object, so as to help a user to quickly understand semantic information contained in the text object from the entity level.
Illustratively, as shown in fig. 12a, the text object is the recruitment inspiring matter previewed through the preview interface, and when the electronic device detects that the user selects an entity function option in the function list shown in fig. 4a, as shown in fig. 12b, the electronic device displays a function area 1201, and entities such as posts, huazi, clouds, products, caches, and the like of the recruitment inspiring matter are displayed in the function area 1201. Or, for example, the text object is the recruitment inspiring matter previewed through the preview interface, and when the preview interface is opened by the electronic device, as shown in fig. 12b, a function list and a function area are displayed on the preview interface, an entity function option is selected by default in the function list, and an entity of the recruitment inspiring matter is displayed in the function area.
It should be noted that an entity may include multiple aspects of time, names, locations, positions, and organizations. Moreover, the types of the text objects are different, and the content included in the entity may also be different. For example, the entity content may also include a work name, and the like.
In addition, in the scenario shown in fig. 12b, the user displays each entity in a classified manner through the text display box, so that the information extracted from the text object can be more organized and structured, and the user can conveniently sort and classify the information.
When a user wants to pay attention to the entity information such as people, time, places and the like related to the text object, the user can quickly acquire various entity information through the entity function. In addition, the function can help the user to find some new entity nouns, and help the user to know new things.
In the entity function processing process, there are various algorithms for acquiring the entity in the character information of the text object, for example, there may be a rule and dictionary based method, a statistic based method, a method in which a rule and dictionary based method and a statistic based method are mixed, and the like.
The method based on the rules and the dictionary mostly adopts a method that a linguistic expert manually constructs a rule template, selects methods with characteristics including statistical information, punctuations, keywords, indicator words, direction words, position words (such as tail words), central words and the like, and takes the matching of a mode and a character string as a main means. While extracted rules can more accurately reflect linguistic phenomena, rule and dictionary based methods perform better than statistical based methods.
The statistical-based method mainly comprises the following steps: hidden Markov Models (HMMs), large entropy (MEs), Support Vector Machines (SVMs), Conditional Random Fields (CRFs), and the like. In the 4 methods, the larger entropy model has compact structure and better universality; the conditional random field provides a flexible-feature globally optimal labeling framework for named entity identification; the larger entropy and the support vector machine are higher than the hidden Markov model in accuracy; the Viterbi algorithm is used for solving the named entity category sequence with high efficiency, so the speed of the hidden Markov model during training and recognition is faster.
The statistical-based method has high requirements on feature selection, and various features which have influences on the task need to be selected from the text and added into the feature vector. Depending on the major difficulties faced in identifying a particular named entity and the characteristics exhibited, it is contemplated to select a feature set that effectively reflects the characteristics of that type of entity. The main method is to excavate features from the corpus by counting and analyzing the language information contained in the corpus. The related characteristics can be divided into specific word characteristics, context characteristics, dictionary and part-of-speech characteristics, stop word characteristics, core word characteristics, semantic characteristics and the like.
Because text processing is not completely a random process, the state search space is very large by using a method based on statistics alone, and filtering and pruning processing must be performed in advance by means of rule knowledge. Therefore, at present, a named entity recognition system which only uses a statistical model but not rule knowledge is not available basically, and a method of mixing the two is used in many cases.
In addition, as an alternative to the above-mentioned displaying of the entity information through the functional area, the electronic device may mark the entity information on characters of the text object. For example, in the scenario shown in fig. 12a, as shown in fig. 13, the electronic device marks entity information in the form of a circle on the characters of the text object.
(4) Viewpoint function
The point of view function can analyze and summarize the point of view in the character content of the description of the text object, thereby providing a reference basis for the user to make decisions.
Illustratively, when a user previews the comment content of the user comment area displayed on a paper document or on a computer display screen through the camera function of the electronic device, the preview object at this time is a text object. As shown in fig. 14a, when the electronic device detects that the user selects the viewpoint function option in the function list, as shown in fig. 14b, the electronic device displays a function area 1401, and the overall viewpoints of all the commentary users reflected by the content of the current commentary area, such as delicate interior, low oil consumption, good appearance, large space, high price, etc., are output in a visual form in the function area 1401. Alternatively, when the electronic device opens the preview interface, as shown in fig. 14b, a function list and a function area are displayed on the preview interface, a view function option is selected by default in the function list, and the overall view reflected by the content of the current review area is output in a visual form in the function area 1401. In fig. 14b, the larger the circle in which the viewpoint is located, the larger the number of comments to issue such a viewpoint.
In an electronic shopping scenario, browsing the ratings by the user to decide which product to purchase typically takes the user a lot of time to read and summarize whether the current product is worth purchasing. The process of repeatedly reading summary product assessment data can take a significant amount of time for the user, even though the user may not be able to make a good decision. The viewpoint function provided by the embodiment of the application can help the user to better integrate and summarize data, and save the decision time of the user, thereby helping the user to make an optimal decision.
In the viewpoint functional processing, after the evaluated word (for example, a noun or a pronoun) corresponding to the evaluated object is identified, the viewpoint given to the evaluated object can be further found through the syntactic dependency relationship.
(5) Classification function
The classification function can classify according to the character information of the text object, so that a user can conveniently know the field of the content in the text object.
Illustratively, as shown in fig. 15a, the text object is the recruitment inspirator previewed through the preview interface, and when the electronic device detects that the user selects the classification function option in the function list shown in fig. 4a, as shown in fig. 15b, the electronic device displays a function area 1501, and a classification of the recruitment inspirator, such as a domestic finance category, is displayed in the function area 1501. Or, for example, when the electronic device opens the preview interface, as shown in fig. 15b, a function list and a function area are displayed on the preview interface, a category function option is selected by default in the function list, and a category of the recruitment inspiring is displayed in the function area.
In fig. 15b, the classification criteria comprises two levels, the first level being both domestic and international, and the second level comprising sports education, finance, society, entertainment, military, science and technology, internet, real estate, games, politics, automobiles. The picture content in fig. 2-6 is labeled domestic + politics. It should be noted that the classification criterion may be in other forms, and the embodiments of the present application are not particularly limited.
Since different users have different sensitivities and interests for different types of documents, or users may only be interested in a specific type of document, the classification function can help users to identify the type of the current document in advance and then decide whether to read or not, so that the time for users to read uninteresting documents is saved. In addition, after the user shoots pictures for the text object, the classification function can help the electronic equipment or the user to classify the pictures according to the types of the articles, and the later reading of the user is greatly facilitated.
In the classification function process, there are various algorithms for obtaining the classification, such as a statistical learning (machine learning) method. The statistical learning method divides text classification into two stages, a training stage (with rules for computer automatic summary classification) and a classification stage (classifying new texts). The core classifier models of machine learning can be used for text classification, and the common models and algorithms are: support Vector Machines (SVMs), edge perceptrons, k-nearest neighbor algorithms (KNNs), decision trees, Naive Bayes (NBs), bayesian networks, Adaboost algorithms, logistic regression, neural networks, and the like.
In the training stage, the computer finds out the most representative dictionary vector (selecting the most representative word) by using feature extraction (including feature selection and feature extraction) according to the documents in the training set, converts the documents in the training set into vector representation according to the dictionary, and learns by using a classifier model after the vector representation of text data exists.
(6) Emotional function
The emotion function is mainly to obtain the emotion exposed by an author according to character information analysis of a text object, and the emotion can comprise two or more types of commendation or derogation, so that a user can be helped to judge whether the author holds positive or negative emotion on a document in the text object.
Illustratively, as shown in fig. 16a, the text object is the recruitment heuristic previewed through the preview interface, and when the electronic device detects that the user selects an emotional function option in the function list shown in fig. 4a, as shown in fig. 16b, the electronic device displays a function area 1601, where an emotion, such as a positive index and a negative index, exposed by the author for the recruitment heuristic is displayed in the function area 1601. Or, for example, when the electronic device opens the preview interface, as shown in fig. 16b, a function list and a function area are displayed on the preview interface, an emotion function option is selected by default in the function list, and an emotion exposed by the author for the recruitment heuristic stream is displayed in the function area. In FIG. 16b, the emotion is depicted by a positive index and a negative index. As can be seen in FIG. 16b, the author has a positive, commendable emotion with respect to the recruitment inspirational flow.
It should be noted that the classification criteria for positive and negative emotions in fig. 16b are only exemplary, and other classification criteria may be used, and the embodiment of the present application is not particularly limited.
In the classification function processing, there may be various algorithms for obtaining the classification, for example, there may be a dictionary-based method, a machine learning-based method, and the like.
The dictionary-based method mainly comprises the steps of making a series of emotion dictionaries and rules, splitting sentences of a text, analyzing and matching the dictionaries (generally, part of speech analysis and syntactic dependency analysis), calculating emotion values, and finally, taking the emotion values as bases for judging the emotion tendency of the text. Specifically, the method may include: carrying out sentence disassembling operation on the text with the strength greater than the sentence strength, and taking the sentence as a minimum analysis unit; analyzing words appearing in the sentence and matching according to the emotion dictionary; processing the negation logic and the transition logic; calculating the score of the whole sentence of emotional words (carrying out weighted summation according to different words, different polarities, different degrees and other factors); and outputting the emotion tendencies of the sentences according to the emotion scores. If the emotion analysis task is at chapter or paragraph level, the emotion analysis task can be performed in the form of single emotion analysis and fusion of each sentence, or the emotion analysis of the sentences can be performed after the emotion theme sentences are extracted, so that the final emotion analysis result is obtained.
Machine learning based methods can treat sentiment analysis as a supervised classification problem. For judging the emotion polarity, dividing the target emotion into three categories: positive, medium, negative. And manually labeling the training text, then performing a supervised machine learning process, and predicting the result of the test data by using a model.
(7) Associating function
The association function is to provide the user with the content related to the character content in the text object, help the user to know and expand more related content to let the user to extend reading, save the work that the user searches for the related content specially.
Illustratively, as shown in fig. 17a, the text object is the recruitment inspired by the preview interface, when the electronic device detects that the user selects an associated function option in the function list shown in fig. 4a, as shown in fig. 17b, the electronic device displays a function area 1701, and other content related to the recruitment inspired event, such as a link of another recruitment of hua shi, a link of a recruitment of another enterprise related to the middleware, a website of a recruitment of hua shi, a website of a public town, a website of a recruitment of samsung or a website of a recruitment of a rrieba, etc., is displayed in the function area 1701. Or, for example, when the electronic device opens the preview interface, as shown in fig. 17b, a function list and a function area are displayed on the preview interface, the association function option is selected by default in the function list, and other content related to the recruitment inspirator is displayed in the function area.
Specifically, in the association function processing process, links to other sentences having a high similarity to the sentences in the text object may be returned to the user by accessing the search engine according to the semantic similarity between the sentences.
(8) Identification function
The commodity identification function can help a user search for articles linked or indicated by information content in a text object by means of a huge resource library of the internet in the process of shopping or identifying the articles (search tools are not limited to common search tools such as search engines and can also be other search tools), so that the user can be helped to analyze comprehensive characteristics of the linked or indicated articles by means of different dimensions, meanwhile, a background can perform deep processing according to acquired data, and finally, comprehensive evaluation of the articles is output.
Illustratively, when a user previews a link to a cup displayed on a flyer, a magazine, or a computer display screen via a camera function of the electronic device, the preview object is a text object. As shown in fig. 18a, when the electronic device detects that the user selects the authentication function in the function list, as shown in fig. 18b, the electronic device displays a function area 1801, and some evaluation information of the cup corresponding to the link, positive and negative evaluation information, and the like are displayed in the function area 1801. The function can greatly help the user to know the relevant characteristics of the water cup in advance when the user does not purchase the water cup. Meanwhile, the function can help the user to purchase a water cup with high cost performance. Or, when the electronic device opens the preview interface, as shown in fig. 18b, a function list and a function area are displayed on the preview interface, a default selected identification function option is selected in the function list, and some evaluation information of the current cup, positive and negative evaluation information, and the like are displayed in the function area.
In addition, as shown in fig. 19, the identification information may further include specific contents currently linked, such as the origin, capacity, and material of the cup.
It should be noted that, the above description has been given by taking the selected target function option as one function option, the selected target function option may be multiple, and the electronic device may display the service information of multiple target function options in the function area. Illustratively, as shown in fig. 20a, the text object is the recruitment inspirator previewed through the preview interface, and when the electronic device detects that the user selects the summary function option and the association function option in the function list shown in fig. 4a, as shown in fig. 20b, the electronic device displays a function area 2001, and summary information and association information of character information in the text object are displayed in the function area 2001; alternatively, as shown in fig. 20c, the function area 2002 includes two parts, one part for displaying summary information. The other part is used for displaying the associated information. Further, if the user cancels the selection of the association function option, the electronic device cancels the display of the association information and displays only the summary information.
It should also be noted that, in the photo preview state, the function options executable by the electronic device for the text object are not limited to the above listed ones, and may also include a tag function, for example. When the electronic equipment executes the label function, the electronic equipment can carry out deep analysis on the title and the content of the text, and display multi-dimensional label information which can reflect the theme, the topic, the entity and the like of the key information of the text and the corresponding confidence coefficient, and the functional option has wide application value in a plurality of scenes such as personalized recommendation, article aggregation, content retrieval and the like. The functional options executable by other electronic devices are not listed here.
Furthermore, in the embodiments of the present application, the characters in the text object may include one or more languages, for example, chinese, english, french, german, russian, italian, or the like may be included. The information in the functional area and the characters in the text object can adopt the same kind of languages; alternatively, the information in the functional area and the characters in the text object may be in different languages. For example, the characters in the text object may be english, and the summary information in the functional area may be chinese; alternatively, the characters in the text object may be Chinese, and the keyword information in the functional region may be English, etc.
In some cases, a language setting control may be further included in the function list, for setting a language type to which the service information in the function area belongs. Illustratively, as shown in fig. 21a, when the electronic device detects that the user clicks the language setting control 2101, the electronic device displays a language list 2102, and when the user selects chinese, the electronic device displays information in a functional box in the form of chinese (or chinese character); when the user selects english, the electronic device displays information in the form of english in the function box.
In some other embodiments of the present application, in the preview taking state, after the electronic device detects the fourth operation of the user, the electronic device may perform text function display on the text object in the preview taking state.
In one case, when the user needs to use the text function, a fourth operation can be input on the touch screen to trigger the electronic device to display the function list. For example, in the photo preview state, as shown in fig. 22a, after detecting a long press operation of the user in the preview box, the electronic device may display a function list shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on the text object by using the method described in fig. 4 a-21 b in the above embodiment.
It should be noted that the long press operation by the user in the preview frame is merely an exemplary illustration of the fourth operation, and the fourth operation may be another operation. For example, the fourth operation may also be an operation in which the user presses and drags two fingers in the preview frame; alternatively, as shown in fig. 22b, the fourth operation may also be an operation in which the user slides up on the preview interface; or, the fourth operation may also be an operation in which the user slides down on the preview interface; or, the fourth operation may also be an operation of the user drawing a circle track on the preview interface; or, the fourth operation may also be an operation of a user pulling down three fingers on the preview interface; alternatively, the fourth operation may be a voice operation input by the user, or the like, which is not listed here.
In another case, the electronic device may display a prompt message on the preview interface to prompt the user whether to select the text function, and when the user selects the text function, the electronic device may display the text function to the text object in the photo preview state.
Illustratively, as shown in fig. 23a, a prompt box is displayed on the preview interface for prompting the user whether to use the text function, and when the user selects to use the text function, the electronic device may display a function list, so as to perform text function display on the text object by using the method described in fig. 4 a-21 b in the above embodiment. Or, as shown in fig. 23b, a prompt box and a function list are displayed on the preview interface, the prompt box is used for prompting the user whether to use the text function, and when the user selects to use the text function, the function list continues to be displayed on the preview interface; when the user selects not to use the text function, the electronic device hides the list of functions on the preview interface.
As another example, as shown in fig. 23a, a prompt box is displayed on the preview interface for prompting the user whether to display the function list, and when the user selects "yes", the electronic device may display the function list shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on the text object by using the method described in fig. 4a to 21a in the foregoing embodiment. Alternatively, as shown in fig. 23b, a prompt box 2302 and a function list are displayed on the preview interface, where the prompt box is used to prompt the user whether to hide the function list, and when the user selects "no", the function list continues to be displayed on the preview interface; when the user selects "yes," the electronic device hides the list of functions on the preview interface.
As another example, a text function control is displayed on the preview interface, and when the electronic device detects a touch operation of a user on the text function control, the electronic device may display a function list shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on a text object by using the method described in fig. 4a to 21a in the foregoing embodiment. For example, the text functionality control can be a functionality list button 2303 as shown in fig. 23c, a hover ball 2304 as shown in fig. 23d, an icon, or the like.
In some other embodiments of the present application, the shooting mode includes a coma reading mode, and in the coma reading mode, the electronic device may perform text function display on the text object in a shooting preview state.
For example, after the camera application is opened, the electronic device may display a preview interface as shown in fig. 24a, where the preview interface includes a coma reading mode control 2401, and when the electronic device detects that the user clicks and selects the coma reading mode control 2401, the electronic device may display a function list as shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on the text object by using the method described in fig. 4a to 21a in the foregoing embodiment.
Further illustratively, as shown in fig. 24b, when the user detects an operation of clicking the shooting option control 311 by the user on the preview interface, as shown in fig. 24c, the electronic device displays a shooting mode interface, where the shooting mode interface includes a coma mode control 2402. When the electronic device detects that the user clicks and selects the comatic reading mode control 2402, the electronic device may display a function list shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on the text object by using the method described in fig. 4a to 21a in the above embodiment. Moreover, when the electronic device detects that the user clicks and selects the comatic reading mode control 2402, and the subsequent user opens the photo preview interface again, the electronic device can automatically display the text function of the text object in the comatic reading mode.
Further illustratively, the preview interface includes a comatic reading mode control, and if the electronic device determines that the preview object is a text object, the electronic device automatically switches to the comatic reading mode, and displays the function list shown in fig. 4a, 5b, 7b, or 10b, so as to perform text function display on the text object by using the method described in fig. 4a to 21a in the foregoing embodiment.
In another example, the preview interface includes a coma reading mode control, the default shooting mode of the electronic device is a coma reading mode, and after the user selects to switch to another shooting mode, the electronic device shoots in another shooting mode.
As another example, after the camera application is opened, a prompt box as shown in fig. 23a may be displayed on the preview interface, where the prompt box may be used to prompt the user whether to use the comatic reading mode, and when the user selects "yes," the electronic device may display a function list as shown in fig. 4a, fig. 5b, fig. 7b, or fig. 10b, so as to perform text function display on the text object by using the method described in fig. 4a to fig. 21a in the above embodiment.
As can be seen from the above description of the embodiments, in the photo preview state, the electronic device may perform text function display on the text object. In some other embodiments of the present application, when the electronic device determines that the preview object is switched from one text object to another text object, the electronic device may perform a text function presentation on the switched text object. When the electronic device determines that the preview object is switched from a text object to a non-text object, the electronic device may close the associated application of the text function presentation. For example, when the electronic device determines that the camera is refocused, it may indicate that the preview object has moved and that the preview object may have changed, at which point the electronic device may determine whether the preview object has changed. Illustratively, when the electronic device determines that the preview object is changed from a newspaper text object to a new text object, namely, a book page, the electronic device performs a text function presentation on the new text object, namely, the book page. For example, when the electronic device determines that the preview object is changed from a text object, such as a newspaper, to a non-text object, such as a character, the electronic device may hide the list of functions and not enable the associated application of the text function presentation.
In addition, in the shooting preview state, in the process that the electronic equipment displays the text function of the text object, if the electronic equipment shakes or the preview object shakes, the electronic equipment can determine whether the current preview object and the preview object before shaking are the same text object. If the text objects are the same text object, the electronic equipment keeps the text function display of the text object at present; and if the text objects are not the same text object, the electronic equipment displays the text function of the new text object. Specifically, in a photographing preview state, when the electronic device determines that the moving distance of the electronic device is greater than or equal to a certain preset value through a gravity sensor, an acceleration sensor, a gyroscope or other sensors of the electronic device, it can be indicated that the electronic device has moved, and the electronic device can determine whether a current preview object and a preview object before shaking are the same text object; or, when the electronic device determines that the camera is refocused during the preview process, it may indicate that the preview object or the electronic device has moved, and at this time, the electronic device may determine whether the current preview object and the previous preview object are the same text object.
In other embodiments, the function options in the list of functions displayed on the preview interface by the electronic device may be related to the preview object. If the preview objects are different, the function options displayed on the preview interface by the electronic device may also be different. Specifically, the electronic device may identify a preview object on the preview interface, and then display a function option corresponding to the preview object on the preview interface according to the identified characteristics of the preview object, such as the type and the specific content. After detecting the operation of the user selecting the target function option, the electronic device may display service information corresponding to the target function option.
For example, when the electronic device previews a recruitment heuristic, a newspaper, or a page of a book, the electronic device may recognize that the preview object is a segment of text on the preview interface, and the electronic device may display the functional options of a summary, keywords, entities, viewpoints, analysis, emotion, and association on the preview interface.
As another example, when the electronic device previews an item, such as a cup, a computer, a bag, or an article of clothing, the electronic device may recognize that the preview object is an item on the preview interface, and the electronic device may display the association and authentication function options on the preview interface.
Also, the function options are not limited to the above-mentioned ones, and may include others.
For example, when the electronic device previews a poster on which a Jack captain is displayed, the electronic device may recognize on the preview interface that the preview object is the Jack captain, and the electronic device may display on the preview interface functional options such as a director, a drama brief summary, a character, a showing time, a lead actor, and the like.
For another example, when the electronic device previews the logo identifier of hua cheng, the electronic device may recognize that the logo is hua cheng, and display functional options such as hua cheng brief introduction, hua cheng official website, hua cheng shopping mall, hua cheng cloud, hua cheng recruitment and the like on the preview interface.
For another example, when the electronic device previews a rare animal, the electronic device may recognize the animal and select functional options such as genus, morphological feature, life habit, distribution category, habitat, etc. on the preview interface.
Specifically, the function options in the function list displayed on the preview interface by the electronic device may be related to the type of the preview object, and if the preview object is a text type, the electronic device may display a function list on the preview interface; if the preview object is of an image type, the electronic device may display another function list on the preview interface. Wherein the function options contained in the two function lists are different. The text type preview object refers to a preview object containing characters; the preview object of the image type refers to a preview object containing an image, a portrait, a scene, and the like.
In some other embodiments, the preview object on the preview interface may include a plurality of sub-objects of multiple types, and the list of functions displayed on the preview interface by the electronic device may correspond to the types of the sub-objects. The types of the sub-objects of the preview object may include a text type and an image type, among others. The sub-object of the text type refers to a character part in the preview object; the sub-object of the image type refers to an image portion of a preview object, such as an image on a previewed picture or a previewed person, animal or scene. Illustratively, the preview object shown in fig. 25a includes a first sub-object 2501 of a text type and a second sub-object 2502 of an image type. Wherein the first sub-object 2501 is a character part of the recruitment inspiring, and the second sub-object 2502 is a logo part of the recruitment inspiring.
Specifically, when the electronic device previews the recruitment heuristic in a photographing preview state, the electronic device may display a function list 2503 corresponding to the first sub-object 2501 of the text type on a preview interface, where the function list 2503 may include function options such as an abstract, a keyword, an entity, a viewpoint, a category, an emotion, and an association; moreover, the electronic device may display another function list 2504 corresponding to the second sub-object 2502 of the image type on the preview interface, where the function list 2504 may include function options such as hua bluo, hua official website, hua shopping mall, hua cloud, and hua recruitment. The function list 2504 is different from the function list 2503 in content and location. As shown in fig. 25c, when the user clicks on a summary option that may be included in the function list 2503, the electronic device may display summary information 2505 on the preview interface; as shown in FIG. 25d, when the user clicks on the Huaqi profile option in the function list 2504, the electronic device may display Huaqi profile information 2506 on the preview interface.
In other embodiments, in the photo preview state, when the preview object on the preview interface of the electronic device is switched from preview object 1 to preview object 2, in one case, the electronic device may stop displaying the business information of preview object 1 and display the business information of preview object 2. For example, if the entire recruitment inspiring comprises two pieces, the preview object 1 is the 1 st recruitment inspiring (i.e., the upper half of the entire recruitment inspiring) shown in fig. 7b, and the electronic device displays summary information of the preview object 1 as shown in fig. 7 b. When the user moves the electronic device to preview the 2 nd recruitment heuristic (i.e., the lower half of the content of the entire recruitment heuristic), the preview object switches to preview object 2. As shown in fig. 25e, the electronic device stops displaying the summary information of the preview object 1 and displays the summary information 2507 of the preview object 2.
When the preview object on the photographing preview interface of the electronic device is switched from the preview object 1 to the preview object 2, in another case, the electronic device may display the service information 2 of the preview object 2 and continue to display the service information 1 of the preview object 1. For example, if the entire recruitment inspiring comprises two pieces, the preview object 1 is the 1 st recruitment inspiring (i.e., the upper half of the entire recruitment inspiring) shown in fig. 7b, and the electronic device displays summary information of the preview object 1 as shown in fig. 7 b. When the user moves the electronic device to preview the 2 nd recruitment heuristic (i.e., the lower half of the content of the entire recruitment heuristic), the preview object switches to preview object 2. The electronic device may display summary information 2507 of preview object 2 and continue to display summary information 701 of preview object 1.
For example, as shown in fig. 25f, the electronic device may display the summary information of the preview object 1 and the summary information of the preview object 2 in the same display frame.
For another example, the electronic device may display the summary information 701 of the preview object 1 in a reduced size while displaying the summary information of the preview object 2. For example, as shown in fig. 25g, the electronic device can zoom out to display summary information 2507 of the preview object 1 in the upper right corner (or lower right corner, upper left corner, lower left corner) of the preview interface. Further, when the electronic device receives a third operation of the user, the electronic device may combine the summary information of the preview object 1 and the summary information of the preview object 2 on the preview interface. Illustratively, the third operation may be an operation in which the user kneads summary information 701 and summary information 2507. For another example, as shown in fig. 25h, a merge control 2508 may be displayed on the preview interface, and when the user clicks the merge control 2508, as shown in fig. 25f, the electronic device may merge and display the summary information of the preview object 1 and the summary information of the preview object 2 on the preview interface, so that the user may integrate the related business information corresponding to the multiple preview objects conveniently.
Further, in the photographing preview state, after the electronic device detects the operation of clicking the photographing button by the user, the electronic device may photograph a picture. After the picture is shot, after the electronic equipment detects that the user opens the picture, the electronic equipment can display the picture and can also display the picture in a text function mode.
In one case, the electronic device may obtain and display the service information of the target function option selected by the user through self-processing or from the server in the photo preview state, and store the service information. After the electronic device opens the shot picture (e.g., from an album or from a thumbnail frame), the electronic device may present the service information of the target function option according to the saved content. When the user wants to display the service information of other target functions which is not stored, the electronic device can process or acquire the service information of other target functions from the server and then display the text function.
In another case, the electronic device may obtain and store the service information of all target functions in the function list through self-processing or from the server in the photo preview state. After the electronic device opens the shot picture, the electronic device can display the text function according to the stored service information of all the target functions. After the electronic device opens the picture, the content in the functional area may be service information of a target function option selected by the user in a shooting preview state, may also be service information of a default target function, may also be service information of a target function option reselected by the user, or may also be service information of all target functions.
In another case, the electronic device does not store the service information of the target function processed by itself or acquired from the server in the photographing preview state, and after the electronic device opens the photographed picture, the electronic device re-processes or acquires the service information of the target function option selected by the user or the service information of all the target functions from the server and performs text function display. After the electronic device opens the picture, the content displayed in the function area may be service information of a default target function, service information of a target function option selected by the user, or service information of all target functions.
Specifically, in some embodiments of the present application, after the photographed picture is opened, a manner of displaying a text function of the picture by the electronic device may be the same as a manner of displaying a text function of the text object in the photographing preview state shown in fig. 4a to 21b, where the difference is that, except that all the information related to the image content and the text function may be displayed, the interface of the touch screen of the electronic device no longer includes photographing controls such as a photographing mode control, a video recording mode control, a photographing option control, a photographing button, a hue style control, a thumbnail frame, and a focus frame in the photographing preview state; in addition, some controls for processing the shot pictures, such as a sharing control, an editing control, a setting control, a deleting control, and the like, can be displayed on the touch screen of the electronic device.
Illustratively, in the same manner as shown in fig. 7a and 7b, after opening the picture of the recruiting inspirations, referring to fig. 26a, the electronic device displays the picture taken and the list of functions; when the electronic device detects that the user selects the summary function option in the function list, as shown in fig. 26b, the electronic device displays a function area in which a summary of the recruitment heuristic is displayed; or, after the electronic device opens the shot picture of the recruitment inspirational event, as shown in fig. 26b, the electronic device displays a function list and a function area, the function list selects the summary function option by default, and the function area displays the summary of the recruitment inspirational event. The description is given only by taking the display mode shown in fig. 7a and 7b as an example, and the description of the display mode is omitted for the same display mode as the other modes in fig. 4 a-21 b.
In addition, it should be noted that, in the same way as the text function display in the preview box in the shooting preview state, after the shot picture is opened, the electronic device can hide and restore the display function list and the function area.
In addition, in some other embodiments of the present application, after opening the taken picture, the electronic device may also perform text function display in a manner different from that shown in fig. 4a to 21 b. For example, referring to fig. 27a and 27b, after opening the picture, the electronic device may display service information of the target function option or service information of all target functions in the attribute information of the picture.
The electronic equipment displays the text function of the picture after the shot picture is opened, can convert the unstructured character content in the picture into the structured character content, simplifies the information amount, saves the time spent by a user for reading a large amount of character information on the picture, is convenient for the user to quickly know the main content of the picture by reading a small amount of information which is most concerned, can also provide other information associated with the picture content for the user, and brings convenience for the reading and information management of the user.
Another embodiment of the present application further provides a picture display method, where the electronic device may not perform the text function display in the preview photographing state, and may perform the text function display when the picture is photographed and the photographed picture is opened. Illustratively, on the preview interface 308 shown in fig. 3b, when the electronic device detects an operation of clicking the shoot button 312 by the user, the electronic device shoots a picture. After the electronic device opens the shot picture (for example, opens from an album or opens from a thumbnail frame), the electronic device can also obtain service information of the function options through self processing or from a server, so as to perform text function presentation on the picture.
Specifically, after the picture is taken, the electronic device may obtain service information of all target functions through self-processing or from a server, so that the text function display is performed after the picture is opened. After the electronic device opens the picture, the content in the functional area may be service information of a default target function, service information of a target function option selected by the user, or service information of all target functions.
Or after the picture is opened, the electronic device may perform text function display by processing the picture itself or acquiring service information of all target functions from a server.
Or, after the electronic device opens the picture and detects that the user selects the target function option, the electronic device may perform text function display by processing the electronic device itself or acquiring service information of all target functions from the server.
In one case, the way of displaying the text function of the shot picture by the electronic device may be the same as the way of displaying the text function of the text object in the shooting preview state shown in fig. 4a to 21b, and the difference is that, except that the image content and the related information of the text function can be displayed, the interface of the touch screen of the electronic device does not include shooting controls such as a shooting mode control, a video mode control, a shooting option control, a shooting button, a tone style control, a thumbnail frame, a focusing frame and the like in the shooting preview state any more; in addition, some controls for processing the shot pictures, such as a sharing control, an editing control, a setting control, a deleting control, and the like, can be displayed on the touch screen of the electronic device.
Illustratively, in the same manner as shown in fig. 7a and 7b, after opening the picture of the recruiting inspirations, referring to fig. 26a, the electronic device displays the picture taken and the list of functions; when the electronic device detects that the user selects the summary function option in the function list, as shown in fig. 26b, the electronic device displays a function area in which a summary of the recruitment heuristic is displayed; or, after the electronic device opens the shot picture of the recruitment inspirational event, as shown in fig. 26b, the electronic device displays a function list and a function area, the function list selects the summary function option by default, and the function area displays the summary of the recruitment inspirational event. The description is given only by taking the display mode shown in fig. 7a and 7b as an example, and the description of the display mode is omitted for the same display mode as the other modes in fig. 4 a-21 b.
In another case, after opening the taken picture, the electronic device may also perform text function presentation in a manner different from that shown in fig. 4 a-21 b. For example, referring to fig. 27a and 27b, after opening the picture, the electronic device may display service information of the target function option or service information of all target functions in the attribute information of the picture.
The electronic equipment displays the text function of the picture after the shot picture is opened, can convert the unstructured character content in the picture into the structured character content, simplifies the information amount, saves the time spent by a user for reading a large amount of character information on the picture, facilitates the user to quickly know the main content of the picture by reading a small amount of information which is most concerned, can also provide other information associated with the picture content for the user, and brings convenience for the reading and information management of the user.
Furthermore, after the picture is shot, the electronic equipment can classify the picture in the album according to the service information of the function options, so that the picture can be classified or identified on the content layer of the picture. Illustratively, according to the keyword information shown in fig. 10b, after the electronic device takes a picture of the text object in fig. 10b, a group can be established according to the keyword "recruitment", and, as shown in fig. 28a, the electronic device can divide the picture into "recruitment" groups. As another example, after the electronic device takes a picture of the text object in fig. 15b according to the classification information shown in fig. 15b, a group may be established according to the classification "domestic finance", and the electronic device may divide the picture into "domestic finance" groups as shown in fig. 28 b. As another example, after the electronic device takes a picture of the text object in fig. 15b according to the classification information shown in fig. 15b, the electronic device may mark the picture with a "domestic news" label as shown in fig. 28 c. As another example, the electronic device may print the label information on the opened picture according to the label information in the service information of the function option.
Another embodiment of the present application further provides a method for displaying personalized functions of a text, which can display personalized functions of text contents directly displayed on an electronic device through a touch screen. The personalized functions may include the functional options of abstract, keyword, entity, viewpoint, category, emotion, association, and tasting in the above embodiments. The functional options can be used for converting unstructured character contents in the text contents into structured character contents by correspondingly processing and processing characters in the text contents, so that the information quantity is simplified, the time spent by a user for reading a large amount of character information in the text contents is saved, the user can conveniently read a small amount of information which is most concerned, and convenience is brought to the reading and information management of the user.
The text content displayed by the electronic equipment through the touch screen is text content directly displayed on the touch screen by the electronic equipment through a browser or an app mode, and the text content is different from a text object previewed by the electronic equipment in a photographing preview state and is also different from a picture photographed by the electronic equipment.
Specifically, the electronic device may perform the text function display by using the same method as the personalized function display method for the text image and the photographed picture in the photographing preview state. For example, when the electronic device opens a news article through the browser, the electronic device may perform personalized function presentations such as summarization, classification, association, and the like on the news article. For another example, when the electronic device browses a novel through the app, the electronic device may perform personalized function presentation of keywords, entities, emotions, and the like on the text content displayed on the current page. For another example, when the electronic device opens a document locally, the electronic device may perform personalized function presentations such as abstracts, keywords, entities, emotions, associations and the like on the text content in the document.
In one case, the electronic device may automatically display a list of functions upon determining that the displayed content includes textual content; in another case, the electronic device defaults to not displaying the function list, and when the electronic device is detecting a third operation, the function list may be displayed in response to the third operation. The third operation may be the same as or different from the fourth operation, and embodiments of the present application are not particularly limited. In another case, the electronic device may default to displaying the function list, and when the electronic device detects an operation in which the user indicates to hide the function list (e.g., drag the function list to a position of a bezel of the touch screen), the electronic device no longer displays the function list.
Illustratively, as shown in fig. 29a, the electronic device opens a newsfeed through the browser, a function list is displayed on the touch screen of the electronic device, and when the electronic device detects that the user selects an entity function option from the function list, as shown in fig. 29b, the electronic device displays a function area 2901, and an entity of the newsfeed is displayed in the function area 2901. Alternatively, for example, when the electronic device opens the preview interface, as shown in fig. 29b, the electronic device opens a newsfeed through the browser, a function list and a function area are displayed on the touch screen of the electronic device, an entity function option is selected by default in the function list, and an entity of the newsfeed is displayed in the function area.
It should be noted that fig. 29b shows the entities such as time, name, location, position, and organization as examples, and the entities may include other contents. Moreover, the types of the text objects are different, and the content included in the entity may also be different. For example, the entity content may also include a work name, and the like.
In addition, the interface shown in FIG. 29b also includes a "+" control 2902, and when the user clicks on the "+" control 2902, the electronic device may display other organizational structures involved in the text object.
In addition, in the scenario shown in fig. 29b, the user displays each entity in a classified manner through the text display box, so that the information extracted from the text object can be more organized and structured, and the user can conveniently sort and classify the information.
Therefore, when a user browses text contents through the electronic equipment, the entity function can facilitate the user to quickly acquire various entity information, help the user to find some new entity nouns and help the user to know new things.
As another example, as shown in fig. 30a, the electronic device opens a news article through the browser, a function list is displayed on the touch screen of the electronic device, and when the electronic device detects that the user selects the associated function option from the function list, as shown in fig. 30b, the electronic device displays a function area 3001, and other contents related to the news article, for example, a link to related news of a thirteen national grand meeting, a link to a two-meeting schedule forecast, and the like are displayed in the function area 3001. Alternatively, for example, when the electronic device opens the preview interface, as shown in fig. 30b, the electronic device opens a news article through the browser, a function list and a function area are displayed on the touch screen of the electronic device, the association function option is selected by default in the function list, and other content related to the news article is displayed in the function area.
Therefore, when a user browses text contents through the electronic equipment, the association function can provide the contents related to the text contents for the user, so that the user is helped to know and expand more related contents to be extended and read by the user, and the work that the user specially searches the related contents is omitted.
It should be noted that the text functions that the electronic device can execute with respect to the text content displayed on the touch screen are not limited to the entity functions and the association functions shown in fig. 29 a-30 b, and may also have various other text functions, which are not listed here.
Another embodiment of the present application provides a text recognition method, which may include: the electronic equipment or the server acquires a target image in a RAW format; then, the electronic equipment or the server determines the standard character corresponding to the character to be recognized in the target image.
For example, the target image may be a preview image acquired when a preview is taken. In the above embodiment of the application, before the electronic device performs text function display on the text object in the shooting preview state, the electronic device may further identify characters in the text object, and then display service information of the function options according to the identified standard characters. In addition, in the above embodiment of the application, before the picture is opened and the text function display is performed, the electronic device may further identify characters in the text object corresponding to the picture, and then perform the text function display according to the identified standard characters. Specifically, the electronic device recognizing the characters in the text object may include: identifying through self-processing; or, the character recognition result is obtained from the server through server recognition. In the following embodiments, the server performs character recognition as an example, and a method for performing character recognition by the electronic device is the same as the method for performing character recognition by the server, which will not be described in detail in the embodiments of the present application.
In the character recognition method, electronic equipment acquires a preview image in a photographing preview state and sends the preview image to a server, and the server performs character recognition according to the preview image; or the electronic equipment acquires a preview image when shooting a picture and sends the preview image to the server, and the server performs character recognition according to the preview image. The preview image is an original image which is not processed by the ISP, and the electronic equipment generates a picture which is finally presented to a user after the electronic equipment processes the preview image by the ISP. In the character recognition method, the original image output by the camera of the electronic equipment can be directly processed, and the character recognition is not needed after the original image is processed by an ISP (internet service provider) to generate a picture; the method saves other methods for preprocessing the picture during character recognition (operations comprise reverse processes of ISP processing), saves computing resources, can also avoid noise introduced by preprocessing, and improves recognition accuracy. Moreover, the character recognition process and the preview process are carried out synchronously, so that more convenient use experience can be brought to a user.
In another character recognition method, the electronic device may also acquire a preview image in a photographing preview state and process the preview image to generate a picture, and then send the picture to the server, and the server may recognize the photographed picture by using the above-mentioned conventional character recognition method; or, the electronic device may send the picture to the server after taking the picture, and the server may perform recognition according to the taken picture by using the above-mentioned conventional character recognition method. Specifically, the server may pre-process the picture to remove noise and useless information in the image, and then perform character recognition according to the pre-processed data. It is understood that the embodiment of the present application may also perform character recognition by other methods, which are not described herein again.
Specifically, in the character recognition process, the server may obtain the brightness, also referred to as a gray scale value or a gray scale value (for example, when the preview image is in a YUV format, the brightness is a Y component of a pixel), of each pixel in the preview image, and perform character recognition processing according to the brightness. The chrominance of each pixel point in the preview image (for example, when the preview image is in YUV format, the chrominance is the U component and the V component of the pixel point) may not participate in the character recognition process. Therefore, the data volume in the character recognition processing process can be reduced, the calculation time is reduced, the calculation resources are saved, and the processing efficiency is improved.
Specifically, the server may perform binarization processing and image sharpening processing on the gray value of each pixel point in the preview image to generate a black-and-white image. The binarization refers to setting the gray value of a pixel point on the preview image to be 0 or 255, so that the pixel point on the preview image is a white pixel point (that is, the gray value is 0) or a black pixel point (that is, the gray value is 255). Therefore, the preview image can show obvious black and white effect, and the outline of the character to be recognized on the preview image is highlighted. The image sharpening is to compensate the outline of the preview image, enhance the edge and the gray level jump part of the character to be recognized on the preview image, highlight the edge and the outline of the character to be recognized on the preview image and improve the contrast between the edge of the character to be recognized and the surrounding pixels.
And then, the server determines black pixel points included by the character to be recognized according to the black and white image. Specifically, on a black-and-white image, for a certain black pixel, as shown in fig. 31, the server may determine whether there are other pixels around the black pixel, where a distance between the other pixels and the black pixel is smaller than or equal to a certain preset value. If n (positive integer) other pixel points exist around the pixel point, wherein the distance between the pixel point and the black pixel point is smaller than or equal to a certain preset value, the n other pixel points and the pixel point belong to the same character, and the server records the black pixel point and the n other pixel points; and continuously searching whether black pixel points which belong to the same character with the target exist around the target by taking each pixel point in the n other pixel points as the target. If no other pixel points with the distance from the black pixel point being smaller than or equal to a certain preset value exist around the pixel point, the n other pixel points and the pixel point do not belong to the same character, and the server takes another black pixel point as a target to search whether a black pixel point which belongs to the same character as the target exists around the target. The principle for determining the black pixel points included in the character to be recognized provided by the embodiment of the application can be called as follows: "highly correlated inside the character, extremely sparse outside the character".
After determining the black pixel points included by the character to be recognized, the server may perform matching comparison on the character to be recognized and the characters in the standard library according to the black pixel points included by the character to be recognized, and if a standard character matching the character to be recognized exists in the standard library, determine that the character to be recognized is the standard character; and if the standard character matched with the character to be recognized does not exist in the standard library, the character to be recognized is failed to be recognized.
Because the size range of the character to be recognized may not be consistent with that of the standard character, the character to be recognized is usually required to be processed and then matched and compared with the standard character.
In one processing method, the server may scale/enlarge the character to be recognized so that the size range of the character to be recognized is consistent with the size range of the preset standard character, and then match/compare the scaled character to be recognized with the standard character. As shown in fig. 32a or fig. 32b, the size range of a character refers to a size range of an area enclosed by a first straight line tangent to the left side of the leftmost black pixel of the character, a second straight line tangent to the right side of the rightmost black pixel of the character, a third straight line tangent to the upper side of the topmost black pixel of the character, and a fourth straight line tangent to the lower side of the bottommost black pixel of the character. Wherein, the size range shown in fig. 32a is the size range of the character to be recognized before the scaling/zoom-in; fig. 32b shows a size range of the character to be recognized after scaling/enlargement, that is, a size range of the standard character.
When the size range of the character to be recognized is reduced/scaled to be consistent with the size range of the preset standard character, the server can encode the character to be recognized according to the coordinates of black pixel points included in the character to be recognized after the character to be recognized is reduced/scaled. For example, the encoding result may be a set of coordinates of black pixels from the first row to the last row, and for each row, the black pixels are encoded in the order of arrangement from left to right. When this encoding method is employed, the encoding result of the character to be recognized shown in fig. 32b may be an encoding vector [ (x1, y1), (x2, y1),. -%, (x1, y2),. -%, (xp, yq), (xs, yq) ]. For another example, the encoding result may be a set of coordinates of black pixels from the first line to the last line (that is, black pixels included in the character to be recognized), and for each line of black pixels, encoding may be performed according to an arrangement order of black pixels from right to left. For another example, the encoding result may be a set of coordinates of black pixels from the first column to the last column, and for each column, encoding may be performed according to an arrangement order of the black pixels from top to bottom.
It should be noted that the encoding mode adopted by the character to be recognized is the same as the encoding mode adopted by the standard character in the standard library, so that whether the character to be recognized is matched with the standard character can be determined by comparing the encoding of the character to be recognized with the encoding of the standard character.
After obtaining the code vector of the character to be recognized, the server may determine whether the character to be recognized matches the standard character according to the similarity (e.g., vector space cosine value, pearson correlation coefficient, etc.) between the code vector of the character to be recognized and the code vector of the standard character in the standard library. When the similarity is greater than or equal to a certain preset value, the server can determine that the character to be recognized is matched with the standard character.
In another processing method, the server may encode the character to be recognized according to coordinates of black pixel points included in the character to be recognized, so as to obtain a first encoding vector of the character to be recognized, obtain a size range of the character to be recognized, and calculate a ratio Q between a preset size range of the standard character and the size range of the character to be recognized. Wherein, when Q is greater than 1, it can be referred to as a magnification; when Q is less than 1, it can be referred to as a reduction factor. Then, the server may calculate, according to the code vector 1 of the character to be recognized, the ratio Q, and an image scaling/scaling algorithm (e.g., a sampling algorithm, an interpolation algorithm, etc.), a corresponding code vector 2 after the character to be recognized is scaled/scaled according to the ratio Q. Then, the server can determine whether the character to be recognized is matched with the standard character according to the similarity between the encoding vector 2 of the character to be recognized and the encoding vector of the standard character in the standard library. When the similarity is greater than or equal to a certain preset value, the electronic equipment can determine that the character to be recognized is matched with the standard character, and the character to be recognized is the standard character.
Compared with the classification identification method in the traditional character identification method, the method for carrying out character identification by calculating the similarity according to the coding vector formed by the coordinates of the pixel points is more accurate.
The server determines whether the character to be recognized is matched with the standard character according to the similarity between the character code vector to be recognized and the code vector in the standard library. For example, the server may compare the code vector of the character to be recognized with the code vector of each standard character in the standard library one by one, and the standard character with the highest similarity obtained by the comparison is the standard character corresponding to the character to be recognized.
For another example, the server may sequentially compare the code vector of the character to be recognized with the code vectors of the standard characters in the standard library according to the sequence of the preset standard characters in the character library, and the standard character with the similarity higher than or equal to a certain preset value for the first time is the standard character corresponding to the character to be recognized.
For another example, the standard library stores a first similarity between the second code vector of each standard character and a preset second code vector of a reference standard character, and the standard characters are arranged according to the magnitude sequence of the first similarity. The server calculates a second similarity between the first code vector of the character to be recognized and the second code vector of the reference standard character. In one case, the server determines a target first similarity closest to the second similarity in the standard library, and the standard character corresponding to the target first similarity is the standard character corresponding to the character to be recognized. Therefore, the server does not need to compare the character to be recognized with each standard character in the standard library in sequence, so that the calculation range of the similarity can be reduced, the process of calculating the characters in the standard library one by one is effectively avoided, and the time for calculating the similarity is greatly reduced.
In another case, the server determines at least one target first similarity (i.e., at least one target first similarity having a difference value with the second similarity smaller than or equal to a preset threshold) in the standard library, which is close to the second similarity, and at least one standard character corresponding to the at least one target first similarity. Then, the server determines whether a standard character matched with the character to be recognized exists in at least one standard character corresponding to the at least one target first similarity, and the character to be recognized does not need to be compared with each standard character in the standard library in sequence, so that the calculation range of the similarity can be reduced, the process of calculating the similarity one by one with the Chinese characters in the standard library is effectively avoided, and the time for calculating the similarity is greatly reduced.
Illustratively, the code vector of the reference standard character "fu" and "fu" is [ a1, a2, a 3. Referring to table 1, the code vectors are arranged in the standard library in order of similarity from the code vector of the reference standard character to the code vector of the reference standard character.
TABLE 1
Figure GPA0000290031690000401
After the code vector of the character to be recognized is obtained in the recognition process, similarity calculation is firstly carried out on the code vector of the character to be recognized and the code vector of the reference character 'fu' according to similarity algorithms such as a vector space cosine value, a Pearson correlation coefficient and the like, and the second similarity is obtained to be 0.933. In one case, the server may determine that the first similarity closest to 0.933 in the standard library is 0.936, the standard character corresponding to 0.936 is "day", and the standard character "day" is the standard character corresponding to the character to be recognized. In another case, the server determines that the standard characters corresponding to the target first similarities around 0.933 in the standard library are "husband", "day", and "day", respectively, of 1,0.936, and 0.929, 1,0.936, and 0.929. Then, the server compares the character to be recognized with the characters of 'husband', 'day' and 'death', and when the server determines that the third similarity between the code vector of the character to be recognized and the character of 'day' is maximum, the server can determine that the character to be recognized is the character of 'day'.
In addition, when the information in the functional region and the characters in the text object do not belong to the same language, the electronic device may also translate the characters into another language after recognizing the characters in the text object, and then display the service information of the functional options in the functional region in the other language, which is not described herein.
With reference to the foregoing embodiments and accompanying drawings, another embodiment of the present application provides a method for displaying service information on a preview interface, where the method may be implemented in an electronic device having a hardware structure shown in fig. 1 and a software structure shown in fig. 2. As shown in fig. 33, the method may include:
s3301, the electronic device detects a first touch operation for starting a camera application.
For example, the first touch operation for starting the camera application may be an operation in which the user clicks the camera icon 302 as shown in fig. 3 a.
S3302, responding to the first touch operation, displaying a first shot preview interface on the touch screen by the electronic device, wherein the first preview interface comprises a comet reading mode control.
For example, the first preview interface may be the interface shown in fig. 24a, and the coma read mode control may be the coma read mode control 2401 as shown in fig. 24 a; alternatively, the first preview interface may be the interface shown in fig. 23c, and the comatic read mode control may be the function list control 2303 as shown in fig. 23 c; alternatively, the first preview interface may be the interface shown in fig. 23d, the comatic read mode control may be the hover ball 2304 as shown in fig. 23d, and so on.
And S3303, the electronic device detects a second touch operation for the coma reading mode control.
For example, the touch operation of the user with respect to the coma read mode control may be a click operation of the coma read mode control 2401 as shown in fig. 24a, or a click operation of the function list control 2303 as shown in fig. 23c, or a click or drag operation of the hover ball control 2304 as shown in fig. 23 d.
And 3304, in response to the second touch operation, the electronic device displays p function controls and q function controls corresponding to the comatic reading mode control on a second preview interface, respectively, where the second preview interface has a preview object, where the preview object includes a first sub-object and a second sub-object, the first sub-object is a text type, the second sub-object is an image type, the p function controls correspond to the first sub-object, the q function controls correspond to the second sub-object, p and q are natural numbers, and the p function controls are different from the q function controls.
Wherein p and q may be the same or different.
Illustratively, the second preview interface may be the interface shown in fig. 25a, the second preview interface including a first sub-object of a text type and a second sub-object of an image type. Wherein, the first sub-object of text type may be the sub-object 2501 in fig. 25a, and the p function controls may be the abstract, keyword, entity, viewpoint, category, emotion and association function controls in the function list 2503 shown in fig. 25 b; the second sub-object of the image type may be the sub-object 2502 in fig. 25a, and the q function controls may be hua yi brief, hua yi official gao, hua yi shopping mall, hua yi cloud, and hua yi recruitment function controls in the function list 2504 shown in fig. 25 b.
And S3305, the electronic device detects a third touch operation for a first function control in the p function controls.
For example, the third touch operation may be an operation in which the user clicks a digest function option in the function list 2503 as shown in fig. 25 c.
And S3306, in response to the third touch operation, the electronic device displays first service information corresponding to the first function option on the second preview interface, where the first service information is obtained after the electronic device processes the first sub-object in the second preview interface.
For example, the second preview interface may be the interface shown in fig. 25a, and the first service information may be summary information 2505 corresponding to the first sub-object shown in fig. 25 c.
And S3307, the electronic device detects a fourth touch operation for a second function control in the q function controls.
For example, the third touch operation may be an operation in which the user clicks the huayinji function option in the function list 2504 as shown in fig. 25 d.
And S3308, in response to the fourth touch operation, the electronic device displays second service information corresponding to the second function option on the second preview interface, where the second service information is obtained after the electronic device processes the second sub-object in the second preview interface.
For example, the second preview interface may be the interface shown in fig. 25a, and the first service information may be hua-ji-profile information 2506 corresponding to the second sub-object shown in fig. 25 d.
In the scheme, under the photo preview interface, the electronic device can respond to the operation of a user on the smart read mode control, display different function options corresponding to different types of preview sub-objects respectively, process the preview sub-objects according to the function options selected by the user to acquire service information corresponding to the function options, and display the service information corresponding to the different sub-objects and the selected function options on the preview interface. Thus, the preview processing function of the electronic device can be improved.
The service information of the first sub-object of the text type is acquired after the electronic equipment processes characters on the preview object in the second preview interface. The characters can include characters of various countries such as Chinese characters, English, Russian, German, French, Japanese and the like, and can also include numbers, letters, symbols and the like. The service information may include summary information, keyword information, entity information, viewpoint information, classification information, emotion information, association information, or identification information, etc. The function options corresponding to the text-type preview sub-object can be used for enabling the electronic device to display service information associated with the character content in the preview sub-object on the second preview interface by correspondingly processing and processing the characters in the text-type preview sub-object, converting unstructured character content in the preview sub-object into structured character content, simplifying information amount, saving time spent by a user in reading a large amount of character information on the text object, facilitating the user to read a small amount of information which is most concerned, and bringing convenience to the reading and information management of the user.
In some other embodiments of the present application, the displaying, by the electronic device, service information corresponding to the function option in steps S3306 and 3308 (for example, first service information corresponding to the first function option or second service information corresponding to the second function option) may include: and the electronic equipment superposes and displays a function interface on the second preview interface, wherein the function interface comprises service information corresponding to the function option. The function interface is positioned in front of the second preview interface, so that a user can know the service information conveniently through the function interface in front.
For example, the function interface may be an area 2505 where summary information in the form of a popup window is located, an area 2506 where profile information is paged, or the like as shown in fig. 25 d.
In some other embodiments of the present application, the displaying, by the electronic device, the service information corresponding to the first function option in step S3306 may include: and the electronic equipment displays the first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode. Therefore, the service information on the preview object can be highlighted in a marking mode, and the user can browse the service information conveniently.
In some other embodiments of the present application, in response to the electronic device detecting a touch operation of a user with respect to the coma-reading mode control, the method may further include: the electronic equipment displays a language setting control on the touch screen, and the language setting control is used for setting the language type of the service information so as to facilitate the user to set and switch the language type of the service information. Illustratively, the language setting control may be a language setting control 2101 as shown in fig. 21a, and may be used to set or switch the language type of the service information.
Referring to fig. 34, before the first service information corresponding to the first function option is displayed on the second preview interface in step S3306, the method may further include:
s3309, the electronic device acquires a preview image of the preview object in a RAW format.
The preview image is an original image which is acquired by a camera of the electronic equipment and is not processed by an ISP (internet service provider).
S3310, the electronic equipment determines standard characters corresponding to the characters to be recognized in the preview object according to the preview image.
That is to say, the original image in the RAW format output by the camera of the electronic device can be directly processed without character recognition after the original image is processed by the ISP to generate a picture; the method saves other methods for preprocessing the picture during character recognition (including reverse processes of ISP processing), saves computing resources, can also avoid noise introduced by preprocessing, and improves recognition accuracy.
S3311, the electronic device determines first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
Specifically, the algorithm and the process of determining, by the electronic device, the first service information of the first function option according to the recognized standard character in the preview object may refer to the detailed description of each function option in the foregoing embodiments, which is not described herein again.
It should be noted that the above step S3311 may be after step S3305; the steps S3309-S3310 may be performed before step S3305 or after step S3305, and the embodiments of the present application are not limited thereto.
Wherein, the step S3310 specifically includes:
and S3401, the electronic equipment carries out binarization processing on the preview image to obtain the preview image comprising black pixel points and white pixel points.
The electronic equipment performs binarization processing on the preview image, so that the preview image can show an obvious black-and-white effect, and the outline of the character to be recognized on the preview image is highlighted; moreover, the preview image only comprises black pixel points and white pixel points, and the calculated data volume is reduced.
And S3402, the electronic equipment determines at least one target black pixel point included by the character to be recognized according to the position relation of the adjacent black pixel points on the preview image.
For example, referring to fig. 31, the electronic device may determine at least one target black pixel point included in the character to be recognized according to the above-described "highly correlated inside the character, and extremely sparse outside the character".
And S3403, the electronic equipment encodes according to the coordinates of the target black pixel point to obtain a first encoding vector of the character to be recognized.
And S3404, the electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library.
And S3405, the electronic equipment determines a standard character corresponding to the character to be recognized according to the similarity.
In the character recognition method described in step S3401 to step S3405, the electronic device may encode according to coordinates of target black pixel points included in the character to be recognized, and determine a standard character corresponding to the character to be recognized according to similarity with the standard character in the standard library. Compared with the classification identification method in the traditional character identification method, the method for carrying out character identification by calculating the similarity according to the coding vector formed by the coordinates of the pixel points is more accurate.
In some other embodiments of the present application, the standard character has a size range of a predetermined size range. Step S3403 may specifically include: the electronic equipment shrinks/zooms the size range of the character to be recognized into a preset size range; and the electronic equipment encodes according to the coordinates of the target black pixel point in the scaled character to be recognized so as to obtain a first encoding vector.
In some other embodiments of the present application, the standard character has a size range of a predetermined size range. Step S3403 may specifically include: the electronic equipment carries out coding according to the coordinates of the target black pixel point in the character to be recognized so as to obtain a third coding vector; the electronic equipment calculates the ratio Q of a preset size range to the size range of the character to be recognized; and the electronic equipment calculates the corresponding first coding vector after the character to be recognized is scaled/scaled by Q times according to the third coding vector ratio Q and the image scaling/scaling algorithm.
The size range of one character refers to the size range of a region enclosed by a first straight line tangent to the left side of the leftmost black pixel point of the character, a second straight line tangent to the right side of the rightmost black pixel point of the character, a third straight line tangent to the upper side of the topmost black pixel point of the character and a fourth straight line tangent to the lower side of the bottommost black pixel point of the character.
Because the size range of the character to be recognized may not be consistent with that of the standard character, the character to be recognized is usually required to be processed and then matched and compared with the standard character. For example, the character to be recognized before zooming in/out can be seen in fig. 32a, and the character to be recognized after zooming in/out can be seen in fig. 32 b.
For a specific process of obtaining the first encoding vector by scaling/scaling the character to be recognized or according to the Q value in step S3403, reference may be made to the detailed description of the text recognition process in the above embodiments, which is not repeated herein.
In some other embodiments of the present application, the standard library includes the reference standard character and a first similarity between the second code vector of each of the other standard characters and the second code vector of the reference standard character. The step 3404 may specifically include: the electronic equipment calculates a second similarity of the first encoding vector and a second encoding vector of the reference standard character; determining at least one target first similarity of which the absolute value of the difference value with the second similarity is smaller than or equal to a preset threshold; and calculating third similarity of second code vectors of standard characters corresponding to the first code vectors and the at least one target first similarity respectively. Based on this, the step S3405 may specifically include: and the electronic equipment determines the standard character corresponding to the character to be recognized according to the third similarity. And the standard character with the maximum third similarity is the standard character matched with the character to be recognized.
For an exemplary specific description of step S3404 and step S3405 by the electronic device, reference may be made to the detailed process of identifying the character to be identified according to the reference standard character "fu" described in table 1 in the foregoing embodiment, which is not described herein again.
Therefore, the electronic equipment does not need to compare the character to be recognized with each standard character in the standard library in sequence, so that the calculation range of the similarity can be reduced, the process of calculating the characters in the standard library one by one is effectively avoided, and the time for calculating the similarity is greatly shortened.
With reference to the foregoing embodiments and accompanying drawings, another embodiment of the present application provides a method for displaying service information in a preview interface, where the method may be implemented in an electronic device having a hardware structure shown in fig. 1 and a software structure shown in fig. 2. The method can comprise the following steps:
s3501, the electronic device detects a first touch operation for starting a camera application.
S3502, responding to the first touch operation, and displaying a shot first preview interface on the touch screen by the electronic equipment, wherein the first preview interface comprises a comet reading mode control.
S3503, the electronic device detects a second touch operation for the coma mode control.
S3504, in response to the second touch operation, the electronic device respectively displays p function controls and q function controls corresponding to the comatic reading mode control on a second preview interface, where the second preview interface has a preview object, where the preview object includes a first sub-object and a second sub-object, the first sub-object is a text type, the second sub-object is an image type, the p function controls correspond to the first sub-object, the q function controls correspond to the second sub-object, and the p function controls are different from the q function controls.
S3505, the electronic device acquires a preview image in RAW format of the preview object.
And S3506, the electronic equipment conducts binarization processing on the preview image to obtain the preview image represented by black pixel points and white pixel points.
S3507, the electronic device determines at least one target black pixel point included by the character to be recognized according to the position relation of the adjacent black pixel points on the preview image.
S3508, the electronic device shrinks/zooms the size range of the character to be recognized into a preset size range.
S3509, the electronic device carries out coding according to coordinates of target black pixel points in the scaled character to be recognized so as to obtain a first coding vector.
S3510, the electronic device calculates a second similarity between the first encoding vector and the reference standard character.
S3511, the electronic device determines at least one target first similarity with the absolute value of the difference value of the second similarity smaller than or equal to a preset threshold.
S3512, the electronic device calculates third similarities of second encoding vectors of standard characters, corresponding to the first encoding vectors and the at least one target first similarity respectively.
S3513, the electronic equipment determines standard characters corresponding to the characters to be recognized according to the third similarity.
S3514, the electronic device detects a third touch operation aiming at the first function control in the p function controls.
S3515, responding to the third touch operation, the electronic equipment determines first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized, wherein the first service information is obtained after the electronic equipment processes the first sub-object in the second preview interface.
S3516, the electronic equipment displays the first service information corresponding to the first function option on the second preview interface.
S3517, the electronic device detects a fourth touch operation aiming at a second function control in the q function controls.
S3518, responding to the fourth touch operation, the electronic device displays second service information corresponding to the second function option on the second preview interface, wherein the second service information is obtained after the electronic device processes a second sub-object in the second preview interface.
The steps S3505 to S3513 may be performed before the step S3514, or after the step S3514, which is not limited in the embodiments of the present application.
It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The present application is capable of being implemented in hardware or a combination of hardware and computer software in conjunction with the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 35 shows a possible schematic composition diagram of the electronic device 3600 related in the above embodiment, as shown in fig. 35, the electronic device 3600 may include: a detection unit 3601, a display unit 3602 and a processing unit 3603.
Among other things, the detection unit 3601 may be used to support the electronic device 3600 to perform the above-described steps S3301, S3303, S3305, S3307, S3501, S3503, S3514, S3517, etc., and/or other processes for the techniques described herein.
The display unit 3601 may be used to support the electronic device 3600 to perform the above-described steps S3302, S3304, S3306, S3308, S3502, S3504, S3516, S3518, etc., and/or other processes for the techniques described herein.
The processing unit 3601 may be used to support the electronic device 3600 to perform the above-described steps S3308-S3311, as well as steps S3401-S3405, steps S3505-S35013, step S3515, etc., and/or other processes for the techniques described herein.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The electronic device provided by the embodiment of the application is used for executing the implementation method for displaying the service information in the preview interface, so that the same effect as that of the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may comprise a processing module and a memory module. The processing module may be configured to control and manage an operation of the electronic device, and for example, may be configured to support the electronic device to execute the steps executed by the detection unit 3601, the display unit 3602, and the processing unit 3603. The storage module can be used for supporting the electronic device to store the first preview interface, the second preview interface, the preview image of the preview object, the obtained service information, the program code and the data, and the like. In addition, the electronic device may also include a communication module that may be used to support communication of the electronic device with other devices.
The processing module may be a processor or a controller. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a wifi chip, or other devices that interact with other electronic devices.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to the embodiment of the present application may be a device having the structure shown in fig. 1.
The embodiment of the present application further provides a computer storage medium, where a computer instruction is stored in the computer storage medium, and when the computer instruction runs on an electronic device, the electronic device is enabled to execute the relevant method steps to implement the method for displaying service information in the preview interface in the foregoing embodiment.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute the above related steps, so as to implement the method for displaying the service information in the preview interface in the above embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the method for displaying the service information in the preview interface in the above method embodiments.
In addition, the electronic device, the computer storage medium, the computer program product, or the chip provided in the embodiments of the present application are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Each functional unit in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
As used in the above embodiments, the term "when.. may be interpreted to mean" if. "or" after.. or "in response to a determination." or "in response to a detection.", depending on the context. Similarly, the phrase "upon determining.," or "if (a stated condition or event) is detected" may be interpreted to mean "if determining.," or "in response to determining.," or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)" depending on the context.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.
The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the exemplary discussions above are not intended to be exhaustive or to limit the application to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best utilize the application and various embodiments with various modifications as are suited to the particular use contemplated.

Claims (17)

1. A method for displaying service information in a preview interface is applied to an electronic device with a touch screen, and is characterized in that the method comprises the following steps:
the electronic equipment detects a first touch operation for starting a camera application;
responding to the first touch operation, the electronic equipment displays a shot first preview interface on the touch screen, wherein the first preview interface comprises a comet reading mode control;
the electronic equipment detects a second touch operation aiming at the coma reading mode control;
responding to the second touch operation, the electronic equipment respectively displays p functional controls and q functional controls corresponding to the coma reading mode control on a second preview interface, and a preview object is arranged in the second preview interface;
the preview object comprises a first sub-object and a second sub-object, the first sub-object is a text type, the second sub-object is an image type, the p function controls correspond to the first sub-object, the p function controls comprise abstract, keyword, entity, viewpoint, classification, emotion and association function controls, the q function controls correspond to the second sub-object, wherein p and q are natural numbers, and the p function controls are different from the q function controls;
the electronic equipment detects a third touch operation aiming at a first function option in the p function controls;
responding to the third touch operation, the electronic equipment displays first service information corresponding to the first function option on the second preview interface, wherein the first service information is obtained after the electronic equipment processes the first sub-object in the second preview interface;
the electronic equipment detects a fourth touch operation aiming at a second function option in the q function controls;
responding to the fourth touch operation, the electronic device displays second service information corresponding to the second function option on the second preview interface, where the second service information is obtained after the electronic device processes the second sub-object in the second preview interface.
2. The method for displaying service information in a preview interface according to claim 1, wherein before the electronic device displays the first service information corresponding to the first function option on the second preview interface, the method further comprises:
the electronic equipment acquires a preview image of the preview object in an RAW format;
the electronic equipment determines standard characters corresponding to the characters to be recognized in the preview object according to the preview image;
and the electronic equipment determines first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
3. The method for displaying service information in a preview interface according to claim 2, wherein the determining, by the electronic device, the standard character corresponding to the character to be recognized in the preview object according to the preview image includes:
the electronic equipment carries out binarization processing on the preview image to obtain a preview image comprising black pixel points and white pixel points;
the electronic equipment determines at least one target black pixel point included by the character to be recognized according to the position relation of adjacent black pixel points on the preview image;
the electronic equipment carries out coding according to the coordinates of the target black pixel point so as to obtain a first coding vector of the character to be recognized;
the electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library;
and the electronic equipment determines the standard character corresponding to the character to be recognized according to the similarity.
4. The method of claim 3, wherein the size range of the standard character is a preset size range, and the electronic device performs encoding according to the coordinates of the target black pixel point to obtain the first encoding vector of the character to be recognized, including:
the electronic equipment reduces or enlarges the size range of the character to be recognized into the preset size range;
the electronic equipment encodes according to the reduced or enlarged coordinates of the target black pixel point in the character to be recognized to obtain the first encoding vector; alternatively, the first and second electrodes may be,
the electronic equipment encodes according to the coordinates of the target black pixel point in the character to be recognized to obtain a third encoding vector;
the electronic equipment calculates the ratio Q of the preset size range to the size range of the character to be recognized;
and the electronic equipment calculates the corresponding first coding vector after Q times of reduction or amplification of the character to be recognized according to the third coding vector, the ratio Q and an image reduction or amplification algorithm.
5. The method for displaying service information in a preview interface according to claim 3 or 4, wherein the standard library comprises a reference standard character and a first similarity between the second code vector of each of the other standard characters and the second code vector of the reference standard character; the electronic equipment calculates the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library, and comprises the following steps:
the electronic device calculating a second similarity of the first encoded vector to a second encoded vector of the reference standard character;
the electronic equipment determines at least one target first similarity with the absolute value of the difference value between the second similarity and the target first similarity being smaller than or equal to a preset threshold;
the electronic equipment calculates third similarities of second encoding vectors of standard characters, corresponding to the first encoding vectors and the at least one target first similarity respectively;
the electronic equipment determines the standard character corresponding to the character to be recognized according to the similarity, and the method comprises the following steps:
and the electronic equipment determines the standard character corresponding to the character to be recognized according to the third similarity.
6. The method for displaying service information in the preview interface according to any one of claims 1 to 4, wherein the displaying, by the electronic device, the first service information corresponding to the first function option on the second preview interface includes:
the electronic equipment displays a function interface on the second preview interface in an overlapping mode, wherein the function interface comprises first service information corresponding to the first function option; alternatively, the first and second electrodes may be,
and the electronic equipment displays first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode.
7. The method for displaying service information in a preview interface of any one of claims 1 to 4, wherein the first service information comprises summary information, keyword information, entity information, viewpoint information, classification information, emotion information, association information, or identification information.
8. An electronic device comprising a touch screen, at least one memory, and at least one processor, the touch screen, the at least one memory coupled with the at least one processor, wherein:
the touch screen is used for detecting a first touch operation for starting a camera application;
the processor is used for responding to the first touch operation and instructing the touch screen to display a shot first preview interface;
the touch screen is also used for displaying the first preview interface according to an instruction of the processor, and the first preview interface comprises a comet reading mode control;
the touch screen is further used for detecting a second touch operation aiming at the coma reading mode control;
the processor is further used for responding to the second touch operation and instructing the touch screen to display a second preview interface;
the touch screen is further used for displaying the second preview interface according to an instruction of the processor, p function controls and q function controls corresponding to the coma reading mode control are respectively displayed on the second preview interface, and a preview object is arranged in the second preview interface;
the preview object comprises a first sub-object and a second sub-object, the first sub-object is a text type, the second sub-object is an image type, the p function controls correspond to the first sub-object, the p function controls comprise abstract, keyword, entity, viewpoint, classification, emotion and association function controls, the q function controls correspond to the second sub-object, p and q are natural numbers, and the p function controls are different from the q function controls;
the touch screen is further used for detecting a third touch operation aiming at a first function option in the p function controls;
the processor is further configured to instruct the touch screen to display first service information corresponding to the first function option on the second preview interface in response to the third touch operation;
the touch screen is further configured to display the first service information according to an instruction of the processor, where the first service information is obtained by the electronic device after processing the first sub-object in the second preview interface;
the touch screen is further used for detecting a fourth touch operation aiming at a second function option in the q function controls;
the processor is further configured to instruct the touch screen to display second service information corresponding to the second function option on the second preview interface in response to the fourth touch operation;
the touch screen is further configured to display second service information corresponding to the second function option on the second preview interface according to an instruction of the processor, where the second service information is obtained by the electronic device after processing the second sub-object in the second preview interface;
the memory is used for storing the first preview interface and the second preview interface.
9. The electronic device of claim 8, wherein the processor is further configured to:
acquiring a preview image of the preview object in a RAW format before the touch screen displays the first service information corresponding to the first function option on the second preview interface;
determining standard characters corresponding to the characters to be recognized in the preview object according to the preview image;
and determining first service information corresponding to the first function option according to the standard character corresponding to the character to be recognized.
10. The electronic device of claim 9, wherein the processor is specifically configured to:
carrying out binarization processing on the preview image to obtain a preview image comprising black pixel points and white pixel points;
determining at least one target black pixel point included by the character to be recognized according to the position relation of adjacent black pixel points on the preview image;
coding according to the coordinates of the target black pixel points to obtain a first coding vector of the character to be recognized;
calculating the similarity between the first encoding vector and a second encoding vector of at least one standard character in a preset standard library;
and determining the standard character corresponding to the character to be recognized according to the similarity.
11. The electronic device of claim 10, wherein the standard character has a size range that is a preset size range, and wherein the processor is specifically configured to:
reducing or enlarging the size range of the character to be recognized into the preset size range;
coding according to the reduced or enlarged coordinates of the target black pixel point in the character to be recognized to obtain the first coding vector; alternatively, the first and second electrodes may be,
coding according to the coordinates of the target black pixel point in the character to be recognized to obtain a third coding vector;
calculating the ratio Q of the preset size range to the size range of the character to be recognized;
and calculating the first coding vector corresponding to the character to be recognized after Q times of reduction or amplification according to the third coding vector, the ratio Q and an image reduction or amplification algorithm.
12. The electronic device according to claim 10 or 11, wherein the standard library comprises a reference standard character and a first similarity between the second encoding vector of each of the other standard characters and the second encoding vector of the reference standard character; the processor is specifically configured to:
calculating a second similarity of the first encoded vector to a second encoded vector of the reference standard character;
determining at least one target first similarity with the absolute value of the difference value of the second similarities being less than or equal to a preset threshold;
calculating third similarities of second encoding vectors of standard characters, corresponding to the first similarities of the at least one target, of the first encoding vectors respectively;
and determining the standard character corresponding to the character to be recognized according to the third similarity.
13. The electronic device according to any of claims 8-11, wherein the touch screen is specifically configured to:
according to the instruction of the processor, a functional interface is displayed on the second preview interface in an overlapping mode, wherein the functional interface comprises first service information corresponding to the first functional option; alternatively, the first and second electrodes may be,
and displaying first service information corresponding to the first function option on the preview object displayed on the second preview interface in a marking mode according to the instruction of the processor.
14. The electronic device according to any one of claims 8-11, wherein the first service information comprises summary information, keyword information, entity information, point of view information, category information, emotion information, association information, or authentication information.
15. An electronic device comprising one or more processors and one or more memories;
the one or more memories coupled to the one or more processors for storing computer program code comprising computer instructions which, when executed by the one or more processors, cause the electronic device to perform the method of displaying business information in a preview interface of any of claims 1-7.
16. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of displaying business information in a preview interface of any of claims 1-7.
17. A computer program product, characterized in that it causes a computer to carry out the method of displaying service information in a preview interface according to any of claims 1-7, when the computer program product is run on the computer.
CN201880080687.0A 2018-07-25 2018-07-25 Method for displaying service information in preview interface and electronic equipment Active CN111465918B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097122 WO2020019220A1 (en) 2018-07-25 2018-07-25 Method for displaying service information in preview interface, and electronic device

Publications (2)

Publication Number Publication Date
CN111465918A CN111465918A (en) 2020-07-28
CN111465918B true CN111465918B (en) 2021-08-31

Family

ID=69181073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880080687.0A Active CN111465918B (en) 2018-07-25 2018-07-25 Method for displaying service information in preview interface and electronic equipment

Country Status (3)

Country Link
US (1) US20210150214A1 (en)
CN (1) CN111465918B (en)
WO (1) WO2020019220A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11531748B2 (en) * 2019-01-11 2022-12-20 Beijing Jingdong Shangke Information Technology Co., Ltd. Method and system for autonomous malware analysis
KR20200100918A (en) 2019-02-19 2020-08-27 삼성전자주식회사 Electronic device for providing various functions through application using a camera and operating method thereof
CN111597906B (en) * 2020-04-21 2023-12-19 云知声智能科技股份有限公司 Quick drawing recognition method and system combined with text information
CN111832220A (en) * 2020-06-16 2020-10-27 天津大学 Lithium ion battery health state estimation method based on codec model
CN114510176B (en) * 2021-08-03 2022-11-08 荣耀终端有限公司 Desktop management method of terminal equipment and terminal equipment
CN113676673B (en) * 2021-08-10 2023-06-16 广州极飞科技股份有限公司 Image acquisition method, image acquisition system and unmanned equipment
CN115035360B (en) * 2021-11-22 2023-04-07 荣耀终端有限公司 Character recognition method for image, electronic device and storage medium
CN116055856B (en) * 2022-05-30 2023-12-19 荣耀终端有限公司 Camera interface display method, electronic device, and computer-readable storage medium
CN116434250B (en) * 2023-06-13 2023-08-25 深圳宏途教育网络科技有限公司 Handwriting character image similarity determination model training method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677618A (en) * 2012-08-28 2014-03-26 三星电子株式会社 Text recognition apparatus and method for a terminal
CN107124553A (en) * 2017-05-27 2017-09-01 珠海市魅族科技有限公司 Filming control method and device, computer installation and readable storage medium storing program for executing
CN108305296A (en) * 2017-08-30 2018-07-20 深圳市腾讯计算机系统有限公司 Iamge description generation method, model training method, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100042399A1 (en) * 2008-08-12 2010-02-18 David Park Transviewfinder
JP6116167B2 (en) * 2012-09-14 2017-04-19 キヤノン株式会社 Image processing apparatus, image processing method, and program
CN103838508A (en) * 2014-01-03 2014-06-04 浙江宇天科技股份有限公司 Method and device for controlling display of intelligent terminal interface
KR20160128119A (en) * 2015-04-28 2016-11-07 엘지전자 주식회사 Mobile terminal and controlling metohd thereof
CN107943799B (en) * 2017-11-28 2021-05-21 上海量明科技发展有限公司 Method, terminal and system for obtaining annotation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677618A (en) * 2012-08-28 2014-03-26 三星电子株式会社 Text recognition apparatus and method for a terminal
CN107124553A (en) * 2017-05-27 2017-09-01 珠海市魅族科技有限公司 Filming control method and device, computer installation and readable storage medium storing program for executing
CN108305296A (en) * 2017-08-30 2018-07-20 深圳市腾讯计算机系统有限公司 Iamge description generation method, model training method, equipment and storage medium

Also Published As

Publication number Publication date
CN111465918A (en) 2020-07-28
WO2020019220A1 (en) 2020-01-30
US20210150214A1 (en) 2021-05-20

Similar Documents

Publication Publication Date Title
CN111465918B (en) Method for displaying service information in preview interface and electronic equipment
CN110286976B (en) Interface display method, device, terminal and storage medium
US11847314B2 (en) Machine translation method and electronic device
US20210382941A1 (en) Video File Processing Method and Electronic Device
CN110377204B (en) Method for generating user head portrait and electronic equipment
WO2021258797A1 (en) Image information input method, electronic device, and computer readable storage medium
CN112269853B (en) Retrieval processing method, device and storage medium
US20190228031A1 (en) Graphical image retrieval based on emotional state of a user of a computing device
US20220343648A1 (en) Image selection method and electronic device
WO2021190078A1 (en) Method and apparatus for generating short video, and related device and medium
CN112130714B (en) Keyword search method capable of learning and electronic equipment
CN112214636A (en) Audio file recommendation method and device, electronic equipment and readable storage medium
US20230367464A1 (en) Multi-Application Interaction Method
CN111970401A (en) Call content processing method and electronic equipment
CN113852714A (en) Interaction method for electronic equipment and electronic equipment
KR20150117043A (en) Method for sorting a media content and electronic device implementing the same
WO2022211509A1 (en) Electronic device and method for providing sticker on basis of content input
CN108255917B (en) Image management method and device and electronic device
US20210224310A1 (en) Electronic device and story generation method thereof
CN113497835B (en) Multi-screen interaction method, electronic equipment and computer readable storage medium
CN116861066A (en) Application recommendation method and electronic equipment
CN110929122B (en) Data processing method and device for data processing
WO2023246666A1 (en) Search method and electronic device
WO2024051730A1 (en) Cross-modal retrieval method and apparatus, device, storage medium, and computer program
US20240031655A1 (en) Video Playback Method, Terminal Device, Apparatus, System, and Storage Medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant