Layout document processing method and device, electronic equipment and readable storage medium
1. A processing method of a layout document comprises the following steps:
acquiring a format document to be processed;
analyzing the content of the layout document to obtain character information of the layout document;
and according to the document image of the layout document and the character information of the layout document, carrying out layout analysis on the layout document so as to obtain the document layout of the layout document.
2. The method of claim 1, wherein the content parsing the layout document to obtain character information of the layout document comprises:
and performing text analysis and/or image analysis on the layout document to obtain character information of the layout document.
3. The method of claim 1, wherein the performing layout parsing on the layout document according to the document image of the layout document and the character information of the layout document to obtain the document layout of the layout document comprises:
according to the document image of the layout document and the character information of the layout document, carrying out region division processing on characters in the layout document to obtain at least one region;
in each area of the at least one area, adjusting characters in the layout document by using attribute information of paragraph layout to obtain paragraph information of the layout document and page information of the layout document.
4. The method according to claim 3, wherein before performing the region division processing on the characters in the layout document according to the document image of the layout document and the character information of the layout document to obtain at least one region, the method further comprises:
generating a document image of a layout document according to the layout document of the text type; or
And directly taking the layout document of the picture type as a document image of the layout document.
5. The method according to claim 3, wherein the performing area division processing on the characters in the layout document according to the document image of the layout document and the character information of the layout document to obtain at least one area comprises:
obtaining partition information of the layout document by using an image algorithm according to the document image of the layout document;
and according to the partition information of the layout document and the character information of the layout document, performing area division processing on characters in the layout document to obtain at least one area and characters in each area in the at least one area.
6. The method according to any one of claims 3-5, wherein the performing layout parsing on the layout document according to the document image of the layout document and the character information of the layout document to obtain the document layout of the layout document further comprises:
and according to the document image of the format document, identifying a table in the format document to obtain table information of the format document.
7. The method according to claim 6, wherein the identifying, according to the document image of the layout document, the table in the layout document to obtain the table information of the layout document comprises:
obtaining a frame line in the layout document by utilizing an image algorithm according to the document image of the layout document;
and obtaining the table information of the table in the layout document according to the frame line in the layout document.
8. A layout document processing apparatus comprising:
the file acquisition unit is used for acquiring a format file to be processed;
the content analysis unit is used for carrying out content analysis on the layout document so as to obtain character information of the layout document;
and the layout analysis unit is used for carrying out layout analysis on the layout document according to the document image of the layout document and the character information of the layout document so as to obtain the document layout of the layout document.
9. The apparatus of claim 8, wherein the content parsing unit is specifically configured to
And performing text analysis and/or image analysis on the layout document to obtain character information of the layout document.
10. The apparatus according to claim 8, wherein the layout resolution unit is specifically configured to
According to the document image of the layout document and the character information of the layout document, carrying out region division processing on characters in the layout document to obtain at least one region; and
in each area of the at least one area, adjusting characters in the layout document by using attribute information of paragraph layout to obtain paragraph information of the layout document and page information of the layout document.
11. The apparatus of claim 10, wherein the layout parsing unit is further configured to
Generating a document image of a layout document according to the layout document of the text type; or
And directly taking the layout document of the picture type as a document image of the layout document.
12. The apparatus according to claim 10, wherein the layout resolution unit is specifically configured to
Obtaining partition information of the layout document by using an image algorithm according to the document image of the layout document; and
and according to the partition information of the layout document and the character information of the layout document, performing area division processing on characters in the layout document to obtain at least one area and characters in each area in the at least one area.
13. The apparatus according to any of claims 10-12, wherein the layout parsing unit is further configured to
And according to the document image of the format document, identifying a table in the format document to obtain table information of the format document.
14. The apparatus according to claim 13, wherein the layout resolution unit is specifically configured to
Obtaining a frame line in the layout document by utilizing an image algorithm according to the document image of the layout document; and
and obtaining the table information of the table in the layout document according to the frame line in the layout document.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
Background
The layout document refers to a document conforming to the format specification of the layout document, and the position, the size, the style and the like of each page element display are definitely recorded in a self-defined coordinate system by adopting an absolute description mode. The format document format is an electronic document format with a fixed layout presentation effect, the presentation of the format document is irrelevant to a terminal, and the presentation results of the layout are consistent when the layout document format is read, printed or printed on various terminals. More and more electronic books, product descriptions, company reports, network materials, and e-mails are beginning to use layout documents, for example, a Portable Document Format (PDF) Document is a more typical layout Document.
In the processing of a layout document, in some cases, for example, extracting the content of a specific position in the layout document, the document layout may have a great influence on the result.
Disclosure of Invention
The disclosure provides a format document processing method and device, electronic equipment and a readable storage medium.
According to an aspect of the present disclosure, there is provided a method for processing a layout document, including:
acquiring a format document to be processed;
analyzing the content of the layout document to obtain character information of the layout document;
and according to the document image of the layout document and the character information of the layout document, carrying out layout analysis on the layout document so as to obtain the document layout of the layout document.
According to another aspect of the present disclosure, there is provided a layout document processing apparatus including:
the file acquisition unit is used for acquiring a format file to be processed;
the content analysis unit is used for carrying out content analysis on the layout document so as to obtain character information of the layout document;
and the layout analysis unit is used for carrying out layout analysis on the layout document according to the document image of the layout document and the character information of the layout document so as to obtain the document layout of the layout document.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the aspects and any possible implementation described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the above-described aspect and any possible implementation.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the aspect and any possible implementation as described above.
According to the technical scheme, the layout document to be processed is obtained, and then the content of the layout document is analyzed to obtain the character information of the layout document, so that the layout document can be subjected to layout analysis according to the document image of the layout document and the character information of the layout document to obtain the document layout of the layout document.
In addition, by adopting the technical scheme provided by the disclosure, the user experience can be effectively improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed for the embodiments or the prior art descriptions will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to the drawings without inventive labor. The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1A is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 1B is a schematic diagram illustrating a layout analysis in the embodiment corresponding to FIG. 1A;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
fig. 3 is a block diagram of an electronic device to implement a method of processing a layout document according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is to be understood that the described embodiments are only a few, and not all, of the disclosed embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terminal device involved in the embodiments of the present disclosure may include, but is not limited to, a mobile phone, a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), and other intelligent devices; the display device may include, but is not limited to, a personal computer, a television, and the like having a display function.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
More and more electronic books, product descriptions, company reports, network materials, and e-mails are beginning to use layout documents, for example, a Portable Document Format (PDF) Document is a more typical layout Document.
For these layout documents, a user needs to obtain not only all the text information in the document, but also the position information of each character, and the paragraph information, the page information, and other document layouts of the whole page, so that the user can further process the document contents of the layout documents on this basis, for example, the contents at specific positions in two documents need to be extracted for document comparison, or the information position of the document label and the information position of the document extraction need to be judged when the document contents are labeled and extracted. In further processing, the document layout has a large impact on the processing results, e.g., "wrapping" in the paragraph layout may result in erroneous processing results.
Therefore, in order to effectively improve the reliability of the layout document processing, it is necessary to accurately analyze the document layout of the layout document.
Fig. 1A is a schematic diagram according to a first embodiment of the present disclosure, as shown in fig. 1A.
101. And acquiring a layout document to be processed.
102. And analyzing the content of the layout document to obtain the character information of the layout document.
103. And according to the document image of the layout document and the character information of the layout document, carrying out layout analysis on the layout document so as to obtain the document layout of the layout document.
Therefore, for a layout document given by a user, the document layout necessary for further processing the layout document can be obtained, and the method has higher flexibility and reliability.
It should be noted that part or all of the execution subjects of 101 to 103 may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in a text processing platform on the network side, and the like, which is not particularly limited in this embodiment.
It is to be understood that the application may be a native application (native app) installed on the local terminal, or may also be a web page program (webApp) of a browser on the local terminal, which is not limited in this embodiment.
In this way, by acquiring the format document to be processed and then analyzing the content of the format document to obtain the character information of the format document, the layout of the format document can be analyzed according to the document image of the format document and the character information of the format document to obtain the document layout of the format document.
In the disclosure, the format document to be processed refers to any document conforming to the format specification of the format document, and the position, the size, the style and the like of each page element display are definitely recorded in a self-defined coordinate system by adopting an absolute description mode.
In 102, the parsed character information of the layout document refers to the character content and character attributes of each character presented in the layout document, such as position, size, style, color, and the like.
Through the implementation mode, the general characters and the special characters in the format document can be analyzed to be used as the processing input of 102, so that the layout analysis processing of the general characters, the layout analysis processing of the table and the layout analysis processing of the special characters can be carried out on the general characters and the special characters.
Optionally, in a possible implementation manner of this embodiment, in 102, an existing content parsing method may be specifically adopted to perform content parsing on the layout document so as to obtain character information of the layout document.
Specifically, text parsing and/or image parsing may be performed on the layout documents according to different types of layout documents to obtain character information of the layout documents. And a proper analysis method is adopted to analyze the content of the format document, so that the reliability of the content analysis of the format document can be effectively improved.
Generally, layout documents can be classified into a text type and a picture type, that is, a text type layout document and a picture type layout document. The text type format document is mainly a format document obtained by directly coding text information, and the picture type format document is mainly a format document converted from a scanned piece, a picture and the like.
In a specific implementation process, text analysis may be specifically performed on text content in a layout document of a text type to obtain character information of the layout document.
Generally, a layout document of text type mainly includes text objects. The text in the format can be selected by a mouse, the document belongs to a result obtained by directly coding the text information, and the contained text information can be analyzed by a reverse decoding method, for example, for a text type PDF document, the contained text information can be analyzed by a PDFminer analyzer through a reverse decoding method.
In this case, the parsed text information may be character information of general characters such as letters and characters, or may also be character information of special characters such as lines and figures, which is not particularly limited in this embodiment.
In another specific implementation process, the picture analysis may be specifically performed on the layout document of the picture type to obtain the character information of the layout document.
The picture type format document is mainly a format document converted from a scanning piece, a picture and the like, the document displays text information in a picture form, the text information contained in the format document cannot be acquired by directly performing text analysis on the format document, and only a picture object can be acquired.
In this case, the parsed text information may be character information of general characters such as letters and characters, which is not particularly limited in this embodiment.
For the character information analyzed by the OCR method, whether the character information is rotated or not and the angle of the rotation can be further calculated according to the position information of the character, and the position of the analyzed character information is corrected, so that the obtained analysis result is more real and reliable.
In order to obtain a better analysis effect, before the analysis of the picture object, the picture object may be further subjected to image enhancement processing and then subjected to content analysis. The image enhancement may be to adjust brightness, contrast, gray scale processing, etc. to highlight character portions for ease of resolution.
In another specific implementation process, picture analysis may be specifically performed on picture content in a text-type layout document to obtain character information of the layout document.
In addition to the text object, the text type format document may also include an image object, and then, for the text content in the text type format document, a reverse decoding method is adopted to perform text parsing to obtain character information included in the text content, and further, for the picture content in the text type format document, an OCR method is adopted to perform picture parsing to obtain character information included in the image content.
In the implementation manner, for the analysis of the text object, the corresponding text information and the layout information (e.g., position, size, style, color, etc.) of the text information in the page can be analyzed through the existing analysis technology of the layout document; for the parsing of the picture object, corresponding text information and layout information (e.g., position, size, style, etc.) of the text information in the page may be recognized through an OCR method.
Based on the determination of the parsing modes (parsing modes, including parsing modes for all text objects, parsing modes for all picture objects, and parsing modes for splitting text objects and picture objects respectively), the content parsing of the whole layout document can be completed through the joint parsing of the text objects and the picture objects.
In this implementation manner, in the parsing process, repeated characters may occur, and then, deduplication processing may be further performed according to the character positions in the character information and further in combination with the similarity between the characters, so as to obtain the character information of the layout document after adjustment. Wherein, special characters such as lines and figures allow repetition without performing deduplication processing.
Optionally, in a possible implementation manner of this embodiment, in 103, specifically, according to the document image of the layout document and the character information of the layout document, a region division process may be performed on characters in the layout document to obtain at least one region. Furthermore, in each of the at least one region, the character in the layout document may be adjusted by using the attribute information of the paragraph layout, so as to obtain the paragraph information of the layout document and the page information of the layout document.
The area may be a column, a block, or both, which is not particularly limited in this embodiment.
In this way, by introducing attribute information of the paragraph layout, such as attributes of line head, indentation, line spacing and the like, the document layout of the layout document can be accurately restored, and the reliability of document layout acquisition of the layout document is further improved.
In a specific implementation process, in this implementation manner, a document image of the layout document may be further obtained.
For example, a document image of a layout document may be generated according to the layout document of a text type.
Because the image is generated by converting the format document in a non-scanning form, the quality of the image is very high, image correction operations such as noise elimination, image rotation and the like do not need to be considered, and the reliability of document image acquisition is effectively improved. Then, the document image can be directly converted into a gray-scale image, and then the document image is converted into a black-and-white image through binarization so as to carry out the basis of subsequent proceeding.
Or, for another example, the layout document of the picture type may be directly used as the document image of the layout document.
Since the image is a scanned or picture format document, the quality is usually uneven, and image correction operations such as noise elimination and image rotation need to be considered to obtain a high-quality document image, so that the reliability of document image acquisition is effectively improved.
In another specific implementation process, the partition information of the layout document may be obtained by using an image algorithm specifically according to the document image of the layout document, and then, according to the partition information of the layout document and the character information of the layout document, the characters in the layout document may be subjected to region division processing to obtain at least one region and characters in each region in the at least one region.
Specifically, the document image can be directly converted into a grayscale image, and then binarized into a black-and-white image. Wherein the background of the document is black and the characters of the document are white. Furthermore, the partition information of the layout document, that is, the position range of the column and/or the position range of the block, may be obtained by using an image algorithm, for example, an XY Cut algorithm, according to a preset line spacing threshold and/or a preset column spacing threshold. Then, after obtaining the partition information of the layout document, the partition information of the layout document and the character information of the layout document may be further utilized to perform region division processing on characters in the layout document to obtain at least one region and characters in each region in the at least one region. And the connection sequence of the characters in each area is obtained by sequencing according to the positions in the character information of the layout document.
In another specific implementation process, in this implementation manner, in each region of the at least one region, the characters in each region may be specifically subdivided by using attribute information of the paragraph layout, for example, attributes such as line head, indentation, line space, and the like, to obtain paragraph information of the layout document. Furthermore, the special fields of each page of the layout document, such as header fields, footer fields, etc., can be determined according to the paragraph information of the layout document. Then, global information of the page is utilized to judge the similarity of the special fields so as to obtain page information of the layout document.
For example, the similarity between the special fields can be used to determine the similarity of the special fields to determine which special fields are header fields, which special fields are footer words, and so on. If the similarity exceeds a preset similarity threshold, such as 0.8, the contents of the special field may be determined to be the same, i.e., a header field or a footer field.
Or, for another example, sometimes headers or footers are simple numbers (e.g. first page "1", second page "2"), so that if the similarity is used, then another determination mechanism may be introduced: based on cognition: the text format length of the header or the footer of each page should be the same, and then the header or the footer should be the same or similar for a layout document, and then when the length of a special field of most pages, for example, more than 50%, of the pages is X, it is possible that the special field is the header or the footer.
In another specific implementation process, in this implementation manner, a table in the layout document may be further identified according to a document image of the layout document, so as to obtain table information of the layout document.
Specifically, the frame line in the layout document may be obtained by using an image algorithm according to the document image of the layout document, and further, the table information of the table in the layout document may be obtained according to the frame line in the layout document.
In this way, the form information of the form in the format document can be effectively identified by the image algorithm through the document image of the format document, so that the reliability of the document layout acquisition of the format document is further improved.
For example, all the frame lines in the table contained in the layout document may be obtained as table line segments by an image algorithm according to the document image of the layout document. Then, all table line segments are connected further according to the position information of the table line segments.
However, the table forms are various, and there are a large number of default frame lines, so there is no closed outer contour structure, and the table cannot be identified by using the outer contour detection method. After a large amount of form data is observed, although a form lacks a few frame lines for the sake of aesthetic appearance, few forms have no line information at all and only contain characters, and particularly, lines exist at the boundary positions of the form areas basically to help readers distinguish the form from the text parts. Therefore, the frame can be filled in a contour line manner.
For example, most default bars of tables are mostly vertical bars, and the upper and lower table border bars are usually reserved.
In this embodiment, in the process of performing layout analysis processing, the layout document to be processed after content analysis processing may be subjected to region division processing, and the document content in each region of the layout document after the region division processing is subjected to layout analysis processing by performing layout analysis processing on general characters and layout analysis of a table in the layout document, so as to obtain paragraph information of the layout document, page information of the layout document, and table information of the layout document, and further, the paragraph information of the layout document, the page information of the layout document, the table information of the layout document, and character information of special characters are subjected to mixed layout processing, so as to obtain the document layout of the layout document, as shown in fig. 1B.
In this embodiment, the document type may be determined by the document attribute or the type information transmitted by the user, and if not, the document type may be determined according to the suffix of the document. If the document type is a streaming document, the document layout of the streaming document can be obtained by adopting the existing processing method of the streaming document; if the document type is a layout document, the document layout of the layout document can be obtained by adopting the processing method of the layout document provided by the disclosure.
In this embodiment, by obtaining a format document to be processed and then performing content analysis on the format document to obtain character information of the format document, the layout document can be subjected to layout analysis according to a document image of the format document and the character information of the format document to obtain a document layout of the format document.
In addition, by adopting the technical scheme provided by the disclosure, manual operation is not needed, the operation is simple, errors are not easy to occur, and the efficiency and the reliability of processing the layout document can be further improved.
In addition, by adopting the technical scheme provided by the disclosure, the user experience can be effectively improved.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required for the disclosure.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure, as shown in fig. 2. The processing apparatus 200 of the layout document of the present embodiment may include a document acquisition unit 201, a content parsing unit 202, and a layout parsing unit 203. The document acquiring unit 201 is configured to acquire a layout document to be processed; a content analysis unit 202, configured to perform content analysis on the layout document to obtain character information of the layout document; the layout analysis unit 203 is configured to perform layout analysis on the layout document according to the document image of the layout document and the character information of the layout document, so as to obtain a document layout of the layout document.
Therefore, for a layout document given by a user, the document layout necessary for further processing the layout document can be obtained, and the method has higher flexibility and reliability.
It should be noted that, part or all of the processing apparatus of the layout document in this embodiment may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in a text processing platform on the network side, and this embodiment is not particularly limited in this respect.
It is to be understood that the application may be a native application (native app) installed on the local terminal, or may also be a web page program (webApp) of a browser on the local terminal, which is not limited in this embodiment.
Optionally, in a possible implementation manner of this embodiment, the content parsing unit 202 may be specifically configured to perform text parsing and/or image parsing on the layout document to obtain character information of the layout document.
Optionally, in a possible implementation manner of this embodiment, the layout analysis unit 203 may be specifically configured to perform area division processing on characters in the layout document according to a document image of the layout document and character information of the layout document to obtain at least one area; and
in each area of the at least one area, adjusting characters in the layout document by using attribute information of paragraph layout to obtain paragraph information of the layout document and page information of the layout document.
In a specific implementation process, the layout analysis unit 203 may be further configured to generate a document image of a layout document according to the layout document of a text type; or directly using the format document of the picture type as the document image of the format document.
In another specific implementation process, the layout analysis unit 203 may be specifically configured to obtain partition information of the layout document by using an image algorithm according to a document image of the layout document; and according to the partition information of the layout document and the character information of the layout document, performing area division processing on characters in the layout document to obtain at least one area and characters in each area in the at least one area.
In another specific implementation process, the layout analysis unit 203 may be further configured to perform recognition processing on a table in the layout document according to a document image of the layout document, so as to obtain table information of the layout document.
Specifically, the frame line in the layout document can be obtained by using an image algorithm according to the document image of the layout document; and obtaining table information of a table in the layout document according to the frame line in the layout document.
In this embodiment, a format document to be processed is acquired by the document acquisition unit, and then the content analysis unit performs content analysis on the format document to acquire character information of the format document, so that the layout analysis unit can perform layout analysis on the format document according to a document image of the format document and the character information of the format document to acquire a document layout of the format document.
In addition, by adopting the technical scheme provided by the disclosure, manual operation is not needed, the operation is simple, errors are not easy to occur, and the efficiency and the reliability of processing the layout document can be further improved.
In addition, by adopting the technical scheme provided by the disclosure, the user experience can be effectively improved.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 3 illustrates a schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 3, the electronic device 300 includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)302 or a computer program loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 can also be stored. The calculation unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
A number of components in the electronic device 300 are connected to the I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 301 executes the respective methods and processes described above, such as the processing method of the layout document. For example, in some embodiments, the method of processing the layout document may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 300 via the ROM 302 and/or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the above-described processing method of the layout document may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the processing method of the layout document by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable form factor document processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.