An image processing method, apparatus, storage medium and electronic device
By recognizing and saving image text as online documents in instant messaging applications, the problem of slow and error-prone manual input of image text by users is solved, and fast and accurate text content retrieval is achieved.
Patent Information
- Application Number
- CN202010505564.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-05
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2040-06-05
AI Technical Summary
Users need to manually input text content in images in instant messaging applications, which results in slow input speed and a high risk of errors.
Image recognition technology identifies text content in images within instant messaging interfaces and saves it as an online document, allowing users to quickly access and use the text information within the images.
It improves the speed and accuracy of image and text input, reduces the tedious manual input process for users, and enhances the convenience of instant messaging applications.
Smart Images

Figure CN113762258B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an image processing method and device, a storage medium and an electronic device. BACKGROUND
[0002] With the rapid development of computer technology and the popularity of wireless networks, users use instant messaging applications more and more frequently. Through the chat window of the instant messaging application, users can communicate with friends, colleagues, family members and other users in real time. The chat content between users not only involves a large amount of text information and voice information, but also a large amount of image information for sharing and communication.
[0003] Currently, when a user uses an instant messaging application to chat with other users one-on-one or one-to-many (group chat), if the user needs to use the text content in the image in the chat window, the user usually needs to manually input the text content in the image by referring to the image through a keyboard or other means.
[0004] In the above process, since the user needs to manually input the text content in the image by referring to the image, the input speed is slow and input errors are likely to occur. SUMMARY
[0005] To solve the existing technical problems, the embodiments of the present application provide an image processing method and device, a storage medium and an electronic device, which can assist the user to quickly input the text content in the image in the instant messaging interface, and alleviate the problem of slow manual input of the text content in the image and the problem of easy errors.
[0006] To achieve the above purpose, the technical scheme of the embodiments of the present application is as follows:
[0007] In a first aspect, the embodiments of the present application provide an image processing method, comprising:
[0008] obtaining structural text information in a to-be-recognized image according to an image recognition request triggered by a target user for the to-be-recognized image in an instant messaging interface;
[0009] saving the structural text information as an online document according to a conversion request of saving the structural text information as an online document;
[0010] displaying indication information of the online document to the instant messaging interface of the target user;
[0011] displaying the online document to the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface.
[0012] In a second aspect, the embodiments of the present application provide an image processing device, comprising:
[0013] a text recognition unit, configured to obtain structural text information in a to-be-recognized image according to an image recognition request triggered by a target user for the to-be-recognized image in an instant messaging interface, and save the structural text information as an online document according to a conversion request of saving the structural text information as the online document;
[0014] an information display unit, configured to display indication information of the online document on the instant messaging interface of the target user, and display the online document on the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface.
[0015] In an optional embodiment, the information display unit is further configured to:
[0016] display the indication information of the online document on the instant messaging interface of the chat user corresponding to the target user, and display the online document on a target instant messaging interface in response to an online document calling request triggered by the target instant messaging interface for the indication information displayed on the instant messaging interface; the target instant messaging interface is an interface of an instant messaging client running on a target terminal device.
[0017] In an optional embodiment, the text recognition unit is specifically configured to:
[0018] determine whether the to-be-recognized image contains a preset line structure;
[0019] if yes, perform table content recognition on a region containing the preset line structure to obtain structural text information containing an electronic table;
[0020] if no, perform text content recognition on the to-be-recognized image to obtain structural text information containing text content.
[0021] In an optional embodiment, the text recognition unit is further configured to:
[0022] before the determination of whether the to-be-recognized image contains the preset line structure, determine that there is no online document corresponding to the to-be-recognized image in the saved online documents.
[0023] In an optional embodiment, the information display unit is further configured to:
[0024] After obtaining the structured text information in the image to be recognized, the structured text information is displayed on the instant messaging interface of the target user, and a numerical string part in the structured text information is saved in a first area in the memory of the terminal device of the target user, and other text content in the structured text information except the numerical string part is saved in a second area in the memory of the terminal device of the target user.
[0025] In an alternative embodiment, the apparatus further comprises:
[0026] The string processing unit is configured to obtain a numerical string from the first area in response to a target operation on the numerical string in the structured text information displayed on the instant messaging interface of the target user, and process the numerical string according to the target operation.
[0027] In an alternative embodiment, the apparatus further comprises:
[0028] The touch sensing unit is configured to display an operation button corresponding to the image to be recognized on the instant messaging interface of the target user in response to a touch operation of the target user on the image to be recognized, the operation button including a text conversion button, and the touch sensing unit is configured to take the operation of the target user on the text conversion button corresponding to the image to be recognized as an image recognition request triggered by the target user on the image to be recognized in the instant messaging interface.
[0029] In a third aspect, the embodiments of the present application further provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the image processing method of the first aspect.
[0030] In a fourth aspect, the embodiments of the present application further provide an electronic device, which comprises a memory and a processor, and the memory stores a computer program capable of running on the processor, and the computer program is executed by the processor to make the processor implement the image processing method of the first aspect.
[0031] The image processing method, device, storage medium and electronic device provided in the embodiments of the present application can perform text content recognition on the to-be-recognized image in the instant messaging interface according to the related request of the target user, obtain the structural text information of the to-be-recognized image, and save the structural text information as an online document, so as to facilitate the target user and the chat user corresponding to the target user to call and use the structural text information of the to-be-recognized image through the online document. After the structural text information is saved as the online document, the indication information of the online document can also be displayed on the instant messaging interface of the target user, so as to facilitate the target user to call the online document through the indication information, copy and use the structural text information of the to-be-recognized image, and further assist the user in quickly inputting the text content in the image, and alleviate the problem that the user manually inputs the text content in the image slowly and is prone to errors. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0033] Figure 1 An application scenario diagram of an image processing method provided in an embodiment of the present application;
[0034] Figure 2 An interaction diagram of an image processing method provided in an embodiment of the present application;
[0035] Figure 3 A diagram of an instant messaging interface provided in an embodiment of the present application;
[0036] Figure 4 A diagram of another instant messaging interface provided in an embodiment of the present application;
[0037] Figure 5 A diagram of a to-be-recognized image provided in an embodiment of the present application;
[0038] Figure 6 A diagram of another instant messaging interface provided in an embodiment of the present application;
[0039] Figure 7 A diagram of another to-be-recognized image provided in an embodiment of the present application;
[0040] Figure 8 A diagram of another instant messaging interface provided in an embodiment of the present application;
[0041] Figure 9 A diagram of another to-be-recognized image provided in an embodiment of the present application;
[0042] Figure 10 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0043] Figure 11 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0044] Figure 12 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0045] Figure 13 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0046] Figure 14 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0047] Figure 15 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0048] Figure 16 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0049] Figure 17 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0050] Figure 18 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application;
[0051] Figure 19 FIG. 4 is a schematic diagram of another instant messaging interface provided by an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0053] Some terms in the embodiments of the present application are explained below to facilitate the understanding of those of ordinary skill in the art.
[0054] (1) Instant messaging client: an application software that can be installed on a terminal device and run based on the terminal device, and can receive and send messages through a network to provide online chatting and communication services for users.
[0055] (2) Online document: a document that can be viewed or edited by multiple users simultaneously online, and is synchronized in real time at the terminal device of each user. In the embodiments of the present application, the online document can be a Word document or an Excel document, etc.
[0056] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.
[0057] The terms "first", "second", etc. are used only for the purpose of description, and should not be interpreted as indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise specified.
[0058] An application scenario of the image processing method provided by the embodiments of the present application can be seen from Figure 1 As shown in the figure, the application scenario includes a business server 100 and a plurality of terminal devices (such as terminal devices 301, 302, 303, etc.). The business server 100 is in communication connection with the plurality of terminal devices through a network 200, which can be, but is not limited to, a local area network, a metropolitan area network, or a wide area network, etc. The terminal devices 301-303 can be portable devices (for example, mobile phones, tablet computers, notebook computers, etc.), smart screens, or personal computers (PC, Personal Computer), etc. The business server 100 can be any device capable of providing Internet services, for example, a device capable of providing business services for an instant messaging client, etc. The business server 100 can also be a cloud server, and can include one or more servers.
[0059] In the following, the terminal device 301 is taken as an example for description. In some embodiments, an instant messaging client is installed on the terminal device 301, and a target user can use the instant messaging client on the terminal device 301 to chat with one or more other users through the network. During the chatting process, the target user or the other user can send an image, and the image sent by the user will be displayed on the instant messaging interface. At present, if the user needs to use the text content in the image on the instant messaging interface, the user needs to manually input by checking the image through a keyboard or other means. Based on this, the embodiments of the present application provide an image processing method, device, storage medium and electronic equipment.
[0060] In the embodiments of the present application, if the target user needs to use the text content in a certain to-be-recognized image displayed on the instant messaging interface, the terminal device 301 can trigger an image recognition operation for the to-be-recognized image in the instant messaging interface. The terminal device 301 receives the image recognition operation triggered by the target user, and sends an image recognition request and an online document conversion request for the to-be-recognized image to the service server 100 through the network 200. The service server 100 can identify the to-be-recognized image according to the image recognition request sent by the terminal device 301, obtain the structured text information in the to-be-recognized image, and save the structured text information as an online document according to the online document conversion request sent by the terminal device 301, so as to facilitate the target user and the chat user corresponding to the target user to retrieve and use the structured text information in the to-be-recognized image through the online document.
[0061] In some optional embodiments, the service server 100 can also be provided with a machine learning model based on artificial intelligence (AI) and machine learning (ML) technology. The service server 100 can also train the machine learning model, and use the trained machine learning model to perform the step of identifying the to-be-recognized image.
[0062] Artificial intelligence is to use digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Artificial intelligence technology mainly includes computer vision (CV) technology, speech processing technology, and machine learning / deep learning, etc.
[0063] With the research and progress of artificial intelligence technology, artificial intelligence has been researched and applied in many fields, such as common smart home, image recognition, text recognition, video monitoring, intelligent sound box, intelligent marketing, unmanned driving, autonomous driving, unmanned aerial vehicle, robot, intelligent medical treatment, etc. It is believed that with the development of technology, artificial intelligence will be applied in more and more fields and play an increasingly important value.
[0064] The machine learning model in the embodiments of this application is designed based on computer vision technology in artificial intelligence. Computer vision technology is an important application of artificial intelligence, which studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images, videos or multi-dimensional data to replace human visual interpretation. Typical computer vision technology usually includes image processing and video analysis. The embodiments of this application involve identifying text in a to-be-identified image, which is a method of image processing.
[0065] Machine learning is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, etc. The embodiments of this application use an image recognition model based on machine learning or deep learning for the to-be-identified image in the instant messaging interface, learn to identify the text content in the image according to the image features of the training image containing text, so as to identify the structural text information contained in the input to-be-identified image.
[0066] In an embodiment, the image processing method provided by the embodiments of this application can be executed by the business server 100 and the terminal device in cooperation. Figure 1 Figure 2 An interaction diagram between a business server and a terminal device provided by the embodiments of this application is shown, as shown in Figure 2 The method can include the following steps:
[0067] Step S201, the terminal device receives an image recognition operation triggered by the target user for the to-be-identified image in the instant messaging interface, and generates image processing information containing an image recognition request and an online document conversion request.
[0068] In the process of using the instant messaging client on the terminal device to chat with one or more other users, the target user or the other user may send an image, and the image sent by the user will be displayed on the instant messaging interface. If the target user needs to use the text content in a to-be-identified image displayed on the instant messaging interface, the target user can trigger an image recognition operation for the to-be-identified image in the instant messaging interface. The terminal device receives the image recognition operation triggered by the target user for the to-be-identified image, and generates image processing information containing an image recognition request and an online document conversion request.
[0069] Step S202, the terminal device sends the image processing information to the business server.
[0070] In step S203, the service server obtains the structured text information in the image to be recognized according to the image recognition request in the received image processing information, and saves the structured text information as an online document according to the online document conversion request in the image processing information.
[0071] In an embodiment, the image recognition request in the image processing information sent by the terminal device can carry the image to be recognized. In another embodiment, the image recognition request in the image processing information sent by the terminal device can carry identification information of the image to be recognized. For example, the image recognition request can carry a number or a name of the image to be recognized. The service processor saves the chat record of the target user and other users, and according to the number or the name of the image carried in the image recognition request, the service server can find the image to be recognized from the chat record and recognize the image to be recognized to obtain the structured text information in the image to be recognized.
[0072] The service server can also save the structured text information as an online document according to the conversion request in the image processing information sent by the terminal device. In an embodiment, the service server can save the online document locally. In another embodiment, the service server can save the online document to an online document server corresponding to the service server, and the online document server is used to provide sharing and online editing services of the online document. Optionally, the service server can name the online document by using the name or other identification of the image to be recognized when saving the structured text information as the online document.
[0073] In step S204, the service server sends a conversion completion notification to the terminal device.
[0074] Optionally, the conversion completion notification can carry a link address of the online document.
[0075] In step S205, the terminal device generates indication information of the online document according to the link address of the online document in the conversion completion notification, and displays the indication information of the online document on the instant messaging interface of the target user.
[0076] The terminal device receives the conversion completion notification sent by the service server, generates indication information of the online document according to the link address of the online document in the conversion completion notification, and displays the indication information of the online document on the instant messaging interface of the target user.
[0077] In step S206, the terminal device receives a touch operation of the target user on the indication information displayed on the instant messaging interface, and generates an online document calling request.
[0078] If the user using the terminal device clicks the "view online document" button, the terminal device can receive the touch operation of the user on the display instruction information on the instant messaging interface. The terminal device can be referred to as a target terminal device, and the instant messaging interface running on the terminal device can be referred to as a target instant messaging interface. Since the "view online document" button is associated with the link address of the online document, the terminal device can obtain the link address of the online document, and then generate an online document calling request. The online document calling request contains the link address of the online document.
[0079] In step S207, the terminal device sends the online document calling request to the service server.
[0080] In step S208, the service server obtains the online document according to the received online document calling request.
[0081] The service server obtains the online document from the link address of the online document according to the online document calling request triggered by the display instruction information on the target instant messaging interface.
[0082] In step S209, the service server sends the online document to the terminal device.
[0083] In some embodiments, if the online document is saved in an online document server, the service server can obtain the online document from the online document server according to the link address of the online document, and then send the online document to the terminal device.
[0084] In step S210, the terminal device displays the online document on the instant messaging interface.
[0085] The terminal device displays the online document on the instant messaging interface, so that the user can use the content in the online document.
[0086] The image processing method provided in the embodiments of the present application can obtain the structural text information in the to-be-recognized image according to the image recognition request for the to-be-recognized image of the instant messaging interface sent by the terminal device, and save the structural text information as an online document according to the conversion request for saving the structural text information as an online document sent by the terminal device. In this way, the target user and the chat user corresponding to the target user can conveniently call and use the structural text information of the to-be-recognized image through the online document. After the structural text information is saved as an online document, the indication information of the online document can also be displayed on the instant messaging interface of the target user, so that the target user can conveniently call the online document through the indication information, copy and use the structural text information of the to-be-recognized image, and then assist the user in quickly inputting the text content in the image, reduce the case of manually inputting the text content by the user, reduce the tediousness of the operation of the user, alleviate the problem that the user manually inputs the text content in the image slowly and is prone to errors, improve the use convenience of the instant application client, and improve the sharing of the text information in the image.
[0087] In some embodiments, the target user clicks the to-be-recognized image on the instant messaging interface, and the terminal device regards the click operation as a touch operation for the to-be-recognized image. The terminal device displays the operation key corresponding to the to-be-recognized image on the instant messaging interface of the target user in response to the touch operation of the target user for the to-be-recognized image, and the operation key includes a text conversion key. If the target user clicks the text conversion key, the terminal device can generate the image recognition request and the online document conversion request triggered by the target user for the to-be-recognized image in the instant messaging interface according to the operation of the target user triggering the text conversion key corresponding to the to-be-recognized image, and send the image recognition request and the online document conversion request to the service server.
[0088] In some embodiments, the target user clicks the to-be-recognized image on the instant messaging interface, and the terminal device regards the click operation as a touch operation for the to-be-recognized image. The terminal device displays the operation key corresponding to the to-be-recognized image on the instant messaging interface of the target user in response to the touch operation of the target user for the to-be-recognized image, and the operation key includes a text conversion key. If the target user clicks the text conversion key, the terminal device can generate the image recognition request and the online document conversion request triggered by the target user for the to-be-recognized image in the instant messaging interface according to the operation of the target user triggering the text conversion key corresponding to the to-be-recognized image, and send the image recognition request and the online document conversion request to the service server. Figure 3 Figure 4 The secondary menu includes operation buttons such as "Convert to Text" and "Convert to Online Document". If the target user clicks the "Convert to Online Document" operation button, the terminal device generates an image recognition request and an online document conversion request for the to-be-identified image in response to the touch operation of the target user on the "Convert to Online Document" button, and sends the image recognition request and the online document conversion request to the service server.
[0089] In an optional embodiment, if the target user clicks the "Convert to Text" operation button shown in FIG. 6B, the terminal device generates an image recognition request for the to-be-identified image in response to the touch operation of the target user on the "Convert to Online Document" button, and sends the image recognition request to the service server. After obtaining the structured text information in the to-be-identified image according to the received image recognition request, the service server can directly send the structured text information to the terminal device of the target user, and the terminal device displays the structured text information on the instant messaging interface of the target user. Figure 4 In some embodiments, after obtaining the structured text information in the to-be-identified image according to the received image recognition request, the service server can also send a conversion completion notification to the terminal device of the target user, and the conversion completion notification can include a "picture has been converted into text content and stored in the clipboard" prompt information. After receiving the conversion completion notification, the terminal device of the target user can display an information prompt box as shown in FIG. 6C on the instant messaging interface to inform the target user that the text recognition of the to-be-identified image has been executed. Figure 13
[0090] Optionally, in the step S203, the service server can identify the to-be-identified image to obtain the structured text information in the to-be-identified image in the following manner: first, the service server determines whether the to-be-identified image contains a preset line structure, if the to-be-identified image contains the preset line structure, performs table content recognition on the region containing the preset line structure to obtain structured text information containing an electronic table; and if the to-be-identified image does not contain the preset line structure, performs text content recognition on the to-be-identified image to obtain structured text information containing text content.
[0091] Specifically, the service server identifies the to-be-identified image through a pre-trained machine learning model, which can be a deep neural network model. By way of example, the deep neural network model can include a table recognition network and a text recognition network. The table recognition network can adopt an Enet model, which includes an encoder-decoder network structure composed of a plurality of sequentially connected bottleneck modules. The table recognition network can detect lines in the to-be-identified image to determine whether the to-be-identified image contains a preset line structure. The preset line structure can be a grid structure formed by lines intersecting with each other.
[0092] If the preset line structure is contained in the to-be-recognized image, the table recognition network can also detect the intersection positions of the lines, so as to obtain the number of cells contained in the to-be-recognized image and the position of each cell. According to the number of cells and the position of each cell detected by the table recognition network, a blank electronic table can be established. According to the position of each cell detected by the table recognition network, each cell corresponding image region can be obtained by image segmentation. The text recognition network can be input with each cell corresponding image region, so as to recognize the text content in each cell. Then, the recognized text content can be filled into the corresponding cell in the blank electronic table, so as to obtain an electronic table corresponding to the table region in the to-be-recognized image.
[0093] If it is detected by the table recognition network that the to-be-recognized image does not contain the preset line structure, the text recognition network can be used to directly perform text recognition on the to-be-recognized image, so as to obtain the text content contained in the to-be-recognized image.
[0094] In some embodiments, the structural text information obtained by recognizing the to-be-recognized image by using the deep neural network model can only contain an electronic table or only contain text content. If the structural text information only contains text content, the online document to be saved is a document in Word format. If the structural text information only contains an electronic table, the online document to be saved is a document in Excel format.
[0095] In other embodiments, the structural text information obtained by recognizing the to-be-recognized image by using the deep neural network model can contain both an electronic table and text content. For example, as shown in FIG. 2, the to-be-recognized image contains a table, and the text content is located outside the table region. The structural text information recognized by the deep neural network model contains both the electronic table and the text content located outside the electronic table. If the structural text information contains both the electronic table and the text content, the online document to be saved is a document in Word format. Figure 5
[0096] After the service server saves the structural text information into the online document, the service server sends a conversion completion notification to the terminal device. The conversion completion notification can carry a link address of the online document. After receiving the conversion completion notification sent by the service server, the terminal device generates indication information of the online document according to the link address of the online document in the conversion completion notification, and displays the indication information of the online document on the instant messaging interface of the target user. The indication information of the online document contains the link address of the online document.
[0097] Optionally, in the step S203, before determining whether the to-be-recognized image contains the preset line structure, the service server obtains the structural text information in the to-be-recognized image, and the method further includes the following steps.
[0098] It is determined that the online document corresponding to the to-be-recognized image does not exist in the saved online documents.
[0099] Optionally, the indication information of the online document is displayed on the instant messaging interface in the manner of a "view online document" button or in other manners. The "view online document" button is associated with the link address of the online document. The target user clicks the "view online document" button, and the terminal device can obtain the online document through the link address of the online document and display the online document on the instant messaging interface of the target user, so as to facilitate the target user to use the content in the online document. For example, the terminal device can establish an information display card on the instant messaging interface and display the content of the online document in the information display card. A close button can also be arranged at the upper left corner or the upper right corner of the information display card. If the user finishes reading, the information display card can be actively closed through the close button. Figure 6
[0100] In an optional embodiment, the conversion completion notification sent by the service server to the terminal device can also carry the structured text information of the to-be-recognized image. After receiving the conversion completion notification, the terminal device can display the structured text information on the instant messaging interface of the target user. In some embodiments, if the structured text information contains a digital string, the terminal device can save the digital string part in the structured text information to a first area in the memory, and save the other text content in the structured text information to a second area in the memory. It can also be understood that the terminal device can save the digital string part and the other text content in the structured text information to different clipboards, respectively, so as to meet the individual calling demand of the digital string.
[0101] Specifically, the terminal device receives a target operation of the target user on the digital string in the structured text information displayed on the instant messaging interface of the target user, obtains the digital string from the first area, and processes the digital string according to the target operation. For example, the target operation can be a copy, paste, call, or other operation, and the corresponding process of processing the digital string can be copying the digital string, pasting the digital string, or calling a telephone number composed of the digital string.
[0102] For example, if the to-be-recognized image is a bank card image as shown in FIG. 6, the bank card number included in the structured text information of the to-be-recognized image obtained through recognition is a digital string. After receiving the conversion completion notification sent by the service server, the terminal device displays the structured text information on the instant messaging interface of the target user, as shown in FIG. 7. Figure 7 Figure 8 As shown in FIG. 13, the terminal device displays the structural text information of the identified image on the instant messaging interface of the target user. As shown in FIG. 14, the terminal device saves the bank card number part to a first area in the memory, and saves other text content (including the account name, etc.) other than the bank card number part to a second area in the memory. If the target user long-presses the bank card number part, the terminal device can display a "copy" button, and the target user clicks the "copy" button, so that the terminal device receives the target operation of the target user copying the bank card number. The terminal device can only obtain the bank card number saved in the first area, and wait for further paste operation of the target user. The target user can paste the bank card number in the chat content input box of the instant messaging interface, or paste the bank card number in the business operation interface of the electronic banking client.
[0103] For example, if the image to be identified is a personal business card image as shown in FIG. 15, the phone number included in the structural text information of the identified image is a digital string. After the terminal device receives the conversion completion notification sent by the service server, the terminal device displays the structural text information on the instant messaging interface of the target user, as shown in FIG. 16. Figure 9 Figure 10 As shown in FIG. 16, the terminal device saves the phone number part to a first area in the memory, and saves other text content (including the account name, etc.) other than the phone number part to a second area in the memory. If the target user long-presses the phone number part, the terminal device can display a "call" button, and the target user clicks the "call" button, so that the terminal device receives the target operation of the target user calling the phone number. The terminal device can only obtain the phone number saved in the first area, and call the phone number.
[0104] For the convenience of other users chatting with the target user to use the structural text information of the image to be identified by calling the online document, the image processing method provided by an embodiment of the present application can include the following steps, as shown in FIG. 17. Figure 14
[0105] In step S1401, the first terminal device receives the image recognition operation triggered by the target user for the image to be identified in the instant messaging interface, and generates image processing information containing an image recognition request and an online document conversion request.
[0106] The first terminal device is the terminal device used by the target user. If the target user needs to use the text content in a certain image to be identified displayed on the instant messaging interface, the target user can trigger the image recognition operation for the image to be identified in the instant messaging interface. The first terminal device receives the image recognition operation triggered by the target user for the image to be identified, and generates image processing information containing an image recognition request and an online document conversion request.
[0107] Exemplarily, in the instant messaging interface on the first terminal device, the target user can long-press the image and select a function option menu, for example, the "convert to online document" option, which needs to be used for subsequent processing of the selected image. After receiving the image recognition operation of the "convert to online document" input by the target user, the first terminal device can generate image processing information containing the image recognition request and the online document conversion request after recognizing the text.
[0108] In step S1402, the first terminal device sends the image processing information to the service server.
[0109] For example, the information content of the image processing information sent by the first terminal device to the server can be "perform image recognition and online document conversion on the to-be-recognized image, and return prompt information after recognition is completed".
[0110] In step S1403, the service server obtains the structured text information in the to-be-recognized image according to the image recognition request in the received image processing information, and saves the structured text information as an online document according to the online document conversion request in the image processing information.
[0111] In an optional embodiment, after receiving the image processing information, the service server can first check whether the to-be-recognized image has been converted. For example, the service server can search in the saved online documents according to the name or other identifier of the to-be-recognized image to check whether there is an online document corresponding to the to-be-recognized image. If there is an online document corresponding to the to-be-recognized image, the step of re-recognizing the to-be-recognized image can be omitted, and the link address of the online document corresponding to the to-be-recognized image is directly returned, so as to avoid repeated recognition and improve the running efficiency of the program.
[0112] If the service server does not find the online document corresponding to the to-be-recognized image, the service server obtains the structured text information in the to-be-recognized image according to the image recognition request in the image processing information, and saves the structured text information as an online document. Optionally, when saving the structured text information as an online document, the service server can first judge whether the structured text information of the to-be-recognized image is text content or an electronic table. If the structured text information is text content, the saved online document format can be a Word format document. If the structured text information is an electronic table, the saved online document format can be an Excel format document. If the structured text information of the to-be-recognized image obtained by the service server after recognizing the to-be-recognized image is empty, it means that the to-be-recognized image does not contain text information, and the step of saving the structured text information as an online document can be omitted, and the following step S704 is directly executed.
[0113] In some embodiments, the business server can also send the image to be recognized to the conversion server, and the conversion server can perform structural text information recognition and online document conversion on the image to be recognized.
[0114] In step S1404, the business server sends a conversion completion notification to the first terminal device.
[0115] For example, the conversion completion notification can include a prompt message "the image has been converted into text content and stored in an online document". Optionally, the conversion completion notification can also include a link address of the online document. In some embodiments, if the business server performs recognition on the image to be recognized and obtains no structural text information of the image to be recognized, the conversion completion notification sent by the business server to the first terminal device can include a prompt message "no convertible content is found".
[0116] In step S1405, the first terminal device displays indication information of the online document on the instant messaging interface of the target user according to the conversion completion notification.
[0117] If the conversion completion notification sent by the business server includes the prompt message "the image has been converted into text content and stored in an online document" and the link address of the online document, the first terminal device can display an information prompt box of "the image has been converted into text content and stored in an online document" on the instant messaging interface of the target user, as shown in FIG. 6A. The prompt message can disappear after being displayed on the instant messaging interface for a set time length, which can be 1 second. Then, the first terminal device can display indication information of the online document generated according to the link address of the online document on the instant messaging interface of the target user, as shown in FIG. 6B. Figure 11 Figure 6 If the conversion completion notification includes the prompt message "no convertible content is found", the first terminal device can display an information prompt box of "no convertible content is found" on the instant messaging interface of the target user, as shown in FIG. 6C. Figure 12
[0118] In step S1406, the business server sends the conversion completion notification to a second terminal device of a chat user corresponding to the target user.
[0119] Each user in the same instant messaging group as the target user can be referred to as a chat user corresponding to the target user. The same instant messaging group can include only two users, such as the target user and a friend chatting alone. The same instant messaging group can also include multiple users, such as a group chat. The image to be recognized is an image sent by any user in the same instant messaging group in a chatting process.
[0120] The service server can send a conversion completion notification to each terminal device of the target user corresponding to the to-be-identified image having been converted into an online document. The conversion completion notification carries a link address of the online document.
[0121] At step S1407, the second terminal device displays indication information of the online document on the instant messaging interface according to the conversion completion notification.
[0122] Optionally, the second terminal device receives the conversion completion notification sent by the service server, generates the indication information of the online document according to the link address of the online document in the conversion completion notification, and displays the indication information of the online document on the instant messaging interface. The indication information of the online document displayed on the instant messaging interface of the second terminal device can also be displayed in the form of a "view online document" button as shown in the figure, and the "view online document" button is associated with the link address of the online document. Figure 6
[0123] It should be noted that each terminal device receiving the conversion completion notification sent by the service server can display the indication information of the online document on the instant messaging interface. In this embodiment, only the second terminal device is taken as an example for description.
[0124] At step S1408, the second terminal device receives a touch operation of a user on the indication information displayed on the instant messaging interface, and generates an online document calling request.
[0125] If the user using the second terminal device clicks the "view online document" button, the second terminal device can receive the touch operation of the user on the indication information displayed on the instant messaging interface. The second terminal device can be referred to as a target terminal device, and the instant messaging interface running on the second terminal device can be referred to as a target instant messaging interface. Since the "view online document" button is associated with the link address of the online document, the second terminal device can obtain the link address of the online document, and then generate the online document calling request. The online document calling request contains the link address of the online document.
[0126] At step S1409, the second terminal device sends the online document calling request to the service server.
[0127] At step S1410, the service server obtains the online document according to the received online document calling request.
[0128] The service server obtains the online document from the link address of the online document according to the online document calling request triggered by the indication information displayed on the target instant messaging interface.
[0129] At step S1411, the service server sends the online document to the second terminal device.
[0130] In some embodiments, if the online document is stored in the online document server, the service server can obtain the online document from the online document server according to the link address of the online document, and then send the online document to the second terminal device. Alternatively, the service server can forward the online document calling request to the online document server, and the online document server sends the online document to the second terminal device, and the online document server provides services for subsequent user use of the online document.
[0131] In step S1412, the second terminal device displays the online document on the instant messaging interface.
[0132] The second terminal device displays the online document on the instant messaging interface, so as to facilitate the user to use the content in the online document.
[0133] In this embodiment, after completing the conversion of the online document, the service server sends a conversion completion notification to the terminal devices of the target user and the chat user corresponding to the target user, and the instant messaging interface of the target user and the chat user corresponding to the target user will display the indication information of the online document, so as to facilitate the target user and the chat user corresponding to the target user to call and use the structural text information of the to-be-recognized image through the online document, and improve the shareability of the image text information.
[0134] It should be noted that each of the above embodiments is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other.
[0135] Based on the same inventive concept, the embodiments of the present application also provide an image processing method, as shown in Figure 15 In an embodiment, the method can be executed by a server, such as the service server 100 shown in Figure 1 When the method is executed by the server, it can include the following steps:
[0136] In step S1501, the structural text information in the to-be-recognized image is obtained according to an image recognition request triggered by a target user for a to-be-recognized image in an instant messaging interface.
[0137] The image recognition request triggered by the target user for the to-be-recognized image in the instant messaging interface is sent by the terminal device to the server. After the terminal device receives the image recognition operation triggered by the target user for the to-be-recognized image in the instant messaging interface, the terminal device sends the image recognition request to the server. The server identifies the to-be-recognized image according to the received image recognition request, and obtains the structural text information in the to-be-recognized image.
[0138] At step S1502, the structured text information is saved as an online document according to a conversion request of saving the structured text information as the online document.
[0139] If the terminal device receives an operation of triggering the conversion of the to-be-recognized image into the online document by the target user, the terminal device sends a conversion request of saving the structured text information as the online document to the server. The server saves the structured text information as the online document according to the conversion request.
[0140] At step S1503, the indication information of the online document is displayed on the instant messaging interface of the target user.
[0141] The indication information of the online document can include a link address of the online document. The server can display the indication information of the online document on the instant messaging interface of the target user through the terminal device or other display device. For example, the server can send the link address of the online document to the terminal device, and the terminal device generates the indication information of the online document according to the link address of the online document and displays the indication information of the online document on the instant messaging interface of the target user. Alternatively, the server can generate the indication information of the online document according to the link address of the online document, send the indication information of the online document to the terminal device, and the terminal device displays the indication information of the online document on the instant messaging interface of the target user.
[0142] At step S1504, the online document is displayed on the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface.
[0143] If the target user clicks the indication information displayed on the instant messaging interface, for example, a "view online document" button, the terminal device can receive the touch operation of the user for the indication information displayed on the instant messaging interface. Since the "view online document" button is associated with the link address of the online document, the terminal device can obtain the link address of the online document, and then generate an online document calling request and send the online document calling request to the service server. The online document calling request includes the link address of the online document. The service server obtains the online document according to the received online document calling request, and sends the online document to the terminal device, and the terminal device displays the online document on the instant messaging interface.
[0144] In another embodiment, Figure 15 The image processing method shown can be performed by a terminal device, such as any one of the terminal devices 301-303 shown in Figure 1 The method performed by the terminal device can include the following steps:
[0145] At step S1501, the structural text information in the to-be-recognized image is obtained according to an image recognition request triggered by the target user for the to-be-recognized image in the instant messaging interface.
[0146] In this embodiment, the terminal device can use a machine learning model to recognize the to-be-recognized image. For example, the terminal device receives an image recognition request triggered by the target user for the to-be-recognized image in the instant messaging interface, and can recognize the to-be-recognized image according to the image recognition request to obtain the structural text information in the to-be-recognized image.
[0147] At step S1502, the structural text information is saved as an online document according to a conversion request of saving the structural text information as an online document.
[0148] If the terminal device receives a conversion request of saving the structural text information as an online document triggered by the target user for the to-be-recognized image, the terminal device can generate a document according to the structural text information of the to-be-recognized image, directly upload the generated document to an online document server, and save the document as an online document.
[0149] At step S1503, the indication information of the online document is displayed on the instant messaging interface of the target user.
[0150] After the terminal device uploads the generated document to the online document server, the terminal device can generate the indication information of the online document according to the link address of the online document returned by the online document server, and display the indication information of the online document on the instant messaging interface of the target user.
[0151] At step S1504, the online document is displayed on the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface.
[0152] If the target user clicks the indication information displayed on the instant messaging interface, for example, a “view online document” button, the terminal device can receive the touch operation of the user for the indication information displayed on the instant messaging interface. Since the “view online document” button is associated with the link address of the online document, the terminal device can obtain the link address of the online document, and then generate an online document calling request. The online document calling request contains the link address of the online document. The terminal device obtains the online document according to the online document calling request, and displays the online document on the instant messaging interface.
[0153] In another embodiment, Figure 15 The image processing method shown can be completed by the terminal device and the server in cooperation, for example, the server executes steps S1501 and S1502, and the terminal device executes steps S1503 and S1504. The specific implementation process of the method can be referred to Figure 2The interaction diagram shown is executed, and will not be described here again.
[0154] Based on the same inventive concept, the embodiment of the present application also provides an image processing device, which can be arranged in a server or a terminal device. Since the device is the device corresponding to the image processing method of the embodiment of the present application, and the principle of solving problems of the device is similar to that of the method, the implementation of the device can be referred to the implementation of the above method, and the repeated parts will not be described here again.
[0155] Figure 16 A flow diagram of an image processing device provided by the embodiment of the present application is shown, as shown in the figure, the image processing device includes a text recognition unit 161 and an information display unit 162; wherein, Figure 16
[0156] The text recognition unit 161 is configured to obtain structural text information in a to-be-recognized image according to an image recognition request triggered by a target user for a to-be-recognized image in an instant messaging interface; and save the structural text information as an online document according to a conversion request of saving the structural text information as the online document.
[0157] The information display unit 162 is configured to display indication information of the online document on the instant messaging interface of the target user, and display the online document on the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface.
[0158] In an optional embodiment, the information display unit 162 can also be configured to:
[0159] display the indication information of the online document on the instant messaging interface of the chat user corresponding to the target user; and display the online document on the target instant messaging interface in response to an online document calling request triggered by the indication information displayed on the target instant messaging interface in each instant messaging interface having the indication information displayed; the target instant messaging interface is the interface of the instant messaging client running on the target terminal device.
[0160] In an optional embodiment, the text recognition unit 161 is specifically configured to:
[0161] determine whether the to-be-recognized image contains a preset line structure;
[0162] if yes, perform table content recognition on a region containing the preset line structure to obtain structural text information containing an electronic table;
[0163] if no, perform text content recognition on the to-be-recognized image to obtain structural text information containing text content.
[0164] In an optional embodiment, the text recognition unit 161 is further configured to:
[0165] Before determining whether the preset line structure is contained in the to-be-recognized image, it is determined that the online document corresponding to the to-be-recognized image does not exist in the saved online documents.
[0166] In an optional embodiment, the information display unit 162 is further configured to:
[0167] After obtaining the structured text information in the to-be-recognized image, the structured text information is displayed on the instant messaging interface of the target user; a numerical string part in the structured text information is saved to a first area in the memory of the terminal device of the target user, and other text content in the structured text information except the numerical string part is saved to a second area in the memory of the terminal device of the target user.
[0168] In an optional embodiment, the image processing apparatus can further include:
[0169] The touch sensing unit 171 is configured to display, in response to a touch operation of the target user on the to-be-recognized image, an operation button corresponding to the to-be-recognized image on the instant messaging interface of the target user; the operation button includes a text conversion button; and the operation of the target user triggering the text conversion button corresponding to the to-be-recognized image is taken as an image recognition request triggered by the target user on the to-be-recognized image in the instant messaging interface.
[0170] In an optional embodiment, as shown in Figure 17 the image processing apparatus can further include:
[0171] The string processing unit 172 is configured to obtain, in response to a target operation on a numerical string in the structured text information displayed on the instant messaging interface of the target user, the numerical string from the first area; and process the numerical string according to the target operation.
[0172] The image processing apparatus according to the embodiments of the present application can perform text content recognition on the to-be-recognized image in the instant messaging interface according to a related request of the target user, obtain the structured text information of the to-be-recognized image, and save the structured text information as an online document, so that the target user and the chat user corresponding to the target user can retrieve and use the structured text information of the to-be-recognized image through the online document. After saving the structured text information as the online document, the indication information of the online document can be displayed on the instant messaging interface of the target user, so that the target user can retrieve the online document through the indication information, copy and use the structured text information of the to-be-recognized image, and further assist the user in quickly inputting the text content in the image, thereby relieving the problem of slow speed and easy error in manual input of the text content in the image.
[0173] Based on the same inventive concept, the embodiments of the present application also provide an electronic device. In an embodiment, the electronic device can be a server, such as the service server 100 shown in Figure 1 In this embodiment, the structure of the electronic device can be as shown in Figure 18 including a memory 181, a communication module 183, and one or more processors 182.
[0174] The memory 181 is configured to store computer programs executed by the processor 182. The memory 181 can mainly include a program storage area and a data storage area, where the program storage area can store an operating system and programs required for running instant messaging functions, etc., and the data storage area can store various instant messaging information and operation instruction sets, etc.
[0175] The memory 181 can be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 701 can be any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 181 can be a combination of the above memories.
[0176] The processor 182 can include one or more central processing units (CPUs) or digital processing units, etc. The processor 182 is configured to invoke the computer programs stored in the memory 181 to implement the above image processing method.
[0177] The communication module 183 is configured to communicate with terminal devices and other servers.
[0178] The embodiments of the present application do not limit the specific connection medium between the above memory 181, communication module 183 and processor 182. In the embodiments of the present disclosure, Figure 18 the memory 181 and the processor 182 are connected through a bus 184, and the bus 184 is represented by a thick line in Figure 18 the connection mode between other components is only schematically illustrated and is not limited thereto. The bus 184 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 18 only one thick line is used in .
[0179] The computer storage medium in the memory 181 stores computer executable instructions for implementing the image processing method of the embodiments of the present application. The processor 182 is configured to execute the image processing method described above.
[0180] In another embodiment, the electronic device can be a terminal device. In this embodiment, the structure of the electronic device can be as shown in the figure, including a communication component 210, a memory 220, a display unit 230, a camera 240, a sensor 250, an audio circuit 260, a Bluetooth module 270, a processor 280, and the like. Figure 19
[0181] The communication component 210 is configured to communicate with a server. In some embodiments, a WiFi (Wireless Fidelity) module can be included, which belongs to a short-range wireless transmission technology. The electronic device can help the user to send and receive messages through the WiFi module.
[0182] The memory 220 can be used to store software programs and data. The processor 280 executes various functions and data processing of the terminal device 200 by running the software programs or data stored in the memory 220. The memory 220 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. The memory 220 stores an operating system that enables the terminal device 200 to run. In the present application, the memory 220 can store an operating system and various application programs, and can also store codes for executing the image processing method described in the embodiments of the present application.
[0183] The display unit 230 can also be used to display information input by the user or information provided to the user, as well as the graphical user interface (GUI) of various menus of the terminal device 200. Specifically, the display unit 230 can include a display screen 232 arranged on the front of the terminal device 200. The display screen 232 can be configured in the form of a liquid crystal display, a light-emitting diode, and the like. The display unit 230 can be used to display the instant messaging interface described in the embodiments of the present application.
[0184] The display unit 230 can also be used to receive input digital or character information, and generate signal inputs related to user settings and function control of the terminal device 200. Specifically, the display unit 230 can include a touch screen 231 arranged on the front of the terminal device 200, which can collect touch operations of the user thereon or therearound, such as clicking buttons, dragging scroll boxes, and the like.
[0185] The touch screen 231 can be overlaid on the display screen 232, or the touch screen 231 can be integrated with the display screen 232 to realize the input and output functions of the terminal device 200. After integration, the touch screen 231 and the display screen 232 can be referred to as a touch display screen. The display unit 230 can display an application program and corresponding operation steps.
[0186] The camera 240 can be used to capture a still image. A user can send an image captured by the camera 240 to a user of a chat partner through an instant messaging client. The camera 240 can be one or more. An object generates an optical image through a lens and projects the optical image onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts an optical signal into an electrical signal, and then transmits the electrical signal to the processor 280 to convert the electrical signal into a digital image signal.
[0187] The terminal device can also include at least one sensor 250, such as an acceleration sensor 251, a distance sensor 252, a fingerprint sensor 253, and a temperature sensor 254. The terminal device can also be configured with a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, a motion sensor, and other sensors.
[0188] The audio circuit 260, the speaker 261, and the microphone 262 can provide an audio interface between a user and the terminal device 200. The audio circuit 260 can convert received audio data into an electrical signal and transmit the electrical signal to the speaker 261, which converts the electrical signal into an audible signal for output. The terminal device 200 can also be configured with a volume button for adjusting the volume of the audible signal. On the other hand, the microphone 262 converts a sound signal collected by the microphone 262 into an electrical signal, which is received by the audio circuit 260 and converted into audio data. The audio data is then output to the communication component 210 for transmission to another terminal device 200, for example, or to the memory 220 for further processing. In this application, the microphone 262 can obtain a user's voice.
[0189] The Bluetooth module 270 is used to interact with other Bluetooth devices having a Bluetooth module through a Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (e.g., a smart watch) having a Bluetooth module through the Bluetooth module 270, and thus exchange data.
[0190] The processor 280 is the control center of the terminal device, connects all parts of the terminal through various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs stored in the memory 220 and calling data stored in the memory 220. In some embodiments, the processor 280 can include one or more processing units; the processor 280 can also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the baseband processor mainly processes wireless communication. It can be understood that the above-mentioned baseband processor can also not be integrated into the processor 280. The processor 280 in the present application can run the operating system, application program, user interface display and touch response, and the communication method of the embodiment of the present application. In addition, the processor 280 is coupled with the display unit 230.
[0191] The embodiment of the present application further provides a computer storage medium, and the computer storage medium stores computer executable instructions. The computer executable instructions are used for implementing the image processing method of any embodiment of the present application.
[0192] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. An image processing method, characterized by, The method comprises: receiving an image recognition operation triggered by a target user for a to-be-recognized image, generating image processing information containing an image recognition request and an online document conversion request, obtaining structural text information in the to-be-recognized image according to the image recognition request, comprising: determining whether the to-be-recognized image contains a preset line structure, if the to-be-recognized image contains the preset line structure, performing table content recognition on the region containing the preset line structure to obtain structural text information containing an electronic table corresponding to the table region in the to-be-recognized image; if the to-be-recognized image does not contain the preset line structure, performing text content recognition on the to-be-recognized image to obtain structural text information containing text content; saving the structural text information as an online document according to the online document conversion request, if the structural text information only contains text content, the saved online document is a document in Word format, if the structural text information only contains an electronic table, the saved online document is a document in Excel format, the online document is a document that is simultaneously viewed or edited by multiple users online and is synchronized in real time on the terminal devices of the users; displaying indication information of the online document on an instant messaging interface of the target user, the indication information is embedded and displayed in the instant messaging interface in the form of a button; displaying the online document on the instant messaging interface of the target user in response to an online document calling request triggered by the target user for the indication information displayed on the instant messaging interface; embedding and displaying the indication information of the online document on the instant messaging interface of a chat user corresponding to the target user in the form of a button; displaying the online document on a target instant messaging interface in response to an online document calling request triggered by the indication information displayed on the target instant messaging interface, the target instant messaging interface is the interface of an instant messaging client running on a target terminal device.
2. The method of claim 1, wherein, The method further comprises: if the to-be-recognized image contains the preset line structure, detecting the intersection positions of each line by a table recognition network to obtain the number of cells and the position of each cell in the to-be-recognized image, establishing a blank electronic table according to the number of cells and the position of each cell detected by the table recognition network, obtaining an image region corresponding to each cell by image segmentation according to the position of each cell detected by the table recognition network, inputting the image region corresponding to each cell into a text recognition network to recognize the text content in each cell, and filling the recognized text content into the corresponding cells in the blank electronic table to obtain an electronic table corresponding to the table region in the to-be-recognized image.
3. The method of claim 1, wherein, The method further comprises: if the structural text information contains an electronic table and text content, the saved online document is a document in Word format.
4. The method of claim 1, wherein, Before determining whether the to-be-recognized image contains the preset line structure, the method for obtaining structural text information in the to-be-recognized image further comprises: determining that the saved online document does not exist in the online document corresponding to the to-be-recognized image.
5. The method of claim 1, wherein, After obtaining the structured text information in the to-be-recognized image, the method further includes: displaying the structured text information on the instant messaging interface of the target user, saving a digital string part in the structured text information to a first area in the memory of the terminal device of the target user, and saving other text content in the structured text information except the digital string part to a second area in the memory of the terminal device of the target user.
6. The method of claim 5, wherein, The method further includes: obtaining the digital string from the first area in response to a target operation on the digital string in the structured text information displayed on the instant messaging interface of the target user, and processing the digital string according to the target operation. Before obtaining the structured text information in the to-be-recognized image according to the image recognition request, the method further includes:
7. The method of claim 1, wherein, displaying an operation button corresponding to the to-be-recognized image on the instant messaging interface of the target user in response to a touch operation of the target user on the to-be-recognized image, the operation button including a text conversion button; generating an image recognition request triggered by the target user on the to-be-recognized image in the instant messaging interface according to an operation of the target user triggering the text conversion button corresponding to the to-be-recognized image. The method includes:
8. An image processing apparatus characterized by comprising: a text recognition unit configured to receive an image recognition operation triggered by a target user on a to-be-recognized image, generate image processing information including an image recognition request and an online document conversion request, obtain structured text information in the to-be-recognized image according to the image recognition request, including: determining whether the to-be-recognized image includes a preset line structure, if the to-be-recognized image includes the preset line structure, performing table content recognition on a region including the preset line structure to obtain structured text information including an electronic table corresponding to a table region in the to-be-recognized image, if the to-be-recognized image does not include the preset line structure, performing text content recognition on the to-be-recognized image to obtain structured text information including text content, and saving the structured text information as an online document according to the online document conversion request, if the structured text information only includes text content, the saved online document is a document in Word format, if the structured text information only includes an electronic table, the saved online document is a document in Excel format, the online document is a document that is simultaneously viewed or edited by multiple users and is synchronized in real time on terminal devices of the users, and The information display unit is configured to display the indication information of the online document on the instant messaging interface of the target user, display the indication information in the form of a button in the instant messaging interface, and display the online document on the instant messaging interface of the target user in response to an online document calling request triggered by the target user in response to the indication information displayed on the instant messaging interface; display the indication information of the online document on the instant messaging interfaces of the chat users corresponding to the target user in the form of a button; and display the online document on the target instant messaging interface in response to an online document calling request triggered by the target instant messaging interface in response to the indication information displayed on each instant messaging interface having the indication information displayed thereon; the target instant messaging interface is an interface of an instant messaging client running on a target terminal device.
9. A computer readable storage medium having stored therein a computer program, characterized in that: The computer program is executed by a processor to implement the method of any one of claims 1-7.
10. An electronic device, comprising: The computer program is executed by a processor to implement the method of any one of claims 1-7. The computer program is executed by a processor to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Instant messaging information processing method and device and storage medium
CN110278141A
Image processing method and device, computer equipment and storage medium
CN111126301A