Cloud disk document editing method and device and electronic equipment
By storing documents in fragmented form in cloud disk and editing only the first fragment during editing, the problem of low utilization of cloud disk storage space is solved, and the effect of effectively reducing storage space occupation is achieved.
Patent Information
- Application Number
- CN202411973296.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
AI Technical Summary
The utilization rate of cloud disk storage space is low, mainly because users modify the document less, and most of the content between the edited documents and the original documents is the same, resulting in the individual storage of edited documents taking up a lot of storage space.
By storing the document in fragmented form in the cloud disk, and when editing, only the first fragment of the document is edited, a second fragment is generated, and the second fragment is then associated with the document identification in the cloud disk.
This method effectively reduces the use of storage space, improves the utilization of storage space, and avoids waste of space caused by storing edited documents separately.
Smart Images

Figure CN119807146A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of cloud storage technology, and specifically relates to a cloud disk document editing method, device and electronic device. Background Art
[0002] For documents with the same hash value uploaded by different users, the cloud disk usually only stores them once. The same document is for multiple users, and different users may edit the same document differently. The edited document may have certain differences in content from the original document. In this case, the cloud disk can generate a new document by saving the edited document as a new document and save it independently.
[0003] Generally, the extent of modification made by users to documents is small, and the contents of the modified document are mostly the same as the original document. Storing the edited document separately takes up a large amount of storage space, resulting in low utilization of the storage space. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a cloud disk document editing method, device and electronic device, which can solve the problem of low utilization of cloud disk storage space.
[0005] In a first aspect, an embodiment of the present application provides a cloud disk document editing method, which is applied to a server, and the method comprises: receiving editing information of a cloud disk document sent by a client, wherein the editing information comprises editing operation indication information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; obtaining a first fragment of the cloud disk document associated with the document identifier stored in the cloud disk; editing the first fragment of the cloud disk document according to the editing operation indicated by the editing operation indication information to obtain a second fragment; and storing the second fragment in the cloud disk in association with the document identifier.
[0006] In a second aspect, an embodiment of the present application provides a cloud disk document display method, which is applied to a client, and the method includes: in response to an input editing operation, performing corresponding editing on the cloud disk document; displaying the edited cloud disk document, and sending editing information corresponding to the editing operation to a server, wherein the editing information includes editing operation indication information and a document identifier of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information. .
[0007] In the third aspect, an embodiment of the present application provides a cloud disk document editing device, which includes: a receiving module, used to receive editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation indication information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; a first acquisition module, used to obtain a first fragment of the cloud disk document associated with the document identifier stored in the cloud disk; a second acquisition module, used to edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation indication information to obtain a second fragment; a storage module, used to associate the second fragment with the document identifier and store it in the cloud disk.
[0008] In a fourth aspect, an embodiment of the present application provides a cloud disk document display device, which includes: an editing module, used to perform corresponding editing on the cloud disk document in response to an input editing operation; a display module, used to display the edited cloud disk document and send editing information corresponding to the editing operation to a server, wherein the editing information includes editing operation indication information and a document identifier of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information.
[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0010] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0011] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect or the second aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the method described in the first or second aspect above.
[0013] In an embodiment of the present application, the server can receive editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation instruction information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; obtain a first fragment of the cloud disk document associated with the document identifier stored in the cloud disk; edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation instruction information to obtain a second fragment; associate the second fragment with the document identifier and store it in the cloud disk. By storing local incremental edits on the basis of storing the original cloud disk document when storing the edited cloud disk document, the problem of low utilization of cloud disk storage space can be solved, and the storage space occupied can be effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 A schematic diagram showing a flow chart of a cloud disk document editing method provided in an embodiment of the present application; Figure 2 A schematic diagram showing the editing of cloud disk document fragments provided by an embodiment of the present application is shown; Figure 3 A schematic diagram of a process of segmenting a document provided in an embodiment of the present application is shown; Figure 4 A schematic diagram showing a flow chart of a cloud disk document display method provided in an embodiment of the present application; Figure 5 A schematic diagram showing the structure of a cloud disk document editing device provided in an embodiment of the present application is shown; Figure 6 A schematic diagram showing the structure of a cloud disk document display device provided in an embodiment of the present application is shown; Figure 7 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown; Figure 8 A structural block diagram of another electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0015] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0016] The cloud disk document editing method provided by the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0017] Figure 1 A cloud disk document editing method provided by an exemplary embodiment of the present application is shown, which is applied to the server. The method 100 can be executed by an electronic device. In other words, the method can be executed by software or hardware installed in the electronic device. The electronic device can be a terminal device such as a mobile phone. Figure 1 As shown, the method mainly includes the following steps: S101: receiving editing information of a cloud disk document sent by a client.
[0018] Among them, the editing information includes editing operation instruction information and the document identification of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; in an embodiment of the present application, the server can receive editing information of the cloud disk document sent by the client.
[0019] The editing information includes the editing operation instruction information and the document identifier of the cloud disk document, so as to facilitate the editing of the cloud disk document. In practical applications, the server can uniformly and persistently store the cloud disk document in the form of fragments in the cloud disk database, which helps to save storage space.
[0020] In an optional implementation, before receiving the editing information of the cloud disk document sent by the client, the method further includes the following steps: Step 1: Receive the cloud disk document to be uploaded, the document identifier of the cloud disk document, and the upload object identifier sent by the client; in the embodiment of the present application, before receiving the editing information of the cloud disk document, the cloud disk document needs to be stored. Step 2: Determine the length of the cloud disk document segmentation according to the target isolation forest; in the embodiment of the present application, the length of the cloud disk document segmentation can be determined according to the pre-acquired target isolation forest. Using the target isolation forest to determine the length of the cloud disk document segmentation can search for the optimal solution of the segmented document length in a complex search space, effectively reducing the storage space occupied.
[0021] Step 3, according to the length, the cloud disk document is segmented to obtain the first fragment of the cloud disk document; in the embodiment of the present application, the cloud disk document is segmented into multiple first fragments according to the determined segmentation length. Step 4, the first fragment of the cloud disk document, the document identifier and the upload object identifier are associated and stored in the cloud disk. In an embodiment of the present application, after the cloud disk document is divided into multiple first fragments according to the determined segmentation length, the first fragment can be associated and stored with the document identifier and the upload object identifier. Associating related data not only makes the relationship between the data clearer, but also facilitates query.
[0022] In an optional implementation, the target isolation forest is determined by: Step 1, constructing an isolation forest by considering the stored documents that are not edited online as normal and the stored documents that are edited online as abnormal; Step 2, initializing the isolation forest by using multiple sets of parameters to obtain multiple initial isolation forests; Step 3, using a swarm intelligence algorithm to train the initial isolation forest to obtain multiple intermediate isolation forests; Step 4: Determine the target isolated forest by performing a grayscale test on a plurality of the intermediate isolated forests.
[0023] In the embodiment of the present application, for the above step 1, most of the documents stored on the cloud disk will not be edited by users online, and only a small part of them will be edited by users online. The stored documents that are not edited by users online can be regarded as normal, and the stored documents edited by users online can be regarded as abnormal, and then an isolation forest is constructed. There are n trees in the isolation forest, and each node on the tree has a parameter of a segmentation feature.
[0024] The height of the tree is generated as follows:
[0025] in, For the The height of the tree, is the lower limit of the height, is the upper limit of the height, is the first number generated between [0,1] using the Halton sequence The Halton sequence can ensure true randomness, avoid the pseudo-randomness of some random algorithms, and ensure the uniformity of the tree height.
[0026] In an optional implementation, for the above step 2, initializing the isolation forest by using multiple sets of parameters to obtain multiple initial isolation forests includes: A plurality of the initial isolation forests are obtained by respectively setting the leaf nodes in the isolation forest using the plurality of groups of parameters.
[0027] In the embodiment of the present application, for each node of the tree, multiple groups of identifier (ID) values can be randomly selected, and each group of ID values can be subjected to Singer chaotic mapping and rounded to obtain a new ID to represent multiple groups of parameters. For each group of parameters, an isolated forest can be trained. Since Singer chaotic mapping can increase the randomness of the parameters, using several groups of parameters can basically cover all random combinations.
[0028] For each set of parameters, the initial values of the parameters are randomly set within [0,1]. These values are used to divide the possibility of editing. The higher the height of the tree, the higher the degree of abnormality, and the more likely it is to be edited, and then the Chebyshev chaotic map is used to map the values. No matter how close the initial values are, the mapped values are all unrelated, which can enhance the robustness of the isolated forest. During initialization, each tree in the isolated forest can be encoded as an individual, where the height of the n trees constrains the length of the gene, and the parameter values can be selected multiple times to form multiple groups of individual genes. By initializing the isolated forest with multiple sets of parameters, multiple initial isolated forests can be obtained, and then preferential allocation can be performed to facilitate the determination of the length of the cloud disk document segmentation. In practical applications, the swarm intelligence algorithm is an emerging evolutionary computing technology that has become the focus of more and more researchers. It has a very special connection with artificial life, especially evolutionary strategies and genetic algorithms. The swarm intelligence algorithm needs to perform multiple genetic operations. In an embodiment of the present application, an intermediate isolated forest can be obtained by a swarm intelligence algorithm, and then the final target isolated forest can be obtained.
[0029] In an optional implementation, for the above step 3, the using of a swarm intelligence algorithm to train the initial isolation forest to obtain an intermediate isolation forest includes: (1) By extracting features from the stored document, a feature vector corresponding to the stored document is obtained; in the embodiment of the present application, a feature vector corresponding to the stored document can be obtained by extracting features from the stored document. In practical applications, features of multiple dimensions can be screened out from the current stored document, and then the above features are encoded to form a feature vector, which may include: the total length of the stored document, label features, and uploaded object features. The label features are obtained by using natural language processing (NLP) technology to screen out multiple labels from the title and content of the stored document, such as "Spring Festival" + "Composition", "K12" + "Mathematics Courseware", "Novel" + "Reading Notes", etc. Static features and dynamic features are extracted for users whose documents stored on the cloud disk have the above 2 / 3 labels. The static features include the proportion of various types of files in the cloud disk, the average online time of the cloud disk, the average frequency of opening files online on the cloud disk, the average time of browsing files online on the cloud disk, etc. The dynamic features include the frequency of editing files online on the cloud disk, the time of editing files online on the cloud disk, the number of operations of editing files online on the cloud disk, etc. The upload object characteristics are the characteristics of the user who uploaded the stored document, including the average frequency of cloud disk sharing operations, the average access frequency of shared files, the average frequency of newly uploading the same file within a week after uploading the file, etc. The embodiments of the present application are not specifically limited.
[0030] (2) The length of the stored document is obtained by inputting the feature vector into the initial isolation forest. In the embodiment of the present application, the feature vector can be input into each tree in the initial isolation forest to obtain the height of the feature vector in each tree, the average value of the height is calculated, and the length of the current stored document is calculated using the following formula:
[0031] in, To split the length of the stored document, is the average height, The upper limit of the segmentation.
[0032] (3) The fitness of each tree in the initial isolated forest is obtained by dividing the stored document according to the length of the divided stored document; in the embodiment of the present application, the stored document can be divided according to the length of the divided stored document, thereby obtaining the fitness of each tree in the initial isolated forest. The fitness of each tree can be used to evaluate the quality of each tree, thereby determining the size of its inheritance opportunity.
[0033] The calculation formula of the tree fitness is as follows:
[0034] in, For Trees The fitness of is the number of documents stored in the cloud disk within a period of time, The number of online edited documents in the cloud disk within a period of time. The amount of storage space saved by splitting the stored documents. The increased consumption of management resources due to the segmentation and storage of documents, , , and All are weights.
[0035] Further, and In fact, it does not exist in the historical log files, but is fitted after assuming that the stored documents are divided into fragments. It can be evaluated in the following way:
[0036] in, The number of times a document has been stored for editing, The total length of the stored document. For the The length of the fragments generated during each edit.
[0037]
[0038] in, The number of fragments after the storage document is segmented. is the threshold value, is a coefficient. If the number of fragments after the storage document is split is small (less than or equal to ), the impact on input / output (I / O) is not obvious, so a constant can be used To measure, if the number of fragments after segmentation is large (greater than ), the impact on I / O etc. increases significantly and can be regarded as linear.
[0039] (4) Genetically operate the fitness of each of the trees through a swarm intelligence algorithm to update the parameters of each tree in the initial isolated forest; in the embodiment of the present application, the fitness of each tree in the initial isolated forest can be analyzed through a swarm intelligence algorithm to update the parameters. In practical applications, the ant colony algorithm and the particle swarm algorithm can be used for updating. The ant colony algorithm is a simulation of the food collection process of an ant colony and has been successfully applied to many discrete optimization problems. The particle swarm optimization algorithm also originated from the simulation of a simple social system. It was originally a simulation of the foraging process of a flock of birds and is also a good optimization algorithm. The embodiment of the present application does not specifically limit which form of swarm intelligence algorithm is used.
[0040] (5) When the number of inheritances reaches a threshold, the tree with the highest fitness is mapped to the initial isolated forest to obtain an intermediate isolated forest. In an embodiment of the present application, when the number of inheritances reaches a threshold, the tree with the highest fitness can be mapped to the initial isolated forest to obtain a trained intermediate isolated forest, which is convenient for calculating the length of the cloud disk document segmentation.
[0041] In the embodiment of the present application, an isolation forest can be used to fit the situation of editing documents on a cloud disk, and a swarm intelligence algorithm can be used to train the isolation forest. Since the swarm intelligence algorithm has a strong global search capability, it can search for the optimal solution for the length of the segmented document in a complex search space, effectively reducing the storage space occupied. In the above optional method, the fitness of each of the trees is genetically operated by the swarm intelligence algorithm to update the parameters of each tree in the intermediate isolation forest, including at least one of the following: (1) The fitness of each tree is normalized. When the normalized fitness of the tree is greater than or equal to the first threshold, the tree is selected for inheritance. The selection operation (or replication operation) is to pass the genes of the individuals with higher fitness in the current parent generation to the offspring according to a certain rule or model. The purpose of selection is to directly pass on the optimized individuals to the next generation or to generate new individuals through pairing and crossover and then pass them on to the next generation. The selection operation is based on the fitness evaluation of individuals in the population. In the embodiment of the present application, the fitness of each tree (individual) is normalized. For each tree, a value r is randomly generated in the range of [0,1]. If the normalized fitness of the tree is greater than or equal to r, the tree is selected for inheritance. Otherwise, the tree is filtered out and not inherited. (2) Two trees are randomly selected and the parameters of the two positions of the trees are crossed. The crossover operation is to exchange some genes of two individuals in a certain way to form two new individuals. In the embodiment of the present application, two trees can be randomly selected, and two positions can be randomly selected, and the genes located between the two positions on the two trees are crossed. The crossover operation plays a core role in the genetic algorithm.
[0042] (3) Randomly select the tree, randomly generate a variation value for each parameter of the tree within a preset range, and mutate the parameter when the variation value is greater than a second threshold. The mutation operation refers to changing one or more genes in an individual with a relatively small probability to form a new individual. In an embodiment of the present application, an individual (tree) can be randomly selected, and a value can be randomly generated for each gene of the individual within a preset range, such as the range of [0, 1]. If the value is greater than the second threshold, the gene is mutated, otherwise the gene is maintained unchanged. The mutation method is to randomly generate a value within a preset range, apply Tent chaotic mapping to the value, and replace the above-mentioned gene.
[0043] In the embodiment of the present application, the crossover operation and the mutation operation can cooperate with each other to jointly complete the global search and local search of the search space.
[0044] In an embodiment of the present application, for the above step 4, the target isolated forest can be determined by performing grayscale tests on multiple intermediate isolated forests. In practical applications, multiple intermediate isolated forests can be deployed online for grayscale testing, and the intermediate isolated forest with the best grayscale test effect is selected as the target isolated forest for deployment. The effect of the grayscale test is mainly the optimization of storage space and the increase in management costs. After multiple documents are segmented, the increase in management costs is nonlinear. Technicians can comprehensively consider multiple aspects such as the central processing unit (CPU), memory, bandwidth, I / O, etc., so as to select the optimal target isolated forest.
[0045] In the embodiment of the present application, by combining the isolation forest with the swarm intelligence algorithm, multiple trained intermediate isolation forests can be obtained, and then by grayscale testing the intermediate isolation forests, the target isolation forest can be obtained. The length of the cloud disk document segmentation is determined by the target isolation forest. A good balance is achieved between optimizing storage space and controlling management costs, that is, while taking into account management costs, the occupancy of cloud disk storage space is effectively reduced.
[0046] In actual applications, in order to reduce the resource consumption of the cloud disk, the target isolation forest can be used to calculate the length of the segmentation and the cloud disk document can be segmented into fragments according to the length only when the number of times the same cloud disk document is stored exceeds N times within a week and the cloud disk document has been edited M times by the user. It should be noted that if the document has been edited by the user, after segmenting the cloud disk document, the Diff operation can be used to locate the edited content of the document, and the edited content of the document can be mapped to the fragments, and the complete document after editing can be deleted.
[0047] In an embodiment of the present application, a feature vector of a cloud disk document may be obtained and input into a target isolation forest, thereby calculating the length of the segmentation of the cloud disk document.
[0048] In an optional implementation, before receiving the editing information of the cloud disk document sent by the client, the method further includes: Receive the document identifier and upload object identifier of the stored cloud disk document sent by the client, and the upload object identifier is used to indicate the object that is allowed to modify the cloud disk document corresponding to the document identifier. In an embodiment of the present application, if the server receives the document identifier and upload object identifier of the stored cloud disk document sent by the client, then the upload object identifier can be associated with the document identifier. This can avoid secondary storage of the same document and save space. Moreover, the upload object identifier can be used to indicate the object that is allowed to modify the cloud disk document corresponding to the document identifier. This can avoid resource leakage.
[0049] S102: Acquire a first fragment of the cloud disk document associated with the document identifier and stored in the cloud disk.
[0050] In the embodiment of the present application, the first fragment of the cloud disk document associated with the document identifier stored in the cloud disk can be obtained according to the document identifier, and targeted editing can be performed to improve editing efficiency.
[0051] S103: Edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation instruction information to obtain a second fragment.
[0052] In the embodiment of the present application, the document on the cloud disk can be divided into multiple first fragments, and the user's editing operation can be loaded into the original cloud disk document in real time, that is, the content edited by the user is mapped to the corresponding fragment to obtain the second fragment, and a new complete document is not generated for each user's editing. The storage space occupied by the edited document can be effectively reduced.
[0053] like Figure 2 As shown in the figure, an original cloud disk document is divided into fragments 1, 2, 3, 4 and 5. Users A, B, C and D all store the document in the cloud disk. If user A edits fragment 2, edited fragment 2' (the second fragment) can be generated. If user D edits fragment 4, edited fragment 4' can be generated. There is no need to generate a new document, which can effectively reduce the storage space occupied and save resources. The original fragment 2 does not need to be deleted and can be used for editing by the next user.
[0054] S104: Store the second fragment in the cloud disk in association with the document identifier.
[0055] In an embodiment of the present application, the edited second fragment can be associated with the document identifier and stored in the cloud disk. There is no need to store all edited cloud disk documents as a whole, which can save storage space.
[0056] In an optional implementation, the editing information further includes an upload object identifier; The storing the second fragment in association with the document identifier in the cloud disk includes: The second fragment, the document identifier and the uploaded object identifier are associated and stored in the cloud disk. In an embodiment of the present application, the second fragment, the document identifier and the uploaded object identifier can be associated to facilitate subsequent query and modification. The purpose of associating the uploaded object identifier is to distinguish which uploaded object (or user) edited the second fragment, so that it is easy to find during subsequent downloads, which can improve the user experience. In an optional implementation, after the second fragment is associated with the document identifier and stored in the cloud disk, the method also includes: Receiving a download message sent by the client, wherein the download message includes the upload object identifier and the document identifier; The download document is obtained by merging the second fragment with the third fragment and sending the download document to the client, wherein the third fragment is an unedited fragment of the first fragment of the cloud disk document associated with the upload object identifier and the document identifier.
[0057] In the embodiment of the present application, if the cloud disk document corresponding to the download message has been edited, the second fragment and the third fragment can be merged, the second fragment is the edited fragment associated with the document identifier and the upload object identifier, and the third fragment is the unedited fragment associated with the document identifier and the upload object identifier, so as to obtain the download document and send the download document to the client. Figure 2 In the example shown, user A edited fragment 2 to generate edited fragment 2'. If user A needs to download the edited cloud disk document, the server can merge fragment 1, fragment 3, fragment 4, fragment 5 and edited fragment 2' to obtain the download document required by the user. By merging the original cloud disk document with the fragment edited by the user to generate a download document consistent with the user's edit, it can be ensured that the downloaded document obtained by the user when downloading to the local is the same as the edited content, ensuring user experience.
[0058] In an optional implementation, if the cloud disk document corresponding to the download message has not been edited, the fragments associated with the document identifier of the cloud disk document can be merged to obtain the cloud disk document and send the cloud disk document to the client. Figure 2 In the example shown, user B does not edit the original cloud disk document, and can directly merge fragments 1, 2, 3, 4, and 5 to obtain a complete cloud disk document, and then send the cloud disk document to the client.
[0059] In an embodiment of the present application, the server can receive editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation instruction information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; obtain a first fragment of the cloud disk document associated with the document identifier stored in the cloud disk; edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation instruction information to obtain a second fragment; associate the second fragment with the document identifier and store it in the cloud disk. By storing local incremental edits on the basis of storing the original cloud disk document when storing the edited cloud disk document, the problem of low utilization of cloud disk storage space can be solved, and the storage space occupied can be effectively reduced. Figure 3 A document segmentation method provided by an exemplary embodiment of the present application is shown, which is applied to a server. The method mainly includes the following steps: Step 1: Build an isolation forest. Most of the documents stored on the cloud disk are not edited by users online, and only a small part is edited by users online. If documents that are not edited by users online are considered normal, and documents that are edited by users online are considered abnormal, an isolation forest can be built.
[0060] Step 2: Initialize the population. Encode each tree in the isolation forest as an individual, where the height of n trees constrains the length of the gene, and select parameter values multiple times to form multiple groups of individual genes.
[0061] Step 3: Simulate users editing documents in the cloud disk. For each individual in the population, use the logs recorded in the cloud disk in history to re-simulate the situation of users editing documents in the cloud disk.
[0062] Step 4: Update the population. Analyze the fitness of each individual to update the population. The process of updating the population includes the following three operations: selection operation, crossover operation and mutation operation.
[0063] Repeat Step 3 and Step 4 until the number of inheritances reaches the threshold, and map the individual with the highest fitness to the isolated forest. Since multiple sets of parameters are generated in Step 1, multiple isolated forests can be trained. For each isolated forest, deploy it online for grayscale testing, and select the isolated forest with the best grayscale test effect for deployment.
[0064] Step 5: Use Isolation Forest to segment documents. In practical applications, the Isolation Forest with the best grayscale test effect can be used to segment documents, which can effectively reduce the storage space occupied by the documents.
[0065] Figure 4 A cloud disk document display method provided by an exemplary embodiment of the present application is shown, which is applied to a client. The method 400 can be executed by an electronic device. In other words, the method can be executed by software or hardware installed in an electronic device. The electronic device can be a terminal device such as a mobile phone. Figure 4 As shown, the method mainly includes the following steps: S401: In response to the input editing operation, perform corresponding editing on the cloud disk document.
[0066] In an embodiment of the present application, the client can perform corresponding editing on the cloud disk document in response to the input editing operation.
[0067] S402: Display the edited cloud disk document, and send editing information corresponding to the editing operation to the server.
[0068] The editing information includes editing operation instruction information and a document identifier of the cloud disk document, and the editing operation instruction information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation instruction information.
[0069] In the embodiment of the present application, the client can display the edited cloud disk document for the user to confirm, and send the editing information corresponding to the editing operation to the server. The server can edit the first fragment associated with the document identifier based on the editing operation indication information in the editing information, which can effectively reduce the occupation of the cloud disk storage space.
[0070] In an optional implementation, the editing information also includes an upload object identifier. In the embodiment of the present application, the editing information also includes an upload object identifier, mainly because the cloud disk document is shared and stored, and different users edit the cloud disk document differently. In order to avoid downloading cloud disk documents edited by other users when downloading, the corresponding upload object identifier can be added to the corresponding editing information, or it can be called a user identifier, to distinguish the edited cloud disk document from the cloud disk documents edited by other users.
[0071] In an optional implementation, before sending the editing information to the server in response to the editing operation on the cloud disk document, the method further includes: Obtain the document ID and upload object ID of the cloud disk document to be uploaded; Get the document ID of the cloud disk document stored on the server; In the case where the document identifier is the same as the document identifier of the cloud disk document stored on the server, a successful upload message is displayed and the document identifier and the upload object identifier are sent to the server; When the document identifier is different from the document identifier of the cloud disk document stored in the server, the cloud disk document, the document identifier and the upload object identifier are sent to the server.
[0072] In an embodiment of the present application, the client can obtain the document identifier and upload object identifier of the cloud disk document to be uploaded. Then, the document identifier of the cloud disk document stored by the server can be obtained by calling the interface provided by the server, and then it can be determined whether the cloud disk document exists in the database of the server based on the document identifier. If it does exist, the user is informed that the upload is complete (a successful upload message is displayed), and the upload is achieved in seconds. If it does not exist, the cloud disk document, document identifier and upload object identifier can be sent to the server. Not only can the upload efficiency be improved, but also resources can be saved.
[0073] In the above optional implementation, the document identifier of the cloud disk document can be obtained by calculating the hash value of the cloud disk document.
[0074] In an embodiment of the present application, when a user uploads a cloud disk document, the client can calculate a hash value for the cloud disk document to be uploaded as a unique identifier for the cloud disk document. The hash value is a numerical value obtained through logical operations based on the data of the content of the document. Different documents have different hash values, so it can be used as a document identifier. In practical applications, a suitable hash algorithm can be selected, such as Message Digest Algorithm 5 (MD5), Secure Hash Algorithm 1 (SHA-1), Secure Hash Algorithm 256 (SHA-256), etc., and the hash algorithm can be used to calculate the cloud disk document to generate the corresponding hash value.
[0075] In an optional implementation, the method further includes: In response to an instruction to download the cloud disk document, sending a download message to the server, wherein the download message includes the document identifier and the upload object identifier; Receive the download document sent by the server and display the download document.
[0076] In an embodiment of the present application, the client can receive an instruction to download a cloud disk document, and then send a corresponding download message to the server, so that the server can merge the fragments corresponding to the cloud disk document to obtain a downloaded document. Then the downloaded document sent by the server is received and displayed, wherein the downloaded document is obtained by the server by merging the second fragment and the third fragment, wherein the third fragment is an unedited fragment associated with the document identifier and the upload object identifier, and the second fragment is an edited fragment associated with the document identifier and the upload object identifier.
[0077] In an embodiment of the present application, the client can perform corresponding editing on the cloud disk document in response to the input editing operation; display the edited cloud disk document, and send editing information corresponding to the editing operation to the server, the editing information includes editing operation indication information and the document identification of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information, which can effectively reduce the occupancy of the cloud disk storage space.
[0078] The cloud disk document editing method provided in the embodiment of the present application can be executed by a cloud disk document editing device. In the embodiment of the present application, the cloud disk document editing device executing the cloud disk document editing method is taken as an example to illustrate the cloud disk document editing device provided in the embodiment of the present application.
[0079] Figure 5 The schematic diagram of the structure of a cloud disk document editing device provided by an exemplary embodiment of the present application is shown. The cloud disk document editing device is applied to the server and can be implemented as follows: Figure 1 All or part of the content in the illustrated embodiment, the cloud disk document editing device includes: a receiving module 501, a first acquisition module 502, a second acquisition module 503 and a storage module 504.
[0080] In an embodiment of the present application, a receiving module 501 is used to receive editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation indication information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; a first acquisition module 502 is used to obtain a first fragment of the cloud disk document associated with the document identifier stored in the cloud disk; a second acquisition module 503 is used to edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation indication information to obtain a second fragment; a storage module 504 is used to associate the second fragment with the document identifier and store it in the cloud disk.
[0081] In an optional implementation, the editing information further includes an upload object identifier; When the storage module 504 is used to associate the second fragment with the document identifier and store it in the cloud disk, it is specifically used to: The second fragment, the document identifier and the upload object identifier are associated and stored in the cloud disk. In an optional implementation, the receiving module 501 is further used to receive the cloud disk document to be uploaded, the document identifier of the cloud disk document, and the upload object identifier sent by the client; In an optional implementation, the device further includes a segmentation module, which is used to determine the length of segmenting the cloud disk document according to the target isolation forest; The segmentation module is further used to segment the cloud disk document according to the length to obtain a first fragment of the cloud disk document; In an optional implementation, the storage module 504 is further configured to store the first fragment of the cloud disk document, the document identifier, and the upload object identifier in association with each other in the cloud disk.
[0082] In an optional implementation, the target isolation forest is determined by: An isolation forest is constructed by treating stored documents that are not edited online as normal and stored documents that are edited online as abnormal; Initializing the isolation forest using multiple sets of parameters to obtain multiple initial isolation forests; Using a swarm intelligence algorithm to train the initial isolation forest to obtain multiple intermediate isolation forests; The target isolated forest is determined by performing grayscale tests on a plurality of the intermediate isolated forests.
[0083] In an optional implementation, initializing the isolation forest by using multiple sets of parameters to obtain multiple initial isolation forests includes: A plurality of the initial isolation forests are obtained by respectively setting the leaf nodes in the isolation forest using the plurality of groups of parameters.
[0084] In an optional implementation, the using a swarm intelligence algorithm to train the initial isolation forest to obtain an intermediate isolation forest includes: By performing feature extraction on the stored document, a feature vector corresponding to the stored document is obtained; By inputting the feature vector into the initial isolation forest, the length of segmenting the stored document is obtained; Obtaining the fitness of each tree in the initial isolation forest by segmenting the stored document according to the length of the segmented stored document; Performing genetic operations on the fitness of each of the trees through a swarm intelligence algorithm to update the parameters of each tree in the intermediate isolated forest; When the number of inheritance reaches a threshold, the tree with the highest fitness is mapped to the initial isolation forest to obtain an intermediate isolation forest.
[0085] In an optional implementation, the performing of genetic operations on the fitness of each of the trees by a swarm intelligence algorithm to update the parameters of each tree in the intermediate isolation forest includes at least one of the following: Performing normalization processing on the fitness of each of the trees, and selecting the tree for inheritance when the normalized fitness of the tree is greater than or equal to a first threshold; Randomly select two of the trees, and cross the parameters of the two positions of the trees; The tree is randomly selected, a variation value is randomly generated for each parameter of the tree within a preset range, and the parameter is mutated when the variation value is greater than a second threshold.
[0086] In an optional manner, the receiving module 501 is further used to receive a document identifier and an upload object identifier of a stored cloud disk document sent by a client, wherein the upload object identifier is used to indicate an object that is allowed to modify the cloud disk document corresponding to the document identifier.
[0087] In an optional implementation, the receiving module 501 is further configured to receive a download message sent by the client, wherein the download message includes the upload object identifier and the document identifier; In an optional implementation, the device also includes: a sending module, used to obtain the downloaded document by merging the second fragment with the third fragment and send the downloaded document to the client, wherein the third fragment is an unedited fragment of the first fragment of the cloud disk document associated with the upload object identifier and the document identifier.
[0088] The cloud disk document editing device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0089] The cloud disk document editing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0090] The cloud disk document editing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0091] The cloud disk document display method provided in the embodiment of the present application can be executed by a cloud disk document display device. In the embodiment of the present application, the cloud disk document display device executing the cloud disk document display method is taken as an example to illustrate the cloud disk document display device provided in the embodiment of the present application.
[0092] Figure 6 The schematic diagram of the structure of a cloud disk document display device provided by an exemplary embodiment of the present application is shown. The cloud disk document display device, applied to a client, can achieve the following Figure 4 All or part of the content in the illustrated embodiment, the cloud disk document display device includes: an editing module 601 and a display module 602.
[0093] In an embodiment of the present application, the editing module 601 is used to perform corresponding editing on the cloud disk document in response to an input editing operation; the display module 602 is used to display the edited cloud disk document and send editing information corresponding to the editing operation to the server, wherein the editing information includes editing operation indication information and the document identifier of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information.
[0094] In an optional implementation, the editing information also includes an upload object identifier.
[0095] In an optional implementation, the device further includes an acquisition module, configured to: Obtain the document ID and upload object ID of the cloud disk document to be uploaded; Get the document ID of the cloud disk document stored on the server; In an optional implementation, the display module 602 is further configured to: In the case where the document identifier is the same as the document identifier of the cloud disk document stored on the server, a successful upload message is displayed and the document identifier and the upload object identifier are sent to the server; In an optional implementation, the device also includes a sending module for sending the cloud disk document, the document identifier and the upload object identifier to the server when the document identifier is different from the document identifier of the cloud disk document stored in the server.
[0096] In an optional implementation, the sending module is further used to send a download message to the server in response to an instruction to download the cloud disk document, wherein the download message includes the document identifier and the upload object identifier; In an optional implementation, the display module 602 is further configured to receive a download document sent by the server and display the download document.
[0097] The cloud disk document display device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0098] The cloud disk document display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0099] The cloud disk document display device provided in the embodiment of the present application can achieve Figure 4 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0100] Alternatively, if Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, and the memory 702 stores a program or instruction that can be executed on the processor 701. When the program or instruction is executed by the processor 701, the various steps of the above-mentioned cloud disk document editing method or cloud disk document display method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0101] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0102] Figure 8FIG. 8 is a block diagram of another electronic device 800 according to an exemplary embodiment of the present application. The electronic device 800 may be implemented as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a TV, etc. The electronic device 800 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.
[0103] Typically, the electronic device 800 includes a processor 801 and a memory 802 .
[0104] The processor 801 may include one or more processing cores, such as a 4-core processor, a 10-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0105] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement all or part of the steps in the cloud disk document editing method or cloud disk document display method shown in the method embodiment of the present application.
[0106] In some embodiments, the electronic device 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807 and a power supply 808.
[0107] In some embodiments, the electronic device 800 further includes one or more sensors 809 , including but not limited to: an acceleration sensor 810 , a gyroscope sensor 811 , a pressure sensor 812 , an optical sensor 813 , and a proximity sensor 814 .
[0108] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the electronic device 800, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0109] An embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned cloud disk document editing method or cloud disk document display method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0110] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0111] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned cloud disk document editing method or cloud disk document display method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0112] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0113] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the above-mentioned cloud disk document editing method or cloud disk document display method.
[0114] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0116] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A cloud disk document editing method, applied to a server, characterized in that: include: Receiving editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation instruction information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; Acquire a first fragment of the cloud disk document associated with the document identifier and stored in the cloud disk; Editing the first fragment of the cloud disk document according to the editing operation indicated by the editing operation instruction information to obtain a second fragment; The second fragment is associated with the document identifier and stored in the cloud disk.
2. The method according to claim 1, characterized in that The editing information also includes an upload object identifier; The storing the second fragment in association with the document identifier in the cloud disk includes: The second fragment, the document identifier and the upload object identifier are associated and stored in the cloud disk.
3. The method according to claim 1, characterized in that Before receiving the editing information of the cloud disk document sent by the client, the method further includes: Receive the cloud disk document to be uploaded, the document identifier of the cloud disk document and the upload object identifier sent by the client; Determine the length of segmenting the cloud disk document according to the target isolation forest; According to the length, the cloud disk document is segmented to obtain a first fragment of the cloud disk document; The first fragment of the cloud disk document, the document identifier and the upload object identifier are associated and stored in the cloud disk.
4. The method according to claim 3, characterized in that: The target isolation forest is determined in the following way: An isolation forest is constructed by treating stored documents that are not edited online as normal and stored documents that are edited online as abnormal; Initializing the isolation forest using multiple sets of parameters to obtain multiple initial isolation forests; Using a swarm intelligence algorithm to train the initial isolation forest to obtain multiple intermediate isolation forests; The target isolated forest is determined by performing grayscale tests on a plurality of the intermediate isolated forests.
5. The method according to claim 4, characterized in that Initializing the isolation forest by using multiple sets of parameters to obtain multiple initial isolation forests includes: By using the multiple groups of parameters to respectively set the leaf nodes in the isolation forest, multiple initial isolation forests are obtained.
6. The method according to claim 4, characterized in that The method of using a swarm intelligence algorithm to train the initial isolation forest to obtain an intermediate isolation forest includes: By performing feature extraction on the stored document, a feature vector corresponding to the stored document is obtained; By inputting the feature vector into the initial isolation forest, the length of segmenting the stored document is obtained; Obtaining the fitness of each tree in the initial isolation forest by segmenting the stored document according to the length of the segmented stored document; Performing genetic operations on the fitness of each of the trees through a swarm intelligence algorithm to update the parameters of each tree in the intermediate isolated forest; When the number of inheritance reaches a threshold, the tree with the highest fitness is mapped to the initial isolation forest to obtain an intermediate isolation forest.
7. The method according to claim 6, characterized in that The step of performing genetic operations on the fitness of each of the trees by using a swarm intelligence algorithm to update the parameters of each tree in the intermediate isolation forest includes at least one of the following: Performing normalization processing on the fitness of each of the trees, and selecting the tree for inheritance when the normalized fitness of the tree is greater than or equal to a first threshold; Randomly select two of the trees, and cross the parameters of the two positions of the trees; The tree is randomly selected, a variation value is randomly generated for each parameter of the tree within a preset range, and the parameter is mutated when the variation value is greater than a second threshold.
8. The method according to claim 2, characterized in that: Before receiving the editing information of the cloud disk document sent by the client, the method further includes: A document identifier and an upload object identifier of a stored cloud disk document sent by a client are received, where the upload object identifier is used to indicate an object that is allowed to modify the cloud disk document corresponding to the document identifier.
9. The method according to claim 2 or 8, characterized in that: After storing the second fragment in association with the document identifier in the cloud disk, the method further includes: Receiving a download message sent by the client, wherein the download message includes the upload object identifier and the document identifier; The download document is obtained by merging the second fragment with the third fragment and sending the download document to the client, wherein the third fragment is an unedited fragment of the first fragment of the cloud disk document associated with the upload object identifier and the document identifier.
10. A cloud disk document display method, applied to a client, characterized in that: include: In response to the input editing operation, performing corresponding editing on the cloud disk document; The edited cloud disk document is displayed, and editing information corresponding to the editing operation is sent to the server, wherein the editing information includes editing operation indication information and the document identifier of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information.
11. The method according to claim 10, characterized in that The editing information also includes an upload object identifier.
12. The method according to claim 10, characterized in that Before sending the editing information to the server in response to the editing operation on the cloud disk document, the method further includes: Obtain the document ID and upload object ID of the cloud disk document to be uploaded; Get the document ID of the cloud disk document stored on the server; In the case where the document identifier is the same as the document identifier of the cloud disk document stored on the server, a successful upload message is displayed and the document identifier and the upload object identifier are sent to the server; When the document identifier is different from the document identifier of the cloud disk document stored in the server, the cloud disk document, the document identifier and the upload object identifier are sent to the server.
13. A cloud disk document editing device, characterized in that: include: A receiving module, configured to receive editing information of a cloud disk document sent by a client, wherein the editing information includes editing operation instruction information and a document identifier of the cloud disk document, and the cloud disk document is stored in the cloud disk in the form of fragments; A first acquisition module, configured to acquire a first fragment of the cloud disk document associated with the document identifier and stored in the cloud disk; A second acquisition module, configured to edit the first fragment of the cloud disk document according to the editing operation indicated by the editing operation indication information to obtain a second fragment; A storage module is used to associate the second fragment with the document identifier and store it in the cloud disk.
14. A cloud disk document display device, characterized in that: include: The editing module is used to perform corresponding editing on the cloud disk document in response to the input editing operation; A display module is used to display the edited cloud disk document and send editing information corresponding to the editing operation to the server, wherein the editing information includes editing operation indication information and the document identifier of the cloud disk document, and the editing operation indication information is used to instruct the server to edit the first fragment of the cloud disk document based on the editing operation indicated by the editing operation indication information.
15. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 12 are implemented.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
17. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to perform the steps of the method according to any one of claims 1 to 12.
Citation Information
Cited By
Cloud disk document editing method and apparatus, electronic device, storage medium, and computer program product
WO2026144600A1