Document merging system and method, equipment and medium
By introducing section break insertion and header/footer disconnection mechanisms into the document merging system, combined with a document format conversion module, the problem of format loss in merging multi-format documents is solved, achieving high-fidelity, lossless document merging results.
Patent Information
- Application Number
- CN202511880095.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-07
AI Technical Summary
Existing document merging solutions generally suffer from severe loss of formatting and header/footer information, especially when merging documents with multiple formats, as they cannot preserve the independent formatting and header/footer integrity of each document.
By integrating a verification and repair module into the document merging system and communicating with the document merging module, and inserting section breaks and disconnecting header and footer links during the merging process, combined with a document format conversion module, the system ensures that the section breaks, headers, and footers of the output document retain their original format.
It enables intelligent, automatic, and lossless batch merging of multi-format documents, ensuring that the format and header/footer integrity of each document are preserved, significantly improving the success rate and output quality of cross-format document merging.
Smart Images

Figure CN121807788A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of document merging, and in particular to a document merging system and method, equipment and medium. BACKGROUND
[0002] In daily office work, it is often necessary to merge multiple documents of formats such as Word (.doc / .docx), Excel (.xls / .xlsx) and PDF (.pdf) into a single document. However, the existing document merging solutions generally have a serious problem of format and header and footer loss, that is, when processing multiple Word documents, the traditional copy and paste or most document merging tools will merge all the contents into a continuous "section", which causes the header and footer of the subsequent document to be covered by the previous section, or the header and footer of the entire document to be unified, and the independent layout of each source document cannot be preserved. Although the existing technology involves document merging, the header and footer processing thereof relies on "inheritance" to achieve unification, which destroys the independence of the header and footer of the source document.
[0003] Therefore, there is an urgent need for a document merging solution that can intelligently, automatically and losslessly batch merge multiple format documents and ensure that the format and header and footer integrity of each document are preserved. SUMMARY
[0004] The present application provides a document merging system and method, equipment and medium to solve the problem of the existing document merging solutions that generally have a serious problem of format and header and footer loss.
[0005] The first aspect of the present application provides a document merging system for merging multiple to-be-merged documents of different or same formats, the system of the present application comprising an interaction and configuration module, a document analysis and routing module, a document merging module and a verification and repair module, wherein the interaction and configuration module comprises a document operation graphical interface configured to allow a user to add and sort the to-be-merged documents and set the output path, output format and merging options of the output document; the document analysis and routing module is in communication connection with the interaction and configuration module and the document format conversion module and is configured to identify the document extensions of the multiple to-be-merged documents and, based on the document extensions of the multiple to-be-merged documents and the output path, output format and merging options of the output document, dynamically route the multiple to-be-merged documents to the document format conversion module; the document merging module is in communication connection with the document analysis and routing module and the document format conversion module and is configured to merge the multiple to-be-merged documents to obtain the output document; and the verification and repair module is in communication connection with the document merging module and is configured to verify and repair the header and footer of the output document so that the sectioning, header and footer of all the documents in the output document remain the original format before merging.
[0006] In some embodiments of the present application, the system of the present application further comprises: a document format conversion module, wherein the document format conversion module is in communication connection with the document analysis and routing module and the document merging module, and is configured to convert the document format of the one or more to-be-merged documents and transmit it to the document merging module for merging processing when the one or more to-be-merged documents are not in the set output format.
[0007] In some embodiments of the present application, the document merging module of the present application comprises: a PDF document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.pdf transmitted by the document analysis and routing module and / or the document format conversion module; a Word document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.docx or.doc transmitted by the document analysis and routing module and / or the document format conversion module; and an Excel document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.xlsx transmitted by the document analysis and routing module and / or the document format conversion module.
[0008] In some embodiments of the present application, the PDF document merger is configured to automatically insert a "next page section break" at the end of each to-be-merged document with the document extension name.pdf after receiving it, and merge the to-be-merged documents in the order of reception.
[0009] In some embodiments of the present application, the Word document merger is configured to automatically insert a "next page section break" at the end of each to-be-merged document with the document extension name.docx or.doc after receiving it, embed each to-be-merged document into an output document, and set the document connection property of the to-be-merged document embedded in the output document to "false", and locate each section break in the output document and set the previous section connection property of the header and footer of the to-be-merged document corresponding to the section break to "false".
[0010] In some embodiments of the present application, the Excel document merger is configured to automatically insert a "next page section break" at the end of each to-be-merged document with the document extension name.xlsx after receiving it, and merge the to-be-merged documents in the order of reception.
[0011] In some embodiments of the present application, one section marker corresponds to one section, the output document includes multiple sections, and the checking and repairing module is configured to traverse each section in the output document, check the previous section connection attribute of the header and footer of each section, modify the previous section connection attribute to "false" if the previous section connection attribute is detected to be "true", and replace the header and footer of each section with the content of the header and footer of the corresponding source document of the section to complete the checking and repairing of the header and footer of the output document.
[0012] The second aspect of the present application provides a document merging method, and the method of the present application includes: importing multiple to-be-merged documents into the document merging system of claim 1; and performing merging processing on the multiple to-be-merged documents by the document merging system.
[0013] The third aspect of the present application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method of the second aspect in the above embodiments when executing the computer program.
[0014] The fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, and the program instructions are executed by a processor to implement the method of the second aspect in the above embodiments.
[0015] The present application has the following beneficial effects: the present application provides a document merging system, the system includes an interaction and configuration module, a document analysis and routing module, a document merging module, and a checking and repairing module, the checking and repairing module is communicatively connected with the document merging module in the system, and the checking and repairing module is used for checking and repairing the header and footer of the output document, so that the sectioning, header, and footer of all documents in the output document remain the original format before merging. In this way, multiple format documents can be intelligently, automatically, and losslessly merged in batches, and the format and header and footer integrity of each document are preserved. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the technical solutions of the present application together with the specification.
[0017] Figure 1 is a frame schematic diagram of the first embodiment of the document merging system provided by the present application; Figure 2 is a frame schematic diagram of the second embodiment of the document merging system provided by the present application; Figure 3 is a frame schematic diagram of the third embodiment of the document merging system provided by the present application; Figure 4 is a flowchart of an embodiment of a PDF document merger provided by the present application performing a document merging operation; Figure 5 is a flowchart of an embodiment of a Word document merger provided by the present application performing a document merging operation; Figure 6 is a flowchart of an embodiment of an Excel document merger provided by the present application performing a document merging operation; Figure 7 is a flowchart of an embodiment of a Word document merging operation provided by the present application; Figure 8 is a block diagram of an embodiment of an electronic device provided by the present application; Figure 9 is a block diagram of an embodiment of a computer readable storage medium provided by the present application. DETAILED DESCRIPTION
[0018] The scheme of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0019] In the following description, specific details are set forth in order to provide a thorough understanding of the present application. However, persons having ordinary skill in the art will appreciate that the present application can be practiced without the specific details.
[0020] The term "and / or" herein merely describes an association relationship of associated objects, and means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally means that the front and rear associated objects are in an "or" relationship. In addition, "multiple" herein means two or more than two. In addition, the term "at least one" herein means any one of multiple or any combination of at least two of multiple, for example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0021] As described in the background, the existing document merging solutions generally have a serious loss of format and header and footer, and therefore there is an urgent need for a document merging solution that can intelligently, automatically, and losslessly batch merge multiple format documents and ensure that the format and header and footer integrity of each document is preserved.
[0022] To solve the above problems, the present application proposes a new document merging scheme. In the scheme of the present application, a verification and repair module is integrated in the document merging system and is in communication connection with the document merging module. The verification and repair module is used to verify and repair the header and footer of the output document, so that the sectioning, header and footer of all documents in the output document remain the original format before merging. In this way, multiple format documents can be intelligently, automatically and losslessly merged in batches, and the format and header and footer integrity of each document are preserved.
[0023] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0024] According to one embodiment of the present application, as shown in Figure 1 and 2 , the present application proposes a document merging system for merging multiple documents to be merged of different or same formats. The system of the present application includes an interaction and configuration module, a document analysis and routing module, a document merging module, and a verification and repair module. The interaction and configuration module includes a document operation graphical interface configured to allow a user to add and sort the documents to be merged, and set the output path, output format and merging options of the output document. The document analysis and routing module is in communication connection with the interaction and configuration module and the document format conversion module, and is configured to identify the document extension of the multiple documents to be merged, and based on the document extension of the multiple documents to be merged and the output path, output format and merging options of the output document, dynamically route the multiple documents to be merged to the document format conversion module. The document merging module is in communication connection with the document analysis and routing module and the document format conversion module, and is configured to merge the multiple documents to be merged to obtain the output document. The verification and repair module is in communication connection with the document merging module, and is configured to verify and repair the header and footer of the output document, so that the sectioning, header and footer of all documents in the output document remain the original format before merging.
[0025] The inventor has also found through research that some existing document merging schemes have low or no cross-format merging support: most tools only support the merging of single format documents. For the merging needs of mixed Word, Excel and PDF documents, although the existing technology proposes the idea of converting different formats to a temporary target format before merging, its focus is on preserving directories, links and other "additional information", and does not solve the problem of maintaining the original format layout and header and footer when merging different format documents into Word or PDF. In actual tests, the failure rate of mixed merging is extremely high.
[0026] Therefore, in the present embodiment, as shown in Figure 1 and 3As shown, the system of the present application further comprises: a document format conversion module: wherein the document format conversion module is in communication connection with the document analysis and routing module, the document merging module, and is configured to convert the document format of one or more to-be-merged documents and transmit it to the document merging module for merging processing when the to-be-merged documents are not in the set output format.
[0027] As can be known from the above description, by introducing the document format conversion module, the embodiment effectively solves the problems of layout distortion, header and footer disorder, and high failure rate caused by format heterogeneity in the merging process of mixed format documents (such as Word, Excel, PDF) in the prior art; the module can uniformly and accurately convert the documents in non-target format to the set output format (such as Word or PDF or Excel) before merging, and focus on preserving the original layout structure and key format elements such as header and footer during the conversion process, thereby significantly improving the success rate and output quality of cross-format document merging, and realizing high-fidelity and high-compatibility one-stop mixed document merging.
[0028] In the embodiment, still referring to Figure 1 As shown, the document merging module of the present application comprises: a PDF document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.pdf transmitted by the document analysis and routing module and / or the document format conversion module; a Word document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.docx or.doc transmitted by the document analysis and routing module and / or the document format conversion module; and an Excel document merger in communication connection with the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to perform merging processing on the to-be-merged documents with the document extension name.xlsx transmitted by the document analysis and routing module and / or the document format conversion module.
[0029] As can be known from the above description, by setting the dedicated PDF, Word, and Excel document mergers and working cooperatively with the document analysis and routing module, the format conversion module, and the verification and repair module, the embodiment not only can realize high-fidelity merging of 100% preservation of the original independent format, header, footer, and section settings for documents of the same format (such as multiple Word files), but also can efficiently handle mixed scenarios of heterogeneous formats such as Word, Excel, and PDF, and uniformly output them as a single PDF file, while ensuring the lossless restoration of key format elements such as layout, header, and footer of each source document in the final PDF, thereby significantly improving the compatibility, stability, and output quality of cross-format document merging.
[0030] In the embodiment, asFigure 4 As shown in the PDF document merger of the present application is configured to perform the document merging operation according to the following steps S1-S2: S1, after receiving each to-be-merged document with the document extension name.pdf, automatically inserting a "next page section marker" at the end of the to-be-merged document; S2, merging the to-be-merged documents in the order of reception.
[0031] In this embodiment, as shown in the Word document merger of the present application is configured to perform the document merging operation according to the following steps T1-T3: T1, after receiving each to-be-merged document with the document extension name.docx or.doc, automatically inserting a "next page section marker" at the end of the to-be-merged document; T2, embedding each to-be-merged document into the output document, and setting the document connection property of the to-be-merged document embedded in the output document to "false"; T3, locating each section marker in the output document, and setting the previous section connection property of the header and footer of the to-be-merged document corresponding to the section marker to "false". Figure 5 In this embodiment, as shown in the Excel document merger of the present application is configured to perform the document merging operation according to the following steps P1-P2: P1, after receiving each to-be-merged document with the document extension name.xlsx, automatically inserting a "next page section marker" at the end of the to-be-merged document; P2, merging the to-be-merged documents in the order of reception.
[0032] Figure 6 As can be seen from the above description, the present embodiment effectively realizes the clear isolation of the format boundaries of the multi-source documents in the merging process by introducing a unified "next page section marker" insertion mechanism in the PDF, Word and Excel document mergers, and combining the embedded property control and the header and footer "LinkToPrevious" disconnection operation specific to the Word document. Not only does it ensure the independent section structure of each source document and the header and footer content is not disturbed or covered by the subsequent document, but it also avoids the format pollution problem caused by the default link to the previous section. Especially in the Word merging, by explicitly setting the connection property of the embedded document to "false" and disconnecting the association between the header and footer and the previous section, the format integrity of each source document is completely guaranteed, thereby significantly improving the accuracy, stability and professionalism of the same format and cross-format merging results.
[0033] The inventor has also found through research that the existing document merging solutions have low automation and poor stability. Solutions that rely on the Microsoft Office COM (Component Object Model) interface frequently pop up warning windows during execution, and there is a memory leakage problem caused by the failure to completely release the process, which cannot achieve stable and silent background batch processing.
[0034] The inventor has also found through research that the existing document merging solutions have low automation and poor stability. Solutions that rely on the Microsoft Office COM (Component Object Model) interface frequently pop up warning windows during execution, and there is a memory leakage problem caused by the failure to completely release the process, which cannot achieve stable and silent background batch processing.
[0035] Thus, in the present embodiment, still referring to Figure 1 As shown, the document merging system of the present application further comprises: a global singleton manager, which is in communication connection with the Word document merger, the Excel document merger, and the document format conversion module, and is configured to manage COM objects of the to-be-merged documents with the document extension.docx or.doc and the to-be-merged documents with the document extension.xlsx in the singleton mode, wherein only one COM instance is created and reused throughout the entire document merging process, and the reuse rate of the COM objects is increased by more than 300%, greatly reducing resource consumption and startup time; a double-silence setter, which is in communication connection with the Word document merger, the Excel document merger, and the document format conversion module, and is configured to set Application.Visible = "False" and Application.DisplayAlerts = "False" at the same time when the COM objects are obtained, so as to eliminate user interface interference and pop-up warnings during the merging operation; and a resource release controller, which is in communication connection with the Word document merger, the Excel document merger, and the document format conversion module, and is configured with an atexit function and an application exit event listener, to ensure that when the merging document operation ends, whether normally or abnormally, the Quit() method of the COM object is forcibly called, and pythoncom.CoUninitialize() is executed to perform memory cleaning, so as to minimize the risk of memory leakage.
[0036] As can be known from the above description, the present embodiment introduces a global singleton manager, a double-silence setter, and a resource release controller, which significantly optimize the performance and stability of the document merging based on the COM objects: the global singleton manager ensures that only one COM instance of Word or Excel is created throughout the merging process and is reused efficiently, so that the reuse rate of the COM objects is increased by more than 300%, greatly reducing the startup overhead and system resource occupation; the double-silence setter synchronously closes the interface display and warning pop-up (Visible = False and DisplayAlerts = False) when the COM objects are obtained, to realize completely background silent running and avoid user interference; and the resource release controller registers the atexit function and listens to the application exit event, to forcibly call Quit() and execute pythoncom.CoUninitialize() when the program normally or abnormally terminates, to completely release the COM resources and effectively prevent memory leakage. The three work together to make the system have the advantages of high performance, high reliability, and low resource consumption in the high-concurrency and multi-format mixed merging scenarios.
[0037] Still referring to Figure 1As shown, in the embodiment, the document merging system further comprises an output and cleaning module, which is in communication connection with the checking and repairing module and is configured to save the output document, clean the temporary document, and release the COM resource. The document merging system further comprises a UUID temporary directory generator, an authority controller, and a physical destroyer, which are in communication connection with the output and cleaning module, the UUID temporary directory generator is configured to generate a unique temporary directory using UUID, and all temporary documents in the conversion process are operated in this directory, wherein the temporary document is a single document used in the process of merging the to-be-merged document or a document generated in the process of converting the document format; the authority controller is configured to set the system authority to be accessible only by the current user; and the physical destroyer is configured to, after the completion of the merging task, call shutil.rmtree to forcibly delete the entire temporary directory, so that the sensitive temporary file cannot be recovered and the security standards such as NIST SP 800-88 are met.
[0038] As can be known from the above description, the embodiment cooperates the output and cleaning module with the UUID temporary directory generator, the authority controller, and the physical destroyer to build a safe, reliable, and compliant temporary file management mechanism: the system generates a unique temporary directory using UUID during the merging process to ensure that there is no conflict when multiple tasks are run in parallel; the directory access authority is strictly limited to the current user by the authority controller to prevent unauthorized access; and the physical destroyer calls shutil.rmtree to forcibly and completely delete the entire temporary directory after the completion of the task, so that the sensitive intermediate file cannot be left or recovered, and the data security destruction standards such as NIST SP 800-88 are met. This way not only guarantees the isolation and privacy of the document processing process, but also significantly improves the security and compliance level of the system, effectively preventing information security risks caused by temporary file leakage.
[0039] The present application provides a document merging method, which comprises the following steps: introducing a plurality of to-be-merged documents into the document merging system according to claim 1; and performing merging processing on the plurality of to-be-merged documents by the document merging system.
[0040] In order to verify the effectiveness of the above embodiment, the inventors performed the following experiment: 1. High-fidelity merging process of Word documents based on Python and COM As Figure 7As shown, (1) the user selects multiple Word documents and determines the order through the GUI (GUI is graphical interface of document operation) in the document merging system; (2) the document merging system calls get_word_application() to obtain (or create) a silent Word COM instance; (3) the document merging system creates a new blank Word output document as the merging target; (4) loop processing each source file: a, if not the first document, insert a wdSectionBreakNextPage section break at the end of the output document; b, embed the content of the document to be merged into the current end of the output document; c, immediately set the LinkToPrevious property (previous section connection property) of the header and footer of the section where the newly inserted content is located to False to block format inheritance; d, after merging is completed, the header verification module can be optionally called for final scanning and repair; e, save the output document and release the COM resource.
[0041] 2. Merging process of mixed format documents to PDF (1) The user selects Word, Excel, and PDF mixed files; (2) The document merging system creates a temporary directory; (3) The file analysis and routing module judges each document to be merged, if it is a PDF, it is directly added to the list of PDFs to be merged; if it is a Word or Excel, the document format conversion module is started, and the corresponding COM interface is called in silent mode to convert it into a high-quality PDF temporary file, and the temporary file path is added to the list of documents to be merged; (4) Use the PDF document merger to merge all PDF files (original PDF + converted temporary PDF) in order; (5) Call the physical destroyer to securely delete the entire temporary directory; (6) Output the final merged PDF, which is the corresponding output document.
[0042] 3. Workflow of the verification and repair module (1) Trigger: automatically call the verification and repair module after the document merging module completes the merging process; (2) Traversal: loop through each section (Section) in the output document; (3) Diagnosis: for each section, check the LinkToPrevious state of its first page header, odd-even page header, and footer; (4) Repair: restore the original header content from the backup or source file to ensure correctness; (5) Generate a repair output document or record a log.
[0043] In summary, the present application proposes a system and method for intelligent batch merging of files, the core inventive concept of which is that through the combination of four technologies of "dynamic format conversion + forced section isolation + header inheritance chain blocking + automated post-verification", compared with the prior art, the present application has the following significant advantages: 100% format retention rate: through the dual mechanisms of section symbol isolation and header inheritance chain blocking, the industry problem of loss of headers and footers during merging of Word documents is successfully solved, achieving a retention rate of 100%, which is much higher than that of traditional tools (≤20%); True lossless merging of mixed formats: the original document format conversion module realizes lossless conversion and merging of Word, Excel and PDF into a single PDF, solving the problem of high failure rate (>95%) of mixed merging of market tools; Efficiency is greatly improved: through COM object reuse, multithreading and silent operation, the merging time of 80 documents is shortened from 180 seconds of traditional tools to 35 seconds, with an efficiency improvement of more than 80%; Industrial-grade stability and security: the COM object life cycle management mechanism reduces the risk of memory leakage by more than 83%, and the safety sandbox (i.e. global singleton manager, double silent setter and resource release controller) design ensures zero residual of temporary files, meeting the requirements of enterprise-level continuous operation and data security compliance. The experimental results are shown in Table 1.
[0044] Table 1. Performance comparison of existing document merging tools and the document merging system of the present application
[0045] Based on the inventive concept of the above embodiments, the present application also provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the above embodiments when executing the computer program. The following will be described in detail in combination with Figure 8
[0046] As shown in Figure 8 , it shows the electronic device of the present application, which can specifically include a processor 110 and a memory 120. The memory 120 is coupled to the processor 110.
[0047] The processor 110 is used to control the operation of the electronic device, and the processor 110 can also be referred to as a CPU (Central Processing Unit). The processor 110 can be an integrated circuit chip with signal processing capability. The processor 110 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor can be a microprocessor or the processor 110 can also be any conventional processor.
[0048] The memory 120 is configured to store a computer program, and can be a RAM, a ROM, or other types of storage terminals. Specifically, the memory 120 can include one or more computer-readable storage media, which can be non-transitory or transitory. The memory 120 can further include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage terminals, flash storage terminals. In some embodiments, the non-transitory computer-readable storage medium in the memory 120 is configured to store at least one program code.
[0049] The processor 110 is configured to execute the computer program stored in the memory 120 to implement the methods described in the method embodiments of the present application.
[0050] In some embodiments, the electronic device can further include a peripheral terminal interface 130 and at least one peripheral terminal. The processor 110, the memory 120, and the peripheral terminal interface 130 can be connected through a bus or a signal line. Each peripheral terminal can be connected to the peripheral terminal interface 130 through a bus, a signal line, or a circuit board. Specifically, the peripheral terminal includes at least one of a radio frequency circuit 140, a display screen 150, an audio circuit 160, and a power supply 170.
[0051] The peripheral terminal interface 130 can be used to connect at least one peripheral terminal related to I / O (Input / output) to the processor 110 and the memory 120. In some embodiments, the processor 110, the memory 120, and the peripheral terminal interface 130 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 110, the memory 120, and the peripheral terminal interface 130 can be implemented on a separate chip or circuit board, and the present embodiment is not limited in this regard.
[0052] The radio frequency circuit 140 is configured to receive and send RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 140 communicates with communication networks and other wireless devices through electromagnetic signals. The radio frequency circuit 140 is the communication circuit of the electronic device. The radio frequency circuit 140 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 140 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operating personnel identity module, and the like. The radio frequency circuit 140 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 140 can also include NFC (Near Field Communication) related circuitry, which is not limited in this application.
[0053] The display screen 150 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 150 is a touch display screen, the display screen 150 also has the ability to collect touch signals on or above the surface of the display screen 150. The touch signals can be input as control signals to the processor 110 for processing. At this time, the display screen 150 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 150 can be one, arranged on the front panel of the electronic device; in other embodiments, the display screen 150 can be at least two, arranged on different surfaces of the electronic device or in a folding design; in other embodiments, the display screen 150 can be a flexible display screen, arranged on a curved surface or a folding surface of the electronic device. Even, the display screen 150 can also be arranged in an irregular shape other than a rectangle, i.e., a special-shaped screen. The display screen 150 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
[0054] The audio circuit 160 can include a microphone and a speaker. The microphone is used to collect sound waves of the operator and the environment, and convert the sound waves into an electrical signal input to the processor 110 for processing, or input to the radio frequency circuit 140 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, respectively arranged at different parts of the electronic device. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert the electrical signal from the processor 110 or the radio frequency circuit 140 into sound waves. The speaker can be a traditional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into a sound wave that humans can hear, but also can be converted into a sound wave that humans cannot hear for ranging purposes. In some embodiments, the audio circuit 160 can also include a headphone jack.
[0055] The power supply 170 is used to supply power to each component in the electronic device. The power supply 170 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 170 includes a rechargeable battery, the rechargeable battery can be a wired charging battery or a wireless charging battery. The wired charging battery is a battery charged through a wired line, and the wireless charging battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0056] For the detailed description of the functions and execution processes of each functional module or component in the electronic device embodiments of the present application, reference can be made to the description of each method embodiment of the present application described above, which will not be repeated here.
[0057] In several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the above-described electronic device embodiments are only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0058] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0059] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0060] Based on the inventive concept of the above embodiments, this application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the method described in any of the above embodiments. The following is in conjunction with... Figure 9 This describes the execution process of the above embodiments on a computer-readable storage medium.
[0061] like Figure 9 As shown, it illustrates the computer-readable storage medium of this application. The integrated units described above, if implemented as software functional units and sold or used as independent products, can be stored in the computer-readable storage medium 200. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions / computer programs to cause an Internet of Things device (which may be a personal computer, server, or network terminal, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as electronic terminals such as computers, mobile phones, laptops, tablets, and cameras that have the aforementioned storage media.
[0062] The execution process of program data in a computer-readable storage medium can be described with reference to the above-described method embodiments of this application, and will not be repeated here.
[0063] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0064] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
Claims
1. A document merging system for merging multiple documents of different or identical formats, characterized in that, The system includes an interaction and configuration module, a document analysis and routing module, a document merging module, and a verification and repair module, wherein... The interaction and configuration module includes a graphical interface for document operations, which is configured to allow users to add and sort documents to be merged, and set the output path, output format, and merging options for the output documents. The document analysis and routing module is communicatively connected to the interaction and configuration module and the document format conversion module. It is configured to identify the document extensions of multiple documents to be merged, and dynamically route multiple documents to be merged to the document format conversion module based on the document extensions of multiple documents to be merged and the output path, output format and merging options of the output document. The document merging module is communicatively connected to the document analysis and routing module and the document format conversion module, and is configured to merge multiple documents to be merged to obtain the output document; The verification and repair module is communicatively connected to the document merging module and is configured to verify and repair the headers and footers of the output document so that the section breaks, headers, and footers of all documents in the output document retain their original format before merging.
2. The document merging system according to claim 1, characterized in that, The system also includes: a document format conversion module; wherein, The document format conversion module is communicatively connected to the document analysis and routing module and the document merging module. It is configured to convert the document format of the documents to be merged and transmit them to the document merging module for merging processing when one or more of the documents to be merged are not in the set output format.
3. The document merging system according to claim 2, characterized in that, The document merging module includes: The PDF document merger is communicatively connected to the document analysis and routing module, the verification and repair module, and the document format conversion module, and is configured to merge the documents to be merged that have the document extension .pdf transmitted by the document analysis and routing module and / or the document format conversion module. A Word document merger, communicatively connected to the document analysis and routing module, the verification and repair module, and the document format conversion module, is configured to merge documents to be merged that have the document extension .docx or .doc transmitted by the document analysis and routing module and / or the document format conversion module. An Excel document merger is communicatively connected to the document analysis and routing module, the verification and repair module, and the document format conversion module. It is configured to merge documents with the .xlsx extension transmitted by the document analysis and routing module and / or the document format conversion module.
4. The document merging system according to claim 3, characterized in that, The PDF document merger is configured as follows: Upon receiving each of the documents to be merged with the file extension .pdf, a "next page section break" is automatically inserted at the end of the document to be merged. The documents to be merged will be merged in the order they are received.
5. The document merging system according to claim 3, characterized in that, The Word document merger is configured as follows: Upon receiving each of the documents to be merged with the document extension .docx or .doc, a "next page section break" is automatically inserted at the end of the document to be merged; Each of the documents to be merged is embedded into the output document, and the document connection attribute of the document to be merged embedded in the output document is set to "false"; Locate each section break in the output document and set the previous section connection attribute of the header and footer of the document to be merged corresponding to the section break to "false".
6. The document merging system according to claim 3, characterized in that, The Excel document merger is configured as follows: Upon receiving each document to be merged with the file extension .xlsx, a "next page section break" is automatically inserted at the end of the document to be merged. The documents to be merged will be merged in the order they are received.
7. The document merging system according to any one of claims 4-6, characterized in that, A section break corresponds to a section, and the output document includes multiple sections. The verification and repair module is configured to: traverse each section in the output document and check the previous section connection attribute of the header and footer of each section. If the previous section connection attribute is detected as "true", the previous section connection attribute is modified to "false", and the content of the header and footer of the source document corresponding to each section is obtained to replace the header and footer of that section, so as to complete the verification and repair of the header and footer of the output document.
8. A document merging method, characterized in that, The method includes: Import multiple documents to be merged into the document merging system as described in claim 1; The document merging system performs merging processing on multiple documents to be merged.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as claimed in claim 8.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method of claim 8.
