Structural image reconstruction methods, devices, electronic equipment, media, and program products

By identifying and classifying the mirrored text in the mind map, performing restoration processing, and generating editable structural pictures, the problem that mind maps cannot be edited in the existing technology is solved, and efficient and accurate restoration of structural pictures is achieved.

CN114154467BActive Publication Date: 2024-09-20BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111277486.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-09-20
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

The existing technology cannot realize the editing of mind maps and only supports review, lacking an efficient and reliable restoration solution.

Method used

By obtaining the image hierarchical structure picture, text recognition and image image classification are performed, restoration processing is performed according to the target image classification, and an editable restored hierarchical structure picture is generated.

Benefits of technology

It achieves efficient and accurate restoration of structural pictures, improves the convenience and accuracy of restoration, and supports the rapid restoration of mirrored hierarchical structure diagrams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114154467B
    Figure CN114154467B
Patent Text Reader

Abstract

The present invention discloses a structural image restoration method, device, electronic device, medium and program product, the method comprising: obtaining a mirror hierarchical structure image; performing text recognition on the mirror hierarchical structure image to obtain mirror text in the mirror hierarchical structure image; performing image mirror classification on the mirror text to obtain a target mirror classification of the mirror hierarchical structure image; performing restoration processing on the mirror hierarchical structure image according to the target mirror classification to obtain a corresponding restored hierarchical structure image. The above scheme improves the efficiency, accuracy and speed of structural image restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a structural image restoration method, device, electronic equipment, medium and program product. Background Art

[0002] Hierarchical structure images are nested structure images with clear levels, which often appear in users' daily work and study life. Among them, mind mapping is an effective graphic thinking tool for expressing divergent thinking. In order to facilitate file transmission and user reading, mind maps usually exist in the form of images. However, when mind maps are stored and transmitted in image format, there is a big flaw - they can only support viewing but not editing.

[0003] Therefore, it is urgent to propose an efficient and reliable mind map restoration solution. Summary of the invention

[0004] The embodiments of the present invention improve the convenience and accuracy of structural image restoration by providing a structural image restoration method, device, electronic device, medium and program product.

[0005] In a first aspect, an embodiment of the present invention provides a method for restoring a structured image, comprising:

[0006] Obtaining a mirrored hierarchical structure picture, wherein the mirrored hierarchical structure picture is a hierarchical structure picture after image mirroring transformation;

[0007] Performing text recognition on the image hierarchy structure image to obtain the image text in the image hierarchy structure image;

[0008] Performing image image classification on the image text to obtain a target image classification of the image hierarchy structure picture;

[0009] The image hierarchical structure picture is restored according to the target image classification to obtain a corresponding restored hierarchical structure picture.

[0010] Optionally, the restoring the image hierarchical structure picture according to the target image classification to obtain a corresponding restored hierarchical structure picture includes:

[0011] According to the target image classification, the image hierarchical structure image is mirror-flipped accordingly to obtain a flipped hierarchical structure image, wherein the flipped hierarchical structure image includes a flipped text corresponding to the image text, a plurality of hierarchical nodes, and logical connections between the hierarchical nodes;

[0012] Reconstructing the structure of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure;

[0013] The flipped text and the reconstructed hierarchical structure are associated and matched to obtain the restored hierarchical structure image.

[0014] Optionally, the structural reconstruction of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure picture to obtain the reconstructed hierarchical structure includes:

[0015] Performing node extraction and line extraction on the flipped hierarchical structure image to obtain the multiple hierarchical nodes in the flipped hierarchical structure image and the logical lines between the hierarchical nodes;

[0016] The plurality of hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain the reconstructed hierarchical structure.

[0017] Optionally, the flipped text includes at least one flipped text line and the position of each flipped text line, and associating and matching the flipped text with the reconstructed hierarchical structure to obtain the restored hierarchical structure image includes:

[0018] According to the position of each flipped text line, each flipped text line is added to the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

[0019] Optionally, the method further comprises:

[0020] Receiving an editing instruction for the restored hierarchical structure picture, the editing instruction is used to edit target information in the restored hierarchical structure picture, the target information including at least one of the following: a target flip text line, a target hierarchical node, and a target logical connection;

[0021] In response to the editing instruction, corresponding editing processing is performed on the target information in the restored hierarchical structure picture.

[0022] Optionally, the restored hierarchical structure picture includes an editable reconstructed hierarchical structure picture, and the method further includes:

[0023] receiving an editing instruction for the reconstructed hierarchical structure diagram, wherein the editing instruction is used to edit the reconstructed hierarchical structure in the reconstructed hierarchical structure diagram;

