Nothing Special   »   [go: up one dir, main page]

CN108111598B - Cloud disk data issuing method and device and storage medium - Google Patents

Cloud disk data issuing method and device and storage medium Download PDF

Info

Publication number
CN108111598B
CN108111598B CN201711372692.2A CN201711372692A CN108111598B CN 108111598 B CN108111598 B CN 108111598B CN 201711372692 A CN201711372692 A CN 201711372692A CN 108111598 B CN108111598 B CN 108111598B
Authority
CN
China
Prior art keywords
version number
item
history
terminal
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711372692.2A
Other languages
Chinese (zh)
Other versions
CN108111598A (en
Inventor
史传红
李智文
翟淑宝
娄小川
黄锦章
张伟烽
禤宝琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd, Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201711372692.2A priority Critical patent/CN108111598B/en
Publication of CN108111598A publication Critical patent/CN108111598A/en
Application granted granted Critical
Publication of CN108111598B publication Critical patent/CN108111598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a cloud disk data issuing method, a cloud disk data issuing device and a storage medium, wherein the method comprises the following steps: receiving request information of a current storage item under a preset directory, which is sent by a terminal, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information of the historical storage item which is used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time; determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued; selecting the number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item; and issuing the target storage item to the terminal, and by the mode, repeated issuing of the stored data can be avoided, so that the flow can be reduced, and the time consumption is reduced.

Description

Cloud disk data issuing method and device and storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a cloud disk data issuing method, a cloud disk data issuing device and a storage medium.
Background
The cloud disk is also called as a network U disk, a network hard disk and the like, is an online storage service, can provide file management functions such as storage, access, backup, sharing and the like of files for a user, and the user can manage the files in the cloud disk on a mobile phone or a computer and other terminals in an internet login mode no matter where the user is, as long as the user can connect with a network, so that the cloud disk does not need to be carried about and is convenient for data storage.
At present, after a terminal pulls a storage resource under a certain directory in a cloud disk, if the storage resource under the directory is subjected to operations such as addition, deletion or modification, and the like, when the terminal accesses the directory again, a cloud disk system will re-issue all the storage resources under the directory to the terminal, so that a large flow is required to be consumed for transmitting the storage resource, and the time consumed for the terminal to receive and issue data is also increased.
Disclosure of Invention
The embodiment of the invention provides a cloud disk data issuing method, a cloud disk data issuing device and a storage medium, which can avoid repeated issuing of stored data, thereby reducing flow and time consumption.
The embodiment of the invention provides a cloud disk data issuing method, which comprises the following steps:
receiving request information of a current storage item under a preset directory, which is sent by a terminal, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information of the historical storage item which is used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time;
determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
selecting the number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and issuing the target storage item to the terminal.
Correspondingly, an embodiment of the present invention further provides an apparatus for issuing cloud disk data, including:
the receiving module is used for receiving request information of a current storage item in a preset directory, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time;
the determining module is used for determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
the selecting module is used for selecting the number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and the sending module is used for sending the target storage item to the terminal.
Optionally, the apparatus further includes a setting module, configured to set a version number of the current storage item according to an operation time of the current storage item in a predetermined directory, where the later the operation time of the storage item is, the larger the version number is.
Optionally, the obtaining module is further configured to obtain, according to the request information, a minimum version number of a history folder and a minimum version number of a history file that have been sent to the terminal until the last time the history storage item was sent to the terminal, so as to obtain history version information, where the minimum version number of each type of history storage item is used to indicate the earliest operation time of the corresponding type of history storage item;
the determination module is further to:
comparing the minimum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is smaller than the minimum version number of the history folder, and obtaining the residual folders;
comparing the minimum version number of the history file with the version number of the current file to determine the current file of which the version number is smaller than the minimum version number of the history file, and obtaining a residual file;
and determining that the remaining storage items sent to the terminal are not sent after the historical storage items are sent to the terminal last time in the current storage items according to the remaining folders and the remaining files, wherein the storage items to be sent comprise the remaining storage items.
Optionally, the history identification information further includes a history fully issued flag of a folder and a history fully issued flag of a file, the history fully issued flag is 0 or 1, where "0" indicates that all history file/folder entries in the predetermined directory have not been fully issued to the terminal after the last history entry was issued to the terminal, and "1" indicates that all history file/folder entries in the predetermined directory have been fully issued to the terminal after the last history entry was issued to the terminal;
the apparatus further comprises a control module to:
judging whether the historical issuing complete mark of the folder is 0 or not;
if yes, controlling the determining module to execute a step of comparing the minimum version number of the historical folder with the version number of the current folder;
the control module is also used for judging whether the historical issuing complete mark of the file is 0 or not; and if so, controlling the determining module to execute a step of comparing the minimum version number of the historical file with the version number of the current file.
Optionally, the apparatus further includes a first determining module and a first generating module;
the first judging module is used for judging whether folders which are not selected and are sent to the terminal exist in the current storage item of the preset directory or not and judging whether files which are not selected and are sent to the terminal exist in the current storage item of the preset directory or not;
the first generation module is used for generating a current issuing complete mark of a folder and enabling the current issuing complete mark of the folder to be '0' when the folder which is not selected and is sent to the terminal exists in the current storage item of the preset directory; when no folder which is not selected and is sent to the terminal exists in the current storage item of the preset directory, generating a current issuing complete mark of the folder, and enabling the current issuing complete mark of the folder to be '1';
the first generation module is used for generating a current issuing complete mark of a file when the file which is not selected to be sent to the terminal exists in the current storage item of the preset directory, and enabling the current issuing complete mark of the file to be '0'; and when the file which is not selected and is sent to the terminal does not exist in the current storage item of the preset directory, generating a current issuing complete mark of the file, and enabling the current issuing complete mark of the file to be '1'.
Optionally, the apparatus further comprises an update module;
the updating module is used for updating the historical identification information according to the current issued complete mark of the folder, the current issued complete mark of the file, and the maximum version number and the minimum version number of each type of storage item in the target storage item to obtain current identification information;
the sending module is specifically configured to send the current identification information and the target storage item to the terminal.
Optionally, the updating module is further configured to arrange the issued complete flag, the maximum version number, and the minimum version number in the updated historical identifier information according to a predetermined format to form current identifier information in a character string form.
Optionally, the selecting module is configured to select the number of storage items from the storage items to be issued according to a selecting sequence of the newly added deleted item, the newly added folder, the newly added file, the remaining folder, and the remaining file.
Optionally, the system further comprises a second judging module and a second generating module;
the second judging module is used for judging whether the maximum version number of the historical deleted item is smaller than the minimum version number of the current deleted item;
the second generation module is used for generating a deletion item overflow mark when the maximum version number of the historical deletion item is smaller than the minimum version number of the current deletion item, and enabling the value of the deletion item overflow mark to be 1;
the sending module is further configured to send the deletion item overflow flag to the terminal, so that the terminal blanks the history identification information according to the deletion item overflow flag and resends request information for a current storage item in a predetermined directory;
and the second generation module is used for generating a deletion item overflow mark when the maximum version number of the historical deletion item is not less than the minimum version number of the current deletion item, enabling the value of the deletion item overflow mark to be 0, and controlling the determination module to execute the step of determining the updated incremental storage item after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information.
The embodiment of the present invention further provides a storage medium, where multiple instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the steps in the cloud disk data issuing method.
In the cloud disk data issuing method, historical version information of issued historical storage items is acquired from request information of a terminal when the historical storage items are intercepted to the terminal last time, then the incremental storage items updated after the historical storage items are issued to the terminal last time are determined from current storage items under a preset directory according to the historical version information, storage items to be issued are obtained, the storage items with the quantity requested by the terminal are selected from the storage items to be issued and issued to the terminal, in the scheme, the storage items to be issued this time are selected from the incremental storage items updated after the historical storage items are issued to the terminal last time, therefore, the storage items issued to the terminal this time are only the storage items updated after the last time are issued, the issued historical storage items do not need to be repeatedly issued to the terminal, and therefore, the repeated data issuing is avoided, therefore, the flow consumed by data transmission can be reduced, the time consumption can be reduced, and the terminal can quickly receive the issued storage items.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a scene schematic diagram of a cloud disk data issuing method according to an embodiment of the present invention;
fig. 1b is a flowchart of a cloud disk data issuing method according to an embodiment of the present invention;
fig. 2 is a schematic view of a storage form of a storage item in a cloud disk data issuing method provided by an embodiment of the present invention;
fig. 3 is a schematic diagram of version numbers of storage items after operating a part of the storage items shown in fig. 2 in the cloud disk data issuing method provided in the embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for issuing cloud disk data according to an embodiment of the present invention;
fig. 5 is a schematic view illustrating interaction between a terminal and a cloud disk when the terminal first requests a storage item in a predetermined directory in a cloud disk data issuing method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart illustrating a process of determining an incremental storage item in the cloud disk data issuing method according to the embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a storage item in a predetermined directory displayed on a terminal before a request message is issued in the cloud disk data issuing method according to the embodiment of the present invention;
fig. 8 is a schematic diagram of a storage item in a predetermined directory displayed after a terminal receives a target storage item in the cloud disk data issuing method provided in the embodiment of the present invention;
fig. 9 is a schematic flowchart illustrating a process of determining remaining storage items in the cloud disk data issuing method according to the embodiment of the present invention;
fig. 10 is a schematic view illustrating interaction between a terminal and a cloud disk when the terminal requests a storage item in a predetermined directory again in the cloud disk data issuing method according to the embodiment of the present invention;
fig. 11 is another schematic interaction diagram of the cloud disk when the terminal requests the storage item in the predetermined directory again in the cloud disk data issuing method provided in the embodiment of the present invention;
fig. 12 is a schematic structural diagram of a cloud disk data issuing device according to an embodiment of the present invention;
fig. 13 is another schematic structural diagram of a cloud disk data issuing device according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a cloud disk data issuing method, a cloud disk data issuing device and a storage medium. The cloud disk data issuing device can be integrated into equipment such as a server.
As shown in fig. 1a, fig. 1a is a scene schematic diagram of a cloud disk data issuing method according to an embodiment of the present invention. In a usage scenario of the embodiment of the present invention, the server 101, the network 102, and the terminal are involved, the terminal may include a plurality of terminals, for example, a terminal a, a terminal B, and a terminal C, the terminal may be a mobile phone, a tablet computer, a notebook computer, or a personal computer, and the server 101 is, for example, a cloud server of a cloud disk. The server 101 and the terminal A, B, C are connected via a network 102. The terminal A, B, C may request the server to send down the data stored in the cloud disk, or upload the data to the cloud disk for storage, or modify or delete the data in the cloud disk.
Taking the terminal a as an example, referring to fig. 1b, the server 101 may be configured to receive request information for a current storage item in a predetermined directory, where the request information carries a requested quantity and history identification information, where the history identification information includes history version information used to identify that the history storage item has been issued to the terminal since the last time the history storage item was issued to the terminal a. After receiving the request information, the server 101 may further determine whether the request information is the request information first sent by the terminal a according to the request information, if so, select a corresponding number of folders/files according to the number requested by the terminal a and send the folders/files to the terminal a, for example, the folders may be preferentially selected, the files are then selected and sent to the terminal, and further generate identification information according to the selected folders/files and send the identification information to the terminal a.
If the request information is not the request information sent by the terminal A for the first time, determining an incremental storage item updated after the historical storage item is issued to the terminal A for the last time from the current storage items in the preset directory according to the historical version information; in addition, the server 101 may further determine, according to the history version information, that the remaining storage items which have not been issued to the terminal a after the last history storage item was issued to the terminal from the current storage item, so as to obtain the storage item to be issued according to the incremental storage item and the remaining storage items. And then selecting the storage items with the requested quantity from the storage items to be issued according to a preset rule to obtain target storage items, and issuing the target storage items to the terminal A. For example, the selection may be performed according to the selection sequence of the newly added deleted item, the newly added folder, the newly added file, the remaining folders, and the remaining files, so as to obtain the target storage item. In addition, further, the identification information can be generated according to the selected target storage item, and the identification information is sent to the terminal A together.
Therefore, the incremental storage items updated under the preset catalogue after the historical storage items are issued to the terminal A last time can be determined by utilizing the historical version information, and then the storage items with the number of issued storage items can be selected from the incremental storage items to the terminal A preferentially, so that the storage items issued to the terminal A this time are only the storage items updated after the historical storage items are issued last time, the issued historical storage items are not required to be issued to the terminal A repeatedly, repeated data issuing is avoided, the flow consumed by data transmission can be reduced, time consumption can be reduced, the terminal A can receive the issued storage items quickly, and time delay is reduced.
The following are detailed below.
First, a description is given of the version number of the storage item to which the present invention relates. In the method for processing a storage data request provided in the embodiment of the present invention, the storage data may be, for example, storage data in a cloud disk or storage data in other cloud storage spaces, and taking the cloud disk as an example, a folder, a file, and a deletion item in the cloud disk may all be regarded as a storage item, respectively, that is, the type of the storage item may include the folder, the file, and the deletion item may include the deleted file and the deleted folder. The predetermined directory refers to a directory in the cloud disk, and may be, for example, a root directory of the cloud disk or a directory in a folder under the root directory. Each storage item in the cloud disk has its operation time, and the operated contents can be modified, uploaded or deleted, for example.
As shown in fig. 2, the storage items in the cloud disk are stored in a tree form, in the embodiment of the present invention, each storage item is provided with a version number, the version number is set according to the operation time of the storage item, and the version numbers of the storage items in the same directory are sequentially set according to the sequence of the operation time of the storage items, where the precision of the operation time may be, for example, millisecond or more. In one embodiment, the later the operation time of the storage item, the larger the version number, and the earlier the operation time, the smaller the version number. For convenience of description, the version number of a storage item may be represented by a number. For example, as shown in fig. 2, the storage items in the root directory of the cloud disk include two files (file 1 and file 2), three folders (folder 1, folder 2, and folder 3), and three deletion items (deletion item 1, deletion item 2, and deletion item 3), where the directory of folder 1 further includes three storage items of folder 1-1, file 1-2, and file 1-3, and the directory of folder 1-1 further includes two storage items of file 1-1-1 and file 1-1-2. The folder 3 includes a file 3-1 under its directory.
The setting of the version number of the storage item will be described below by way of example. For example, file 1, file 2, folder 3, folder 4, and folder 5 are added in sequence under the root directory, where file 1 is the first added storage item, and folder 5 is the last added storage item, and then according to the sequence of the operation times of these five storage items, the corresponding version numbers are obtained in order from small to large: v1, V2, V3, V4, V5, where V1 is the version number of file 1, V2 is the version number of file 2, V3 is the version number of folder 1, and so on.
Thereafter, a file 3-1 is added under the folder 3, when the operation time of the folder 3 is the same as the addition time of the added file 3-1, the version number of the folder 3 is changed to V6 accordingly according to the change of the operation time thereof, and the operation times of the file 3-1 and the folder 3 are the same, so that the version number thereof is also V6. After that, a folder 1-1 and a file 1-2 are successively added under the folder 1, and the version numbers of the folder 1-1 and the file 1-2 are respectively set as V7 and V8 according to the sequence of the adding time, at this time, the operation time of the folder 1 is the same as the adding time of the file 1-2 added last, and the version number is correspondingly changed into V8. Then, the file 1-1-1 and the file 1-1-2 are added under the folder 1-1 in sequence, the version numbers of the file 1-1-1 and the file 1-1-2 are respectively set as V9 and V10 according to the sequence of adding time of the two files, the operation time of the folder 1-1 is the same as the adding time of the file 1-1-2 added at last, and the version number is correspondingly changed into V10.
The files 1-1-1 and the files 1-1-2 are added under the directory of the folder 1-1, and belong to storage items under the directory of the folder 1-1, compared with the folder 1, the storage items under the directory of the folder 1 are not changed, the folder 1-1 is only changed in the modification time and the version number, the name of the folder 1-1 is not modified, that is, the operation contents of modification, deletion and addition are not generated under the directory of the folder 1, and therefore the version number of the folder 1 is still V8. Thus, the version number of each storage item shown in fig. 2 is obtained, and the larger the version number of the storage item is, the later the operation time of the storage item is.
After that, if a certain directory has a delete, modify or upload (add) operation, the version number of the operated storage item is changed or set accordingly. For example, as shown in fig. 3, the following operations are sequentially performed on the storage items under the root directory shown in fig. 2 in chronological order: delete file 1, then upload file 3, then modify file 2, and finally delete folder 2. After the above operation, the deleted file 1 becomes a deleted item 4 whose version number is set to V14 immediately after the maximum version number V13, the version number of the added file 3 is V15, the version number of the modified file 2 becomes V16, the deleted folder 2 becomes a deleted item 5, and the version number is set to V17.
According to the similar setting process, when the storage items in a certain directory are modified, added and the like, the version numbers of the operated storage items are set according to the sequence of the operation time.
Referring to fig. 4, in the processing method for storing a data request provided in the embodiment of the present invention, the method specifically includes the following steps:
401. the receiving terminal sends request information of the current storage items in the preset directory, the request information carries the requested quantity and the history identification information, and the history identification information comprises history version information of the history storage items which are used for identifying the history storage items which are issued to the terminal when the history storage items are issued to the terminal last time.
The terminals involved in step 401 all refer to the same terminal. It should be noted that, in the embodiments of the present invention, "terminals" all refer to the same terminal, and all refer to terminals that issue request information for a current storage item in a predetermined directory, and "other terminals" refer to other terminals that are different from the terminals that issue the request information.
In this embodiment, a cloud disk is taken as an example for description, and in other embodiments, other cloud storage spaces may be used. The predetermined directory may be, for example, a root directory in the cloud disk, or a directory under a folder under the root directory. The request information also carries a catalog identification, and the predetermined catalog requested by the terminal can be determined according to the catalog identification.
The history identification information may be the history identification information issued by the server to the terminal together with the last history storage item issued to the terminal, or the history identification information generated by the last terminal according to the version number of the history storage item and other information after receiving the history storage item. In this embodiment, the history identification information is that the server issues the history storage item to the terminal the last time, and the history identification information is issued to the terminal together. The history storage items that have been issued to the terminal include the history storage item that was issued last time to the terminal.
In some embodiments, the version information may be, for example, a version number of the storage item, including a maximum version number and a minimum version number of each type of storage item that has been issued to the terminal.
After the receiving terminal sends the request information for the current storage item under the predetermined directory, the method may include: and judging whether the request information is sent by the terminal for the first time, if not, executing the step 402. When the request information is sent by the terminal for the first time, namely when the terminal requests the storage items in a certain directory in the cloud disk for the first time, the requested quantity information of the storage items is sent to the server, wherein the history identification information may not be sent to the cloud disk server, or the history identification information which is empty is sent to the cloud disk server, and the empty means that the information recorded in the history identification information is all empty characters. For example, as shown in fig. 5, taking the storage items in the "three countries" folder directory in the cloud disk as an example, when the terminal first sends a request for the storage items in the three countries folder directory (i.e., when the user first clicks the three countries folder through the terminal), the first request information sent to the server carries the requested number (count), the history identification information (sign _ info), and the directory identification (w _ key). All information in sign _ info is null characters, and count is, for example, 3, that is, 3 storage items are requested.
In an embodiment, whether the request information is sent by the terminal for the first time may be determined according to whether the request information carries history identification information and whether the information in the carried history identification information is null characters, for example, if the request information does not carry history identification information, it may be determined that the request information is sent by the terminal for the first time; if the request information carries history identification information and the information in the history identification information is all null characters, judging that the request information is sent by the terminal for the first time, and if the information in the history identification information is not all null characters, judging that the request information is not sent for the first time.
When the information in the history identification information is all null characters, the request information is shown to be sent by the terminal for the first time, so that the server can directly select the storage items in the three-country folder directory to return to the terminal. Specifically, when it is determined that the request message in step 401 is sent by the terminal for the first time, the following steps may be performed: still taking the three-country folder directory shown in fig. 5 as an example, the server selects a count number of storage items from the three-country folder directory according to the received first request information and returns the count number of storage items to the terminal, where the selection rule may be, for example, to preferentially select a folder and then select a file, and to sequentially select from the folder/file with the latest operation time, that is, to sequentially select from the folder/file with the largest version number. For example, as shown in fig. 5, since three countries have 1 to 4 folders below the folders, 3 folders of folder 4, folder 3, and folder 2 are preferentially selected from the 4 folders in descending order of version number and returned to the terminal. If only two folders exist under the three-country folder, the two folders and the file with the largest version number are selected and returned to the terminal, and so on.
After selecting 3 folders, determining version information according to the version numbers of the selected 3 folders, specifically, selecting the largest version number V13 from the version numbers of the 3 folders as the largest version number of the folders, and selecting the smallest version number V11 as the smallest version number of the folders, and in addition, when a storage item is first delivered to a terminal, selecting the largest version number of all the version numbers corresponding to all deletion items as the largest version number of the deletion item, where the largest version number of the deletion item is the version number V4 of the deletion item 4. The version information thus includes the maximum version number V4 of the deleted item, the maximum version number V13 of the folder, and the minimum version number V11 of the folder. And because the file is not selected in the first issuing operation, the maximum version number and the minimum version number of the file in the version information are both null.
In addition, besides the version information is determined, a file delivery complete mark and a file delivery complete mark can be generated, the file delivery complete mark can be represented by 0 and 1, when the file delivery complete mark is 0, the file delivery complete mark can represent that all the files/folders under the three-country file folders are not completely delivered to the terminal after one-time delivery operation, namely, a part of the files are not delivered to the terminal; when the delivery complete flag is 1, it indicates that all folders/files under the three-country folder have been completely delivered to the terminal after one delivery operation. As shown in fig. 5, after 3 folders are selected, 5 files and 1 folder are not selected, that is, none of the files and folders in the three-country folders in the first issuing operation are completely issued, so that the issuing complete flag of the folder is 0, and the issuing complete flag of the file is also 0, thereby determining the issuing complete flag of the folder and the file.
The identification information can be generated according to the file delivery complete mark, the file delivery complete mark and the determined version information, and the identification information and the selected 3 files are delivered to the terminal together. Further, the full delivery flag of the folder, the full delivery flag of the file, and the determined version information may be merged into a character string in a fixed format, so as to obtain the identification information, where the fixed format may be, for example: "full mark of file down-sending, maximum version number of deleted item, maximum version number of file". Thus, as shown in fig. 5, the identification information sign _ info generated in the first issue operation is: "0, 0, V4, V13, V11," where the maximum version number of a file and the minimum version number of a file are both null.
After the storage items in the three-country folder directory are requested for the first time, if the storage items in the three-country folder directory are changed, for example, a user logs in a cloud disk on another terminal (for example, a terminal different from the terminal that sent the request information in step 401) to delete some storage items, or modifies some storage items, or uploads new storage items, or the like, when the terminal accesses the storage items in the three-country folder directory again, when sending the request, the server sends the history identification information received when the history storage item was received last time (i.e., the history identification information received when the storage item was received for the first time) to the server together, so that the server can determine, according to the identification information, at least the incremental storage item updated in the three-country folder directory after the storage item was sent to the terminal for the first time, which will be described in detail below.
Continuing to refer to fig. 4, after step 401, when it is determined that the received request information for the current storage item of the predetermined destination is not first sent by the terminal, for example, when the received request information in step 401 is sent by the terminal for the third time, the last time in step 401 is the second time, the last issued historical storage item is the storage item issued to the terminal for the second time, and the historical identification information is the identification information issued to the terminal together when the storage item is issued to the terminal for the second time.
After the receiving terminal sends the request information for the current storage item in the predetermined directory, the method may further include the following steps: and acquiring the maximum version number of the history deletion item, the maximum version number of the history folder and the maximum version number of the history file which are issued to the terminal when the history storage item is issued to the terminal last time according to the request information to acquire history version information, wherein the maximum version number of each type of storage item is used for indicating the latest operation time of the corresponding type of history storage item, and the later operation time of the storage item is larger than the larger version number.
In this embodiment, the history version information includes the maximum version number of the history deletion item, the maximum version number of the history folder, and the maximum version number of the history file, which have been issued to the terminal until the last time the history storage item is issued to the terminal. Specifically, the maximum version number of the history deletion items that have been issued refers to the maximum version number among the version numbers of all the history deletion items that have been issued in the predetermined directory (including the history deletion item that has been issued last time) when the history storage item that has been issued last time is intercepted to the terminal. Similarly, the maximum version number of the history folder that has been issued to the terminal is the maximum version number among the version numbers of all the history folders (including the history folder that has been issued last time) issued in the predetermined directory when the history storage item was issued last time to the terminal, and the maximum version number of the history file that has been issued to the terminal is the maximum version number among the version numbers of all the history files (including the history file that has been issued last time) issued in the predetermined directory when the history storage item was issued last time to the terminal. And when the storage items are issued to the terminal each time, the selected storage items are selected according to the sequence of the version numbers of the corresponding types of storage items from large to small. Therefore, the storage items issued to the terminal each time comprise the storage item corresponding to the maximum version number of the storage item of the corresponding type. For example, when the history storage item is issued to the terminal last time, 3 folders in the predetermined directory are provided, the version numbers are respectively V3, V2 and V1 from large to small, when two folders are required to be selected and issued to the terminal, the two folders with the version number of V3 are selected, the two folders with the version numbers of V3 and V2 are sequentially selected and issued to the terminal, and the maximum version number of the history folder is V3 at this time.
Wherein, after receiving the request information, the history version information is acquired from the request information.
In one embodiment, after obtaining the historical version information, the method may further include: judging whether the maximum version number of the historical deleted item is smaller than the minimum version number of the current deleted item; if yes, generating a deletion item overflow mark, enabling the value of the deletion item overflow mark to be 1, then issuing the deletion item overflow mark to the terminal, enabling the terminal to empty the history identification information according to the deletion item overflow mark, and re-sending request information of a current storage item in a preset directory; if not, a delete item overflow flag is generated, the value of the delete item overflow flag is set to 0, and step 402 is executed.
The minimum version number of the current deletion item refers to the minimum version number in the version numbers of all current deletion items of the predetermined directory. The deletion list in the cloud disk may be limited in length, that is, only a part of the recently deleted deletion items may be retained, for example, only one thousand deletion items may be retained, and if a user deletes one thousand, five hundred deletion items, the deletion list overflows, so that five hundred deletion items will be lost and no longer retained in the deletion list, and thus when a storage item is selected according to the historical version information sent from the terminal and sent to the terminal, a data selection error may be caused. Therefore, in this embodiment, before determining the incremental storage item, it is first determined whether the maximum version number of the historical deletion item in the historical version information is smaller than the minimum version number of the current deletion item, if so, it indicates that the deletion list has an overflow, and at this time, a deletion overflow flag is generated, so that the value of the deletion overflow flag is 1, so that the terminal blanks the historical identifier information according to the deletion overflow flag, that is, all the information in the historical identifier information are blank characters, and retransmits the request information of the current storage item in the predetermined directory to the server, so that the server selects the corresponding storage item according to the first request process according to the request information and transmits the storage item to the terminal. The first request process may be performed with reference to the above description, and is not described in detail herein.
If the maximum version number of the history deletion item in the history version information is not less than the minimum version number of the current deletion item, it indicates that the deletion list does not overflow, at this time, a deletion item overflow flag of 0 is generated, and step 402 is executed. Therefore, in the embodiment of the present invention, when the delete item overflow flag is 0, step 402 is executed, and when the delete item overflow flag is 1, step 402 is not executed. It is understood that in some embodiments, the determination of deletion list overflow may not be performed, and step 402 may be performed directly after step 401.
402. And according to the historical version information, determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item, and obtaining a storage item to be issued.
The updated incremental storage item is a new storage item formed by modifying, adding and deleting the storage item under a preset directory after the historical storage item is issued last time, and can be a file, a folder or a deleted item. For example, after the last time of issuing the history storage item, the user modifies a file content in the predetermined directory through another terminal, and the modified file is an updated incremental storage item; for another example, after the last time the history storage item is issued to the terminal, the user uploads a folder to the predetermined directory through other terminals, and the uploaded folder is an updated incremental storage item; or after the last time of sending the history storage item to the terminal, the user deletes a file under the predetermined directory through other terminals, at this time, the deleted file becomes a deletion item, and the deletion item is an updated incremental storage item in the deletion list under the predetermined destination.
Before the receiving terminal sends the request information for the current storage item in the predetermined directory, the method may further include: and setting the version number of the current storage item according to the operation time of the current storage item in the preset directory, wherein the later the operation time of the storage item is, the larger the version number is. Therefore, when an updated incremental storage item is generated in the predetermined directory, the version number of the incremental storage item is set according to the operation time of the updated incremental storage item and the version number of the storage item in the predetermined directory when the update is generated, and the later the operation time of the storage item is, the larger the version number is, so that the sequence of the operation time of the storage item can be reflected by the version number of the storage item.
In an embodiment, as shown in fig. 6, step 402 may specifically include the following sub-steps:
4021. and comparing the maximum version number of the historical deleted item with the version number of the current deleted item to determine the current deleted item with the maximum version number of the historical deleted item and obtain the incremental deleted item.
4022. And comparing the maximum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is greater than the maximum version number of the history folder, so as to obtain the incremental folder.
4023. And comparing the maximum version number of the history file with the version number of the current file to determine the current file of which the version number is greater than the maximum version number of the history file, so as to obtain the incremental file.
4024. And determining an incremental storage item which is updated after the historical storage item is issued to the terminal last time in the current storage item according to the incremental deletion item, the incremental folder and the incremental file.
In this embodiment, the execution sequence of steps 4021 to 4023 is not limited, and may be sequentially performed according to the sequence of steps 4021 to 4023, or may be performed simultaneously in three steps, or may be performed according to the sequence of steps 4023, 4021, and 4022, and so on.
All the incremental deletion items, the incremental folders and the incremental files are incremental storage items. In this embodiment, the version numbers of the storage items reflect the sequence of the operation time of each storage item, and the larger the version number is, the later the operation time is, so that by comparing the maximum version numbers of the history deleted item, the history folder, and the history file with the version numbers of the storage items of the current corresponding type, it is possible to determine the incremental storage item updated under the predetermined directory after the last time the history storage item is issued to the terminal.
403. And selecting the storage items with the requested quantity from the storage items to be issued according to a preset rule to obtain a target storage item.
The predetermined rule may be, for example, selecting storage items requested by the terminal from the incremental deletion item, the incremental folder, and the incremental file in sequence according to the selection sequence of the incremental deletion item, the incremental folder, and the incremental file, so as to obtain a target storage item, and in addition, selecting the storage items of the same type according to the sequence of the version numbers from large to small when selecting the incremental storage items. For example, according to the comparison results of 4021 to 4023, if an incremental deletion item, an incremental folder, and an incremental file exist, if the number of storage items requested by the terminal is 3, and if the number of the incremental deletion item is greater than or equal to 3, the incremental deletion item with the version number 3 before is selected from the incremental deletion items according to the sequence of the version numbers from large to small, so as to obtain a target storage item; if the number of the incremental deletion items is less than 3, for example, 2, then 2 incremental deletion items are correspondingly selected from the incremental deletion items, and the remaining one is selected from the incremental folders first, that is, a folder with the maximum version number among the version numbers of all the incremental folders is selected from all the incremental folders, so as to obtain 3 storage items requested by the terminal, and so on.
Of course, in other embodiments, the storage items may also be selected according to other rules, for example, the storage items requested by the terminal are sequentially selected according to the selection order of the incremental folder, the incremental deletion item, and the incremental file, which is not limited herein.
404. And issuing the target storage item to the terminal.
And selecting the storage items with the quantity requested by the terminal from the incremental storage items and issuing the storage items to the terminal, so that the terminal can determine the deleted storage items in the storage list under the corresponding directory displayed on the terminal according to the received deletion items, further remove the storage items from the list and display the received incremental folders or the received incremental files on the list. For example, as shown in fig. 7, before the terminal issues no request information for the current storage item under the predetermined directory, the storage items under the "history" folder directory on the cloud disk displayed on the terminal include a "three kingdoms" folder, a "meta" folder, a "song" folder, a "down" folder, a "ming" folder, a "big clear" folder, and a "title 5" document file. When a user logs in the cloud disk at other terminals, deletes the meta folder in the history folder directory and uploads the last topic document file, an incremental file is generated in the history folder directory of the cloud disk: the 'last topic' document file is added with an incremental deletion item: a "meta" folder. Thus, when the terminal makes a request again for the current storage item under the "history" folder directory, and receives the returned target storage item, as shown in fig. 8, the "meta" folder under the "history" folder directory is deleted according to the "meta" folder delete item in the target storage item, is no longer displayed in the list under the "history" folder, and the "last integrated" document file is placed in the list under the history "folder for display according to the delta file of the" last topic "document file.
Therefore, through the above manner, if the updated incremental storage item is generated under the predetermined directory after the storage item under the predetermined directory is requested last time, when the terminal requests the storage item under the predetermined directory again, the storage item which is already issued to the terminal under the predetermined directory does not need to be issued to the terminal again, but is directly selected from the incremental storage items, so that the flow consumed by data transmission can be reduced, the time consumption can be reduced, the terminal can quickly receive the issued storage item, and the time delay is reduced.
Referring to fig. 9, in another embodiment of the present invention, after the receiving terminal sends the request information for the current storage item in the predetermined directory, the method may further include the following steps:
901. and acquiring the minimum version number of a history folder and the minimum version number of a history file which are issued to the terminal when the history storage item is issued to the terminal last time according to the request information so as to acquire history version information for marking the history storage item issued to the terminal last time, wherein the minimum version number of each type of history storage item is used for indicating the earliest operation time of the corresponding type of history storage item.
In this embodiment, the history version information further includes a minimum version number of the history folder and a minimum version number of the history file that have been issued to the terminal. Specifically, the minimum version number of the history folder is the minimum version number of the version numbers of all the history folders (including the history folder which has been issued last time) which have been issued last time in the predetermined directory when the history storage item has been issued last time to the terminal; the minimum version number of the history file is the minimum version number in the version numbers of all the history files (including the history file which is issued last time) in the preset directory when the history storage item is issued last time to the terminal.
In this embodiment, the history identification information further includes a history complete issuing flag of the folder and a history complete issuing flag of the file, where the history complete issuing flag is 0 or 1, where "0" indicates that all history file/folder entries in the predetermined directory have not been completely issued to the terminal after the last history storage entry was issued to the terminal, and "1" indicates that all history file/folder entries in the predetermined directory have been completely issued to the terminal after the last history storage entry was issued to the terminal. After receiving the request information carrying the history identification information, determining whether the history issuing complete flag of the folder is 0, if so, executing step 902, and if not, not executing step 902. In addition, it is also determined whether the file history issuance completion flag is 0, if yes, step 903 is executed, and if no, step 903 is not executed.
902. And comparing the minimum version number of the historical folder with the version number of the current folder to determine the current folder with the version number smaller than the minimum version number of the historical folder, and obtaining the residual folders.
When the historical issuing mark of the folder is 0, the fact that all historical folders under a preset directory are not completely issued to the terminal after the historical storage item is issued to the terminal last time is indicated, the historical folders with smaller version numbers are not issued to the terminal, at the moment, the minimum version numbers of the historical folders are compared with the version number of the current folder, if the version numbers of some current folders are smaller than the minimum version number of the historical folders, the fact that the part of folders are not issued to the terminal is indicated, therefore, the folders which are not issued to the terminal earlier in operation time after the storage item is issued to the terminal last time, namely the remaining folders, can be selected from the remaining folders to be issued to the terminal in the current issuing operation. When the history delivery complete flag of the folder is 1, it indicates that all the history folders of the predetermined directory have been delivered to the terminal after the last delivery of the history storage item to the terminal, and at this time, it is not necessary to select a folder from the history folders with a smaller version number to deliver to the terminal in the current delivery operation, so that step 902 does not need to be executed, thereby reducing the resource overhead of the server.
903. And comparing the minimum version number of the historical file with the version number of the current file to determine the current file of which the version number is smaller than the minimum version number of the historical file, so as to obtain the residual file.
Wherein, whether step 903 needs to be executed is determined according to the history issue complete flag of the file, and the specific process may refer to the description of step 902, which is not described herein again. The meaning indicated when the historical issuing of the file is completely marked as 0 or 1 can refer to the meaning that the issuing of the folder is completely marked as 0 or 1, and is not described herein any more.
In this embodiment, the execution sequence of steps 902 and 903 is not limited, and the two steps may be performed simultaneously, or 902 may be executed first and then 903 may be executed, or 903 and then 902 may be executed first.
904. And according to the remaining file folders and the remaining files, determining that the remaining storage items which are not sent to the terminal are not sent after the historical storage items are sent to the terminal last time in the current storage items, wherein the storage items to be sent comprise the remaining storage items.
Wherein, the residual folders and the residual files are residual storage items.
In this embodiment, selecting the requested number of storage items from the storage items to be issued according to a predetermined rule may specifically include: and selecting the storage items with the required quantity from the storage items to be issued according to the selection sequence of the newly added deletion item, the newly added folder, the newly added file, the remaining folders and the remaining files, so as to obtain the target storage item.
In this embodiment, not only the incremental storage items updated under the predetermined directory are determined, but also the remaining storage items are determined, so that the incremental storage items and the remaining storage items serve as storage items to be issued, and the storage items to be issued to the terminal are selected from the storage items to be issued. And if the number of the storage items of one type is less than the number requested by the terminal, selecting the storage items of the next type according to the selection sequence to obtain the target storage item.
In one embodiment, after obtaining the target storage item, the method may further include: judging whether a folder which is not selected and is sent to the terminal exists in the current storage item of the preset directory, if so, generating a current issuing complete mark of the folder, and enabling the current issuing complete mark of the folder to be '0'; if not, generating a current issuing complete mark of the folder, and enabling the current issuing complete mark of the folder to be '1'. In addition, whether files which are not selected and are sent to the terminal exist in the current storage items of the preset directory is judged; if so, generating a current issuing complete mark of the file, and marking the current issuing complete mark of the file as '0'; if not, generating a complete mark of the current issuing of the file, and marking the complete mark of the current issuing of the file as '1'.
Wherein, whether the folder which is not selected to be issued to the terminal exists in the current storage item can be judged according to the maximum version number and the minimum version number of the history folder in the history identification information and the folder in the selected target storage item, wherein, the folders (including the folder corresponding to the endpoint version number) of which the version numbers are between the maximum version number and the minimum version number of the history folder in the current folder are all the history folders which are selected to be issued to the terminal, and the folder to be sent at this time can be determined according to the folder in the target storage item, so after the folder to be sent at this time and the folders between the maximum version number and the minimum version number of the history folder are removed, if the folder exists in the current storage item, the folder which is not selected to be issued to the terminal exists in the current storage item of the predetermined directory, and setting a current issuing complete mark of the folder to be 0, if no folder exists in the current storage item after removing the folder to be sent this time and the folder between the maximum version number and the minimum version number of the historical folder, indicating that no folder which is not selected and is sent to the terminal exists in the current storage item, indicating that all current folders in the preset directory are selected and are sent to the terminal, and setting the current issuing complete mark of the folder to be 1 at this time. Similarly, the setting mode of the fully issued flag of the reference folder correspondingly sets the fully issued flag of the file to be 0 or 1.
In addition, a total issued complete flag, which is denoted as finish _ flag, may be generated according to the currently issued complete flags of the folders and files, where the value of finish _ flag may be 0(false) or 1(true) to indicate whether all folders and files in the predetermined directory have been selected and sent to the terminal. Specifically, when the currently issued complete flags of the folders and the files are both 1, the value of finish _ flag is 1, which indicates that all the folders and files in the preset directory have been selected and are sent to the terminal; when the current issuing of one of the folders and the files is completely marked as 0, the value of finish _ flag is 0, which indicates that all the folders and files in the preset directory still have folders or files which are not all selected and issued to the terminal.
Before sending the target storage item to the terminal, the method may further include: and updating the historical identification information according to the current issued complete mark of the folder, the current issued complete mark of the file, and the maximum version number and the minimum version number of each type of storage item in the target storage item to obtain the current identification information.
And updating the historical issuing complete mark of the folder in the historical identification information to the current issuing complete mark of the folder, and updating the historical issuing complete mark of the file in the historical identification information to the current issuing complete mark of the file, so as to obtain the current issuing complete marks of the folder and the file in the current identification information.
The maximum version number of each type of storage item in the target storage item comprises the maximum version number of a deleted item in the target storage item, the maximum version number of a folder and the maximum version number of a file, and the minimum version number comprises the minimum version number of the folder and the minimum version number of the file in the target storage item. When the target storage item does not contain a certain type of storage item, for example, the target storage item does not have a folder, that is, the folder is not sent to the terminal in the current sending, so that the maximum version number and the minimum version number of the history folder in the history identification information do not need to be updated, and the maximum version number of the folder in the current identification information is still the maximum version number of the history folder in the history identification information. When a folder exists in the target storage item, selecting the maximum version number of the history folder in the history identification information from all the version numbers corresponding to the folder in the target storage item, wherein the maximum version number of the history folder is larger than the maximum version number of the history folder and is the maximum version number of all the version numbers; and selecting the minimum version number which is smaller than the minimum version number of the historical folders and is the minimum version number of all the version numbers corresponding to the folders in the target storage item to update the minimum version number of the historical folders in the historical identification information.
If all the version numbers corresponding to the folders in the target storage item are greater than the maximum version number of the history folders, the minimum version number of the history folders in the history identification information does not need to be updated, namely the minimum version number of the folder of the current identification information is the minimum version number of the history folders, and if all the version numbers corresponding to the folders in the target storage item are less than the minimum version number of the history folders, the maximum version number of the history folders in the history identification information does not need to be updated, namely the maximum version number of the folder of the current identification information is the maximum version number of the history folders.
Based on a similar principle, the maximum version number of the deleted item, the maximum version number of the file, and the minimum version number of the deleted item in the history identifier information are updated according to the maximum version number of the deleted item, the maximum version number of the file, and the minimum version number of the file in the target storage item, and the specific process may be performed by referring to the setting mode of the maximum and minimum version numbers of the folder, which is not described herein in detail.
The updated historical identification information is current identification information, the current identification information comprises a current issuing complete mark of the folder, a current issuing complete mark of the file and current version information, and the current version information comprises a maximum version number and a minimum version number of the current folder, a maximum version number and a minimum version number of the current file and a maximum version number of a current deleted item.
After the updating of the history identification information, the method may further include: and arranging the issued complete mark, the maximum version number and the minimum version number in the updated historical identification information according to a preset format to form the current identification information in a character string form. That is, the current issued complete flag of the folder, the current issued complete flag of the file, the maximum version number and the minimum version number of the current folder, the maximum version number and the minimum version number of the current file, and the maximum version number of the current deleted item are arranged according to a fixed format, so as to obtain the current identification information in the form of a character string. The fixed format may be arranged, for example, in the following order: "complete mark of current down-sending of folder, complete mark of current down-sending of file, maximum version of current deleted item, maximum version number and minimum version number of current folder, maximum version number and minimum version number of current file".
For example, the currently issued full flag of folder, the currently issued full flag of file, the maximum version number and minimum version number of current folder, the maximum version number and minimum version number of current file, and the maximum version number of currently deleted item are 0, V5, V2, V4, V1, and V7, respectively, and are merged into one character string of fixed format, as follows: "0, 0, V7, V5, V2, V4, V1", thereby obtaining current identification information. In the embodiment, the current identification information is formed in a character string mode, so that the expandability of a protocol between the terminal and the server can be enhanced, and the logic of requesting the storage items by the terminal is simplified and unified.
After obtaining the current identification information, issuing the target storage item to the terminal may specifically include: and issuing the current identification information and the target storage item to the terminal. The terminal can update the storage items under the predetermined directory displayed on the terminal according to the received historical identification information and the target storage items, and send the current identification information received this time to the server when the storage items under the predetermined directory are requested next time.
In addition, in this embodiment, when the current identification information and the target storage item are issued to the terminal, a delete item overflow flag is also issued to the terminal, where the delete item overflow flag is represented by an overflow _ flag, where the overflow _ flag in the present issuing operation is, for example, 0, that is, the delete list in the cloud disk does not overflow. And the value of finish _ flag can also be transmitted to the terminal together.
The present invention will be further explained below by taking the storage items under the three kingdom folder directory shown in fig. 5 as an example.
Fig. 5 is a schematic diagram illustrating a first interaction between a terminal and a server of a cloud disk in an embodiment of the present invention, where the terminal requests a server for a storage item in a predetermined directory for the first time, and the server returns the storage item and identification information to the terminal for the first time according to the request of the terminal. As shown in fig. 5, when a storage item under the three-country folder directory is requested for the first time, the storage items issued to the terminal by the server are folder 3, folder 2, and folder 1, and the identification information issued to the terminal is: "0, 0, V4, V13, V11,". The method is characterized by comprising the steps of respectively representing a full issuing mark of a folder, a full issuing mark of a file, a maximum version number of a deleted item, a maximum version number of the folder and a minimum version number of the folder, wherein the last space symbol represents that the maximum version number of the file and the minimum version number of the file are empty.
Referring to fig. 10, when the terminal sends the request information for the storage item in the three-country folder directory to the server for the second time, the request information carries the history identification information received by the terminal last time, that is, the identification information received in the first request: "0, 0, V4, V13, V11,".
The server obtains a history issued complete mark of the folder, a history issued complete mark of the file, a maximum version number of a history deleted item, a maximum version number and a minimum version number of the history folder and a maximum version number and a minimum version number of the history file according to the received history identification information, wherein the maximum version number and the minimum version number are respectively ' 0 ', ' V4 ', ' V13 ', ' V11 ', '. In combination with the version numbers of the current storage items shown in fig. 10, the server compares the maximum version number of the historical deleted item with the version numbers of all current deleted items in the predetermined directory, and according to the comparison result, it can be known that the maximum version number of the historical deleted item is not less than the minimum version number V1 of the current deleted item, so that the deletion list does not overflow, and at this time, the server determines the incremental storage item according to the maximum version number of the historical deleted item, the historical folder, and the maximum version number of the historical file.
Specifically, according to the comparison result between the maximum version number V4 of the historical deleted item and the version numbers of all the current deleted items, there is no current deleted item with a version number greater than the maximum version number V4 of the historical deleted item in all the current deleted items, so that zero new deleted items are added; according to the comparison result between the maximum version number V13 of the historical folder and the version numbers of all current folders, no current folder with the version number larger than the maximum version number V13 of the historical folder exists in all current folders, and therefore zero newly added folders exist; since the maximum version number of the history file is null, the files 1 to 5 may be regarded as incremental files or may be regarded as residual files.
In addition, the server executes the determination of the remaining storage items after judging that the history issued complete flags of the folder and the file are both 0. Specifically, according to the comparison result between the minimum version number V11 of the history folder and the version numbers of all current folders, it can be seen that the version number V10 of the current folder 1 is smaller than the minimum version number V11 of the history folder, so that it is determined that the current folder 1 is a remaining folder, and since the minimum version number of the history file is empty, the files 1 to 5 can be regarded as delta files or remaining files.
Taking files 1-5 as the remaining files as an example, the number of the newly added files can be regarded as zero, and after determining that the incremental storage items and the remaining storage items are good, the server selects 3 storage items as target storage items according to the selection sequence of the newly added deletion item, the newly added folder, the newly added file, the remaining file folder and the remaining files. The newly added deleted item, the newly added folder and the newly added file are all zero, so that the deleted item, the newly added folder and the newly added file are selected from the rest of folders and the rest of files, and the storage items of the same type are selected from large to small according to the version numbers, so that the folders 1, the files 5 and the files 4 are selected as target storage items.
According to the version number of the selected target storage item, the version number of the file 5 is the largest version number of the version numbers of all the selected files, so that the largest version number of the history file in the history identification information is updated to the version number V9 of the file 5, the file 4 is the smallest version number of the version numbers of all the selected files, the smallest version number of the history file in the history identification information is updated to the version number V8 of the file 4, and the version number of the folder 1 is smaller than the smallest version number V11 of the history folder, so that the smallest version number of the history folder in the history identification information is updated to the version number V10 of the folder 1. The folder in the target storage item is only folder 1, that is, all version numbers corresponding to the folders in the target storage item are smaller than the minimum version number of the history folder, so that the maximum version number of the history folder in the history identification information does not need to be updated and is still V13. And no deleted item exists in the target storage item, so the maximum version number of the history deleted item in the history identification information also does not need to be updated, and is still V4.
In addition, after the folders 1, the files 5 and the files 4 are selected, according to the selected target storage items, all the folders in the three-country folder directory are selected to be sent to the terminal, so that the current issuing complete mark of the folder is 1, and the historical issuing complete mark of the folder in the historical identification information is updated to the current issuing complete mark of the folder. And the files 1-3 in the three-country folder directory are not selected and are sent to the terminal, so that the currently issued complete mark of the file is 0, and the history issued complete mark of the file in the history identification information does not need to be updated.
Thus, the updated history identification information can be obtained as follows: "1, 0, V4, V13, V10, V9, V8", thereby obtaining current identification information. And sending the selected target storage item and the current identification information to the terminal.
Referring to fig. 11, after the terminal requests the storage items under the three-country folder directory for the second time, if the user makes a change to the storage items under the three-country folder directory on other terminals, for example, deletes the folder 4, and then adds a new file 6, where the deleted folder 4 becomes the deleted item 5, the version number of the deleted item 5 is set to V14 immediately following the version number V13 of the deleted folder 4, and the version number of the newly added file 6 is set to V15. Then, when the terminal requests the storage items in the three-country folder directory for the third time, the last received history identification information "1, 0, V4, V13, V10, V9, V8" is sent to the server.
And after judging that the maximum version number of the historical deleted items is not less than the minimum version number of the version numbers of all the current deleted items, the server starts to determine the incremental storage items. According to the comparison result between the maximum version number V4 of the historical deletion item and the version number of the current deletion item, the version number V14 of the deletion item 5 is larger than the maximum version number V4 of the historical deletion item, so that the newly added deletion item is obtained: delete item 5; according to the comparison result between the maximum version number V13 of the historical folder and the version number of the current folder, the current folder has no folder with the version number larger than the maximum version number V13 of the historical folder, so that zero newly added folders exist; according to the comparison result between the maximum version number V9 of the history file and the version number of the current file, the version number V15 of the file 6 is larger than the maximum version number V9 of the history file, so that the added file is obtained: file 6. According to the history issuing complete mark of the folder with the value of 1, after the history storage item is issued to the terminal at the last time, all folders in the preset directory are selected and issued to the terminal, so that the number of the remaining folders is zero, and the version number of the current folder does not need to be compared with the minimum version number of the history folder. And the complete mark is issued according to the history of the file with the value of 0, after the historical storage item is issued to the terminal last time, the files are not selected and issued to the terminal under the preset directory, so the historical minimum version number V8 of the files is compared with the version number of the current file, the version numbers of the files 1-3 are less than the minimum version number of the historical files according to the comparison result, and the rest files are obtained: file 3, file 2, and file 1.
Therefore, the server selects 3 target storage items, namely the deleted item 5, the file 6 and the file 3, according to a preset selection rule, and correspondingly updates the historical identification information to obtain the current identification information as follows: "1, 0, V14, V13, V10, V15, V7". And then the target storage item and the current identification information are sent to the terminal.
Through the manner, in the cloud disk data issuing method provided by the embodiment of the invention, the storage items issued to the terminal and the storage items not issued to the terminal in the predetermined directory can be determined according to the historical identification information, so that when the terminal requests the storage items under the predetermined directory, only the corresponding number of the storage items are selected from the incremental storage items not issued to the terminal and the rest storage items to be issued to the terminal, and the issued historical storage items are not required to be issued to the terminal repeatedly, so that the repeated data issuing is avoided, the flow consumed by data transmission can be reduced, the time consumption can be reduced, and the terminal can quickly receive the issued storage items.
Referring to fig. 12, in the cloud disk data issuing device according to the embodiment of the present invention, the issuing device may be integrated in a server, such as a server of a cloud disk, for example. The issuing device may include a receiving module 1201, a determining module 1202, a selecting module 1203, and a sending module 1204.
The receiving module 1201 is configured to receive request information that a terminal sends to a current storage item in a predetermined directory, where the request information carries a requested number and history identification information, and the history identification information includes history version information used to identify a history storage item that has been issued to the terminal until the last time the history storage item was issued to the terminal. The history identification information may be the history identification information issued by the server to the terminal together with the last history storage item issued to the terminal, or the history identification information generated by the last terminal according to the version number of the history storage item and other information after receiving the history storage item. In this embodiment, the history identification information is that the server issues the history storage item to the terminal the last time, and the history identification information is issued to the terminal together. The history storage items that have been issued to the terminal include the history storage item that was issued last time to the terminal.
In some embodiments, the version information may be, for example, a version number of the storage item, including a maximum version number and a minimum version number of each type of storage item that has been issued to the terminal.
Further, the apparatus may also include an obtaining module 1205 and a setting module 1206. The obtaining module 1025 is configured to obtain, according to the request information, a maximum version number of a history deletion item, a maximum version number of a history folder, and a maximum version number of a history file that have been sent to the terminal until the last time the history storage item was sent to the terminal, so as to obtain history version information, where the maximum version number of each type of storage item is used to indicate a latest operation time of the corresponding type of history storage item, and the later operation time of the storage item is the greater the version number. Therefore, in this embodiment, the history version information includes the maximum version number of the history deletion item, the maximum version number of the history folder, and the maximum version number of the history file, which have been issued to the terminal until the last time the history storage item was issued to the terminal.
The setting module 1206 is configured to set a version number of the current storage item according to the operation time of the current storage item in the predetermined directory before the receiving module 1201 receives the request information for the current storage item in the predetermined directory, where the later the operation time of the storage item is, the larger the version number is.
The determining module 1202 is configured to determine, according to the history version information, an incremental storage item updated after the last time of issuing the history storage item to the terminal from the current storage item, so as to obtain a storage item to be issued. Specifically, the determination module 1202 determines the incremental store item by:
comparing the maximum version number of the historical deleted item with the version number of the current deleted item to determine the current deleted item with the maximum version number of the historical deleted item and obtain an incremental deleted item;
comparing the maximum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is greater than the maximum version number of the history folder, so as to obtain an incremental folder;
comparing the maximum version number of the history file with the version number of the current file to determine the current file of which the version number is greater than the maximum version number of the history file, so as to obtain an incremental file;
and determining an incremental storage item which is updated after the historical storage item is issued to the terminal last time in the current storage item according to the incremental deletion item, the incremental folder and the incremental file.
Through the mode, the incremental storage items are determined, namely all the incremental deletion items, the incremental folders and the incremental files are the incremental storage items. In this embodiment, the version numbers of the storage items reflect the sequence of the operation time of each storage item, and the larger the version number is, the later the operation time is, so that by comparing the maximum version numbers of the history deleted item, the history folder, and the history file with the version numbers of the storage items of the current corresponding type, it is possible to determine the incremental storage item updated under the predetermined directory after the last time the history storage item is issued to the terminal.
The selecting module 1203 is configured to select the storage items with the requested number from the storage items to be issued according to a predetermined rule, so as to obtain a target storage item. The predetermined rule may be, for example, sequentially selecting storage items of the number requested by the terminal from the incremental deletion item, the incremental folder, and the incremental file according to the selection sequence of the incremental deletion item, the incremental folder, and the incremental file, so as to obtain a target storage item, and in addition, when selecting the same type of incremental storage items, selecting the incremental storage items according to the sequence of the version numbers from large to small.
Of course, in other embodiments, the storage items may also be selected according to other rules, for example, the storage items requested by the terminal are sequentially selected according to the selection order of the incremental folder, the incremental deletion item, and the incremental file, which is not limited herein.
The sending module 1204 is configured to send the target storage item to the terminal.
Through the mode, if the updated incremental storage item is generated under the preset directory after the storage item under the preset directory is requested for the last time, when the terminal requests the storage item under the preset directory again, the storage item which is issued to the terminal under the preset directory does not need to be issued to the terminal again, but is directly selected from the incremental storage items, so that the flow consumed by data transmission can be reduced, the time consumption can be reduced, the terminal can quickly receive the issued storage item, and the time delay is reduced.
Referring to fig. 13, the cloud disk data issuing apparatus according to the embodiment of the present invention may further include a control module 1301, an update module 1302, a first determining module 1303, a first generating module 1304, a second determining module 1305, and a second generating module 1306.
In this embodiment, the obtaining module 1205 is further configured to obtain, according to the request information, a minimum version number of a history folder and a minimum version number of a history file that have been sent to the terminal when the history storage item was last sent to the terminal, so as to obtain history version information used to identify the history storage item that was last sent to the terminal, where the minimum version number of each type of history storage item is used to indicate the earliest operation time of the corresponding type of history storage item.
That is, in the present embodiment, the history version information further includes the minimum version number of the history folder that has been issued to the terminal and the minimum version number of the history folder. In addition, the history identification information further includes a history down-sending complete flag of the folder and a down-sending complete flag of the history file, wherein the history down-sending complete flag is 0 or 1, wherein "0" indicates that all history file/folder entries in a predetermined directory have not been completely down-sent to the terminal after the last time the history storage entry was down-sent to the terminal, and "1" indicates that all history file/folder entries in the predetermined directory have been completely down-sent to the terminal after the last time the history storage entry was down-sent to the terminal.
After receiving the request information with the history identification information, the control module 1301 is configured to determine whether the history issued complete flag of the folder is 0, if so, the control determining module 1202 performs the step of comparing the minimum version number of the history folder with the version number of the current folder, and if not, the control determining module 1202 does not perform the step of comparing the minimum version number of the history folder with the version number of the current folder. The control module 1301 is further configured to determine whether the history issued complete flag of the file is 0, if so, control the determining module 1202 to perform the step of comparing the minimum version number of the history file with the version number of the current file, and if not, control the determining module 1202 not to perform the step of comparing the minimum version number of the history file with the version number of the current file.
Wherein the determining module 1202 is further configured to perform the following steps:
comparing the minimum version number of the historical folder with the version number of the current folder to determine the current folder of which the version number is smaller than the minimum version number of the historical folder, and obtaining the residual folders;
comparing the minimum version number of the history file with the version number of the current file to determine the current file of which the version number is smaller than the minimum version number of the history file, and obtaining a residual file;
and according to the remaining file folders and the remaining files, determining that the remaining storage items which are not sent to the terminal are not sent after the historical storage items are sent to the terminal last time in the current storage items, wherein the storage items to be sent comprise the remaining storage items.
Wherein, the residual folders and the residual files are residual storage items. The selecting module 1203 is specifically configured to select the storage items of the requested number from the storage items to be issued according to the selection sequence of the newly added deleted item, the newly added folder, the newly added file, the remaining folders, and the remaining files, so as to obtain the target storage item. In this embodiment, not only the incremental storage items updated under the predetermined directory are determined, but also the remaining storage items are determined, so that the incremental storage items and the remaining storage items serve as storage items to be issued, and the storage items to be issued to the terminal are selected from the storage items to be issued. And if the number of the storage items of one type is less than the number requested by the terminal, selecting the storage items of the next type according to the selection sequence to obtain the target storage item.
The second determining module 1305 is configured to determine whether the maximum version number of the historical deleted item is smaller than the minimum version number of the currently deleted item after the obtaining module 1205 obtains the historical version information. The second generating module 1306 is configured to generate a delete item overflow flag when the second determining module 1305 determines that the maximum version number of the historical delete item is smaller than the minimum version number of the current delete item, and make the value of the delete item overflow flag be 1 (true); when the second determination module 1305 determines that the maximum version number of the history deleted item is not less than the minimum version number of the current deleted item, a deleted item overflow flag is generated and the value of the deleted item overflow flag is made to be 0(false), and the determination module 1202 is controlled to perform the step of determining, from the current stored item, an incremental stored item that is updated after the last time the history stored item was issued to the terminal, according to the history version information.
The sending module 1204 is further configured to send the deletion item overflow flag with a value of 1 to the terminal, so that the terminal blanks the history identification information according to the deletion item overflow flag, and resends the request information for the current storage item in the predetermined directory.
The first determining module 1303 is configured to determine, after the target storage item is obtained, whether there are folders which are not selected and are sent to the terminal in the current storage item of the predetermined directory, and whether there are files which are not selected and are sent to the terminal in the current storage item of the predetermined directory.
The first generating module 1304 is configured to generate a complete currently issued flag of a folder and make the complete currently issued flag of the folder "0" when there is a folder that is not selected to be sent to the terminal in the current storage item of the predetermined directory; and when no folder which is not selected and is sent to the terminal exists in the current storage item of the preset directory, generating a current issuing complete mark of the folder, and enabling the current issuing complete mark of the folder to be '1'.
The first generating module 1304 is further configured to generate a complete currently issued flag of the file and make the complete currently issued flag of the file "0" when the file that is not selected to be issued to the terminal exists in the current storage item of the predetermined directory; and when the file which is not selected to be sent to the terminal does not exist in the current storage item of the preset directory, generating a current issuing complete mark of the file, and enabling the current issuing complete mark of the file to be '1'.
In addition, the first generating module 1304 may further generate a total issued complete flag, which is denoted as a finish _ flag, according to the currently issued complete flags of the folders and files, where the value of the finish _ flag may be 0(false) or 1(true) to indicate whether all folders and files in the predetermined directory have been selected and then sent to the terminal. Specifically, when the currently issued complete flags of the folders and the files are both 1, the value of finish _ flag is 1, which indicates that all the folders and files in the preset directory have been selected and are sent to the terminal; when the current issuing of one of the folders and the files is completely marked as 0, the value of finish _ flag is 0, which indicates that all the folders and files in the preset directory still have folders or files which are not all selected and issued to the terminal.
The updating module 1302 is configured to update the historical identifier information according to the currently issued complete flag of the folder, the currently issued complete flag of the file, the maximum version number and the minimum version number of each type of storage item in the target storage item, and obtain current identifier information before the sending module 1204 sends the target storage item to the terminal. Further, the updating module is further configured to arrange the issued complete flag, the maximum version number, and the minimum version number in the updated historical identification information according to a predetermined format to form the current identification information in the form of a character string.
The sending module 1204 sends the current identification information and the target storage item to the terminal. In this embodiment, when the current identification information and the target storage item are issued to the terminal, an overflow flag of the deletion item is also issued to the terminal, where the overflow flag of the deletion item is represented by an overflow _ flag, where the overflow _ flag in the issuing operation is, for example, 0, that is, the deletion list in the cloud disk does not overflow. And the value of finish _ flag can also be transmitted to the terminal together.
According to the embodiment, the storage items which are sent to the terminal and the storage items which are not sent to the terminal in the preset directory can be determined according to the history identification information, so that when the terminal requests the storage items under the preset directory, only the storage items with the corresponding quantity are selected from the incremental storage items which are not sent to the terminal and the rest storage items and are not needed to be sent to the terminal repeatedly, repeated data sending is avoided, the flow consumed by data transmission can be reduced, the time consumption can be reduced, and the terminal can receive the sent storage items quickly.
An embodiment of the present invention further provides a server, as shown in fig. 14, which shows a schematic structural diagram of the server according to the embodiment of the present invention, specifically:
the server may include components such as a processor 1401 of one or more processing cores, memory 1402 of one or more computer-readable storage media, a power source 1403, and an input unit 1404. Those skilled in the art will appreciate that the server architecture shown in FIG. 14 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 1401 is a control center of the server, connects the respective parts of the entire server by various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 1402 and calling data stored in the memory 1402, thereby performing overall monitoring of the server. Alternatively, processor 1401 may include one or more processing cores; preferably, the processor 1401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1401.
The memory 1402 may be used to store software programs and modules, and the processor 1401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 1402. The memory 1402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 1402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1402 may also include a memory controller to provide the processor 1401 with access to the memory 1402.
The server further includes a power source 1403 for supplying power to each component, and preferably, the power source 1403 is logically connected to the processor 1401 via a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized via the power management system. The power supply 1403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may also include an input unit 1404, the input unit 1404 operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 1401 in the server loads the executable file corresponding to the process of one or more application programs into the memory 1402 according to the following instructions, and the processor 1401 runs the application programs stored in the memory 1402, thereby implementing various functions as follows:
receiving request information of a current storage item under a preset directory, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information of the historical storage item which is used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time;
determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
selecting a number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and issuing the target storage item to the terminal.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In the embodiment of the invention, the historical version information of the issued historical storage items is obtained from the request information of the terminal for identifying the last issued historical storage item when the last issued historical storage item is intercepted to the terminal, then the updated incremental storage item after the last issued historical storage item is issued to the terminal is determined from the current storage items under the preset catalogue according to the historical version information, the storage items to be issued are obtained, the storage items with the quantity requested by the terminal are selected from the storage items to be issued and issued to the terminal, in the scheme, the storage item to be issued this time is selected from the updated incremental storage items after the last issued historical storage item is issued to the terminal, therefore, the storage item issued to the terminal at this time is only the updated storage item after the last issued, and the issued historical storage item is not required to be repeatedly issued to the terminal, thereby avoiding repeatedly issuing data, and reducing the flow consumed by transmitting data, and time consumption can be reduced, so that the terminal can quickly receive the issued storage items.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a storage medium, where a plurality of instructions are stored, where the instructions can be loaded by a processor to execute steps in any one of the cloud disk data issuing methods provided by the embodiments of the present invention. For example, the instructions may include the steps of:
receiving request information of a current storage item under a preset directory, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information of the historical storage item which is used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time;
determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
selecting a number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and issuing the target storage item to the terminal.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any cloud disk data issuing method provided in the embodiment of the present invention, beneficial effects that can be achieved by any cloud disk data issuing method provided in the embodiment of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The cloud disk data issuing method, the cloud disk data issuing device and the storage medium provided by the embodiment of the invention are described in detail, a specific embodiment is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A cloud disk data issuing method is characterized by comprising the following steps:
receiving request information of a current storage item under a preset directory, wherein the request information carries the requested quantity and historical identification information, the historical identification information comprises historical version information used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time, the type of the storage item comprises a deletion item, a folder and a file, and each storage item is provided with a version number;
acquiring the maximum version number of a history deletion item, the maximum version number of a history folder and the maximum version number of a history file which are issued to the terminal when the history storage item is issued last time to the terminal according to the request information so as to acquire history version information, wherein the maximum version number of each type of history storage item is used for indicating the latest operation time of the corresponding type of history storage item, and the later operation time of the storage item is larger than the later version number;
determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
selecting the number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and issuing the target storage item to the terminal.
2. The method according to claim 1, wherein the determining, from the current storage item, an incremental storage item updated after last sending of the history storage item to the terminal according to the history version information comprises:
comparing the maximum version number of the historical deleted item with the version number of the current deleted item to determine the current deleted item of which the version number is greater than the maximum version number of the historical deleted item, so as to obtain an incremental deleted item;
comparing the maximum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is greater than the maximum version number of the history folder, so as to obtain an incremental folder;
comparing the maximum version number of the history file with the version number of the current file to determine the current file of which the version number is greater than the maximum version number of the history file, so as to obtain an incremental file;
and determining an incremental storage item which is updated after the historical storage item is issued to the terminal last time in the current storage item according to the incremental deletion item, the incremental folder and the incremental file.
3. The method of claim 2, before the receiving terminal transmits the request information for the currently stored item under the predetermined directory, further comprising:
and setting the version number of the current storage item according to the operation time of the current storage item in the preset directory, wherein the later the operation time of the storage item is, the larger the version number is.
4. The method of claim 2, wherein after the receiving terminal sends the request information for the currently stored item in the predetermined directory, the method further comprises:
acquiring the minimum version number of a history folder and the minimum version number of a history file which are issued to the terminal when the history storage items are issued last time to the terminal according to the request information so as to acquire history version information, wherein the minimum version number of each type of history storage item is used for indicating the earliest operation time of the corresponding type of history storage item;
comparing the minimum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is smaller than the minimum version number of the history folder, and obtaining the residual folders;
comparing the minimum version number of the history file with the version number of the current file to determine the current file of which the version number is smaller than the minimum version number of the history file, and obtaining a residual file;
and determining that the remaining storage items sent to the terminal are not sent after the historical storage items are sent to the terminal last time in the current storage items according to the remaining folders and the remaining files, wherein the storage items to be sent comprise the remaining storage items.
5. The method according to claim 4, wherein the history identification information further includes a history down complete flag of folder and a history down complete flag of file, the history down complete flag is 0 or 1, where "0" indicates that all history file/folder entries in the predetermined directory have not been completely down-delivered to the terminal after last down-delivery of history entries to the terminal, and "1" indicates that all history file/folder entries in the predetermined directory have been completely down-delivered to the terminal after last down-delivery of history entries to the terminal;
before the comparing the minimum version number of the history folder with the version number of the current folder, the method further includes:
judging whether the historical issuing complete mark of the folder is 0 or not;
if so, executing a step of comparing the minimum version number of the historical folder with the version number of the current folder;
before the comparing the minimum version number of the history file with the version number of the current file, the method further comprises: judging whether the historical issuing complete mark of the file is 0 or not; and if so, executing a step of comparing the minimum version number of the history file with the version number of the current file.
6. The method according to claim 4, wherein after the selecting the number of the storage items from the storage items to be issued according to the predetermined rule to obtain the target storage item, the method further comprises:
judging whether a folder which is not selected and is sent to the terminal exists in the current storage item of the preset directory;
if so, generating a current issuing complete mark of the folder, and marking the current issuing complete mark of the folder as '0'; if not, generating a current issuing complete mark of the folder, and enabling the current issuing complete mark of the folder to be '1';
judging whether files which are not selected and are sent to the terminal exist in the current storage items of the preset directory or not;
if so, generating a current issuing complete mark of the file, and enabling the current issuing complete mark of the file to be '0'; if not, generating a complete mark of the current issuing of the file, and enabling the complete mark of the current issuing of the file to be '1'.
7. The method of claim 6, further comprising, before said sending the target storage item to the terminal:
updating the historical identification information according to the current issued complete mark of the folder, the current issued complete mark of the file, and the maximum version number and the minimum version number of each type of storage item in the target storage item to obtain current identification information;
the issuing the target storage item to the terminal includes: and issuing the current identification information and the target storage item to the terminal.
8. The method of claim 7, wherein after updating the historical identification information, further comprising:
arranging the issued complete mark, the maximum version number and the minimum version number in the updated historical identification information according to a preset format to form the current identification information in a character string form.
9. The method of claim 4, wherein said selecting said number of entries from said pending entries according to a predetermined rule comprises:
and selecting the number of storage items from the storage items to be issued according to the selection sequence of the incremental deletion items, the incremental folders, the incremental files, the remaining folders and the remaining files.
10. The method according to claim 1, before said determining, from the current storage according to the historical version information, an incremental storage updated after last sending of the historical storage to the terminal, further comprising:
judging whether the maximum version number of the historical deleted item is smaller than the minimum version number of the current deleted item;
if yes, generating a deletion item overflow mark, and enabling the value of the deletion item overflow mark to be 1; and issuing the deletion item overflow mark to the terminal so that the terminal empties the history identification information according to the deletion item overflow mark and retransmits the request information of the current storage item under the preset directory;
and if not, generating a deletion item overflow mark, enabling the value of the deletion item overflow mark to be 0, and executing the step of determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information.
11. A cloud disk data issuing device is characterized by comprising:
the receiving module is used for receiving request information of a current storage item in a preset directory, wherein the request information carries the requested quantity and historical identification information, and the historical identification information comprises historical version information used for identifying the historical storage item which is issued to the terminal when the historical storage item is issued to the terminal last time; the types of the storage items comprise deleted items, folders and files;
the acquisition module is used for acquiring the maximum version number of the history deletion item, the maximum version number of the history folder and the maximum version number of the history file which are issued to the terminal when the history storage item is issued to the terminal last time according to the request information so as to acquire history version information, wherein the maximum version number of each type of history storage item is used for indicating the latest operation time of the corresponding type of history storage item, and the later operation time of the storage item is larger than the later version number;
the determining module is used for determining an incremental storage item updated after the historical storage item is issued to the terminal last time from the current storage item according to the historical version information to obtain a storage item to be issued;
the selecting module is used for selecting the number of storage items from the storage items to be issued according to a preset rule to obtain a target storage item;
and the sending module is used for sending the target storage item to the terminal.
12. The apparatus of claim 11, wherein the determining module is specifically configured to:
comparing the maximum version number of the historical deleted item with the version number of the current deleted item to determine the current deleted item of which the version number is greater than the maximum version number of the historical deleted item, so as to obtain an incremental deleted item;
comparing the maximum version number of the history folder with the version number of the current folder to determine the current folder of which the version number is greater than the maximum version number of the history folder, so as to obtain an incremental folder;
comparing the maximum version number of the history file with the version number of the current file to determine the current file of which the version number is greater than the maximum version number of the history file, so as to obtain an incremental file;
and determining an incremental storage item which is updated after the historical storage item is issued to the terminal last time in the current storage item according to the incremental deletion item, the incremental folder and the incremental file.
13. A storage medium, wherein the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the cloud disk data issuing method according to any one of claims 1 to 10.
14. A server, comprising: a processor and a memory; the processor is used for loading the executable file corresponding to the process of one or more than one application program into the memory, and the application program stored in the memory is executed by the processor, thereby realizing the steps of the method as claimed in any one of claims 1 to 10.
CN201711372692.2A 2017-12-19 2017-12-19 Cloud disk data issuing method and device and storage medium Active CN108111598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711372692.2A CN108111598B (en) 2017-12-19 2017-12-19 Cloud disk data issuing method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711372692.2A CN108111598B (en) 2017-12-19 2017-12-19 Cloud disk data issuing method and device and storage medium

Publications (2)

Publication Number Publication Date
CN108111598A CN108111598A (en) 2018-06-01
CN108111598B true CN108111598B (en) 2021-10-08

Family

ID=62211187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711372692.2A Active CN108111598B (en) 2017-12-19 2017-12-19 Cloud disk data issuing method and device and storage medium

Country Status (1)

Country Link
CN (1) CN108111598B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243207B (en) * 2016-12-23 2019-03-15 中科星图股份有限公司 A kind of date storage method of network cloud disk
CN108833553A (en) * 2018-06-21 2018-11-16 郑州云海信息技术有限公司 Catalogue processing method and relevant device
CN110492979B (en) * 2019-08-22 2022-10-28 杭州海兴电力科技股份有限公司 Incremental data transmission method and device, slave and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761861A (en) * 2011-04-27 2012-10-31 中国移动通信集团广东有限公司 Information updating method, server and information updating system
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN105426403A (en) * 2015-10-30 2016-03-23 努比亚技术有限公司 Bookmark synchronization method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761861A (en) * 2011-04-27 2012-10-31 中国移动通信集团广东有限公司 Information updating method, server and information updating system
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN105426403A (en) * 2015-10-30 2016-03-23 努比亚技术有限公司 Bookmark synchronization method and apparatus

Also Published As

Publication number Publication date
CN108111598A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
KR102240557B1 (en) Method, device and system for storing data
CN109040227B (en) Service request response method and device based on block chain and computer equipment
CN109379448B (en) File distributed deployment method and device, electronic equipment and storage medium
US20190140902A1 (en) Centralized configuration data in a distributed file system
CN108111598B (en) Cloud disk data issuing method and device and storage medium
CN111966633B (en) Method, device, electronic equipment and medium for inquiring child node under directory
CN110347651A (en) Method of data synchronization, device, equipment and storage medium based on cloud storage
CN111126604B (en) Model training method, device, server and storage medium
US20120224482A1 (en) Credit feedback system for parallel data flow control
CN106776785B (en) Data writing method and device and data processing system
CN113076186B (en) Task processing method, device, electronic equipment and storage medium
CN113127561B (en) Method and device for generating service single number, electronic equipment and storage medium
CN109165259B (en) Index table updating method based on network attached storage, processor and storage device
CN112887113A (en) Method, device and system for processing data
CN112162964B (en) Self-adaptive data synchronization method, device, computer equipment and storage medium
US12001400B2 (en) Method and apparatus for synchronizing file
JP2016051383A (en) Document data management program, document data management method, and information processing device
CN114090911A (en) Interface processing method and device, computer equipment and computer readable storage medium
CN115269530A (en) Data synchronization method, electronic device and computer-readable storage medium
CN113538080A (en) Task list splitting method and device
CN111405015A (en) Data processing method, device, equipment and storage medium
JPWO2021152802A5 (en)
CN113626409B (en) Test data processing method, device, equipment and storage medium
EP4202675A1 (en) Information processing device, information processing method, and information processing program
CN110213314B (en) Method, device and server for determining storage node

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant