Cloud document processing method and device, storage medium and electronic equipment
By generating and sending target document compression packages in cloud document processing, the cloud document display problem caused by missing or partial missing embedded file data is solved, ensuring that the terminal can display cloud document content normally, improving user experience and processing process optimization .
Patent Information
- Application Number
- CN202310788023.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-12-31
AI Technical Summary
During the cloud document download process, due to the missing or partial absence of embedded file data, the terminal cannot display the entire content of the cloud document normally, affecting the user experience.
The service platform determines the embedded file data of the target cloud document, generates the target document compression package, and sends it to the terminal to ensure that the terminal can display the cloud document normally and optimizes the cloud document processing process.
It avoids the problem of displaying cloud documents due to missing or partial missing embedded file data, ensures that the terminal can display cloud document content normally, improves the user experience, and realizes the optimization of cloud document processing process.
Smart Images

Figure CN119232721A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud storage technology, and in particular to a cloud document processing method, device, storage medium and electronic device. Background Art
[0002] Cloud storage, similar to cloud computing, refers to a system that uses cluster applications, grid technology or distributed file systems to bring together a large number of different types of storage devices in the network to work together through application software to provide data storage and business access functions to the outside world, ensuring data security and saving storage space. As cloud storage technology becomes more and more mature, more and more users are starting to store data in the cloud. Documents stored on the service platform are called cloud documents. Summary of the invention
[0003] The present application provides a cloud document processing method, device, storage medium and electronic device, and the technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a cloud document processing method, the method comprising:
[0005] In response to a document download operation for a target cloud document sent by the terminal, determining at least one embedded file data corresponding to the target cloud document;
[0006] Based on the target cloud document and the at least one embedded file data, generating a target document compression package for the target cloud document;
[0007] The target document compression package is sent to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
[0008] In a feasible implementation manner, determining at least one embedded file data corresponding to the target cloud document includes:
[0009] Obtain file directory level metadata corresponding to the target cloud document, and determine at least one embedded file data corresponding to the target cloud document based on the document target level metadata.
[0010] In a feasible implementation manner, determining at least one embedded file data corresponding to the target cloud document based on the document target level metadata includes:
[0011] Obtain a file cloud storage address corresponding to at least one embedded file data in the document target-level metadata;
[0012] At least one embedded file data corresponding to the target cloud document is obtained based on the file cloud storage address.
[0013] In a feasible implementation manner, the method further includes:
[0014] Performing embedded file data structure detection processing on the target cloud document to obtain a file hierarchy structure consisting of at least one embedded file data and a file cloud storage address of the embedded file data corresponding to the target cloud document;
[0015] Generate file directory level metadata for the target cloud document based on the file level structure and the file cloud storage address.
[0016] In a feasible implementation manner, the generating a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data includes:
[0017] Obtaining a file directory level corresponding to the target cloud document and the at least one embedded file data;
[0018] Based on the file directory hierarchy, a compressed package file including the target cloud document and the at least one embedded file data is generated;
[0019] A target document compression package for the target cloud document is generated based on the compression package file.
[0020] In a feasible implementation manner, the generating a compressed package file including the target cloud document and the at least one embedded file data with reference to the file directory hierarchy includes:
[0021] Creating an initial compressed file directory with reference to the file directory hierarchy, and determining at least one file hierarchy position and a hierarchical file name at the file hierarchy position based on the file directory hierarchy;
[0022] Based on the hierarchical file name, the target cloud document and the at least one embedded file data are written to the file hierarchical location of the initial compressed package file directory to generate a compressed package file corresponding to the initial compressed package file directory.
[0023] In a feasible implementation manner, sending the target document compressed package to the terminal includes:
[0024] Determine the file capacity of the target document compression package;
[0025] Based on the file capacity, the target document is compressed into pieces and sent to the terminal.
[0026] In a feasible implementation manner, the step of compressing the target document into segments and sending them to the terminal based on the file capacity includes:
[0027] If the file capacity is greater than the capacity threshold, the target document compression package is segmented to obtain at least one target document compression package segment;
[0028] The at least one target document compressed package segment is placed into a browser cache area, and the target document compressed package segments are respectively sent to the terminal based on the browser cache area.
[0029] In a second aspect, an embodiment of the present application provides a cloud document processing device, the device comprising:
[0030] a data determination module, configured to determine at least one embedded file data corresponding to the target cloud document in response to a document download operation sent by the terminal for the target cloud document;
[0031] A data sending module is used to generate a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data, and send the target document compression package to the terminal so that the terminal displays the target cloud document based on the target document compression package.
[0032] In a feasible implementation manner, the data determination module is used to:
[0033] Obtain file directory level metadata corresponding to the target cloud document, and determine at least one embedded file data corresponding to the target cloud document based on the document target level metadata.
[0034] In a feasible implementation manner, the data determination module is used to:
[0035] Obtain a file cloud storage address corresponding to at least one embedded file data in the document target-level metadata;
[0036] At least one embedded file data corresponding to the target cloud document is obtained based on the file cloud storage address.
[0037] In a feasible implementation manner, the device further includes:
[0038] A target hierarchy generation module is used to perform embedded file data structure detection processing on the target cloud document to obtain a file hierarchy structure consisting of at least one embedded file data and a file cloud storage address of the embedded file data corresponding to the target cloud document;
[0039] The target level generation module is used to generate file directory level metadata for the target cloud document based on the file level structure and the file cloud storage address.
[0040] In a feasible implementation manner, the compressed package generation module is used to:
[0041] Obtaining a file directory level corresponding to the target cloud document and the at least one embedded file data;
[0042] Based on the file directory hierarchy, a compressed package file including the target cloud document and the at least one embedded file data is generated;
[0043] A target document compression package for the target cloud document is generated based on the compression package file.
[0044] In a feasible implementation manner, the compressed package generation module is used to:
[0045] Creating an initial compressed file directory with reference to the file directory hierarchy, and determining at least one file hierarchy position and a hierarchical file name at the file hierarchy position based on the file directory hierarchy;
[0046] Based on the hierarchical file name, the target cloud document and the at least one embedded file data are written to the file hierarchical location of the initial compressed package file directory to generate a compressed package file corresponding to the initial compressed package file directory.
[0047] In a feasible implementation manner, the data sending module is used to:
[0048] Determine the file capacity of the target document compression package;
[0049] Based on the file capacity, the target document is compressed into pieces and sent to the terminal.
[0050] In a feasible implementation manner, the data sending module is used to:
[0051] If the file capacity is greater than the capacity threshold, the target document compression package is segmented to obtain at least one target document compression package segment;
[0052] The at least one target document compressed package segment is placed into a browser cache area, and the target document compressed package segments are respectively sent to the terminal based on the browser cache area.
[0053] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0054] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0055] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0056] In one or more embodiments of the present application, when the terminal downloads the target cloud document from the service platform, the service platform first determines at least one embedded file data corresponding to the target cloud document, and then generates a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data, and then sends the target document compression package to the terminal, thereby avoiding the situation where the terminal side cannot normally display all the display contents of the target cloud document due to the complete or partial missing of the embedded file data, thereby optimizing the cloud document processing flow, ensuring that the terminal can normally display the target cloud document, and improving the user's cloud document usage experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 It is a scenario diagram of a cloud document processing system provided by an embodiment of the present application;
[0059] Figure 2 is an example schematic diagram of a cloud document processing system provided in an embodiment of the present application;
[0060] Figure 3 It is a flowchart of another cloud document processing method provided in an embodiment of the present application;
[0061] Figure 4 It is a structural schematic diagram of a cloud document processing system device provided in an embodiment of the present application;
[0062] Figure 5 is a structural diagram of another cloud document processing device provided in an embodiment of the present application;
[0063] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0066] In the related art, since cloud documents can support access by one or more users, when one or more users process the cloud document on the terminal, the server performs collaborative editing on the cloud document; the cloud document may generate one or more embedded file data during the collaborative editing process or the user editing process. These embedded file data are stored independently of the cloud document. After the user downloads the cloud document from the service platform, the downloaded cloud document may be opened directly on the terminal due to the complete or partial missing of the embedded file data, which may cause the cloud document to be unable to display all the document contents normally.
[0067] See also Figure 1 , is a schematic diagram of a cloud document processing system provided in this specification. Figure 1 As shown, the cloud document processing system may include at least a client cluster and a service platform 100 .
[0068] The client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.
[0069] Each client in the client cluster may be an electronic device with communication function, including but not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, computing device or other processing device connected to a wireless modem, etc. Electronic devices may be called different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic device in 5G network or future evolution network, etc.
[0070] The service platform 100 can be a separate server device, such as a rack-mounted, blade, tower, or cabinet-mounted server device, or a workstation, mainframe computer, or other hardware device with strong computing power; it can also be a server cluster composed of multiple servers, and the servers in the service cluster can be composed in a symmetrical manner, wherein each server has equivalent functions and status in the transaction link, and each server can provide services to the outside independently, and the independent service can be understood as not requiring the assistance of other servers.
[0071] In one or more embodiments of the present specification, the service platform 100 may establish a communication connection with at least one client in the client cluster, and complete data interaction during the cloud document processing based on the communication connection.
[0072] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication, wherein the network can be a wireless network or a wired network, the wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network, and the wired network includes but is not limited to Ethernet, a universal serial bus (USB) or a controller local area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through a network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0073] The cloud document processing system embodiments provided in this specification belong to the same concept as the cloud document processing method in one or more embodiments. The execution subject corresponding to the cloud document processing method involved in one or more embodiments of the specification can be the above-mentioned service platform 100; the implementation process of the cloud document processing system embodiment can be detailed in the following method embodiments, which will not be repeated here.
[0074] The present application is described in detail below with reference to specific embodiments.
[0075] In one embodiment, Figure 2 As shown, a cloud document processing method is proposed, which can be implemented by a computer program and can be run on a cloud document processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The cloud document processing device can be a service platform.
[0076] Specifically, the cloud document processing method includes:
[0077] S102: In response to a document download operation for a target cloud document sent by a terminal, determining at least one embedded file data corresponding to the target cloud document;
[0078] Cloud documents can be opened directly on different service platforms such as browsers and application software. Terminals can access the service platform and open the selected cloud documents on the service platform. Files can be automatically uploaded by saving. Users can also download cloud documents to the service platform through their terminals.
[0079] In actual applications, since cloud documents can support access by one or more users, when one or more users process the cloud document on the terminal, the server performs collaborative editing on the cloud document. In the application scenarios of cloud documents, the cloud document may generate one or more embedded file data based on the user's editing operations during the collaborative editing process. These embedded file data are stored independently of the cloud document, which may result in a deep directory hierarchy for the cloud document. When a user needs to download a cloud document with a deep directory hierarchy, the downloaded cloud document may be opened directly on the terminal without the embedded file data being completely or partially missing, which may cause the cloud document to be unable to display all the document content normally.
[0080] In some scenarios, the embedded file data of a cloud document usually exists in the cloud document in the form of a file cloud storage address. When loading the cloud document based on the file local link address, the embedded file data can be accessed through the local link address to load the embedded display content of the embedded file data. However, since the cloud document is stored on a service platform, in the related technology, after the terminal downloads the cloud document from the service platform, the terminal cannot find the source embedded file data based on the local link address because the embedded file data is completely or partially missing. As a result, the cloud document cannot display the entire document content normally.
[0081] The file cloud storage address includes but is not limited to the cloud file absolute path, cloud file relative path, network connection path and other forms.
[0082] Schematically, the user can access the cloud document management interface provided by the service platform through the terminal, select the target cloud document on the cloud document management interface and enter the document download operation. The terminal sends the document download operation to the service platform. The service platform receives the document download operation for the target cloud document. In order to avoid the related art of only transmitting the target cloud document to the terminal, resulting in the terminal side being unable to normally display all the display contents of the target cloud document due to the complete or partial missing of the embedded file data. Based on this, the service platform first determines at least one embedded file data associated with the target cloud document.
[0083] The embedded file data may be in any file data format, such as PDF format, picture format, video format, table format, document format, etc. The embedded file data embeds its corresponding embedded file data content into the display content of the target cloud document in a file embedding manner, which means that the entire display content of the target cloud document may include one or more display contents of the embedded file data.
[0084] S104: generating a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data;
[0085] The target cloud document and several embedded file data may be packaged and compressed to generate a target document compression package of the target cloud document.
[0086] S106: Send the target document compression package to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
[0087] The service platform can establish a communication connection with at least one terminal in the terminal cluster to provide cloud document processing services. Based on the communication connection, data interaction in the cloud document processing process can be completed. Based on the communication connection, the service platform can send the target document compression package to the terminal. After receiving the target document compression package, the terminal can automatically decompress the target document compression package based on the cloud document processing service to form a local cloud document folder for the target cloud document. The local cloud document folder retains the directory hierarchy corresponding to the target cloud document and embedded file data, and then the target cloud document in the local cloud document folder can be opened. At this time, the target cloud document can display all display content normally.
[0088] Optionally, in order to ensure stable downloading of the target document compressed package, the file capacity of the target document compressed package may be determined in advance, and based on the file capacity, the target document compressed package may be segmented and sent to the terminal.
[0089] Furthermore, a capacity threshold can be set. The capacity threshold is a threshold or critical value for the file capacity. When the file capacity is greater than the capacity threshold, the target document compression package capacity is larger.
[0090] If the file capacity is greater than the capacity threshold, the service platform segments the target document compression package to obtain at least one target document compression package segment;
[0091] The service platform puts at least one target document compressed package fragment into the browser cache (such as the ob_flush cache), and sends the target document compressed package fragments to the terminal based on the browser cache. The terminal displays the file content to the user by reading the target document compressed package fragments in segments.
[0092] Optionally, the target document compression package segment may be segmented and compressed based on the content of each page of the target cloud document, and multiple page ranges for the target cloud document are determined, and the target cloud sub-document of the target cloud document corresponding to each page range and the embedded sub-file data corresponding to the target cloud sub-document are packaged and compressed into the target document compression package segment;
[0093] Illustratively, the display content corresponding to the target cloud sub-document is the display content of the target cloud document covered by its corresponding page number range. For example, if the page number range is pages ab, then the display content corresponding to the target cloud sub-document is the display content of pages ab, and the embedded sub-file data corresponding to the target cloud sub-document is the embedded sub-file data corresponding to the embedded content existing in the display content of pages ab.
[0094] In an embodiment of the present application, when the terminal downloads the target cloud document from the service platform, the service platform first determines at least one embedded file data corresponding to the target cloud document, and then generates a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data, and then sends the target document compression package to the terminal, thereby avoiding the situation where the terminal side cannot normally display all the display contents of the target cloud document due to the complete or partial missing of the embedded file data, thereby optimizing the cloud document processing flow, ensuring that the terminal can normally display the target cloud document, and improving the user's cloud document usage experience.
[0095] See also Figure 3 , Figure 3 This is a flowchart of another embodiment of a cloud document processing method proposed in this application. Specifically:
[0096] S202: In response to a document download operation sent by the terminal for a target cloud document, obtaining file directory level metadata corresponding to the target cloud document;
[0097] The file directory level metadata is directory level data that represents the target cloud document and all the embedded file data associated with it. The file directory level metadata can at least feedback all the embedded file data corresponding to the target cloud document and the level position of each of the embedded file data.
[0098] Optionally, embedded file data structure detection processing may be performed on the target cloud document in advance, so as to determine file directory level metadata for the target cloud document;
[0099] Optionally, after receiving the document download operation, embedded file data structure detection processing may be performed on the target cloud document to determine the file directory level metadata for the target cloud document;
[0100] In a feasible implementation, the process of embedded file data structure detection and processing can refer to the following interpretation:
[0101] A2: The service platform performs embedded file data structure detection processing on the target cloud document to obtain a file hierarchy structure consisting of at least one embedded file data and a file cloud storage address of the embedded file data corresponding to the target cloud document;
[0102] The service platform can traverse the display content of the target cloud document and the root folder where the target cloud document is located, detect the file hierarchy structure corresponding to the target cloud document, which refers to the hierarchical structure of the target document and all embedded file data associated with it, and determine the file cloud storage address of each embedded file data.
[0103] In a feasible implementation, in order to further optimize the cloud document management process, usually the embedded file data is generated after the collaborative editing or the user independent editing is performed by the user file operation of the source terminal, and the embedded file data may not be cleared for the source terminal, and the embedded metadata information of the uploaded embedded file data may carry the source terminal storage address of the embedded file data on the terminal;
[0104] Based on this, this specification optimizes the file cloud storage address. In addition to the platform cloud storage address corresponding to the service platform, the file cloud storage address can save the source terminal storage address and source terminal identifier corresponding to the embedded file data.
[0105] Subsequently, for each embedded file data, it can be first detected based on the source terminal identifier whether the terminal currently requesting to download the target cloud file and the source terminal indicated by the source terminal identifier corresponding to the embedded file data are the same device;
[0106] If the terminal and the source terminal corresponding to the source terminal identifier are the same device, it is not necessary to write the embedded file data into the compressed package file, and only the storage address of the source terminal needs to be written into the compressed package file;
[0107] For example, writing the source terminal storage address into the compressed package file may be writing the source terminal storage address into the corresponding display content of the corresponding embedded file data of the target cloud document, so that after opening the downloaded target cloud document, the terminal may directly load the local embedded file data based on the source terminal storage address;
[0108] For another example, writing the source terminal storage address into a compressed package file may be writing the source terminal storage address into the compressed package file directory at the file level position indicated by the embedded file data. After opening the downloaded target cloud document, the terminal first jumps to the file level position through a link to read the source terminal storage address, and then accesses the source terminal storage address to read the embedded file data.
[0109] If the terminal and the source terminal corresponding to the source terminal identifier are not the same device, a compressed package file is generated according to the subsequent process.
[0110] A4: The service platform generates file directory level metadata for the target cloud document based on the file level structure and the file cloud storage address.
[0111] Illustratively, the service platform uses the file hierarchy structure and the file cloud storage address as file directory hierarchy metadata for the target cloud document;
[0112] It is understandable that file directory level metadata cannot usually be obtained directly based on the metadata information carried by the target cloud document. In this specification, file directory level metadata for the target cloud document is additionally generated by performing embedded file data structure detection processing. File directory level metadata is a new metadata type for the target cloud document.
[0113] Optionally, the metadata information carried by the target cloud document can be updated based on the file directory level metadata to obtain updated metadata information to facilitate the storage of the file directory level metadata, without the need to store the file directory level metadata separately.
[0114] S204: Determine at least one embedded file data corresponding to the target cloud document based on the document target level metadata;
[0115] In a feasible implementation manner, when the service platform determines the at least one embedded file data corresponding to the target cloud document based on the document target level metadata, it may be:
[0116] B2: The service platform obtains the file cloud storage address corresponding to at least one embedded file data in the document target-level metadata;
[0117] B4: The service platform obtains at least one embedded file data corresponding to the target cloud document based on the file cloud storage address.
[0118] Optionally, at least one embedded file data corresponding to the target cloud document is obtained locally from the service platform based on the file cloud storage address.
[0119] Optionally, for each embedded file data, it may be first detected based on the source terminal identifier whether the terminal currently requesting to download the target cloud file and the source terminal indicated by the source terminal identifier corresponding to the embedded file data are the same device;
[0120] If the terminal and the source terminal corresponding to the source terminal identifier are the same device, the acquisition of the corresponding embedded file data can be canceled, that is, there is no need to subsequently write the embedded file data into the compressed package file, and only the source terminal storage address needs to be written into the compressed package file;
[0121] For example, writing the source terminal storage address into the compressed package file may be writing the source terminal storage address into the corresponding display content of the corresponding embedded file data of the target cloud document, so that after opening the downloaded target cloud document, the terminal may directly load the local embedded file data based on the source terminal storage address;
[0122] For another example, writing the source terminal storage address into a compressed package file may be writing the source terminal storage address into the compressed package file directory at the file level position indicated by the embedded file data. After opening the downloaded target cloud document, the terminal first jumps to the file level position through a link to read the source terminal storage address, and then accesses the source terminal storage address to read the embedded file data.
[0123] If the terminal and the source terminal corresponding to the source terminal identifier are not the same device, at least one embedded file data corresponding to the target cloud document is locally obtained from the service platform based on the file cloud storage address.
[0124] S206: Obtain the file directory level corresponding to the target cloud document and the at least one embedded file data;
[0125] The file directory level may determine the level at which the embedded file data is located based on the file level structure in the file directory level metadata.
[0126] S208: With reference to the file directory hierarchy, generate a compressed package file including the target cloud document and the at least one embedded file data, and generate a target document compressed package for the target cloud document based on the compressed package file.
[0127] Schematically, the service platform can create a new initial compressed package file directory with reference to the file directory hierarchy. The initial compressed package file directory includes the target hierarchical structure indicated by the file directory hierarchy. The file directory hierarchy represents the file hierarchy position of the corresponding embedded file data. In actual applications, at least one file hierarchy position and a hierarchical file name at the file hierarchy position can be determined based on the file directory hierarchy. The hierarchical file name also indicates which embedded file data needs to be written to the file hierarchy position.
[0128] Furthermore, the service platform writes the target cloud document and at least one embedded file data into the file hierarchy location of the initial compressed package file directory based on the hierarchical file name to generate a compressed package file corresponding to the initial compressed package file directory.
[0129] S210: Send the target document compression package to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
[0130] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.
[0131] In an embodiment of the present application, when the terminal downloads the target cloud document from the service platform, the service platform first determines at least one embedded file data corresponding to the target cloud document, and then generates a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data, and then sends the target document compression package to the terminal, thereby avoiding the situation where the terminal side cannot normally display all the display contents of the target cloud document due to the complete or partial missing of the embedded file data, ensuring that the terminal can display the target cloud document normally and improving the user's cloud document usage experience; and, based on the file directory hierarchical metadata, the hierarchical structure of the embedded file data and the target cloud document can be determined, thereby quickly and conveniently generating the target document compression package, thereby optimizing the cloud document processing flow and ensuring the diversity and comprehensiveness of metadata synchronization.
[0132] The following will be combined Figure 4 , the cloud document processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 4 The cloud document processing device shown is used to execute this application Figure 1 to Figure 3 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 to Figure 3 The embodiment shown.
[0133] See also Figure 4 , which shows a schematic diagram of the structure of the cloud document processing device of an embodiment of the present application. The cloud document processing device 1 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the cloud document processing device 1 includes a data determination module 11, a compression package generation module 12 and a data sending module 13, which are specifically used to:
[0134] A data determination module 11, configured to determine at least one embedded file data corresponding to the target cloud document in response to a document download operation sent by the terminal for the target cloud document;
[0135] A compression package generating module 12, configured to generate a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data;
[0136] The data sending module 13 is used to send the target document compression package to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
[0137] Optionally, the data determination module 11 is used to:
[0138] Obtain file directory level metadata corresponding to the target cloud document, and determine at least one embedded file data corresponding to the target cloud document based on the document target level metadata.
[0139] Optionally, the data determination module 11 is used to:
[0140] Obtain a file cloud storage address corresponding to at least one embedded file data in the document target-level metadata;
[0141] At least one embedded file data corresponding to the target cloud document is obtained based on the file cloud storage address.
[0142] Optional, such as Figure 5 As shown, the device also includes:
[0143] A target hierarchy generation module 14 is used to perform embedded file data structure detection processing on the target cloud document to obtain a file hierarchy structure consisting of at least one embedded file data and a file cloud storage address of the embedded file data corresponding to the target cloud document;
[0144] The target hierarchy generation module 14 is used to generate file directory hierarchy metadata for the target cloud document based on the file hierarchy structure and the file cloud storage address.
[0145] Optionally, the compressed package generating module 12 is used to:
[0146] Obtaining a file directory level corresponding to the target cloud document and the at least one embedded file data;
[0147] Based on the file directory hierarchy, a compressed package file including the target cloud document and the at least one embedded file data is generated;
[0148] A target document compression package for the target cloud document is generated based on the compression package file.
[0149] Optionally, the compressed package generating module 12 is used to:
[0150] Creating an initial compressed file directory with reference to the file directory hierarchy, and determining at least one file hierarchy position and a hierarchical file name at the file hierarchy position based on the file directory hierarchy;
[0151] Based on the hierarchical file name, the target cloud document and the at least one embedded file data are written to the file hierarchical location of the initial compressed package file directory to generate a compressed package file corresponding to the initial compressed package file directory.
[0152] Optionally, the data sending module 13 is used to:
[0153] Determine the file capacity of the target document compression package;
[0154] Based on the file capacity, the target document is compressed into pieces and sent to the terminal.
[0155] Optionally, the data sending module 13 is used to:
[0156] If the file capacity is greater than the capacity threshold, the target document compression package is segmented to obtain at least one target document compression package segment;
[0157] The at least one target document compressed package segment is placed into a browser cache area, and the target document compressed package segments are respectively sent to the terminal based on the browser cache area.
[0158] It should be noted that the cloud document processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the cloud document processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the cloud document processing device provided in the above embodiment and the cloud document processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0159] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 3 The cloud document processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 to Figure 3 The specific description of the illustrated embodiment will not be repeated here.
[0160] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 3 The cloud document processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 to Figure 3 The specific description of the illustrated embodiment will not be repeated here.
[0161] Please refer to Figure 6 , is a structural block diagram of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via a bus 150.
[0162] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions and processes data of the terminal 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0163] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets.
[0164] The input device 130 is used to receive input commands or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands or data, and the output device 140 includes but is not limited to a display device and a speaker. In the embodiment of this specification, the input device 130 may be a temperature sensor for obtaining the operating temperature of the terminal. The output device 140 may be a speaker for outputting audio signals.
[0165] In addition, those skilled in the art will appreciate that the structure of the terminal shown in the above drawings does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIFI) module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.
[0166] In the embodiments of this specification, the execution subject of each step may be the terminal described above. Optionally, the execution subject of each step is the operating system of the terminal. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiments of this specification.
[0167] exist Figure 6 In an electronic device, the processor 110 can be used to call the program stored in the memory 120 and execute it to implement the cloud document processing method as described in the various method embodiments of this specification.
[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0169] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A cloud document processing method, characterized in that: Applied to a service platform, the method comprises: In response to a document download operation for a target cloud document sent by the terminal, determining at least one embedded file data corresponding to the target cloud document; Based on the target cloud document and the at least one embedded file data, generating a target document compression package for the target cloud document; The target document compression package is sent to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
2. The method according to claim 1, characterized in that The determining the at least one embedded file data corresponding to the target cloud document includes: Obtain file directory level metadata corresponding to the target cloud document, and determine at least one embedded file data corresponding to the target cloud document based on the document target level metadata.
3. The method according to claim 2, characterized in that The determining, based on the document target level metadata, at least one embedded file data corresponding to the target cloud document comprises: Obtain a file cloud storage address corresponding to at least one embedded file data in the document target-level metadata; At least one embedded file data corresponding to the target cloud document is obtained based on the file cloud storage address.
4. The method according to claim 2, characterized in that: The method further comprises: Performing embedded file data structure detection processing on the target cloud document to obtain a file hierarchy structure consisting of at least one embedded file data and a file cloud storage address of the embedded file data corresponding to the target cloud document; Generate file directory level metadata for the target cloud document based on the file level structure and the file cloud storage address.
5. The method according to claim 1, characterized in that The generating a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data includes: Obtaining a file directory level corresponding to the target cloud document and the at least one embedded file data; Based on the file directory hierarchy, a compressed package file including the target cloud document and the at least one embedded file data is generated; A target document compression package for the target cloud document is generated based on the compression package file.
6. The method according to claim 5, characterized in that The step of generating a compressed package file including the target cloud document and the at least one embedded file data with reference to the file directory hierarchy includes: Creating an initial compressed file directory with reference to the file directory hierarchy, and determining at least one file hierarchy position and a hierarchical file name at the file hierarchy position based on the file directory hierarchy; Based on the hierarchical file name, the target cloud document and the at least one embedded file data are written to the file hierarchical location of the initial compressed package file directory to generate a compressed package file corresponding to the initial compressed package file directory.
7. The method according to claim 1, characterized in that The step of sending the target document compressed package to the terminal includes: Determine the file capacity of the target document compression package; Based on the file capacity, the target document is compressed into pieces and sent to the terminal.
8. The method according to claim 7, characterized in that The step of compressing the target document into segments and sending them to the terminal based on the file capacity includes: If the file capacity is greater than the capacity threshold, the target document compression package is segmented to obtain at least one target document compression package segment; The at least one target document compressed package segment is placed into a browser cache area, and the target document compressed package segments are respectively sent to the terminal based on the browser cache area.
9. A cloud document processing device, characterized in that: Applied to a service platform, the device comprises: a data determination module, configured to determine at least one embedded file data corresponding to the target cloud document in response to a document download operation sent by the terminal for the target cloud document; A compression package generation module, used to generate a target document compression package for the target cloud document based on the target cloud document and the at least one embedded file data; A data sending module is used to send the target document compression package to the terminal, so that the terminal displays the target cloud document based on the target document compression package.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 8.