[0024] In response to the editing instruction, corresponding editing processing is performed on the reconstructed hierarchical structure picture in the restored hierarchical structure picture.

[0025] Optionally, the mirror text includes at least one mirror text line, and performing image mirror classification on the mirror text to obtain a target mirror classification of the mirror hierarchical structure image includes:

[0026] Performing image mirror classification on each of the mirror text lines to obtain a text mirror classification of each of the mirror text lines;

[0027] When the number of mirror text lines of a preset mirror classification exceeds a preset threshold, the preset mirror classification is determined as a target mirror classification of the mirror hierarchy structure picture.

[0028] In a second aspect, an embodiment of the present invention provides a structured image restoration device, comprising:

[0029] An acquisition module, used to acquire a mirrored hierarchical structure picture, wherein the mirrored hierarchical structure picture is a hierarchical structure picture after image mirroring transformation;

[0030] A recognition module, used to perform text recognition on the image hierarchy structure image to obtain the image text in the image hierarchy structure image;

[0031] A classification module, used for performing image image classification on the image text to obtain a target image classification of the image hierarchy structure picture;

[0032] The restoration module is used to restore the image hierarchy picture according to the target image classification to obtain a corresponding restored hierarchy picture.

[0033] Optionally, the restoration module is specifically used to:

[0034] According to the target image classification, the image hierarchical structure image is mirror-flipped accordingly to obtain a flipped hierarchical structure image, wherein the flipped hierarchical structure image includes a flipped text corresponding to the image text, a plurality of hierarchical nodes, and logical connections between the hierarchical nodes;

[0035] Reconstructing the structure of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure;

[0036] The flipped text and the reconstructed hierarchical structure are associated and matched to obtain the restored hierarchical structure image.

[0037] Optionally, the restoration module is specifically used to:

[0038] Performing node extraction and line extraction on the flipped hierarchical structure image to obtain the multiple hierarchical nodes in the flipped hierarchical structure image and the logical lines between the hierarchical nodes;

[0039] The plurality of hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain the reconstructed hierarchical structure.

[0040] Optionally, the flipped text includes at least one flipped text line and the position of each flipped text line, and the restoration module is specifically used to:

[0041] According to the position of each flipped text line, each flipped text line is added to the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

[0042] Optionally, the device further includes a receiving module and a processing module, wherein:

[0043] The receiving module is used to receive an editing instruction for the restored hierarchical structure picture, wherein the editing instruction is used to edit target information in the restored hierarchical structure picture, wherein the target information includes at least one of the following: a target flip text line, a target hierarchical node, and a target logical connection;

[0044] The processing module is used to respond to the editing instruction and perform corresponding editing processing on the target information in the restored hierarchical structure picture.

[0045] Optionally, the mirror text includes at least one mirror text line, and the classification module is specifically used to:

[0046] Performing image mirror classification on each of the mirror text lines to obtain a text mirror classification of each of the mirror text lines;

[0047] When the number of mirror text lines of a preset mirror classification exceeds a preset threshold, the preset mirror classification is determined as a target mirror classification of the mirror hierarchy structure picture.

[0048] For parts that are not introduced or described in the embodiments of the present application, please refer to the relevant introduction in the aforementioned method embodiments, and will not be repeated here.

[0049] In a third aspect, an embodiment of the present invention provides an electronic device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to execute operation instructions corresponding to the structural image restoration method provided in the first aspect.

[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps corresponding to the structural image restoration method provided in the first aspect.

[0051] One or more technical solutions provided by the embodiments of the present invention achieve at least the following technical effects or advantages:

[0052] The solution provided by the embodiment of the present invention obtains a mirror image hierarchy picture, performs text recognition on the mirror image hierarchy picture, obtains the mirror text in the mirror image hierarchy picture, then performs image mirror classification on the mirror text to obtain the target mirror classification of the mirror image hierarchy picture, and finally restores the mirror image hierarchy picture according to the target mirror classification to obtain the corresponding restored hierarchy picture. In the above scheme, the target mirror classification of the picture can be identified based on the mirror text in the mirror image hierarchy picture, and then the initial mirror image hierarchy picture is restored according to the target mirror classification to obtain the final editable restored hierarchy picture, which can efficiently and accurately realize the rapid restoration of the mirror image hierarchy diagram, thereby improving the efficiency, accuracy and speed of structure diagram restoration. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0054] Figure 1 It is a flow chart of a structural image restoration method provided by an embodiment of the present invention.

[0055] Figure 2 It is a schematic diagram of an image hierarchy structure picture provided by an embodiment of the present invention.

[0056] Figure 3 It is a schematic diagram of a flipping hierarchical structure picture provided by an embodiment of the present invention.

