Text recognition method, device and electronic equipment
By dividing the target recognition content into different parts and sending them to different servers for recognition, the problem of information leakage risk in the text conversion function is solved and the effect of reducing the risk of information leakage is achieved.
Patent Information
- Application Number
- CN202210441083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The text conversion function in the existing technology may leak important user information or confidential information, and there is a risk of information leakage.
By dividing the target identification content into different parts and sending them to different servers for identification, it ensures that important information and non-important information or confidential information and non-confidential information are processed separately, reducing the risk of information leakage.
By segmenting and distributing different parts of content for identification, the risk of information leakage is reduced, the association or splicing of leaked information is prevented, and the impact of important or confidential information on users is reduced.
Smart Images

Figure CN114826734B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a text recognition method, device and electronic equipment. Background Art
[0002] With the development of text recognition technology, text conversion function has become one of the commonly used functions on terminal devices. For example, various input methods currently have voice input function, that is, users can choose to use voice instead of manual input, and use voice recognition technology to convert voice into the text to be input. Among them, the current basic process of text conversion is: the terminal device sends the object to be converted into text to the server, which parses and recognizes it, and then returns the parsed text to the terminal device, so that the terminal device displays the parsed text.
[0003] From this, we can see that the current text conversion process requires the object to be converted into text to be sent to the server for identification. However, when the object to be converted into text contains important or confidential information such as bank account passwords and ID numbers, there is a risk of exposing this information to users.
[0004] In summary, the text conversion function in the prior art may have the risk of leaking important user information or confidential information. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a text recognition method, device and electronic device to solve the problem that the text conversion function in the prior art may leak important user information or confidential information.
[0006] In a first aspect, an embodiment of the present application provides a text recognition method, the method comprising:
[0007] Obtain target identification content;
[0008] Acquire the first content and the second content in the target identification content;
[0009] Sending the first content to a first server, and sending the second content to a second server;
[0010] Acquire first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content;
[0011] The first text information and the second text information are displayed.
[0012] In a second aspect, an embodiment of the present application provides a text recognition device, the device comprising:
[0013] A segmentation module, used to obtain first content and second content in the target recognition content;
[0014] A content sending module, used to send the first content to a first server, and send the second content to a second server;
[0015] a first text information acquisition module, configured to acquire first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content;
[0016] The first display module is used to display the first text information and the second text information.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0019] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0020] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0021] In an embodiment of the present application, by acquiring the first content and the second content in the target identified content, the first content is sent to the first server, and the second content is sent to the second server, and then the first text information identified from the first content and sent by the first server, and the second text information identified from the second content and sent by the second server are acquired, and the first text information and the second text information are displayed.
[0022] It can be seen that in the embodiments of the present application, different parts of the target identification content can be sent to different servers for identification, so that important information and non-important information in the target identification content may be sent to different servers for identification, or confidential information and non-confidential information in the target identification content may be sent to different servers for identification. Among them, even if information leakage occurs during the transmission of important information and non-important information, or confidential information and non-confidential information, or information leakage occurs during the text recognition process between the two servers, or information leakage occurs during the transmission of text information recognized by the two servers, since the data of the two servers are not interoperable, the leaked information is also difficult to associate or splice, so that the user's important information or confidential information cannot be accurately obtained, thereby reducing the risk of leakage of important information or confidential information, and further reducing the impact of leakage of important information or confidential information on users. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the steps of a text recognition method provided by an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of segmenting an audio file in an embodiment of the present application;
[0025] Figure 3 It is a flowchart of a specific implementation method of the text recognition method of the embodiment of the present application;
[0026] Figure 4 is a schematic diagram showing the speech recognition results in an embodiment of the present application;
[0027] Figure 5 It is a structural block diagram of a text recognition device provided by the present application;
[0028] Figure 6 is a block diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 7 It is a block diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] The text recognition method, device and electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] See also Figure 1 , Figure 1 is a flow chart of a text recognition method provided by an embodiment of the present invention, which can be applied to terminal devices such as mobile phones, tablet computers, etc. Figure 1 As shown, the method may include the following steps 101 to 104:
[0034] Step 101: Acquire first content and second content in target recognition content.
[0035] The target recognition content may be an audio file or a picture. The audio file may be a user's voice input in the terminal device, or a voice clip sent by other terminal devices and received by the terminal device, or an audio recorded by the terminal device (for example, audio recorded during a meeting); the picture may be a picture taken by the terminal device, or a picture sent by other terminal devices and received by the terminal device.
[0036] In addition, according to the importance or confidentiality of different contents in the target identified content, the target content can be divided into a first content including important information and a second content including unimportant information; or the target content can be divided into a first content including confidential information and a second content including non-confidential information.
[0037] Step 102: Send the first content to a first server, and send the second content to a second server.
[0038] The first server and the second server are different servers. Therefore, in the embodiment of the present application, the first content including important information and the second content including non-important information can be sent to different servers for text recognition, or the first content including confidential information and the second content including non-confidential information can be sent to different servers for recognition, thereby reducing the risk of leakage of important information or confidential information during the text recognition process.
[0039] In addition, the server to which the first content is sent and the server to which the second content is sent can be pre-configured. It is understandable that the server receiving the first content and the server receiving the second content can also be changed according to actual needs.
[0040] It should be noted here that the process of sending the first content to the first server and the process of sending the second content to the second server have no order of precedence and can be performed in parallel.
[0041] Step 103: Acquire a first text message sent by the first server and a second text message sent by the second server.
[0042] The first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content.
[0043] It should be noted here that the process of obtaining the first text information sent by the first server and the process of obtaining the second text information sent by the second server have no order of precedence and can be performed in parallel.
[0044] From this, it can be seen that after the first server receives the first content, it performs text recognition on the first content, and thus sends the recognized first text information to the terminal device; after the second server receives the second content, it performs text recognition on the second content, and thus sends the recognized second text information to the terminal device.
[0045] Therefore, in an embodiment of the present application, important information and non-important information in the target identification content can be sent to different servers for identification, or confidential information and non-confidential information in the target identification content can be sent to different servers for identification. In this way, even if information leakage occurs during the transmission of important information and non-important information, or confidential information and non-confidential information, or information leakage occurs during the text recognition process between two servers, or information leakage occurs during the transmission of text information identified by two servers, since the data of the two servers are not interoperable, the leaked information is difficult to associate or splice, and thus the user's important information or confidential information cannot be accurately obtained, thereby reducing the risk of leakage of important information or confidential information, and thereby reducing the impact of leakage of important information or confidential information on users.
[0046] In addition, optionally, the above-mentioned first server can be a pre-set server bound to the terminal device, wherein the server bound to the terminal device can be considered as a server trusted by the user. In this way, important information or confidential information in the target identification content is identified by the server trusted by the user, which can further reduce the risk of leakage of important information or confidential information.
[0047] Step 104: Display the first text information and the second text information.
[0048] After receiving the first text information identified by the first server and the second text information identified by the second server, the terminal device can display the first text information and the second text information, thereby facilitating the user to view and use the first text information and the second text information.
[0049] It can be seen from the aforementioned steps 101 to 104 that in the embodiment of the present application, by acquiring the first content and the second content in the target identification content, the first content is sent to the first server, and the second content is sent to the second server, and then the first text information identified from the first content sent by the first server and the second text information identified from the second content sent by the second server are acquired, and the first text information and the second text information are displayed. It can be seen that in the embodiment of the present application, different parts of the target identification content can be sent to different servers for identification, thereby reducing the risk of leakage of important information or confidential information, and thereby reducing the impact of leakage of important information or confidential information on users.
[0050] Optionally, the acquiring the first content and the second content in the target identification content includes:
[0051] The target identification content is divided into the first content and the second content according to attribute information associated with the target identification content.
[0052] Among them, the attribute information associated with the target identification content refers to the attribute characteristics of the target identification content, including characteristics other than the text information carried in the target identification content, such as the scene characteristics when collecting the target identification content, that is, the acquisition scene of the first content and the acquisition scene of the second content have different attributes. Based on this, the above-mentioned first content and the second content can be segmented from the target identification content; or, there is an identifier in the target identification content for distinguishing the first content and the second content. Based on this, the above-mentioned first content and the second content can also be segmented from the target identification content.
[0053] It can be seen from this that in an embodiment of the present invention, the first content and the second content can be segmented from the target identification content based on the attribute information associated with the target identification content, rather than identifying and segmenting based on the information itself. In this way, the memory consumption occupied by the terminal device for segmenting the first content and the second content can be reduced.
[0054] Optionally, when the target recognition content is an audio file, dividing the target recognition content into the first content and the second content according to the attribute information associated with the target recognition content includes:
[0055] Divide the audio file into a plurality of target segments of equal length according to a preset duration, and record the volume of each target segment;
[0056] Determine a plurality of target segments whose volume is less than a preset threshold and which are continuous as one of the audio segments in the first content;
[0057] A plurality of target segments whose volumes are greater than or equal to the preset threshold and are continuous are determined as one of the audio segments in the second content.
[0058] For example, if an audio file is 10 seconds long, the audio file can be divided into a target segment every 100ms, and the volume of each target segment is detected, so that multiple target segments with a volume less than 30 decibels and continuous are determined as the first content; and multiple target segments with a volume greater than or equal to 30 decibels and continuous are determined as the second content. Figure 2 As shown, it is a complete audio input by the user. In the second segment 202, the audio input volume is below 30 decibels. In the third segment 203, the normal volume is restored to within the range of 30-50 decibels. Therefore, the audio is divided into three segments, namely: the first segment 201, the second segment 202, and the third segment 203.
[0059] Among them, when collecting audio files, in order to avoid the leakage of important information or confidential information, the user can lower the volume when describing important information or confidential information, and keep the normal volume when describing non-important information or non-confidential information. For example, when the user uses voice input, when he needs to say confidential information such as account number, password, and phone number, he can lower the volume. In the audio files collected in this way, the volume of the audio clips including confidential information is lower than the volume of the audio clips including non-confidential information. Therefore, for audio files, the volume size can be used to identify the audio clips including confidential information and the audio clips including non-confidential information in the audio files.
[0060] Optionally, when the target recognition content is an audio file, dividing the target recognition content into the first content and the second content according to the attribute information associated with the target recognition content includes:
[0061] When at least one group of operations is detected during the process of collecting the audio file, an audio segment between input moments of two operations in the same group is determined as one of the audio segments in the first content;
[0062] Determine the audio segment between two adjacent groups of operations as one of the audio segments in the second content;
[0063] The group of operations includes two preset operations.
[0064] In addition, the two preset operations included in the above set of operations may be the same or different. For example, a set of operations may include two click operations or sliding operations in a first predetermined area (e.g., a curved screen area) of the terminal device, or a set of operations may include a click operation or sliding operation in a second predetermined area (e.g., the upper end of the curved screen) of the terminal device, and a click operation or sliding operation in a third predetermined area (e.g., the lower end of the curved screen).
[0065] For example, when the terminal device captures a 10-second audio file, a sliding operation on the curved screen area of the terminal device is detected at time t1 and time t2, then the audio segment between time t1 and time t2 is the first content; the audio segment before time t1 and after time t2 is the second content.
[0066] Among them, when collecting audio files, the user can implement a preset operation before describing important information or confidential information, and implement a preset operation after describing the important information or confidential information. The input time of this set of preset operations can be mapped to the audio file, so that the audio file can be segmented into audio segments including important information and audio segments including non-important information, or audio segments including confidential information and audio segments including non-confidential information.
[0067] Optionally, when the target recognition content is a picture, segmenting the target recognition content into the first content and the second content according to attribute information associated with the target recognition content includes:
[0068] When it is detected that at least one preset shape exists in the picture, content in the picture within one of the preset shapes is determined as a sub-image in the first content, and content in the picture outside the preset shape is determined as the second content.
[0069] The above-mentioned preset shape may be a regular shape, such as a rectangle or a circle.
[0070] In addition, users can draw preset shapes in the picture to mark important information or confidential information in the picture. For example, when the terminal device displays the picture to be identified, the user can draw a preset shape on the touch screen of the terminal device to circle the important information or confidential information within the preset shape. In this way, after the user clicks the control displayed on the terminal device for performing text recognition on the picture, the terminal device can divide the picture to be identified into two sub-pictures, wherein the sub-picture composed of the content within the preset shape is the first content of the important information or confidential information, and the sub-picture composed of the content outside the preset shape is the second content including non-important information or non-confidential information.
[0071] Optionally, before acquiring the first text message sent by the first server and the second text message sent by the second server, the method further includes:
[0072] encoding the first content and the second content according to positions of the first content and the second content in the target identification content;
[0073] Sending a first code to the first server, and sending a second code to the second server, wherein the first code is a code of the first content, and the second code is a code of the second content;
[0074] The displaying of the first text information and the second text information includes:
[0075] receiving a first correspondence between the first text information and the first code sent by the first server;
[0076] receiving a second correspondence between the second text information and the second code sent by the second server;
[0077] According to the first corresponding relationship and the second corresponding relationship, the first text information and the second text information are concatenated to obtain target text information;
[0078] The target text information is displayed.
[0079] From the above, it can be seen that after the terminal device divides the target identified content into the first content and the second content, it can also encode the first content and the second content respectively according to their positions in the target identified content, and send the first code of the first content to the first server, so that after the first server recognizes the first text information included in the first content, it can return the first code and the first text information to the terminal device; similarly, the terminal device also needs to send the second code of the second content to the second server, so that after the second server recognizes the second text information included in the second content, it can return the second code and the second text information to the terminal device, so that the terminal device can splice the received text information according to the code, thereby displaying the spliced text information.
[0080] Among them, the above-mentioned first content and second content are encoded respectively, which provides a basis for the subsequent splicing of the first text information and the second text information, so that the text information finally displayed by the terminal device matches the position of the part containing text information in the target recognition content in the target recognition content, thereby avoiding the position confusion of the text information finally recognized.
[0081] In addition, in the above encoding process, for the audio file, the audio segments included in the first content and the audio segments included in the second content may be encoded according to the positions of the audio segments included in the first content in the audio file and the positions of the audio segments included in the second content in the audio file;
[0082] For a picture, each sub-picture included in the first content may be encoded according to the position of each sub-picture in the picture; and the second content may be encoded according to the position of the picture content included in the second content in the picture.
[0083] Optionally, before displaying the first text information and the second text information, the method further includes:
[0084] receiving a third text message sent by the first server, wherein the third text message is information associated with a target keyword and belonging to a target user and pre-stored in the first server, the target keyword includes the keyword in the first text message, and the target user is a user to whom the target identification content belongs;
[0085] The third text information is displayed while the first text information and the second text information are displayed.
[0086] It can be seen from this that, under the premise of user authorization, the first server can pre-store information belonging to different users and corresponding to predetermined keywords (such as important information or confidential information), so that after the first server receives the first content and identifies the first text information from the first content, if it is detected that there is a predetermined keyword in the first text information, the corresponding content in the first text information can be corrected according to the pre-stored information corresponding to the keyword and belonging to the user to whom the target identified content belongs (that is, the above-mentioned third text information), or when there is no content matching the third text information in the first text information, the third text information can be automatically filled in the appropriate position.
[0087] For example, after a user uses a terminal device to input voice, the important information or confidential information in the voice may be inaccurately identified due to the user's non-standard pronunciation. In an embodiment of the present invention, the first server can correct the relevant information based on pre-stored information belonging to different users and corresponding to predetermined keywords. For example, the user mentions "telephone number" in the voice, but due to inaccurate pronunciation, the identified specific telephone number is incorrect. After the above calibration of the first server, the correct telephone number can be accurately identified.
[0088] Alternatively, for example, when a user uses a terminal device for voice input, in order to avoid information leakage when describing specific important information or confidential information, the user can describe the keywords of the important information or confidential information during voice input, so that the first server can automatically fill in the relevant information based on pre-stored information belonging to different users and corresponding to predetermined keywords. For example, the user only needs to mention "phone number" in the voice without having to say the specific phone number, so that the first server automatically fills in the correct phone number.
[0089] Among them, the voice input in the prior art basically only completes the voice-to-text function. If some additional information involved in the voice needs to be sent, additional operations are required. For example, if some user's phone number and other information need to be sent, the user needs to remember the phone number or search it before sending it, which is troublesome. In the embodiment of the present invention, automatic input can be achieved, and the operation is simpler.
[0090] In a text recognition method of another embodiment of the present application, the above embodiments can be combined with each other.
[0091] Optionally, one of the combinations may be as follows Figure 3 As shown, the specific steps include the following steps 301 to 309:
[0092] Step 301: The user presets the triggering condition for switching the speech recognition server and the server to be switched.
[0093] Among them, the trigger condition can be features such as volume, preset operation, etc.
[0094] In addition, for the convenience of explanation, the subsequent steps are explained with the volume as the trigger condition. For example, when the volume is between 30 and 50 decibels, the second server is used, and when it is outside this range, the first server is used (that is, the second server is used to identify audio clips with a volume between 30 and 50 decibels, and the first server is used to identify audio clips with a volume below 30 decibels). The specific trigger conditions can also support users to actively modify.
[0095] Step 302: The user clicks the voice input function button, and the terminal device enters a state of receiving voice input.
[0096] Step 303: When the terminal device receives the user's voice content, it also performs real-time decibel testing and analysis on the volume of the user's voice.
[0097] For example, the received voice content is divided into segments of equal length according to a preset duration, and the volume decibel level of each segment is detected.
[0098] Step 304: The terminal device determines in real time whether the volume decibel level of each segment reaches the triggering condition for switching the speech recognition server. If so, it proceeds to step 306, otherwise it proceeds to step 305.
[0099] Step 305: If the “speech recognition server switching” function is not triggered and the input audio volume is between 30-50 decibels, the second server (eg, the speech recognition server of the original speech input APP) is used for speech recognition.
[0100] Step 306: Segment the original audio input by the user according to the volume decibels, and perform voice sequence encoding on each segmented audio segment according to the voice input time sequence.
[0101] like Figure 2 As shown, it is a complete audio input by the user. In the second segment 202, the audio input volume is below 30 decibels. In the third segment 203, the normal volume is restored to within the range of 30-50 decibels. Therefore, the audio is divided into three segments, namely: the first segment 201, the second segment 202, and the third segment 203;
[0102] Step 307: Send the audio clips with a volume below 30 decibels and their encoding to the first server, and send the audio clips with a volume between 30 and 50 decibels and their encoding to the second server.
[0103] by Figure 2For example, the first segment 201, the third segment 203 and the code are transmitted to the second server for identification, and the second segment 202 involving important information or confidential information and its code are transmitted to the first server for identification.
[0104] Step 308: The first server and the second server respectively perform speech recognition on the received audio clip, and return the speech recognition result and the code to the terminal device.
[0105] Step 309: The terminal device sorts the speech recognition results (ie, speech-to-text content) according to the speech recognition results and codes returned by the server, and separates them with commas, so as to display them to the user.
[0106] For example, the speech recognition result of the first segment 201 is "You can write down my phone number", the speech recognition result of the second segment 202 is a specific phone number, such as "It is XXXXXXXXXXX", and the speech recognition result of the third segment 203 is "Contact me anytime if you need it", then the display effect can be as follows: Figure 4 shown.
[0107] It can be seen that in an embodiment of the present invention, by real-time analysis of the volume of the user's voice input, it is determined whether to trigger the switching of the voice recognition server function, that is, the audio clip of important information or confidential information (such as telephone number, ID card, etc.) input by the user in a low voice is uploaded to the first server for voice content recognition and analysis; other audio clips input at a normal volume are transmitted to the second server for recognition according to the original voice recognition method, so that the important information and non-important information in the user's input audio are recognized by two servers respectively, or the confidential information and non-confidential information in the user's input audio are distributed and recognized by two servers, so as to achieve the effect of reducing the risk of leakage of important information or confidential information.
[0108] Among them, the text recognition method of the embodiment of the present invention can not only be applied to the above-mentioned text recognition of audio of voice input, but also can be applied to other text conversion scenarios, such as image content recognition, text recognition (optical character recognition, OCR), intelligent conference recording (need to convert the voice of participants into text), audio recording and text conversion and many other scenarios.
[0109] In addition, in the first server actively set up by the user, that is, the first server used to identify audio clips containing important information or confidential information in the voice-to-text scenario, commonly used user information authorized by the user can also be stored. When keywords of this information appear in the recognized voice content, the information input by the user's voice is automatically input or calibrated, so that additional information can be input quickly and accurately, and the operation is easier.
[0110] The text recognition method provided in the embodiment of the present application can be executed by a text recognition device. In the embodiment of the present application, the text recognition device provided in the embodiment of the present application is described by taking the text recognition method executed by the text recognition device as an example.
[0111] See also Figure 5 , Figure 5 is a block diagram of a text recognition device provided by an embodiment of the present invention, which can be applied to terminal devices such as mobile phones, tablet computers, etc. Figure 5 As shown, the text recognition device 50 may include the following modules:
[0112] A segmentation module 501 is used to obtain a first content and a second content in the target recognition content;
[0113] A content sending module 502, configured to send the first content to a first server, and send the second content to a second server;
[0114] A first text information acquisition module 503, configured to acquire first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content;
[0115] The first display module 504 is configured to display the first text information and the second text information.
[0116] Optionally, the segmentation module 501 includes:
[0117] The segmentation submodule is used to segment the target identification content into the first content and the second content according to the attribute information associated with the target identification content.
[0118] Optionally, when the target recognition content is an audio file, the segmentation submodule includes:
[0119] A segment division subunit, used to divide the audio file into a plurality of target segments of equal duration according to a preset duration, and record the volume of each target segment;
[0120] A first determining subunit, configured to determine a plurality of target segments whose volume is less than a preset threshold and which are continuous, as one of the audio segments in the first content;
[0121] The second determining subunit is configured to determine a plurality of target segments whose volumes are greater than or equal to the preset threshold and are continuous as one of the audio segments in the second content.
[0122] Optionally, when the target recognition content is an audio file, the segmentation submodule includes:
[0123] A third determining subunit is configured to, when at least one group of operations is detected during the process of collecting the audio file, determine an audio segment between input moments of two operations in the same group as one of the audio segments in the first content;
[0124] a fourth determining unit, configured to determine an audio segment between two adjacent groups of operations as one of the audio segments in the second content;
[0125] The group of operations includes two preset operations.
[0126] Optionally, when the target recognition content is a picture, the segmentation submodule includes:
[0127] The fifth determination subunit is used to, when detecting that there is at least one preset shape in the picture, determine the content in the picture that is within one of the preset shapes as a sub-image in the first content, and determine the content in the picture that is outside the preset shape as the second content.
[0128] Optionally, the device further comprises:
[0129] an encoding module, configured to encode the first content and the second content according to positions of the first content and the second content in the target identification content;
[0130] a code sending module, configured to send a first code to the first server, and send a second code to the second server, wherein the first code is a code of the first content, and the second code is a code of the second content;
[0131] The first display module comprises:
[0132] A first receiving submodule, configured to receive a first correspondence between the first text information and the first code sent by the first server;
[0133] A second receiving submodule, configured to receive a second correspondence between the second text information and the second code sent by the second server;
[0134] a splicing submodule, configured to splice the first text information and the second text information according to the first corresponding relationship and the second corresponding relationship to obtain target text information;
[0135] The display submodule is used to display the target text information.
[0136] Optionally, the device further comprises:
[0137] a second text information acquisition module, configured to receive third text information sent by the first server, wherein the third text information is information associated with a target keyword and belonging to a target user and pre-stored in the first server, the target keyword includes the keyword in the first text information, and the target user is a user to whom the target identification content belongs;
[0138] The second display module is used to display the third text information while displaying the first text information and the second text information.
[0139] From the above, it can be seen that in the embodiment of the present application, the segmentation module 501 can obtain the first content and the second content in the target identified content, thereby triggering the content sending module 502 to send the first content to the first server and the second content to the second server, so that the first text information acquisition module 503 obtains the first text information identified from the first content sent by the first server, and receives the second text information identified from the second content sent by the second server, thereby triggering the first display module 504 to display the first text information and the second text information.
[0140] It can be seen from this that in the embodiments of the present application, different parts of the target identification content can be sent to different servers for identification, so that important information and non-important information in the target identification content may be sent to different servers for identification, or confidential information and non-confidential information in the target identification content may be sent to different servers for identification. Among them, even if information leakage occurs during the transmission of important information and non-important information, or confidential information and non-confidential information, or information leakage occurs during the text recognition process between the two servers, or information leakage occurs during the transmission of text information recognized by the two servers, since the data of the two servers are not interoperable, the leaked information is also difficult to associate or splice, so that the user's important information or confidential information cannot be accurately obtained, thereby reducing the risk of leakage of important information or confidential information, and further reducing the impact of leakage of important information or confidential information on users. The text recognition device in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be a device other than a terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.
[0141] The text recognition device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0142] The text recognition device provided in the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0143] Alternatively, if Figure 6As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores programs or instructions that can be executed on the processor 601, and when the program or instructions are executed by the processor 601, the various steps of the above-mentioned text recognition method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0144] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0145] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0146] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0147] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0148] The processor 710 is used to obtain the first content and the second content in the target recognition content;
[0149] The radio frequency unit 701 is configured to send the first content to a first server and send the second content to a second server; obtain first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content;
[0150] The display unit 706 is configured to display the first text information and the second text information.
[0151] As can be seen from the above, in an embodiment of the present application, by acquiring the first content and the second content in the target identified content, the first content is sent to the first server, and the second content is sent to the second server, and then the first text information identified from the first content sent by the first server is acquired, and the second text information identified from the second content sent by the second server is received, and the first text information and the second text information are displayed.
[0152] It can be seen that in the embodiments of the present application, different parts of the target identification content can be sent to different servers for identification, so that important information and non-important information in the target identification content may be sent to different servers for identification, or confidential information and non-confidential information in the target identification content may be sent to different servers for identification. Among them, even if information leakage occurs during the transmission of important information and non-important information, or confidential information and non-confidential information, or information leakage occurs during the text recognition process between the two servers, or information leakage occurs during the transmission of text information recognized by the two servers, since the data of the two servers are not interoperable, the leaked information is also difficult to associate or splice, so that the user's important information or confidential information cannot be accurately obtained, thereby reducing the risk of leakage of important information or confidential information, and further reducing the impact of leakage of important information or confidential information on users.
[0153] Optionally, when the processor 710 obtains the first content and the second content in the target identification content, it is specifically configured to:
[0154] The target identification content is divided into the first content and the second content according to attribute information associated with the target identification content.
[0155] Optionally, when the target recognition content is an audio file, the processor 710 is specifically configured to:
[0156] Divide the audio file into a plurality of target segments of equal length according to a preset duration, and record the volume of each target segment;
[0157] Determine a plurality of target segments whose volume is less than a preset threshold and which are continuous as one of the audio segments in the first content;
[0158] A plurality of target segments whose volumes are greater than or equal to the preset threshold and are continuous are determined as one of the audio segments in the second content.
[0159] Optionally, when the target recognition content is an audio file, the processor 710 is specifically configured to:
[0160] When the user input unit 707 detects at least one group of operations during the process of collecting the audio file, an audio segment between input moments of two operations in the same group is determined as one of the audio segments in the first content;
[0161] An audio segment between two adjacent groups of operations is determined as one of the audio segments in the second content; wherein the group of operations includes two preset operations.
[0162] Optionally, when the target recognition content is a picture, the processor 710 is specifically configured to:
[0163] When it is detected that at least one preset shape exists in the picture, content in the picture within one of the preset shapes is determined as a sub-image in the first content, and content in the picture outside the preset shape is determined as the second content.
[0164] Optionally, before the RF unit 701 acquires the first text information sent by the first server and the second text information sent by the second server, the processor 710 is further configured to: encode the first content and the second content according to positions of the first content and the second content in the target identification content;
[0165] The radio frequency unit 701 is further configured to: send a first code to the first server, and send a second code to the second server, wherein the first code is a code of the first content, and the second code is a code of the second content;
[0166] The radio frequency unit 701 is further configured to: receive a first correspondence between the first text information and the first code sent by the first server; receive a second correspondence between the second text information and the second code sent by the second server;
[0167] When the display unit 706 displays the first text information and the second text information, the processor 710 is further used to: splice the first text information and the second text information according to the first corresponding relationship and the second corresponding relationship to obtain target text information; the display unit 706 is used to display the target text information.
[0168] Optionally, before the display unit 706 displays the first text information and the second text information, the radio frequency unit 701 is further used to: receive third text information sent by the first server, wherein the third text information is information associated with a target keyword and belonging to a target user pre-stored in the first server, the target keyword includes a keyword in the first text information, and the target user is a user to whom the target identification content belongs;
[0169] The display unit 706 is further configured to display the third text information while displaying the first text information and the second text information.
[0170] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0171] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0172] The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
[0173] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned text recognition method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0174] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0175] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned text recognition method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0176] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0177] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned text recognition method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0178] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0180] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for character recognition, characterized in that: The method comprises: Acquire the first content and the second content in the target identification content; sending the first content to a first server, and sending the second content to a second server; Acquire first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content; display the first text information and the second text information; The step of acquiring the first content and the second content in the target identification content includes: dividing the target identification content into the first content and the second content according to the attribute information associated with the target identification content; In a case where the target recognition content is an audio file, dividing the target recognition content into the first content and the second content according to the attribute information associated with the target recognition content includes: When at least one group of operations is detected during the process of collecting the audio file, an audio segment between input moments of two operations in the same group is determined as one of the audio segments in the first content; Determine the audio segment between two adjacent groups of operations as one of the audio segments in the second content; The set of operations includes two preset operations, one of which is implemented before describing the important information or confidential information, and the other is implemented after describing the important information or confidential information, and mapped to the audio file.
2. The text recognition method according to claim 1, characterized in that: Before acquiring the first text message sent by the first server and the second text message sent by the second server, the method further includes: encoding the first content and the second content according to positions of the first content and the second content in the target identification content; Sending a first code to the first server, and sending a second code to the second server, wherein the first code is a code of the first content, and the second code is a code of the second content; The displaying of the first text information and the second text information includes: receiving a first correspondence between the first text information and the first code sent by the first server; receiving a second correspondence between the second text information and the second code sent by the second server; According to the first corresponding relationship and the second corresponding relationship, the first text information and the second text information are concatenated to obtain target text information; The target text information is displayed.
3. The text recognition method according to claim 1, characterized in that: Before displaying the first text information and the second text information, the method further includes: receiving a third text message sent by the first server, wherein the third text message is information associated with a target keyword and belonging to a target user and pre-stored in the first server, the target keyword includes the keyword in the first text message, and the target user is a user to whom the target identification content belongs; The third text information is displayed while the first text information and the second text information are displayed.
4. A text recognition device, characterized in that: The device comprises: A segmentation module, used to obtain first content and second content in the target recognition content; A content sending module, used to send the first content to a first server, and send the second content to a second server; a first text information acquisition module, configured to acquire first text information sent by the first server and second text information sent by the second server, wherein the first text information includes text information recognized by the first server from the first content, and the second text information includes text information recognized by the second server from the second content; A first display module, used for displaying the first text information and the second text information; The segmentation module comprises: a segmentation submodule, configured to segment the target identification content into the first content and the second content according to attribute information associated with the target identification content; A third determining subunit is configured to, when at least one group of operations is detected during the process of collecting the audio file, determine an audio segment between input moments of two operations in the same group as one of the audio segments in the first content; a fourth determining unit, configured to determine an audio segment between two adjacent groups of operations as one of the audio segments in the second content; The set of operations includes two preset operations, one of which is implemented before describing the important information or confidential information, and the other is implemented after describing the important information or confidential information, and mapped to the audio file.
5. The character recognition device according to claim 4, characterized in that: The device also includes: an encoding module, configured to encode the first content and the second content according to positions of the first content and the second content in the target identification content; a code sending module, configured to send a first code to the first server, and send a second code to the second server, wherein the first code is a code of the first content, and the second code is a code of the second content; The first display module comprises: A first receiving submodule, configured to receive a first correspondence between the first text information and the first code sent by the first server; A second receiving submodule, configured to receive a second correspondence between the second text information and the second code sent by the second server; a splicing submodule, configured to splice the first text information and the second text information according to the first corresponding relationship and the second corresponding relationship to obtain target text information; The display submodule is used to display the target text information.
6. The character recognition device according to claim 4, characterized in that: The device also includes: a second text information acquisition module, configured to receive third text information sent by the first server, wherein the third text information is information associated with a target keyword and belonging to a target user and pre-stored in the first server, the target keyword includes the keyword in the first text information, and the target user is a user to whom the target identification content belongs; The second display module is used to display the third text information while displaying the first text information and the second text information.
7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the text recognition method according to any one of claims 1 to 3 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the text recognition method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Divulgence-preventive processing method for artificially identifying information of business cards
CN103235946A
Interactive system, method, terminal and medium for audio character segmentation and word recognition
CN108597521A
Audio processing method and device, electronic equipment and storage medium
CN109840052A
Image processing method, server and terminal equipment
CN110930410A
Text recognition method, text recognition device and readable storage medium
CN112036330A
