A pptx file splitting and merging method and device
By establishing the association between pages and resources in a PPTX file, the problem of resource call failure after PPTX file splitting was solved, achieving lossless splitting and merging, and supporting online and offline collaboration and version management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CAIXUAN TECH CO LTD
- Filing Date
- 2022-12-23
- Publication Date
- 2026-04-24
AI Technical Summary
During offline collaboration on PPT documents, resource access failures occurred after splitting the .pptx file, resulting in file corruption.
By parsing the tree-like organizational structure of the PPTX file, the association between pages and resources is constructed, and corresponding resources are configured for each page during the splitting process to avoid resource calls depending on other pages.
It achieves lossless splitting of PPTX files, ensuring that each page can independently access resources within the file, avoiding splitting corruption, and supporting online and offline collaboration and version management.
Smart Images

Figure CN116227441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of document processing technology, and in particular to a method and apparatus for splitting and merging pptx files. Background Technology
[0002] When a team collaborates on a PowerPoint presentation, multiple roles typically divide the work and follow a workflow to complete the overall writing task. During the task, a task leader distributes the sections of the presentation to collaborators to write the content. Afterward, the team follows a workflow to merge the content, ensure consistency in style, polish, update, and manage the entire lifecycle of the document.
[0003] Currently, collaborative work on PPT documents is usually done offline: all participants have a local copy of the content they are responsible for, and they complete the writing, modification and updating work on their respective copies, which are then handed over to the person in charge for unified merging and management.
[0004] In offline collaboration, a single resource in a PowerPoint file may be shared by multiple PowerPoint slides. However, the resource is only associated with the initial slide where it first appears. Other slides that need to use the resource access the resource link from the initial slide. If the PowerPoint file is split, other slides may fail to access the resource, resulting in corruption of the split PowerPoint file. Summary of the Invention
[0005] The purpose of this application is to provide a method and apparatus for splitting and merging PPTX files, so as to solve the problem of corruption during PPTX file splitting. The specific technical solution is as follows:
[0006] Firstly, a method for splitting .pptx files is provided, the method comprising:
[0007] The content of the pptx file is parsed based on the tree-like organizational structure in the pptx file, and the association between each page and the resources required by the page is constructed. The tree-like organizational structure indicates the content organization form in the pptx file.
[0008] Upon receiving a segmentation instruction, resources are configured for each segmented page according to the aforementioned association.
[0009] According to the preset configuration rules, at least one first sub-file is constructed based on the page after configuring resources, so that collaborators can modify the content of the first sub-file.
[0010] Optionally, the step of parsing the content of the pptx file based on its tree-like organizational structure and constructing the association between each page and the resources required for that page includes:
[0011] Get the .pptx file;
[0012] Traverse the entire contents of the pptx file based on the tree-like organizational structure in the pptx file;
[0013] By analyzing the resources required for each page, the association between each page and the resources required for that page is constructed.
[0014] Optionally, upon receiving a segmentation instruction, based on the aforementioned association, configuring corresponding resources for each segmented page includes:
[0015] Upon receiving a splitting instruction, the pptx file is split into multiple single-page pages;
[0016] Based on the aforementioned relationships, configure corresponding resources for each segmented page.
[0017] Optionally, according to preset configuration rules, at least one first sub-file is constructed based on the page after configuring resources, including:
[0018] Determine the number of the first sub-files;
[0019] Each page configured with resources is divided into at least one sub-file, resulting in at least one first sub-file, wherein each first sub-file includes at least one page.
[0020] Secondly, a method for merging PPTX files corresponding to the above-mentioned method is provided, the method comprising:
[0021] Upon receiving a merge instruction, multiple second sub-files are assembled according to a preset assembly order to obtain the target file. The second sub-files are the pptx files whose content has been modified by the collaborator.
[0022] Analyze whether there are duplicate resources in the target file;
[0023] If there are duplicate resources, one duplicate resource is retained, and the duplicate resource is inserted into the corresponding page according to the association relationship. The non-duplicate resources are also inserted into the corresponding pages. The association relationship refers to the correspondence between each page and the resources required by the page.
[0024] Optionally,
[0025] Assemble multiple second sub-files according to a preset assembly order to obtain a target file, including: determining each page in the second sub-files to be merged, wherein each page corresponds to a page version, and the resources and pages correspond to each other; sorting each page according to a preset assembly order to obtain the target file;
[0026] Determining whether there are duplicate resources in the target file includes: selecting resources with the same attributes from all the resources corresponding to all pages in the target file; comparing the resources with the same attributes to determine whether there are duplicate resources.
[0027] Optionally,
[0028] Assemble multiple second sub-files according to a preset assembly order to obtain a target file, including: determining the selected version of each page in the second sub-files to be merged, wherein each page corresponds to at least two page versions, and the resources and page versions correspond to each other; sorting the selected versions of the pages according to the preset assembly order to obtain the target file;
[0029] The process of analyzing whether there are duplicate resources in the target file includes: determining the target resources corresponding to the selected version in the target file; selecting resources with the same attributes from the target resources; and comparing the resources with the same attributes to determine whether there are duplicate resources.
[0030] Thirdly, a device for splitting .pptx files is provided, the device comprising:
[0031] The parsing module is used to parse the content of the pptx file based on the tree-like organizational structure in the pptx file, and to construct the association between each page and the resources required by the page, wherein the tree-like organizational structure indicates the content organization form in the pptx file;
[0032] The configuration module is used to configure corresponding resources for each segmented page according to the association relationship when a segmentation instruction is received;
[0033] The build module is used to construct at least one first sub-file based on the page after configuring resources, according to preset configuration rules, so that collaborators can modify the content of the first sub-file.
[0034] Fourthly, a merging apparatus for .pptx files is provided, the apparatus comprising:
[0035] The assembly module is used to assemble multiple second sub-files according to a preset assembly order when a merge instruction is received, to obtain the target file. The second sub-files are the pptx files whose content has been modified by the collaborator.
[0036] The parsing module is used to parse whether there are duplicate resources in the target file;
[0037] The insertion module is used to retain one duplicate resource if there is a duplicate resource, and insert the duplicate resource into the corresponding page according to the association relationship, and insert the non-duplicate resource into the corresponding page. The association relationship refers to the correspondence between each page and the resources required by the page.
[0038] Fifthly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0039] Memory, used to store computer programs;
[0040] A processor, when executing a program stored in memory, implements the steps of any of the described methods for splitting and merging pptx files.
[0041] Beneficial effects of the embodiments in this application:
[0042] This application provides a method for splitting and merging PPTX files, which can configure corresponding resources for the split pages without calling resources from other pages. Even if the PPTX file is split into multiple first sub-files, each page can call the resources existing in the PPTX file package without failure, thus avoiding damage caused by splitting the PPT file.
[0043] Of course, implementing any product or method of this application does not necessarily require achieving all of the above advantages at the same time. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A schematic diagram of the hardware environment for a method of splitting and merging .pptx files provided in this application embodiment;
[0046] Figure 2 A flowchart illustrating a method for splitting and merging .pptx files provided in this application embodiment;
[0047] Figure 3 A schematic diagram of a device for splitting and merging .pptx files provided in this application embodiment;
[0048] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module" and "part" may be used interchangeably.
[0051] To address the problems mentioned in the background art, according to one aspect of the embodiments of this application, an embodiment of a method for splitting and merging pptx files is provided.
[0052] Optionally, in the embodiments of this application, the above-described method for splitting and merging .pptx files can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 101 and server 103. Figure 1 As shown, server 103 is connected to terminal 101 via a network and can be used to provide services to the terminal. Database 105 can be set up on the server or independently of the server to provide data storage services for server 103. The network mentioned above includes, but is not limited to, wide area network, metropolitan area network or local area network. Terminal 101 includes, but is not limited to, PC, mobile phone, tablet computer, etc.
[0053] A method for splitting a pptx file in this embodiment can be executed by a terminal 101 or a server 103. The method for splitting a pptx file can be executed by the server 103 to enable lossless splitting and merging of pptx files.
[0054] The following will describe in detail a method for splitting and merging .pptx files provided in this application embodiment, with reference to specific implementation methods. Figure 2 As shown, the specific steps are as follows:
[0055] Step 201: Based on the tree-like organizational structure in the pptx file, parse the content of the pptx file and construct the relationship between each page and the resources required by the page.
[0056] The tree-like organizational structure indicates the way the content is organized in a .pptx file.
[0057] In this embodiment, a plugin is provided that can be inserted into application software such as PowerPoint or WPS to perform the following segmentation operation. The terminal obtains a .pptx file. The images, text, colors, and link resources in the .pptx file are presented in a tree structure (XML format). The terminal traverses the entire content of the .pptx file based on this tree structure, parses the resources required for each page, and constructs the association between each page and its required resources.
[0058] Each page may or may not have any resources. Resources refer to the resources used by the page, such as images, audio and video, links, etc. Resources are stored in the pptx file package.
[0059] Step 202: Upon receiving the splitting instruction, configure the corresponding resources for each split page according to the association relationship.
[0060] In this embodiment, when the terminal receives the splitting instruction, it splits the pptx file into multiple single pages. Since the resources corresponding to each page are already configured in the association relationship, the terminal can configure the corresponding resources for each split page according to the association relationship. That is, for the page that needs to be associated with resources, the corresponding resources exist in the pptx file package, and it is not necessary to call the links of other pages to obtain the resources.
[0061] Step 203: According to the preset configuration rules, construct at least one first sub-file based on the page after configuring resources, so that collaborators can modify the content of the first sub-file.
[0062] In this embodiment, the terminal determines the number of the first sub-files that need to be split. This number can be set according to the work content or the number of collaborators. This application does not impose any specific restrictions.
[0063] The terminal divides each page after configuring resources into at least one sub-file. That is, each page is divided into one first subfolder, or multiple first subfolders. Each first sub-file contains at least one page, thus obtaining at least one first sub-file. The first sub-file can be opened normally in various PPT authoring tools (such as PowerPoint, WPS, etc.) and can be edited by collaborators.
[0064] In this application, corresponding resources can be configured for the split pages without calling resources from other pages. Even if the pptx file is split into multiple first sub-files, each page can call the resources existing in the pptx file package without failure, thus avoiding damage caused by splitting the PPT file.
[0065] In addition, existing online collaboration technologies involve participants collaborating on the same cloud document online via a browser. Online collaboration is impossible without a network environment, and current online collaboration tools differ from everyday PPT writing tools (PowerPoint, WPS, etc.) in terms of capabilities and file formats, making them incompatible for use together.
[0066] Compared with existing technologies, this application can distribute the first sub-file to each collaborator for editing. Each collaborator can edit the content without using the network, and there will be no incompatibility issues between online collaboration tools and daily PPT writing tools.
[0067] Based on the same technical concept, this application also provides a method for merging .pptx files, applied to a server. The method includes: upon receiving a merge instruction, assembling multiple second sub-files according to a preset assembly order to obtain a target file, wherein the second sub-files are .pptx files whose content has been modified by collaborators; parsing whether there are duplicate resources in the target file; if there are duplicate resources, retaining one duplicate resource and inserting the duplicate resource into the corresponding page according to the association relationship, and inserting the non-duplicate resources into the corresponding page, wherein the association relationship refers to the correspondence between each page and the resources required by the page.
[0068] In this application, the collaborator edits the first sub-file using a terminal to obtain a modified second sub-file, which is then uploaded to the server. If the server needs to merge multiple second sub-files into a complete pptx file, it needs to sort the second sub-files according to the original order of the first sub-files within the pptx file to obtain the target file, which contains no duplicate pages.
[0069] In this scenario, different first sub-files may contain the same page, leading to situations where different collaborators edit the same page. When a collaborator uploads the edited second sub-file to the server, the same page will have different page versions on the server. This avoids the problem of version overwriting and loss of previous versions, allowing technicians to choose to download the required page version from the server.
[0070] Since multiple pages can reference the same resource, there's a possibility of resource duplication within the target file, meaning the resource appears multiple times. This can increase the file size of the target file. Therefore, the server needs to parse the resources in the target file to determine if there are duplicate resources.
[0071] If there are duplicate resources, for each duplicate resource, retain one of them and insert it into the corresponding page, while the others are deleted. The resource storage method remains the same as before the split: the first page to reference the resource calls it from the PPTX file package, and subsequent pages referencing the resource call the resource link from the first page that referenced it. For unique resources, insert them into the corresponding pages.
[0072] After sorting each second sub-file, the server inserts the resources into the corresponding page to generate a complete .pptx file that can be edited and used normally.
[0073] This application retains only one duplicate resource when merging PPTX documents, thus reducing the file size of the PPTX file.
[0074] Generating and parsing target files includes two implementation methods:
[0075] In one embodiment, each page in the target file corresponds to only one page version, and resources and pages correspond to each other; that is, each page corresponds to 0, 1, or more resources. The terminal determines each page in the second sub-file to be merged, sorts each page according to a preset assembly order, and obtains the target file.
[0076] The server identifies all resources corresponding to all pages of the target file, and then selects resources with the same attributes from these resources. Attributes refer to the unique identifiers of a resource, ensuring that these attributes remain unchanged even if a collaborator modifies the content of the resource. The server compares resources with the same attributes to determine if there are duplicates. This comparison can involve comparing resource space usage, image dimensions, video duration, etc. The comparison method for different resources can be determined based on the actual situation, and will not be elaborated upon in this application.
[0077] In another embodiment, each page in the target file corresponds to at least two page versions, and resources correspond to page versions, meaning that different page versions may correspond to the same or different resources. The server obtains multiple page versions of a page and selects one version (the selected version) for page sorting to obtain the target file; the server determines the resources corresponding to the target page of the selected version in the target file, and then selects resources with the same attributes from the target resources, compares the resources with the same attributes, and determines whether there are duplicate resources.
[0078] This application establishes a collaborative management method for PPTX that combines online and offline processes. It can support offline editing of the first sub-file and online automatic or manual merging and version management of the second sub-file.
[0079] When communicating between a terminal and a cloud server (e.g., transmitting slides), the encryption mechanism between the two parties is as follows: A (one of the terminal and the cloud server) sends n characters from its own identifier (which can be a device identifier or account; if this information is not binary encoded, it is converted to binary encoding) (if the i-th bit of its own identifier is 0, then the first n bits of its own identifier are taken; if the i-th bit of its own identifier is 1, then the last n bits of its own identifier are taken, where i is the integer part of the number of bits of the identifier divided by 2) and a preset string (stored by both the terminal and the cloud server, initially sent from the cloud server to the terminal, with a length of n). The terminal server periodically updates the timestamp (which is then XORed with the data). The result is converted to a decimal number j to determine the current timestamp. If the last digit of the timestamp is odd, the j-th encryption scheme in sequence is selected from the set of 2n-1 encryption schemes. If the last digit of the timestamp is not odd, the j-th encryption scheme in reverse order is selected from the set of encryption schemes. The selected encryption scheme is used to encrypt the target data, resulting in encrypted data. Then, the encrypted data, its own identifier, and the timestamp are used to form a data packet, which is sent to B (the other of the terminal and cloud servers). After receiving the data packet, B reads the timestamp and its own identifier and processes it in reverse order.
[0080] Based on the same technical concept, embodiments of this application also provide a device for splitting .pptx files, such as... Figure 3 As shown, the device includes:
[0081] Parsing module 301 is used to parse the content of a pptx file based on the tree-like organizational structure in the pptx file, and to construct the relationship between each page and the resources required by the page. The tree-like organizational structure indicates the content organization form in the pptx file.
[0082] The configuration module 302 is used to configure corresponding resources for each segmented page according to the association relationship when a segmentation instruction is received;
[0083] Module 303 is used to build at least one first sub-file according to preset configuration rules and the page after configuring resources, so that collaborators can modify the content of the first sub-file.
[0084] Optionally, the parsing module 301 is used for:
[0085] Get the .pptx file;
[0086] Traverse the entire contents of the pptx file based on its tree-like organizational structure.
[0087] By analyzing the resources required for each page, the relationships between each page and the resources required for that page are constructed.
[0088] Optionally, the configuration module 302 is used for:
[0089] Upon receiving a splitting instruction, the pptx file is split into multiple single-page pages;
[0090] Configure corresponding resources for each segmented page based on the relationship.
[0091] Optionally, building module 303 is used for:
[0092] Determine the number of the first sub-files;
[0093] Each page configured with resources is divided into at least one sub-file, resulting in at least one first sub-file, wherein each first sub-file includes at least one page.
[0094] Based on the same technical concept, this application also provides a device for merging .pptx files.
[0095] The assembly module is used to assemble multiple second sub-files according to a preset assembly order when a merge instruction is received, to obtain the target file. The second sub-files are the pptx files whose content has been modified by the collaborators.
[0096] The parsing module is used to parse whether there are duplicate resources in the target file;
[0097] The insertion module is used to retain one duplicate resource if there are duplicate resources, and insert the duplicate resource into the corresponding page according to the association relationship, and insert the non-duplicate resources into the corresponding page. The association relationship refers to the correspondence between each page and the resources required by the page.
[0098] Optionally, the assembly module is used to: assemble multiple second sub-files according to a preset assembly order to obtain a target file, including: determining each page in the second sub-files to be merged, wherein each page corresponds to a page version, and resources and pages correspond; sorting each page according to a preset assembly order to obtain the target file;
[0099] The parsing module is used to: select resources with the same attributes from all the resources corresponding to all pages of the target file; and compare the resources with the same attributes to determine whether there are duplicate resources.
[0100] Optionally, the assembly module is used to: determine the selected version of each page in the second sub-file to be merged, wherein each page corresponds to at least two page versions, and resources and page versions correspond; and sort the selected versions of the pages according to a preset assembly order to obtain the target file;
[0101] The parsing module is used to: determine the target resources corresponding to the selected version in the target file; select resources with the same attributes from the target resources; and compare resources with the same attributes to determine whether there are duplicate resources.
[0102] According to another aspect of the embodiments of this application, this application provides an electronic device, such as... Figure 4 As shown, the system includes a memory 403, a processor 401, a communication interface 402, and a communication bus 404. The memory 403 stores a computer program that can run on the processor 401. The memory 403 and the processor 401 communicate through the communication interface 402 and the communication bus 404. When the processor 401 executes the computer program, it implements the steps of the above method.
[0103] The memory and processor in the aforementioned electronic devices communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0104] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0105] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0106] According to another aspect of the embodiments of this application, a computer-readable medium having processor-executable non-volatile program code is also provided.
[0107] Optionally, in embodiments of this application, the computer-readable medium is configured to store program code for the processor to execute the above-described method.
[0108] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0109] In specific implementation, the embodiments of this application can be referred to the above embodiments and have corresponding technical effects.
[0110] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0111] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0112] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0113] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0114] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0115] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0116] In addition, 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.
[0117] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, or a 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0118] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for splitting a .pptx file, characterized in that, The method includes: The content of the pptx file is parsed based on the tree-like organizational structure in the pptx file, and the association between each page and the resources required by the page is constructed. The tree-like organizational structure indicates the content organization form in the pptx file, and the resources refer to the images, audio and video or links used by the page. Upon receiving a splitting instruction, resources are configured for each split page according to the aforementioned association. These resources are contained within the pptx file package, eliminating the need to retrieve resources from links on other pages. According to the preset configuration rules, at least one first sub-file is constructed based on the page after configuring resources, so that collaborators can modify the content of the first sub-file without using the network.
2. The method according to claim 1, characterized in that, The process of parsing the content of the pptx file based on its tree-like organizational structure and constructing the association between each page and the resources required by that page includes: Get the .pptx file; Traverse the entire contents of the pptx file based on the tree-like organizational structure in the pptx file; By analyzing the resources required for each page, the association between each page and the resources required for that page is constructed.
3. The method according to claim 1, characterized in that, Upon receiving the segmentation instruction, based on the aforementioned association, the corresponding resources are configured for each segmented page, including: Upon receiving a splitting instruction, the pptx file is split into multiple single-page pages; Based on the aforementioned relationships, configure corresponding resources for each segmented page.
4. The method according to claim 1, characterized in that, According to the preset configuration rules, at least one first sub-file is constructed based on the page after configuring the resources, including: Determine the number of the first sub-files; Each page configured with resources is divided into at least one sub-file, resulting in at least one first sub-file, wherein each first sub-file includes at least one page.
5. A method for merging .pptx files, characterized in that, The method includes: Upon receiving a merge instruction, multiple second sub-files are assembled according to a preset assembly order to obtain the target file. The second sub-file is a portion of the pptx file after the collaborator modifies the content of the first sub-file. Different pages can reference the same resource. The first sub-file is obtained by the pptx file splitting method described in claim 1. The target file is analyzed to determine if there are duplicate resources, where resources refer to images, audio, video, or links used on the page. If there are duplicate resources, one duplicate resource is retained, and the duplicate resource is inserted into the corresponding page according to the association relationship. The non-duplicate resources are also inserted into the corresponding pages. The association relationship refers to the correspondence between each page and the resources required by the page.
6. The method according to claim 5, characterized in that, Assemble multiple second sub-files according to a preset assembly order to obtain a target file, including: determining each page in the second sub-files to be merged, wherein each page corresponds to a page version, and the resources and pages correspond to each other; sorting each page according to the preset assembly order to obtain the target file; Determining whether there are duplicate resources in the target file includes: selecting resources with the same attributes from all the resources corresponding to all pages in the target file; comparing the resources with the same attributes to determine whether there are duplicate resources.
7. The method according to claim 5, characterized in that, Assemble multiple second sub-files according to a preset assembly order to obtain a target file, including: determining the selected version of each page in the second sub-files to be merged, wherein each page corresponds to at least two page versions, and the resources and page versions correspond to each other; sorting the selected versions of the pages according to the preset assembly order to obtain the target file; The process of analyzing whether there are duplicate resources in the target file includes: determining the target resources corresponding to the selected version in the target file; selecting resources with the same attributes from the target resources; and comparing the resources with the same attributes to determine whether there are duplicate resources.
8. A device for splitting .pptx files, characterized in that, The device includes: The parsing module is used to parse the content of the pptx file based on the tree-like organizational structure in the pptx file, and to construct the association between each page and the resources required by the page. The tree-like organizational structure indicates the content organization form in the pptx file, and the resources refer to the images, audio and video or links used by the page. The configuration module is used to configure corresponding resources for each segmented page according to the association relationship when a segmentation instruction is received. The resources configured for each page are located in the pptx file package and do not need to be retrieved from the links of other pages. The build module is used to construct at least one first sub-file based on the page after configuring resources according to preset configuration rules, so that collaborators can modify the content of the first sub-file without using the network.
9. A device for merging .pptx files, characterized in that, The device includes: An assembly module is used to assemble multiple second sub-files according to a preset assembly order to obtain a target file when a merge instruction is received. The second sub-files are partial pptx files after the collaborator modifies the content of the first sub-file. Different pages can reference the same resource. The first sub-file is obtained by the pptx file splitting device described in claim 8. The parsing module is used to parse whether there are duplicate resources in the target file, where the resources refer to images, audio, video or links used by the page; The insertion module is used to retain one duplicate resource if there is a duplicate resource, and insert the duplicate resource into the corresponding page according to the association relationship, and insert the non-duplicate resource into the corresponding page. The association relationship refers to the correspondence between each page and the resources required by the page.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method steps of any one of claims 1-4 or 5-7.