[0057] Figure 4 It is a schematic diagram of flipping hierarchical structure information in a hierarchical structure picture provided by an embodiment of the present invention.

[0058] Figure 5 It is a schematic diagram of a reconstruction hierarchical structure provided by an embodiment of the present invention.

[0059] Figure 6 It is a structural schematic diagram of a structural image restoration device provided by an embodiment of the present invention.

[0060] Figure 7 It is a schematic diagram of the structure of another structural image restoration device provided by an embodiment of the present invention.

[0061] Figure 8 is a schematic diagram of an electronic device provided by an embodiment of the present invention.

[0062] Fig. 9 It is a structural diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The present invention provides a structured image restoration method, device, electronic device and readable storage medium to solve the technical problem that the mind map restoration cannot be achieved in the prior art. The overall idea is as follows:

[0064] Acquire a mirror hierarchical structure picture, wherein the mirror hierarchical structure picture is a hierarchical structure picture after image mirroring transformation; perform text recognition on the mirror hierarchical structure picture to obtain mirror text in the mirror hierarchical structure picture; perform image mirror classification on the mirror text to obtain a target mirror classification of the mirror hierarchical structure picture; perform restoration processing on the mirror hierarchical structure picture according to the target mirror classification to obtain a corresponding restored hierarchical structure picture.

[0065] Through the above technical solution, the target image classification of the image can be identified based on the image text in the image hierarchy picture, and then the initial image hierarchy picture is restored according to the target image classification to obtain the final editable restored hierarchy picture. This can efficiently and accurately realize the rapid restoration of the image hierarchy diagram, thereby improving the efficiency, accuracy and speed of structure diagram restoration.

[0066] Please refer to Figure 1 , is a flow chart of a structural image restoration method provided by an embodiment of the present invention. The method can be applied to a terminal device, such as a smart phone, a tablet computer, or a server that has established data interaction with the terminal device, or a system composed of a terminal device and a server, which is not limited by the present invention. Figure 1 The method shown comprises the following steps:

[0067] S101: Obtain a mirrored hierarchical structure picture, where the mirrored hierarchical structure picture is a hierarchical structure picture after image mirroring transformation.

[0068] The mirrored hierarchical structure image described in the present invention refers to a hierarchical structure image after image mirroring transformation, and the image mirroring transformation includes but is not limited to any one of the following mirroring transformations: horizontal mirroring, vertical mirroring and diagonal mirroring. Among them, horizontal mirroring refers to mirroring the left and right parts of the image with the vertical central axis of the image as the center. Vertical mirroring refers to swapping the upper and lower parts of the image with the horizontal central axis of the image as the center. Diagonal mirroring refers to mirroring the image with the intersection of the horizontal central axis and the vertical central axis of the image as the center, which is equivalent to mirroring the image horizontally and vertically in turn.

[0069] For example, see Figure 2A schematic diagram showing a possible image hierarchy structure picture is shown below. Figure 2 The mirrored hierarchical structure picture shown is specifically a hierarchical structure picture after vertical mirroring transformation.

[0070] The hierarchical structure image involved in the present invention refers to a structural image that can be used to represent hierarchical or level relationships. The structural image can clearly show the hierarchical relationships of each level, which may include but is not limited to mind maps, process structure images, tree structure images, or other customized structural images with hierarchical or level relationships.

[0071] S102: Perform text recognition on the image hierarchy structure image to obtain the image text in the image hierarchy structure image.

[0072] In one embodiment, the present invention may use text recognition technology to perform text recognition on the mirror hierarchical structure image to obtain the mirror text in the mirror hierarchical structure image. The text recognition technology includes but is not limited to optical character recognition (OCR), geometric feature extraction technology, or other technologies for text or text recognition. The mirror text refers to the text after the image is mirrored, which may include custom text in any format, such as bmp image format text, jpg image format text, etc.

[0073] In another embodiment, the present invention can use a pre-trained text recognition model to perform text recognition on the mirror hierarchical structure image to obtain the mirror text in the mirror hierarchical structure image. The text recognition model is pre-trained for identifying text information in a hierarchical structure image, which may include but is not limited to a feedforward neural network model, a convolutional neural network model, a deep residual network model, a recurrent neural network model, a long short-term memory model, or other machine learning models.

[0074] The mirror text involved in the present invention includes but is not limited to at least one mirror text line and the position (also referred to as position coordinates) of each mirror text line. The mirror text line can refer to lines of text content, or lines of text content and text boxes owned by the text content, which is not limited in the present invention. Optionally, the present invention takes the text line as an example of text content below to explain the relevant content, but does not constitute a limitation.

[0075] S103: Perform image image classification on the image text to obtain a target image classification of the image hierarchy structure picture.

[0076] In one embodiment, the present invention may use a pre-built variable-length text image classifier to perform image image classification on the image text to determine / obtain a target image classification of the image hierarchy structure image.

[0077] In another embodiment, the present invention may use a pre-trained image classification model to perform image image classification on the mirror text to obtain a target image classification of the mirror hierarchical structure image. The image classification model is a pre-trained model for text image classification, which may include but is not limited to a sequence to sequence (sequence to sequence, seq2seq) model, a bidirectional encoding representation model (encoder representations from transformers, BERT), a word to vector (Word2Vec) model, a text neural network model, or other models for text image classification.

[0078] In a specific embodiment, the mirror text includes at least one mirror text line. In the image mirror classification process, the present invention can specifically classify each mirror text line in the mirror text to obtain the text mirror classification of each mirror text line. When the number of mirror text lines corresponding to the preset mirror classification of the text mirror classification exceeds a preset threshold, it can be considered that the text mirror classification of most of the mirror text lines in the mirror text is the preset mirror classification, and then the preset mirror classification can be determined as the target mirror classification of the mirror hierarchy structure image. Otherwise, the process can be terminated.

[0079] The preset threshold is a threshold set by the system, which can be set according to the actual needs of the system or an experience value set according to user experience, etc., which is not limited in the present invention. The preset mirror classification, the text mirror classification and the target mirror classification involved in the present invention are all classifications pre-configured in the mirror classifier or the mirror classification model, which may include but are not limited to normal mirror classification, horizontal mirror classification, vertical mirror classification, diagonal mirror classification, or other customized mirror classifications.

[0080] S104: restore the image hierarchy picture according to the target image classification to obtain a corresponding restored hierarchy picture.

[0081] In a specific embodiment, the present invention can first perform image flipping processing corresponding to the target image classification on the image hierarchical structure image according to the target image classification to obtain a corresponding flipped hierarchical structure image, wherein the flipped hierarchical structure image includes flipped text corresponding to the image text, multiple hierarchical nodes, and logical connections between the hierarchical nodes. The flipped text specifically refers to the text obtained after the image text in the image hierarchical structure image is subjected to corresponding image flipping processing according to the target image classification.

[0082] Specifically, taking the target mirror classification including four mirror classifications as an example, it specifically includes: normal mirror classification, horizontal mirror classification, vertical mirror classification and diagonal mirror classification. When the mirror classification is normal mirror classification, the present invention can be based on the indication of the normal mirror classification, without mirror flipping the mirror hierarchical structure picture, at this time, the mirror hierarchical structure picture is the original hierarchical structure picture without any image transformation, and the subsequent steps can be continued.

[0083] When the target image classification is a horizontal image classification, the present invention can perform a corresponding horizontal image flip on the image hierarchy structure picture according to an indication of the horizontal image classification to obtain a corresponding flipped hierarchy structure picture.

[0084] When the target mirror classification is a vertical mirror classification, the present invention can perform a corresponding vertical mirror flip on the mirror hierarchical structure picture according to an indication of the vertical mirror classification to obtain a corresponding flipped hierarchical structure picture.

[0085] When the target mirror classification is a diagonal mirror classification, the present invention can perform a corresponding diagonal mirror flip on the mirror hierarchy structure picture according to an indication of the diagonal mirror classification to obtain a corresponding flipped hierarchy structure picture.

[0086] For example, citing Figure 2 As shown in the example of the vertical mirroring hierarchical structure picture, the present invention can be classified according to the target mirroring ( Figure 2 That is, vertical mirror classification) performs corresponding vertical mirror flipping processing on the mirror hierarchy structure picture, and the following can be obtained: Figure 3 Flip the hierarchy picture shown.

[0087] Next, after obtaining the flipped hierarchical structure picture, the present invention can perform structural reconstruction on the flipped hierarchical structure picture to obtain a corresponding reconstructed hierarchical structure. Specifically, the present invention can extract structural information from the flipped hierarchical structure picture (specifically, node extraction and line extraction can be performed) to obtain hierarchical structure information in the flipped hierarchical structure picture, and the hierarchical structure information includes multiple hierarchical nodes in the flipped hierarchical structure picture and logical connections between the hierarchical nodes. Then, the multiple hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain a corresponding reconstructed hierarchical structure.

[0088] In a specific implementation, the present invention can use a pre-trained guide line segmentation model to extract the logical connections between the hierarchical nodes in the flipped hierarchical structure image, so as to segment the logical connections from the image background of the flipped hierarchical structure image, thereby obtaining the logical connections between the hierarchical nodes in the flipped hierarchical structure image, and the number of the logical connections is not limited, and is usually multiple. The guide line segmentation model includes but is not limited to a contour extraction model, a Gaussian line extraction model, a multi-source image line extraction model, or other models for extracting image connections.

[0089] Accordingly, the present invention can also use a pre-trained key node detection model to detect and extract the hierarchical nodes in the flipped hierarchical structure image to obtain the hierarchical nodes in the flipped hierarchical structure image. The number of the hierarchical nodes is not limited, and the number of the hierarchical nodes of the flipped hierarchical structure image is usually multiple. The key node detection model includes but is not limited to a machine translation Tensorflow model, a finite element ANSYS extraction model, a feedforward neural network model, a convolutional neural network model, or other models for node extraction.

[0090] For example, see Figure 4 A schematic diagram showing a possible flipping of the hierarchical structure information in the hierarchical structure picture. Figure 4 As shown, the hierarchical structure information includes each hierarchical node in the flipped hierarchical structure picture and the logical connections between the hierarchical nodes. For example, the label ① in the diagram represents a hierarchical node, and the label ② in the diagram represents a logical connection.

[0091] After obtaining the hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image, the present invention can use a depth-first search algorithm based on point-line information to perform structural reconstruction on the hierarchical nodes and the logical connections between the hierarchical nodes to obtain the corresponding reconstructed hierarchical structure. Specifically, the present invention can use the above-mentioned depth-first search algorithm to perform information fusion on the hierarchical information and the logical connections between the hierarchical information, and determine whether any two of the hierarchical nodes have connectivity. If there is connectivity, the two hierarchical nodes with connectivity are connected together through corresponding logical connections; if there is no connectivity, the subsequent process continues, such as determining whether the other two hierarchical nodes have connectivity. Based on this principle, the reconstruction of the hierarchical structure information between nodes can be achieved to obtain the reconstructed hierarchical structure.

[0092] For example, see Figure 5 A schematic diagram of a possible reconstruction hierarchical structure is shown. Specifically, the present invention uses a depth-first search algorithm based on point-line information to Figure 4 The hierarchical structure information (specifically, multiple hierarchical nodes and logical connections between the hierarchical nodes) in the flipped hierarchical structure picture shown in FIG. 1 is reconstructed to obtain Figure 5 The reconstructed hierarchy is shown.

[0093] Finally, the present invention associates and matches the flipped text with the reconstructed hierarchical structure, thereby obtaining the restored hierarchical structure image corresponding to the mirrored hierarchical structure image. In a specific embodiment, the flipped text includes at least one flipped text line and the position of each flipped text line (i.e., the text box position). At this time, the present invention can add each flipped text to the corresponding position of the reconstructed hierarchical structure, such as the corresponding hierarchical node, etc., according to the position of each flipped text line, so as to obtain the restored hierarchical structure image. It can be understood that when the flipped text line includes the text content and text box of the flipped text line, the present invention can specifically add the text content corresponding to each flipped text line to the corresponding position (such as the hierarchical node) of the reconstructed hierarchical structure according to the position of each flipped text line, so as to achieve the linkage matching between the text content and the hierarchical node, so as to obtain the final restored hierarchical structure image.

[0094] In practical applications, the restored hierarchical structure image can be stored in a file of a preset format, such as a json file, etc. The restored hierarchical structure image can also be displayed to the user for viewing and editing in the form of a visual structure tree.

[0095] In an optional embodiment, after the present invention obtains the restored hierarchical structure image, some editing tools may be used to perform information editing processing, such as modification processing, on the restored hierarchical structure image. Specifically, the present invention may receive an editing instruction from a user for the restored hierarchical structure image, and the editing instruction is used to request editing processing of target information in the restored hierarchical structure image, and the target information includes at least one of the following: any target text line, any target hierarchical node, and any target logical connection in the restored hierarchical structure image. The number of the target text lines, the target hierarchical nodes, and the target logical connections is not limited, and can be determined according to the actual needs of the user.

[0096] Accordingly, after receiving the editing instruction, the present invention can respond to the editing instruction and perform corresponding editing processing on the target information in the restored hierarchical structure image, such as modifying a text line at a certain level node in the restored hierarchical structure image, etc.

[0097] It should be noted that the present application can perform corresponding editing processing on the editable text lines and / or editable hierarchical structure diagram in the restored hierarchical structure picture according to actual needs. Taking the example of only editing the hierarchical structure diagram in the restored hierarchical structure picture, the restored hierarchical structure diagram includes an editable reconstructed hierarchical structure diagram, and the reconstructed hierarchical structure diagram is composed of the reconstructed hierarchical structure. Specifically, when receiving an editing instruction for the reconstructed hierarchical structure diagram, the present application can respond to the editing instruction and perform corresponding editing / modification processing on the reconstructed hierarchical structure diagram in the restored hierarchical structure picture.

[0098] By implementing the embodiment of the present invention, the present invention obtains a mirror hierarchical structure image, performs text recognition on the mirror hierarchical structure image, obtains the mirror text in the mirror hierarchical structure image, then performs image mirror classification on the mirror text to obtain the target mirror classification of the mirror hierarchical structure image, and finally restores the mirror hierarchical structure image according to the target mirror classification to obtain the corresponding restored hierarchical structure image. In the above scheme, the target mirror classification of the image can be identified based on the mirror text in the mirror hierarchical structure image, and then the initial mirror hierarchical structure image is restored according to the target mirror classification to obtain the final editable restored hierarchical structure image, which can efficiently and accurately realize the rapid restoration of the mirror hierarchical structure diagram, thereby improving the efficiency, accuracy and speed of structure diagram restoration.

[0099] Based on the same inventive concept, the embodiments of this specification also provide a device and an electronic device corresponding to the structural image restoration method. Figure 6 , is a schematic diagram of a structural image restoration device provided by an embodiment of the present invention. Figure 6The device 60 shown includes: a text recognition module 601, a mirror image identification module 602, a structure restoration module 603 and an information fusion module 604. Among them:

[0100] The text recognition module 601 may also be referred to as an OCR recognition module, which is used to recognize text in a hierarchical structure image. For example, the text recognition module 601 in the present invention may be used to recognize mirror text in the mirror hierarchical structure image.

[0101] The image identification module 602 is used to identify the target image classification of the image hierarchy picture, and specifically can judge / identify the image text in the image hierarchy picture according to the image text in the image hierarchy picture.

[0102] The structure restoration module 603 is used to restore or reconstruct the hierarchical structure information in the image hierarchical structure picture according to the target image classification, and may specifically include a guide line segmentation unit 6031, a key node detection unit 6032 and a structure search unit 6033. Among them:

[0103] The guide line segmentation unit 6031 is used to extract guide lines (i.e., connections) from the hierarchical structure image to obtain logical connections between hierarchical nodes in the hierarchical structure image. Specifically, for example, the guide line segmentation unit 6031 in the present invention can be used to extract connections from the flipped hierarchical structure image.

[0104] The key node detection unit 6032 is used to extract nodes from the hierarchical structure picture to obtain multiple hierarchical nodes in the hierarchical structure picture. Specifically, for example, the key node detection unit 6032 in the present invention can be used to extract nodes from the flipped hierarchical structure picture.

[0105] The structure search unit 6033 can be used to process the information extracted by the guide line segmentation unit 6031 and the key node detection unit 6032. For example, the structure search unit 6033 in the present invention can be used to reconstruct the structure of multiple hierarchical nodes in the flipped hierarchical structure image and the logical connections between the hierarchical nodes, such as connectivity judgment between nodes and hierarchical structure reconstruction between nodes, so as to obtain a reconstructed hierarchical structure.

[0106] The information fusion module 604 is used to associate and match the flipped text corresponding to the mirror text with the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

[0107] For the contents not introduced or described in the embodiments of the present invention, please refer to the relevant introduction in the aforementioned method embodiments, which will not be repeated here.

[0108] Please also see Figure 7 , is a schematic diagram of another structural image restoration device provided by an embodiment of the present invention. Figure 7 The device 70 shown includes: an acquisition module 701, an identification module 702, a classification module 703 and a restoration module 704. Among them:

[0109] The acquisition module 701 is used to acquire a mirrored hierarchical structure picture, where the mirrored hierarchical structure picture is a hierarchical structure picture after image mirroring transformation;

[0110] The recognition module 702 is used to perform text recognition on the image hierarchy structure picture to obtain the image text in the image hierarchy structure picture;

[0111] The classification module 703 is used to perform image image classification on the image text to obtain a target image classification of the image hierarchy structure picture;

[0112] The restoration module 704 is used to restore the image hierarchy picture according to the target image classification to obtain a corresponding restored hierarchy picture.

[0113] Optionally, the restoration module 704 is specifically used for:

[0114] According to the target image classification, the image hierarchical structure image is mirror-flipped accordingly to obtain a flipped hierarchical structure image, wherein the flipped hierarchical structure image includes a flipped text corresponding to the image text, a plurality of hierarchical nodes, and logical connections between the hierarchical nodes;

[0115] Reconstructing the structure of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure;

[0116] The flipped text and the reconstructed hierarchical structure are associated and matched to obtain the restored hierarchical structure image.

[0117] Optionally, the restoration module 704 is specifically used for:

[0118] Performing node extraction and line extraction on the flipped hierarchical structure image to obtain the multiple hierarchical nodes in the flipped hierarchical structure image and the logical lines between the hierarchical nodes;

[0119] The plurality of hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain the reconstructed hierarchical structure.

[0120] Optionally, the flipped text includes at least one flipped text line and the position of each flipped text line, and the restoration module 704 is specifically used to:

[0121] According to the position of each flipped text line, each flipped text line is added to the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

[0122] Optionally, the device further includes a receiving module 705 and a processing module 706, wherein:

[0123] The receiving module 705 is used to receive an editing instruction for the restored hierarchical structure picture, where the editing instruction is used to edit target information in the restored hierarchical structure picture, where the target information includes at least one of the following: a target flip text line, a target hierarchical node, and a target logical connection;

[0124] The processing module 706 is used to respond to the editing instruction and perform corresponding editing processing on the target information in the restored hierarchical structure picture.

[0125] Optionally, the restored hierarchical structure picture includes an editable reconstructed hierarchical structure picture.

[0126] The receiving module 705 is further configured to receive an editing instruction for the reconstructed hierarchical structure diagram, wherein the editing instruction is used to edit the reconstructed hierarchical structure in the reconstructed hierarchical structure diagram;

[0127] The processing module 706 is further configured to respond to the editing instruction and perform corresponding editing processing on the reconstructed hierarchical structure picture in the restored hierarchical structure picture.

[0128] Optionally, the mirror text includes at least one mirror text line, and the classification module 703 is specifically used to:

[0129] Performing image mirror classification on each of the mirror text lines to obtain a text mirror classification of each of the mirror text lines;

[0130] When the number of mirror text lines of a preset mirror classification exceeds a preset threshold, the preset mirror classification is determined as a target mirror classification of the mirror hierarchy structure picture.

[0131] It should be noted that the identification module 702 in the device of the present invention may be used correspondingly Figure 6 The text recognition module 601 in the device shown in the figure is replaced by the recognition module 702. In other words, the recognition module 702 and the text recognition module 601 are modules with the same function. Figure 6 The image identification module 602 in the device shown in the figure is replaced by the restoration module 704 in the device of the present invention. Figure 6The structure restoration module 603 and the information fusion module 604 in the device shown in the figure are used as an alternative implementation. Regarding the device in the above embodiment, the specific way in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0132] Based on the same inventive concept, an embodiment of the present invention provides an electronic device 800, Figure 8 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0133] Reference Figure 8 , device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0134] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0135] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0136] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0137] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0138] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0139] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0140] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0141] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0142] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0144] Fig. 9 1 is a schematic diagram of the structure of the server in some embodiments of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0145] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0146] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute the structural image restoration method of the aforementioned embodiments.

[0147] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device (server or terminal), the computer device executes the above Figure 1 The description of the structural image restoration method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.

[0148] In addition, it should be noted that the embodiments of the present application also provide a computer program product or computer program embodiment involved in the present application for technical details not disclosed, please refer to the description of the method embodiment of the present application. The computer program product or computer program may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device executes the above Figure 1 The description of the structural image restoration method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.

[0149] One or more technical solutions provided by the embodiments of the present invention achieve at least the following technical effects or advantages: the present invention obtains a mirror hierarchical structure image, performs text recognition on the mirror hierarchical structure image, obtains the mirror text in the mirror hierarchical structure image, then performs image mirror classification on the mirror text to obtain the target mirror classification of the mirror hierarchical structure image, and finally restores the mirror hierarchical structure image according to the target mirror classification to obtain the corresponding restored hierarchical structure image. In the above scheme, the target mirror classification of the image can be identified based on the mirror text in the mirror hierarchical structure image, and then the initial mirror hierarchical structure image is restored according to the target mirror classification to obtain the final editable restored hierarchical structure image, which can efficiently and accurately realize the rapid restoration of the mirror hierarchical structure diagram, thereby improving the efficiency, accuracy and speed of structure diagram restoration.

[0150] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0151] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims. The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A structural image restoration method, characterized in that: include: Obtaining a mirrored hierarchical structure image, wherein the mirrored hierarchical structure image is a hierarchical structure image after image mirroring transformation; Performing text recognition on the image hierarchical structure image to obtain the mirror text in the image hierarchical structure image; Performing image mirror classification on the mirror text to obtain a target mirror classification of the mirror hierarchical structure image; The image hierarchical structure picture is restored according to the target image classification to obtain a corresponding restored hierarchical structure picture.

2. The method according to claim 1, characterized in that The restoring the image hierarchical structure picture according to the target image classification to obtain the corresponding restored hierarchical structure picture includes: According to the target image classification, the image hierarchical structure image is mirror-flipped accordingly to obtain a flipped hierarchical structure image, wherein the flipped hierarchical structure image includes flipped text corresponding to the image text, a plurality of hierarchical nodes, and logical connections between the hierarchical nodes; Reconstructing the structure of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure; The flipped text and the reconstructed hierarchical structure are correlated and matched to obtain the restored hierarchical structure image.

3. The method according to claim 2, characterized in that The structural reconstruction of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure includes: Performing node extraction and line extraction on the flipped hierarchical structure image to obtain the plurality of hierarchical nodes in the flipped hierarchical structure image and the logical lines between the hierarchical nodes; The plurality of hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain the reconstructed hierarchical structure.

4. The method according to claim 2, characterized in that The flipped text includes at least one flipped text line and the position of each flipped text line, and associating and matching the flipped text with the reconstructed hierarchical structure to obtain the restored hierarchical structure image includes: According to the position of each flipped text line, each flipped text line is added to the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

5. The method according to claim 4, characterized in that The method further comprises: receiving an editing instruction for the restored hierarchical structure image, the editing instruction being used to edit target information in the restored hierarchical structure image, the target information including at least one of the following: a target flipped text line, a target hierarchical node, and a target logical connection; In response to the editing instruction, corresponding editing processing is performed on the target information in the restored hierarchical structure picture.

6. The method according to claim 4, characterized in that The restored hierarchical structure image includes an editable reconstructed hierarchical structure image, and the method further includes: receiving an editing instruction for the reconstructed hierarchical structure diagram, wherein the editing instruction is used to edit the reconstructed hierarchical structure in the reconstructed hierarchical structure diagram; In response to the editing instruction, corresponding editing processing is performed on the reconstructed hierarchical structure picture in the restored hierarchical structure picture.

7. The method according to claim 1, characterized in that The mirror text includes at least one mirror text line, and performing image mirror classification on the mirror text to obtain a target mirror classification of the mirror hierarchical structure image includes: Performing image mirror classification on each of the mirror text lines to obtain a text mirror classification of each of the mirror text lines; When the number of mirror text lines of a preset mirror classification exceeds a preset threshold, the preset mirror classification is determined as a target mirror classification of the mirror hierarchical structure picture.

8. A structural image restoration device, characterized in that: include: An acquisition module is used to acquire a mirrored hierarchical structure picture, wherein the mirrored hierarchical structure picture is a hierarchical structure picture after image mirroring transformation; A recognition module, configured to perform text recognition on the image hierarchical structure image to obtain the mirror text in the image hierarchical structure image; A classification module, configured to perform image image classification on the image text to obtain a target image classification of the image hierarchical structure image; The restoration module is used to restore the image hierarchical structure picture according to the target image classification to obtain a corresponding restored hierarchical structure picture.

9. The device according to claim 8, characterized in that The restoration module is specifically used for: According to the target image classification, the image hierarchical structure image is mirror-flipped accordingly to obtain a flipped hierarchical structure image, wherein the flipped hierarchical structure image includes flipped text corresponding to the image text, a plurality of hierarchical nodes, and logical connections between the hierarchical nodes; Reconstructing the structure of the plurality of hierarchical nodes and the logical connections between the hierarchical nodes in the flipped hierarchical structure image to obtain a reconstructed hierarchical structure; The flipped text and the reconstructed hierarchical structure are correlated and matched to obtain the restored hierarchical structure image.

10. The device according to claim 9, characterized in that The restoration module is specifically used for: Performing node extraction and line extraction on the flipped hierarchical structure image to obtain the plurality of hierarchical nodes in the flipped hierarchical structure image and the logical lines between the hierarchical nodes; The plurality of hierarchical nodes and the logical connections between the hierarchical nodes are structurally reconstructed to obtain the reconstructed hierarchical structure.

11. The device according to claim 9, characterized in that The flipped text includes at least one flipped text line and the position of each flipped text line, and the restoration module is specifically configured to: According to the position of each flipped text line, each flipped text line is added to the reconstructed hierarchical structure to obtain the restored hierarchical structure image.

12. The device according to claim 11, characterized in that The device further includes a receiving module and a processing module, wherein: The receiving module is configured to receive an editing instruction for the restored hierarchical structure image, wherein the editing instruction is used to edit target information in the restored hierarchical structure image, wherein the target information includes at least one of the following: a target flipped text line, a target hierarchical node, and a target logical connection; The processing module is used to respond to the editing instruction and perform corresponding editing processing on the target information in the restored hierarchical structure picture.

13. An electronic device, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors to execute the operation instructions corresponding to the method according to any one of claims 1 to 7 contained in the one or more programs.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps corresponding to the method according to any one of claims 1 to 7 are implemented.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so as to enable a computer device having the processor to perform the method according to any one of claims 1 to 7.