File processing method, device, electronic device and readable storage medium
The file processing method addresses security and storage challenges by splitting files across devices using frequency domain and data bit features, ensuring secure storage and efficient use of terminal device space.
Patent Information
- Application Number
- CN201811034154.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-08-24
- Filing Date
- 2018-09-05
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2038-09-05
AI Technical Summary
Existing backup solutions for files on terminal devices face security issues due to limited storage space and the risk of data leakage, as files stored on other devices are less secure and prone to unauthorized access.
A file processing method that splits files into sub-files stored across multiple devices, with at least one sub-file stored locally and others on cloud servers, utilizing frequency domain and data bit features to enhance security by ensuring the original content cannot be obtained if one device is compromised.
Enhances file security by distributing file content across devices, making it impossible to retrieve the original content if one sub-file is leaked, while optimizing storage space and processing efficiency.
Smart Images

Figure CN110858191B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology. Specifically, the present invention relates to a file processing method, device, electronic device and readable storage medium. Background Art
[0002] In daily work and life, due to the limited storage space of terminal devices, it is difficult to accommodate a large number of files such as photos / music / videos / etc. Users often need to store files on other devices to enable the devices to work normally and to be able to save the required files for a long time to achieve the purpose of backup.
[0003] Although existing backup solutions can free up storage space on terminal devices to enable the devices to work better, files stored on other devices are less secure and the contents of the files are easily leaked, causing losses to users. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above technical defects. The technical solution adopted by this application is as follows:
[0005] In a first aspect, an embodiment of the present application provides a file processing method, the method comprising:
[0006] Receiving an operation request for a file, where the file includes at least two sub-files, and the at least two sub-files are respectively stored in at least two devices;
[0007] At least one sub-file of the file is processed accordingly according to the operation request.
[0008] In a second aspect, an embodiment of the present application provides a file processing device, the device comprising:
[0009] An operation request receiving module, used to receive an operation request for a file, where the file includes at least two sub-files, and the at least two sub-files are respectively stored in at least two devices;
[0010] The file processing module is used to perform corresponding processing on at least one sub-file of the file according to the operation request.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor; the memory stores computer instructions; the processor is used to call the computer instructions to execute the file processing method shown in the first aspect of the present application.
[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the file processing method shown in the first aspect of the present application is implemented.
[0013] The beneficial effects of the technical solution provided by the embodiments of the present application are as follows: the file processing method, device, electronic device and readable storage medium provided by the embodiments of the present application, since at least two sub-files of a file are respectively stored in at least two devices, even if the sub-file in one device is leaked, the original content of the file cannot be obtained. Therefore, the solution of the embodiments of the present application can effectively improve the security of the file. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0015] Figure 1 A schematic diagram of a process flow of a file processing method provided in an embodiment of the present application is shown;
[0016] Figure 2a , 2b 2c and 2d respectively show schematic diagrams of four different splitting methods of the core part and the additional part in the embodiment of the present application;
[0017] Figure 3 A schematic diagram of a network architecture applicable to an embodiment of the present application is shown;
[0018] Figure 4 A schematic diagram showing the principle of file splitting and storage in an embodiment of the present application is shown;
[0019] Figure 5 A schematic diagram showing a process flow of a file processing method in an example of the present application
[0020] Figure 6 A schematic diagram of the process of a file splitting method based on frequency domain features and data bit features in an example of the present application is shown;
[0021] Figure 6a A schematic diagram showing a method of splitting a file based on frequency domain features in an example of the present application is shown;
[0022] Figure 6b A schematic diagram showing further splitting of frequency domain elements based on data bit features in an example of the present application is shown;
[0023] Figure 7 A schematic diagram showing the principle of an automatic storage management method based on user event prediction in an example of the present application is shown;
[0024] Figure 8 A schematic diagram showing a method for extracting feature information based on user-related information in an example of the present application is shown;
[0025] Fig. 9A schematic diagram showing a method for determining a target splitting ratio of a file to be split in an example of the present application is shown;
[0026] Fig.10 A schematic diagram showing a file processing method in an example of the present application is shown;
[0027] Fig.11 A schematic diagram of a method for obtaining a file based on a link feature value in an example of the present application is shown;
[0028] Fig.12 A schematic diagram showing a flow chart of a file processing method in an example of the present application is shown;
[0029] Fig.13 A schematic diagram showing the principle of a file sending method in an example of the present application is shown;
[0030] Fig.14a A schematic diagram showing a flow chart of a file sending method in an example of the present application is shown;
[0031] Fig.14b A schematic diagram showing a flow chart of a file sending method in another example of the present application is shown;
[0032] Fig.15 A schematic diagram showing the principle of implementing file content verification in an example of the present application is shown;
[0033] Fig.16 A flowchart of a method for implementing file content verification in an example of the present application is shown;
[0034] Fig.17 A schematic diagram of a multi-device collaboration method in an example of the present application is shown;
[0035] Fig.18 A schematic diagram of the structure of a file processing device provided in an embodiment of the present application is shown;
[0036] Fig.19 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0037] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0038] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0039] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0040] Figure 1 A schematic diagram of a file processing method provided by the present application is shown in FIG. Figure 1 As shown in , the method may include:
[0041] Step S110: receiving an operation request for a file, where the file includes at least two sub-files, and the at least two sub-files are respectively stored in at least two devices;
[0042] Step S120: performing corresponding processing on at least one sub-file of the file according to the operation request.
[0043] The files in this application may include but are not limited to text files, multimedia files, etc., and the multimedia files may include but are not limited to one of various types such as video files, picture files, audio files, etc.
[0044] In the file processing method provided in the embodiment of the present application, at least two sub-files of a file are stored in at least two devices respectively. Therefore, even if the sub-file in one device is leaked, the original content of the file cannot be obtained. Through this method, the security of the file can be effectively improved.
[0045] In an optional embodiment of the present application, at least one sub-file of the file may be stored locally; and / or, at least one sub-file of the file may be stored in other devices.
[0046] The above-mentioned "local" can be understood as the local of the device executing the above-mentioned file processing method, and at least one sub-file of the file can be stored locally, which can be understood as storing at least one sub-file of the file in the local storage space of the device executing the above-mentioned file processing method. Among them, "local" and the device executing the above-mentioned file processing method can also be referred to as a local device.
[0047] In actual applications, at least one sub-file device of a file is stored locally on a device, which enables the device to process the sub-file faster and more conveniently. Other devices may be various types of devices other than local devices, such as servers, terminal devices, and the like.
[0048] It is understandable that in actual applications, the other devices may be one or more. For example, a file may include sub-file 1, sub-file 2, and sub-file 3, where sub-file 1 may be stored locally, sub-file 2 may be stored in a cloud server, and sub-file 3 may be stored in another cloud server or other terminal device. By storing each sub-file of the file in multiple devices, the security of the file is further improved.
[0049] In an optional embodiment, the other device may be a cloud server.
[0050] In the existing cloud storage methods based on cloud servers, if a malicious user (not the uploading user himself) obtains the cloud access password, or passes / bypasses the identity authentication in other abnormal ways, the uploaded user privacy content will be leaked. If a malicious user directly accesses the cloud server storage content in an abnormal way and cracks the encryption, the uploaded user privacy content will be leaked. If the network transmission link is maliciously monitored / hijacked, the user privacy content will be leaked. If the cloud storage provider itself does not comply with business ethics and laws and privately accesses user information, user privacy will be leaked. However, an implementable solution using an embodiment of the present application, since part of the file is stored locally and the other part is stored on the cloud server, even if part of the file on the cloud server is leaked, the entire file cannot be obtained, thereby improving the security of the file.
[0051] It should be noted that Figure 1 The execution subject of the file processing method shown in can be a local device, in which at least one sub-file of the file can be stored, or can be another device storing at least one sub-file of the file. Taking the other device as a cloud server as an example, the cloud server can perform corresponding processing on the sub-file corresponding to the stored file according to the operation request for the file sent by the terminal device, such as sending the stored sub-file to other devices or editing or otherwise processing the stored sub-file according to the operation request, and can also instruct other devices storing the sub-file to perform corresponding processing according to the received operation request.
[0052] In an optional embodiment of the present application, each sub-file of a file may be obtained by splitting the file, and further, may be obtained by splitting based on frequency domain features and / or data bit features of the file.
[0053] The frequency domain feature may include a frequency domain feature value of a frequency domain element of the file, and specifically, the frequency domain feature value may be the magnitude / amplitude of a frequency component of the frequency domain element. The frequency domain element corresponding to the file may be obtained by performing a frequency domain transformation on the file.
[0054] In practical applications, depending on the actual attribute information of the file, the file may need to be preprocessed accordingly before the frequency domain conversion to obtain the original data of the file, wherein the preprocessing may include but is not limited to decompression and / or decryption.
[0055] For example, in one example, if the file is a file in a compressed encoding format, it needs to be decompressed into original data before the file is converted into the frequency domain. It should be noted that the compressed encoding format here refers to the compressed encoding format of multimedia files. For example, for pictures, jpeg format and png format are compressed encoding formats, and for audio and video, mp3 format and ogg format are compressed encoding formats. If it is determined that the multimedia file is in a compressed encoding format, it can be decompressed first to obtain the original data of the multimedia file so that the original data can be split later. For example, for pictures in compressed encoding formats such as jpeg and png, they can be decompressed into bmp (bitmap) format, and for audio and video in compressed encoding formats such as mp3 and ogg, they can be decompressed into wav format.
[0056] The data bit feature refers to the high or low bit of the storage location corresponding to the file when it is stored in the device. It can be understood that the high bit and the low bit are relative. For example, in the binary storage method, the low bit represents the right part of the binary number relative to the high bit. Of course, the number of high bits and low bits can also be different according to different application requirements. For example, for a specific binary data 0011, the left part is a relatively high bit, and the right part is a relatively low bit. For example, 11 can be divided into a low bit and 00 can be divided into a high bit, or 001 on the left can be a high bit and 1 on the right can be a low bit.
[0057] When the file is a multimedia file, such as audio, picture, video and other files, each sub-file of the file can be split based on one or two of the frequency domain characteristics and data bit characteristics of the file. When the file is a text file, each sub-file can be split based on the data bit characteristics of the file.
[0058] In an optional embodiment of the present application, at least one sub-file of the file includes at least one of the following:
[0059] The first part or the second part obtained by splitting based on the frequency domain characteristics of the file, wherein the frequency domain characteristic value of the frequency domain elements of the second part is greater than the frequency domain characteristic value of the frequency domain elements of the first part;
[0060] The third part or the fourth part is obtained by splitting based on the data bit characteristics of the file, wherein the data bit of the fourth part is higher than the data bit of the third part;
[0061] The fifth part and the sixth part are obtained by splitting based on the data bit characteristics of the first part or based on the data bit characteristics of the second part, wherein the data bit of the fifth part is higher than the data bit of the sixth part;
[0062] Based on the frequency domain characteristics of the frequency domain elements of the third part or the frequency domain characteristics of the frequency domain elements of the fourth part, the seventh part or the eighth part is split, and the frequency domain characteristic value of the frequency domain elements of the eighth part is greater than the frequency domain characteristic value of the frequency domain elements of the seventh part.
[0063] For the convenience of description, the part of the frequency domain element with a relatively large frequency domain eigenvalue is called a high-frequency component, the part of the frequency domain element with a relatively small frequency domain eigenvalue is called a low-frequency component, the part with a higher data bit is called a high-order component, and the part with a lower data bit is called a low-order component. In the corresponding items above, the first part can be called a low-frequency component, the second part can be called a high-frequency component, the third part can be called a low-order component, the fourth part can be called a high-order component, the fifth part can be called a low-frequency high-order component or a high-frequency high-order component, the sixth part can be called a low-frequency low-order component or a high-frequency low-order component, the seventh part can be called a low-order low-frequency component or a high-order low-frequency component, and the eighth part can be called a low-order high-frequency component or a high-order high-frequency component.
[0064] In practical applications, the size of the sub-files corresponding to the above-mentioned parts can be obtained based on the target split ratio of each sub-file (see the detailed description below), and the target split ratio can be preset as needed or determined in real time.
[0065] For example, in an optional implementation, the high-frequency component and the low-frequency component can be divided based on a set frequency domain characteristic value threshold or a frequency domain element quantity threshold, and the high-order component and the low-order component can be divided based on a data bit characteristic threshold or a data bit quantity threshold. Specifically, the portion corresponding to the frequency elements whose frequency domain characteristic values in the frequency domain elements of the file are less than the first threshold can be taken as the first portion, and the rest can be the second portion; the portion corresponding to the frequency domain elements whose number is equal to the second threshold in the frequency domain elements of the file can be taken as the first portion, and the rest can be taken as the second portion; the portion corresponding to the higher data bits whose number is equal to the third threshold in the data bit characteristics of the file can be taken as the fourth portion, and the rest can be taken as the third portion; the portion corresponding to the data bits whose data bits are greater than the fourth threshold in the data bits of the file can be taken as the fourth portion in the order from low to high, and the rest can be taken as the third portion.
[0066] Similarly, when the fifth, sixth, seventh and eighth parts are obtained by splitting the first, second, third and fourth parts, the same method can be used. As an example, for example, the part corresponding to the higher data bits whose number is equal to the fifth threshold in the data bit feature corresponding to the first part can be taken as the fifth part, and the rest of the first part can be taken as the sixth part.
[0067] In an optional embodiment of the present application, among the above-mentioned parts obtained based on the frequency domain characteristics and / or data bit characteristics of the file, the subfile including the first part is stored locally, and the subfile including the second part is stored in other devices (method 1); or, the subfile including the fourth part is stored locally, and the subfile including the third part is stored in other devices (method 2); or, the subfile including the fifth part obtained based on the first part is stored locally, and the subfile including the second part and the sixth part obtained based on the first part are stored in other devices (method 3); or, the subfile including the first part and the fifth part obtained based on the second part is stored locally, and the subfile including the sixth part obtained based on the second part is stored in other devices (method 4); or, the subfile including the seventh part obtained based on the fourth part is stored locally, and the subfile including the third part and the eighth part obtained based on the fourth part are stored in other devices (method 5); or, the subfile including the fourth part and the seventh part obtained based on the third part is stored locally, and the eighth part obtained based on the third part is stored in other devices (method 6).
[0068] In mode 1, the sub-file stored locally is a partial file corresponding to the low-frequency component of the file, and the sub-file stored in other devices is a partial file corresponding to the high-frequency component of the file.
[0069] For the frequency domain elements of a file, the low-frequency component usually contains the main structural information of the file content, and the high-frequency component contains the detailed information of the file content (after removing the main structural information). The former (i.e., the low-frequency component) can be called the core part, and the latter can be called the additional part. The core part generally occupies a small storage space, contains the main body of information, and can be used independently. The additional part only contains information details and cannot be used alone (lacking the main body of information and cannot be understood by humans). The core part is stored locally on the device, and the additional part is stored on other devices (such as cloud servers). Since the content stored on other devices does not contain the main body of content information, even if it is leaked, it will not affect user privacy. The local content already contains the main body of content information. When merged with the additional parts stored in other devices, the original content can be restored. The core can also be used independently, which is equivalent to a low-quality version of the original content. This method further improves the security of the file, and can conveniently and quickly perform corresponding processing based on the core part.
[0070] In mode 2, the sub-file stored locally is a partial file corresponding to the high-order component of the file, and the sub-file stored in other devices is a partial file corresponding to the low-order high-frequency component of the file.
[0071] For the data bit characteristics of a file, the file content corresponding to the high-order component usually contains information that can be understood by humans, and can generally be used independently and as a core part. The file content corresponding to the low-order component is usually not understandable by humans and cannot be used independently, and can be used as an additional part. Therefore, when each sub-file of a file is split based on the data bit characteristics of the file, the part including the high-order component can be stored locally, and the part including the low-order component can be stored in other devices, so as to further better ensure the security of the file.
[0072] Method 3 is to further split the low-frequency component, i.e. the first part, to obtain the corresponding scheme of the fifth and sixth parts. In this scheme, the file includes three parts: low-frequency high-bit component, low-frequency low-bit component and high-frequency component. At this time, the low-frequency high-bit component contains information understandable by humans and can be used as the core part and stored locally on the device. The low-frequency low-bit component and the high-frequency component do not contain information understandable by humans and must be attached to the low-frequency high-bit component before they can be used. The low-frequency low-bit component and the high-frequency component can be used together as additional parts and stored in other devices. Figure 2a As shown in , F1 represents the first part, F2 represents the second part, F1B1 is the fifth part obtained by splitting based on F1, and F1B2 is the sixth part. In this solution, F1B1 is stored locally, and F1B2+F2 is stored in other devices.
[0073] Method 5 is to further split the high-order component, i.e., the fourth part, into the seventh and eighth parts. In this solution, some files corresponding to the high-order low-frequency component are stored locally, and the high-order high-frequency component and the low-order component are stored in other devices. Figure 2b As shown in , B1 represents the fourth part, B2 represents the third part, B1F1 is the seventh part obtained by splitting B1, and B1F2 is the eighth part. In this solution, B1F1 is stored locally, and B1F2+B2 is stored in other devices.
[0074] Based on the scheme in method 3 or method 5, the separation of human-understandable information and human-incomprehensible information can be maximized. Under the premise of protecting user privacy, as much human-incomprehensible data as possible can be split out to reduce the core part. Using this scheme, the storage space of the local device can be freed up as much as possible.
[0075] Method 4 is a solution corresponding to further splitting the high-frequency component, i.e., the second part, into the fifth and sixth parts. In this solution, the low-frequency component and the high-frequency high-bit component are stored locally on the device, and the high-frequency low-bit component is stored in other devices. Figure 2c As shown in , F1 represents the first part, F2 represents the second part, F2B1 is the fifth part obtained by splitting based on F2, and F2B2 is the sixth part. Then, F1+F2B1 is stored locally, and F2B2 is stored in other devices.
[0076] Method 6 is a solution corresponding to the seventh and eighth parts by further splitting the low-order component, i.e., the third part. In this solution, some files corresponding to the high-order component and the low-order low-frequency component are stored locally, and the low-order high-frequency component is stored in other devices. Figure 2d As shown in , B1 represents the fourth part, B2 represents the third part, B2F1 is the seventh part obtained by splitting based on B2, and B2F2 is the eighth part. Then B1+B2F1 is stored locally, and B2F2 is stored in other devices.
[0077] When it is necessary to store as much partial content of a file as possible locally, based on the scheme in Mode 4 or Mode 6, it is possible to store as much information as possible that is easily understood by humans locally.
[0078] Based on the solution of method 1 or method 2, the file can be split only once, and the computing load is slightly smaller.
[0079] It is understandable that the above Figure 2a , Figure 2b , Figure 2c and Figure 2dIn the four examples shown, F1 and F2 are only used to schematically represent low-frequency components and high-frequency components, and B1 and B2 are only used to schematically represent high-order components and low-order components. The parts of the files corresponding to F1, F2, B1 and B2 in different figures are likely to be different, such as Figure 2a and Figure 2b The F1, F2, B1 and B2 in 2a and 2c are different, the F1 and F2 in 2a and 2c may be the same or different, and the B1 and B2 in 2a and 2c are different.
[0080] As can be seen from the foregoing description, in actual applications, when splitting a file based on its frequency domain features and data bit features, the file can be split based on the frequency domain features first, and then the sub-files after the split can be split based on the data bit features; or the file can be split based on the data bit features first, and then the sub-files after the split can be split based on the frequency domain features.
[0081] In an optional embodiment of the present application, each subfile of the file is associated with at least one of the following information: file-related information of the file, device-related information of at least one device storing the subfile, and user-related information.
[0082] The file-related information may include at least one of the following information: file type, file size, file tag, file level, file content, file operation information, file quality, file storage location, etc.; and / or,
[0083] The device-related information may include at least one of storage space, power, network status, load status, etc.; and / or
[0084] The user-related information may include at least one of user attribute information, user behavior-related information, user contact information, user setting information, and the like.
[0085] For file-related information, the file type may include but is not limited to one of various types such as text files, video files, picture files, audio files, etc. The file label may be the default label when the file is stored in the device, or it may be a user-defined file label, which may include but is not limited to the file size, file name, file creation time, etc. The content of the file may include the entire file content and / or the content of at least one sub-file of the file, etc. The file operation information may be the file creation time, the file opening time (such as the last opening time), the frequency of use, etc. The file quality may be information such as the size and clarity of the file, and the file storage location may be the storage location information of the file on the local device, or it may be the storage location information of each sub-file, etc.
[0086] The device-related information includes, but is not limited to, the relevant information of the local device and / or other devices storing each sub-file. The storage space may be the overall storage space and / or the remaining storage space of the device. The network status may include one or more of the device's network type (such as wireless LAN, mobile network, etc.), network speed, and available traffic. The load status may include, but is not limited to, one or more of the device's memory usage status, the number of applications installed in the device, the number of running applications, and other information.
[0087] For user related information, user attribute information can be configured according to actual needs, for example, it can include but is not limited to the user's gender, age, education, region, marital status, etc. User behavior information can include but is not limited to one or more of the user's schedule, hotel reservations / air tickets / train tickets, chat / text messages, current location, etc. User contact information can refer to the user's address book, contacts in the recent period, etc. User setting information can refer to the user's device setting information, file setting information, etc.
[0088] In actual applications, the size of each sub-file of a file can be determined or adjusted based on one or more of the above information. When the size of each sub-file changes, the content of each sub-file will also change accordingly. Specifically, for an unsplit file, the split ratio of each sub-file can be determined based on one or more of the file-related information, device-related information, and user-related information. For a split sub-file, whether the ratio of the sub-file of the file corresponding to the sub-file needs to be adjusted can be determined based on one or more of the information.
[0089] In an optional embodiment of the present application, the file processing method may further include:
[0090] Determine the target splitting ratio of each sub-file corresponding to the file to be split;
[0091] According to the target splitting ratio, the file to be split is split to obtain sub-files corresponding to the file to be split.
[0092] The files to be split may be all unsplit files and / or split sub-files in the terminal device.
[0093] In an optional embodiment of the present application, the file to be split may be at least one file determined based on at least one of file-related information, device-related information of at least one device storing sub-files of the file to be split, and user-related information. For a specific description of file-related information, device-related information, and user-related information, please refer to the corresponding description in the foregoing text. For example, user-related information may include at least one of user attribute information, user behavior-related information, user contact information, user setting information, and the like. The file to be split may be at least one file determined based on at least one of the user-related information.
[0094] In one example, the files to be split can be preset by the user, that is, the files to be split can be determined based on user setting information. For example, the user presets one or more files to be split, or sets relevant information of the files to be split, for example, one or more of the relevant information such as the storage location, creation time, and content corresponding to the files to be split can be set, and the terminal device determines the files to be split, i.e., the files to be split, based on the relevant information.
[0095] In addition, the terminal device can also automatically determine the files to be split. In one example, the terminal device can determine the files to be split based on the user's historical settings, device-related information, and other information. For example, when the user previously set the files to be split, they generally set pictures containing a specific person. Therefore, the terminal device can automatically determine the pictures containing the specific person as the files to be split. For another example, the terminal device can automatically determine the number of files to be split based on the device's storage space, power, and other information. For example, when the storage space is small or the power is low, only the set number of files with the most recent creation time can be split as the files to be split.
[0096] It can be understood that the above only lists several optional methods for determining the files to be split. In actual applications, one or more of the above-listed methods can be selected to determine the files to be split according to actual needs and / or application scenarios, or other methods for determining the files to be split can be adopted based on at least one of file-related information, device-related information, and user-related information.
[0097] In an optional embodiment of the present application, the above-mentioned splitting of the to-be-split file according to the target splitting ratio may include:
[0098] When the set file splitting conditions are met, the file to be split is split according to the target splitting ratio.
[0099] The file splitting condition may be a condition determined based on one or more information of file-related information, device-related information, and user-related information, or may be a condition set according to actual application needs. In one optional manner, the files to be split may be split according to the user's instructions, for example, the user may select one or more files to be split at a time, or the files may be automatically split. In another optional manner, the files to be split (i.e., the files to be split) may be automatically split when the device is idle, for example, all unsplit files on the terminal device may be split when the terminal device is idle.
[0100] As an example, a user uses a terminal device to shoot some videos and photos. The device marks these newly generated files as pending. When the device is idle (the load is lower than the threshold), the device splits the pending files. When the device is idle and the wireless LAN (such as WIFI) is available, the device uploads the split additional parts to the cloud and deletes the local additional parts to release storage space.
[0101] In an optional embodiment of the present application, the file processing method may further include:
[0102] When the file to be split is a sub-file that has been split, and the difference between the target split ratio and the current split ratio is greater than a set threshold, the file before splitting corresponding to the file to be split is split according to the target split ratio.
[0103] Among them, according to the target splitting ratio, the file before splitting corresponding to the file to be split is split. The file before splitting corresponding to the file to be split can be split again, or at least one sub-file of the file before splitting corresponding to the file to be split is processed accordingly, so that the target splitting ratio of each sub-file after processing is equal to the target splitting ratio.
[0104] Specifically, the file before splitting corresponding to the file to be split can be re-split by obtaining the file before splitting based on the current sub-files of the file before splitting, and then re-split the file before splitting based on the target splitting ratio. At least one sub-file of the file before splitting corresponding to the file to be split can be processed accordingly by re-segmenting and merging one or more sub-files of the current sub-files of the file before splitting, so that the ratio of each sub-file after re-segmentation and merging is as close as possible to the target splitting ratio.
[0105] In one example, if the file to be split corresponds to a file before splitting, the file to be split is a subfile stored locally in the two subfiles (referred to as the local subfile), and the other subfile is stored in a cloud server (referred to as the cloud subfile). When the target split ratio of the local subfile and the cloud subfile is different from the current split ratio (the above-mentioned threshold value can be zero at this time), the subfile to be split or the subfile stored in the cloud server can be adjusted. For example, when the target split ratio of the local subfile and the cloud subfile is greater than the current split ratio, a portion of the file can be downloaded from the cloud server and merged with the local subfile, and a portion of the file downloaded from the cloud server can be deleted from the cloud server, and the ratio of the processed local subfile to the cloud subfile is equal to the target split ratio; when the target split ratio of the local subfile and the cloud subfile is less than the current split ratio, the local subfile can be re-split, and the split part of the file can be uploaded to the cloud server, merged with the cloud subfile, and the corresponding part of the file in the local can be deleted, and the ratio of the processed local subfile to the cloud subfile is equal to the target split ratio.
[0106] It can be seen that if the file to be split is in an unsplit state, it can be split according to the predicted target split ratio. If the file to be split is in a split state, the file before splitting corresponding to the file to be split can be re-split according to the target split ratio, or at least one sub-file of the file before splitting can be processed accordingly.
[0107] From the foregoing description, it can be seen that each sub-file of a file can be obtained by splitting based on the frequency domain characteristics and / or data bit characteristics of the file. Therefore, when splitting the file to be split according to the target splitting ratio, the file to be split can be split based on the frequency domain characteristics and / or data bit characteristics of the file according to the target splitting ratio to obtain corresponding sub-files.
[0108] In an optional embodiment of the present application, the file processing method may further include:
[0109] At least one sub-file obtained by splitting is sent to at least one other device for storage.
[0110] It is understandable that when the file to be split is an unsplit file, after the local device completes the splitting of the file to be split, it is necessary to send at least one sub-file obtained by the splitting to other devices for storage. The other devices may be one or more of other terminal devices, servers, and cloud servers. After sending at least one sub-file to other devices, the corresponding sub-file in the local device can be deleted to free up the storage space of the local device and optimize the device. When the file to be split is a split sub-file, it can be seen from the above description that if the file before the split corresponding to the file to be split is re-split, the at least one sub-file obtained by the re-split can be sent to other devices for storage. If at least one sub-file of the file before the split is processed accordingly, it may be necessary to send a partial file of at least one sub-file to at least one other device for storage, or it may be necessary to obtain a partial file of at least one sub-file from other devices.
[0111] In an optional embodiment of the present application, determining the target splitting ratio of each sub-file corresponding to the file to be split may include:
[0112] extracting corresponding feature information for at least one of the following information: file-related information of the file to be split, device-related information of at least one device storing sub-files of the file to be split, and user-related information;
[0113] Through the deep learning network, based on the extracted feature information, the target splitting ratio of each sub-file corresponding to the file to be split is determined.
[0114] It should be noted that, in actual applications, the target split ratio of each sub-file may be determined in this manner or may be a set split ratio.
[0115] The specific network type of the deep learning network can be determined according to actual needs. By training the deep learning network, when the extracted feature information of the file to be split is input into the deep learning network, the network can output the target split ratio of each sub-file. In an optional solution, the deep learning network can include but is not limited to one or more networks such as neural networks, multi-layer perceptrons, decision trees, word embedding, natural language processing models, etc.
[0116] It should be noted that when the feature information corresponds to multiple pieces of information, the feature information corresponding to the multiple pieces of information can be input into the same deep learning network, and the target splitting ratio is obtained by the output of the neural network. Alternatively, the feature information corresponding to the multiple pieces of information can first be preprocessed by one or more deep learning networks, and the preprocessing results can be input into the deep learning network trained to output the target splitting ratio to obtain the target splitting ratio.
[0117] In an optional embodiment of the present application, if at least one sub-file of a file is stored locally and at least one sub-file is stored in another device, the at least one sub-file of the file is processed accordingly, which may include at least one of the following methods:
[0118] Performing corresponding processing on at least one sub-file stored locally;
[0119] At least one sub-file stored in other devices is processed accordingly.
[0120] In actual applications, when the core part of the file is stored locally, only the core part stored locally can be processed according to the user's operation request. If the core part of the file is stored in other devices, the sub-files stored in other devices can be processed accordingly according to the operation request. Of course, it is also possible to simultaneously process at least one sub-file stored locally and at least one sub-file stored in other devices.
[0121] In an optional embodiment of the present application, corresponding processing of at least one sub-file stored in other devices may include at least one of the following methods:
[0122] Obtain at least one sub-file of the file from other devices, and perform corresponding processing on the obtained sub-file;
[0123] Instructing other devices to perform corresponding processing on at least one stored sub-file;
[0124] At least two sub-files stored in different devices are obtained, and the obtained at least two sub-files are merged.
[0125] When it is necessary to perform corresponding processing on at least one subfile stored in other devices, a file acquisition request may be sent to other devices to acquire at least one subfile of the file from other devices, and then the acquired subfile may be processed accordingly according to the operation request.
[0126] Instructing other devices to perform corresponding processing on at least one sub-file stored in the device may be to instruct other devices to perform corresponding processing on at least one sub-file stored in the device, or to instruct other devices to perform corresponding processing on other other devices. For example, a file includes three sub-files, one of which is stored locally, one is stored in a cloud server, and one is stored in another terminal device. The local device may directly perform corresponding processing on the sub-file stored locally. When the local device needs to process the sub-file stored in the cloud server, it may send a corresponding operation request to the cloud server, and the operation request is used to instruct the cloud server to perform corresponding processing on the sub-file stored in the cloud server. It may also send an instruction to the cloud server, and the instruction instruction is used to instruct the cloud server to send a corresponding operation instruction to another terminal device, so that the other terminal device performs corresponding operations on the sub-file stored in the cloud server.
[0127] It should be noted that, when obtaining at least two sub-files stored in different devices and merging the obtained at least two sub-files, the merging process may be to simply merge the at least two sub-files, or to merge the at least two sub-files first and then perform corresponding processing on the merged file, or to perform corresponding processing on the at least two sub-files separately and then merge the processed at least two sub-files.
[0128] Among them, the different devices that obtain at least two sub-files stored in different devices may refer to the local device and other devices other than the local device, or may be different other devices. As an example, for example, a file includes three sub-files a, b, and c, where sub-file a is stored in the local device, sub-file b is stored in a cloud server, and sub-file c is stored in another cloud server. When the local device receives an operation request for the file, it can process the file accordingly according to the specific content of the operation request. For example, when the operation request is a browsing request, the local device can respectively obtain sub-files b and sub-file c stored in two cloud servers, and sub-file a stored locally, and merge the three sub-files and display them to the user. For another example, when the operation request is an editing request and a browsing request, the local device can respectively edit the three sub-files a, b, and c obtained and then merge them, and display the edited and merged files to the user. The local device can also first merge the obtained sub-files a, b, and c, and then edit the merged file and display it to the user.
[0129] Of course, if the local device needs to merge the sub-files a and b of the file accordingly after receiving the operation request, it can obtain part or all of the content of sub-file b from the cloud server respectively, and merge part or all of the content of sub-file a and sub-file b. For example, for a video with a duration of 50 seconds and a size of 200MB, 20MB (core part) of the video is stored in the terminal device, 90MB is stored in a cloud server A, and 90MB is stored in another cloud server B. When the operation request is a browsing request (such as the user clicks on the file on the terminal device), the terminal device can immediately load the core part of the file and display it. If the current network is slow, the terminal device can calculate the 30M file content that can be downloaded from the cloud server in 50 seconds based on the current network speed. At this time, the terminal device can obtain a 30M file from one of the cloud servers (such as obtaining a 30M file from cloud server A), merge the obtained 30M file with the local core part, and display it to the user.
[0130] In an optional embodiment of the present application, the operation request includes at least one of the following requests:
[0131] Browse requests, edit requests, delete requests, send requests, get requests.
[0132] Wherein, when the operation request is a sending request, the local device may send at least one subfile stored locally to the receiving device, or the local device may send at least one subfile stored locally and at least one subfile obtained from other devices to the receiving device, or other devices (such as cloud servers) may send at least one stored subfile to the receiving device corresponding to the request according to the request after receiving the sending request. The obtaining request may include a receiving request, such as a terminal receiving a file may receive at least one subfile from the local device and / or other devices.
[0133] In an optional embodiment of the present application, obtaining at least one sub-file of a file from another device may include at least one of the following:
[0134] Based on the device related information, obtaining at least one sub-file of the file from other devices;
[0135] Obtaining part or all of the content of at least one sub-file of the file from another device;
[0136] At least one sub-file of the file is obtained from other devices based on the link feature value corresponding to the file.
[0137] In actual applications, whether to obtain at least one subfile from other devices can be determined based on one or more of the device's storage space, power, network status, load status, etc. For example, when the device network is in WIFI or the data flow is sufficient, at least one subfile can be obtained from other devices. For another example, when the device power is greater than a power threshold, at least one subfile can be obtained from other devices.
[0138] When obtaining at least one sub-file from other devices, partial content or full content of at least one sub-file may be obtained according to configuration or actual application needs. Specifically, whether to obtain partial content or full content may be determined based on one or more information in device-related information and / or file-related information.
[0139] For example, as a specific example, a user clicks on a video file that has been split and stored on a device. The video is 60 seconds long and 70 MB in size, of which 10 MB is stored on the terminal device and 60 MB is stored on the cloud server. When the user clicks on the file on the terminal device, the terminal device can immediately load the core part of the file and display it, which is equivalent to a low-definition version of the video. If the network is available (such as WIFI or sufficient remaining data flow, and the network speed is fast enough), the terminal device can download the corresponding additional part of the file from the cloud while displaying the core part of the file, and combine it with the core part into a complete original file and display it, so that the user can watch the video with original definition. If the network condition is not good (limited network speed, insufficient data flow, etc.), the terminal device can download a part of the corresponding additional part of the file from the cloud while displaying the core part of the file, rather than the complete additional part. Assume that the current network speed is slow, only 0.5 MB / s. Then, within 60 seconds, a maximum of 30 MB of content can be downloaded. Considering that the network speed may be unstable, the cloud server can return 20 MB of additional content. This allows users to watch videos with a resolution equivalent to 30MB (10MB locally and 20MB returned by the server) without any delay (the delay is very small and the user can hardly perceive it).
[0140] It can be seen that the solution of the embodiment of the present application can choose whether to process only the core part of the local storage and whether to obtain the additional parts in other devices according to the actual application requirements and / or device-related information. Since only the core part of the local storage can be processed accordingly, the solution reduces the dependence on network connection and can better meet the actual application needs.
[0141] In an optional embodiment of the present application, obtaining at least one sub-file of a file from another device based on device-related information includes:
[0142] When the device-related information of the local device and / or other devices storing the sub-files meets the set processing conditions, obtaining at least one sub-file of the file from the other devices;
[0143] The device-related information includes at least one of the following information: storage space, power, network status, and load status.
[0144] It is understandable that the processing condition can be configured according to actual needs. For example, the processing condition can be that the network status of the local device is WIFI connection and the device power is greater than 50%.
[0145] The link feature value corresponding to the file is used to uniquely identify the file. The actual storage location or URL (Uniform Resource Locator) of at least one sub-file stored on other devices can be stored in association with the corresponding link feature value. When it is necessary to obtain at least one sub-file of the file from other devices, a file acquisition request including the link feature value can be sent to the other devices, and the other devices can quickly feedback the corresponding at least one sub-file based on the link feature value in the request.
[0146] The device (local device or other device) can obtain at least one required sub-file at any time according to the link feature value when needed. For example, when the sub-files of a file are stored locally and in a cloud server respectively, when the local device needs to send the file to other users, it can only send the locally stored part and the link feature value corresponding to the file. After receiving the link feature value, other users can obtain the part of the file stored in the cloud from the cloud server when needed, without having to resend the acquisition request to the local device, and the time limit for obtaining the part of the file is not limited.
[0147] In addition, since the device can automatically obtain the required sub-files from the cloud server or other devices based on the link feature value, the user does not need to remember the storage location of each sub-file, which reduces the user's file management burden and greatly reduces the difficulty of user file management. It solves the problem that users need to remember the storage location of each file in existing cloud storage methods, causing inconvenience to users.
[0148] In an optional embodiment of the present application, the link feature value may be associated with at least one of the following: file content, time information, user information, and local device information.
[0149] For example, the link feature value can be obtained based on the content of the core part of the file. Specifically, the hash value corresponding to the core part can be calculated using a hash algorithm, and the hash value can be used as the link feature value of the file. In order to avoid the occurrence of collisions between hash values of different files, the link feature value can also be obtained based on the content of the core part of the file and the user identification, for example, the hash value corresponding to the core part can be concatenated with the user identification to obtain the link feature value.
[0150] In an optional embodiment of the present application, at least one sub-file stored on other devices is a sub-file encrypted based on the content of at least one sub-file stored locally. Based on this optional embodiment, the file processing method may further include:
[0151] At least one sub-file stored on another device is decrypted according to the content of at least one sub-file stored locally. If the decryption is successful, it is confirmed that the content of at least one sub-file stored locally has not changed.
[0152] In practical applications, in some specific cases, users need to prove that the content they record is reliable (the time is real and has not been modified, and the content is real and has not been modified). For example, when a traffic accident or other special event occurs, users need to record photos / videos of the on-site conditions, or important conversation content, etc., and need to prove the authenticity and reliability of the photos, recordings, or videos taken when the accident or other event occurs. The content verification scheme provided by the embodiment of the present application encrypts at least one sub-file stored on other devices based on the content of at least one sub-file stored locally. At this time, since only the unmodified core part can decrypt the encrypted additional part, it can be proved whether the core part stored locally has changed based on the content of at least one sub-file stored locally, whether the at least one sub-file stored on other devices can be successfully decrypted, that is, the core part stored locally can be verified based on the additional part stored on other devices.
[0153] In an optional embodiment of the present application, the sub-file encrypted based on the content of at least one sub-file stored locally and stored on other devices may also be stored in association with a timestamp of the other device, and the timestamp may be the time when the other device receives the sub-file. For example, when the other device is a cloud server, the timestamp may be the server timestamp when the cloud server receives the decrypted sub-file. Since the timestamp information is difficult to be tampered with, the real generation time of the file may be proved.
[0154] In actual application, the setting options corresponding to the verification function can be configured on the terminal device. The setting options of this function can be turned off by default. When the user needs to use this function in specific circumstances, such as when obtaining photos, recordings or videos and other files, and needs to use this function on the obtained files, the function can be activated by clicking / gestures / key combinations / voice and other methods. The files obtained after activating this function are split and the additional parts are encrypted using the split core content. The encrypted additional parts are sent to other devices such as cloud servers for storage. The cloud server sets a timestamp for the encrypted additional parts when storing them.
[0155] In order to better understand the solution of the embodiment of the present application, the file processing method of the embodiment of the present application is described below with reference to some specific examples.
[0156] Figure 3 A schematic diagram showing a network architecture applicable to the file processing method of an embodiment of the present application is shown. Figure 3 As shown in , the network architecture may include a terminal device 100 and a cloud server 200, the terminal device 100 is a local device, and the cloud server 200 is another device. A file in the terminal device 100 may be split into at least two sub-files, and the at least two sub-files are stored in the terminal device 100 and the cloud server 200, respectively.
[0157] It is understandable that in actual applications, the terminal device 100 may include but is not limited to smart phones, tablet computers, personal computers, wearable devices such as smart watches / smart glasses, smart home devices such as smart refrigerators / smart TVs, smart cars, etc. The cloud server 200 may be a public server provided by a company manufacturer and / or a private server built by itself. After the sub-files are manually or automatically uploaded to the cloud, the sub-files can be processed through web pages / management applications (APPs), etc.
[0158] based on Figure 3 The system architecture shown in the figure is combined with the following examples to illustrate the file processing method of the embodiment of the present application.
[0159] Figure 4 The schematic diagram shows the principle of processing and uploading a complete file (i.e., original file) stored in the terminal device 100. As can be seen from the figure, the complete file can be divided into two parts, namely, a core part and an additional part. The core part is stored locally in the terminal device 100, and the additional part is stored in the cloud (i.e., on the cloud server 200).
[0160] As an example, Figure 5 The schematic diagram shows the principle of splitting the original file into the core part and the additional part. Figure 5As can be seen from the figure, the original file can be divided into two parts according to the file information content: "low frequency high bit" and "high frequency + low frequency low bit". The former is called the core part and the latter is called the additional part. The core part contains the main body of the information, and the additional part only contains the information details. In addition, optional, such as Figure 5 As shown in , a hash value can also be generated from the core part, and this hash value is used as a secret key or a secret key is generated from this hash value, and the additional part is encrypted using this secret key, and the encrypted additional part is saved on the cloud. It can be understood that this operation is not necessary, and if performed, it can further improve privacy security.
[0161] As an example, Figure 6 , a flow chart of splitting a file into a core part and an additional part according to the frequency domain features and data bit features (such as binary data bit features) of the original multimedia file is shown in. In this example, splitting based on frequency domain features first and then based on data bit features is used as an example for explanation.
[0162] like Figure 6 As shown in , before splitting, the terminal device can first determine whether the original multimedia file is in a compressed encoding format, and if so, decompress it into original data. For common multimedia files, such as audio / picture / video, their original data can be represented as a one-dimensional / two-dimensional / three-dimensional matrix, which respectively represents the distribution of sound amplitude in time / the distribution of the brightness of the three primary colors of pixels in space / the distribution of each frame of the picture in time.
[0163] When splitting based on the information frequency of the file (i.e., frequency domain features), the original data is first transformed into frequency domain data. The original data can be transformed into frequency domain using methods such as FFT (Fast Fourier Transform) / DCT (Discrete Cosine Transform) / STFT (Short-Time Fourier Transform) / WT (Wavelet Transform), or other time-space domain-frequency domain transformation methods. The frequency domain data is a matrix with the same dimension as the original data.
[0164] As an example, the frequency domain data form can be expressed as:
[0165]
[0166] Among them, each frequency domain element F ijIt represents the frequency-domain eigenvalue corresponding to the frequency element, that is, the magnitude of the frequency-domain component of the frequency element. Generally, it is agreed that elements with smaller i and j correspond to low-frequency components, and elements with larger i and j correspond to high-frequency components. m and n are the height and width of the frequency-domain data matrix. The low-frequency components contain the main structural information of the content, and the high-frequency components contain the detailed information of the content (after removing the main structure).
[0167] It should be noted that in practical applications, when performing frequency-domain conversion on the original data, different frequency-domain conversion methods may result in different forms of the frequency-domain data matrix. For some conversion methods, the elements with smaller i and j in the obtained frequency-domain data matrix may correspond to low-frequency components, while for others, this may not be the case. In this example, for the sake of convenience of description, it is assumed that elements with smaller i and j correspond to low-frequency components, and elements with larger i and j correspond to high-frequency components for illustration.
[0168] In this example, the target splitting ratio of the file is jointly characterized by the control variable r1 (value range 0 - 1) and the control variable r2 (value range 0 - 1). Among them, the control variable r1 controls the ratio of the low-frequency part to the high-frequency part, and the control variable r2 controls the ratio of the high data bits to the low data bits.
[0169] Based on the frequency-domain characteristics, according to the control variable r1, the frequency-domain data is split into two parts: low-frequency components and high-frequency components. Specifically, if the frequency-domain elements with smaller subscripts correspond to low-frequency components, then all Fij that meet i < m * r1 and j < n * r1 can be classified into the low-frequency component part, which contains the low-quality main structural information; the other Fij are classified into the high-frequency component part and cannot be used independently.
[0170] As an example, Figure 6a shows a schematic diagram of a splitting method. As shown in the figure, F 00 、F 01 、F 10 、F 11 are the divided low-frequency component parts, and the rest are the high-frequency component parts.
[0171] Optionally, after completing the division of the low-frequency component part and the high-frequency component part, the low-frequency component part can be further split based on the data bit positions (i.e., data bit characteristics) according to the control variable r2. In one example, taking binary as an example, for each low-frequency element F ij , it can be represented as a series of binary bits as shown in Figure 6b . Among them, q + 1 represents the number of binary bits. If the binary bits with smaller subscripts represent high data bits, then all Bit i that meet i < q * r2 can be classified into the low-frequency high-bit component part; the remaining Bit iClassified as low-frequency and low-bit component.
[0172] Through the above two steps of splitting, the original data is split into three parts: low-frequency high-bit component, low-frequency low-bit component, and high-frequency component. Among them, only the low-frequency high-bit component contains information that can be understood by humans. As the core part, it is stored locally on the device; neither the low-frequency low-bit component nor the high-frequency component contains information that can be understood by humans. They must be attached to the low-frequency high-bit component before they can be used. The low-frequency low-bit component + high-frequency component are stored together as an additional part on the cloud.
[0173] In this example, the two-step splitting maximizes the separation of information that is understandable to humans and information that is not understandable to humans. While protecting user privacy, it splits out as much human-incomprehensible data as possible and reduces the core part.
[0174] It is understandable that in practical applications, the original data can also be divided only according to the frequency domain features or the data bit features. For example, in this example, the splitting by the data bit features can be omitted, and the low-frequency component and the high-frequency component of the splitting result by the frequency domain features can be directly used as the core part and the additional part respectively. The effect of information separation can also be achieved. If the splitting by the data bit features is skipped, the separation effect is not as good as the two-step splitting (the core part obtained by the two-step splitting is smaller in size), but the computational load is slightly smaller.
[0175] For this example, during the splitting process, r1 and r2 control the splitting ratio. Smaller r1 and r2 will produce a core part with lower quality but smaller volume + an additional part with larger volume, and larger r1 and r2 will produce a core part with higher quality but larger volume + an additional part with smaller volume. r1 controls the ratio of splitting according to frequency domain features. Specifically, the size of the low-frequency component part / the complete size = r1^n_dim, that is, r1 n _ dim (For audio, n_dim=1; for picture, n_dim=2; for video, n_dim=3) r2 controls the ratio of splitting according to data bit features, specifically, the size of the low-frequency high-bit component part / the size of the low-frequency component part=r2.
[0176] In practical applications, r1 and r2 can take preset default values, for example, r1 and r2 are set to 0.1 according to experience. In addition, r1 / r2 can also be set in real time according to the current device status during initial use. For example, if the current available storage space of the device is small, r1 and r2 are set to be small, and if the current available storage space of the device is large, r1 and r2 are set to be large. It can also be set manually by the user, or automatically by other modules (as described later, based on the file-related information of the file to be split, the device-related information of at least one device storing the sub-files of the file to be split, and the feature information corresponding to at least one of the user-related information, the target split ratio of each sub-file corresponding to the file to be split is determined through a deep learning network), or automatically set by other applications / device operating systems, etc. Regardless of how r1 / r2 is set, the information in the additional part cannot be understood by humans, achieving extremely high privacy protection.
[0177] As an example, Figure 7 The schematic diagram of the principle of the automatic storage management method based on user event prediction is shown in FIG. The idea is to adjust the storage ratio of each file locally and on other devices according to at least one of the information of the file to be split, the device-related information of at least one device storing the sub-files of the file to be split, and the user-related information, that is, to determine the target split ratio of each sub-file of the file. Figure 7 The picture in the figure is used as a schematic diagram of the files to be split. The terminal device can analyze and predict the events that the user will / plan to carry out in the near future, such as business trips, personal travel, family gatherings, etc., through the available information such as the rating of the file shown in the figure, the frequency of use of the file, and whether the storage space of the terminal device is sufficient. At the same time, the terminal device can also analyze the characteristics of each local file through the available information to obtain its relevance / matching degree with future events. On this basis, the remaining storage space of the terminal can also be considered to obtain the target split ratio of the files to be split, and adjust each file.
[0178] If the file to be split is an unsplit file, the adjustment of the file refers to determining the split ratio of the core part and the additional part of the file. For split files, if the difference between the target split ratio and the current split ratio of each sub-file of the file is greater than the set threshold, the adjustment of the file refers to changing the split ratio of the file to obtain a larger core part + a smaller additional part (better local file quality, less traffic / time overhead for loading the complete file), or a smaller core part + a larger additional part (lower local file quality, less local storage). By adjusting each file according to user events, it is ensured that users have sufficient terminal storage space available in various situations, and that the files that users will use are stored as much as possible locally on the terminal, so as to ensure the availability of files that users may use as much as possible, and more importantly, meet the actual needs of users.
[0179] exist Figure 7 In the example, if the file rating is low, the file is not often used, the terminal storage is insufficient, a major event is predicted, or no relevant event is predicted, a smaller core part and a larger additional part can be obtained when splitting the file to be split, so as to obtain a lower quality local storage sub-file quality, so that the local storage is less. If the file rating is high, the file is often used, the terminal storage is sufficient, no major event is predicted, or no relevant event is predicted, a larger core part and a smaller additional part can be obtained when splitting the file to be split, so as to obtain a higher quality local storage sub-file quality, so that the traffic / time overhead of loading the complete file is small.
[0180] For example, when it is predicted that the user is about to go on a trip or other major events, the terminal device needs more storage space because it is necessary to take photos or record videos during the trip. When splitting the files to be split, they can be split into smaller core parts and larger additional parts to free up more storage space. For another example, when it is predicted that the user needs to attend a friend's party or other related events, it is likely that photos, videos and other related files of the people attending the party will be needed. In this case, the larger core part of the related files can be stored in the terminal device for the user's convenience.
[0181] As a specific example, Figure 8 A schematic diagram of a method for extracting corresponding feature information for user related information is shown in FIG. In this example, a variety of methods can be used to process the available user related information to predict the features of the user's near-future events (i.e., the feature information corresponding to the user related information). Figure 8As shown in , the user-related information that can be obtained includes but is not limited to the user's schedule, hotel reservations / air tickets / train tickets, chat / text messages, current location, recent contacts, etc. In addition to the information that can be directly obtained by the terminal device, other terminal devices belonging to the same account / same network / interconnected, and the information of the same user on various network platforms can also be used as input. A variety of methods are used to preprocess user-related information. The preprocessing module converts multimodal unstructured information into vectors that represent information features.
[0182] Generally speaking, for structured information (such as schedules, etc.), rule-based analysis (such as decision trees) and other processing methods can be used to generate deterministic result vectors for subsequent processing. Compared with the outputs of other models, this result has a higher credibility, so it can have a higher weight in subsequent use. One way to achieve a higher weight is to input this result directly into the multi-layer perceptron that predicts user event features instead of combining it with other results from the preprocessing module.
[0183] Word embedding can be performed on vocabulary / entity information (such as current location, hotel reservations / air tickets / train tickets, keywords in schedules, etc.), and can be converted into vectors that maintain the original vocabulary / entity information structure for subsequent processing.
[0184] For natural language text information (such as chat / text messages, etc.), natural language processing technologies such as LSTM (Long Short Term Memory) / GRU (Gated Recurrent Unit) are used to generate vectors that represent their key features (such as topics / keywords / user intent, etc.) for subsequent processing.
[0185] For quantifiable / numerical information (such as recent contacts / current location coordinates, etc.), a multi-layer perceptron is used to generate a vector representing its characteristics for subsequent processing.
[0186] The outputs of word embedding, natural language processing, and multi-layer perceptron in the preprocessing module are combined into a vector and input into an autoencoder to compress and extract the information.
[0187] The output vector of the rule-based analysis (such as decision tree) and the output vector of the autoencoder are combined and input into a multi-layer perceptron to obtain the predicted event feature vector. This vector represents the various characteristics of the near-future events predicted by the terminal, which may include but are not limited to the event type, duration, location, related people, importance, etc. (such as: travel, one week, United States, family, high.). This information is input into the subsequent network and can be used to decide how to adjust the split ratio of each file in the terminal.
[0188] Understandably, Figure 8 The figure only shows a feasible preprocessing flow of the user-related information in this example. In actual application, the input data or the connection mode of the input data to the preprocessing module can be changed.
[0189] As a specific example, Fig. 9 The figure shows a schematic diagram of a method for extracting corresponding feature information based on file-related information and terminal-related information of the file to be split, and obtaining a target split ratio based on the extracted feature information. In this example, based on the predicted event feature vector, the features of each file and its correlation with the predicted event are analyzed, and then considering the terminal device information such as the remaining storage space of the terminal device, it is decided how to adjust each file, that is, the file analysis and automatic adjustment solution.
[0190] In this example, Fig. 9 As shown in , the file-related information that can be obtained includes but is not limited to: file type / size, label / rating, file opening time, file content, etc. Among them, the rating can be set manually by the user, or it can be automatically determined from the user's behavior. For example, if a user marks a photo as liked, or edits or beautifies it, or shares a photo, or often opens a photo, etc., it means that the photo has a high rating. For files that have been split and processed, the file content refers to its core content. For files that have not been split and processed, the file content refers to its complete content.
[0191] In this example, multiple methods can be used to preprocess the file information. The preprocessing module converts multi-modal unstructured information into a vector representing information features.
[0192] Generally speaking, a multi-layer perceptron can be used to process information such as file type / size, label / rating, file opening time, etc., and encode it into a vector for subsequent processing. In this example, RNN (Recurrent Neural Network) / CNN (Convolutional Neural Network) / Recursive CNN can be used to process the file content. The specific network used depends on the file type. For example, RNN can correspond to audio, CNN can correspond to images, and recursive CNN can correspond to video. The file content is encoded into a vector representing its features for subsequent processing.
[0193] Understandably, Fig. 9 The figure only shows a feasible preprocessing flow of the file-related information in this example. In actual application, the input data or the connection mode of the input data to the preprocessing module can be changed.
[0194] Fig. 9 The output of the preprocessing module, device-related information (i.e., terminal device information, such as the remaining storage space of the terminal, etc.), Figure 8 The predicted event feature vector obtained in and other available information can be combined into a vector and input into a multilayer perceptron. The multilayer perceptron is trained to output the target split ratio of the current file, i.e., the file to be split, for the predicted event under the current remaining storage space, i.e., the target r1 and / or r2.
[0195] It should be noted that in practical applications, Figure 8 User prediction event feature prediction shown in Fig. 9 The file analysis and automatic adjustment shown in , as well as the device related information, can also work independently, that is, it can be based only on the predicted event feature vector, or Fig. 9 The feature vector corresponding to the file-related information or the device-related information output by the preprocessing module is used to obtain the target r1 and / or r2 of each file to be split through a deep learning network (such as a multi-layer perceptron). Specifically, the multi-layer perceptron used to output the target r1 and / or r2 can be trained to work when the input is a predicted event feature vector, or trained to work when the input is a feature vector corresponding to the file-related information, that is, when the predicted event feature vector is empty, or trained to work when the input is terminal device-related information. Taking the case where the input is a feature vector corresponding to the file-related information and the remaining storage space of the terminal as an example, at this time, the multi-layer perceptron can work independently without relying on the user event feature prediction, and its effect is equivalent to managing the file / storage space while only considering the popularity / user preference of each file and the storage space of the terminal device.
[0196] After obtaining the target split ratio (i.e., target r1 and / or r2), if the file to be split is currently in an unsplit state, it can be split according to the predicted target r1 and / or r2, and the additional part can be uploaded and the local additional part can be deleted; if the file to be split is a sub-file that has been split, and the current split state is not target r1 and / or r2, it can be adjusted (such as re-split and upload part of the file, or download part of the file and merge it) to make the ratio of the adjusted core part to the additional part as close as possible to the target split ratio.
[0197] In this application, you can execute the following steps for each file to be split: Figure 8 and Fig. 9 The feature extraction and target split ratio prediction shown in FIG. 1 obtain the target split ratio corresponding to each file to be split, i.e., r1 and / or r2. That is to say, for each file to be split, r1 and / or r2 are output respectively to control the adjustment method of the file to be split, i.e., the splitting method.
[0198] Figure 8 and Fig. 9 The networks shown in the figure (such as rule-based analysis, word embedding, natural language processing model, multi-layer perceptron, autoencoder, RNN, CNN, etc.) can all be pre-trained and can also be continuously optimized and updated according to user behavior during actual use. For example, under certain environmental conditions, the user can manually adjust the split ratio of a file, and this behavior can be used as training data for subsequent network updates.
[0199] As a specific example, suppose the user is going to travel abroad and the remaining storage space of the terminal is small. The terminal can use Figure 8 The method shown in predicts that the user is going to travel abroad. For this event, more storage space should be reserved (the user may take a lot of photos / videos, and it may be inconvenient to access cloud storage abroad). In addition, for traveling abroad, some leisure music / videos should be prepared for use on the plane / when bored. The terminal can use Fig. 9 The method shown in , analyzes files one by one, and if the files are irrelevant, upload more of them to the cloud to ensure local storage space. If the files are songs that the user likes, or newer movies that meet the user's preferences, they can be moved more to the local computer so that the user can use them on the plane.
[0200] As another specific example, assume that the user is going to attend a party with friends and the terminal has sufficient remaining storage space. Figure 8 The method shown in , predicts the party that the user will attend and the related personnel. For this event, appropriate storage space should be reserved and photos / videos of the related personnel should be prepared. Fig. 9 The method shown in parses files one by one. Since there is sufficient storage space, there is no need to adjust irrelevant files. If the files are relevant (e.g., photos / videos of partygoers, music suitable for the party, interesting video clips that can liven up the atmosphere, etc.), more of them are moved to the local computer so that users can use them at the party.
[0201] After the local original file is split, the terminal device can upload the split additional part to the cloud and delete the local additional part to release storage space when WIFI is available and / or the device is idle.
[0202] When a file needs to be processed, such as optimizing, deleting, or editing the file, one implementation method is that when a user needs to delete a file, the terminal device receiving the instruction sends a request to the cloud server and deletes the core part stored by itself. The cloud server removes the additional part stored by itself according to the received request.
[0203] When a user edits a file, the terminal device can obtain the additional part from the cloud server and synthesize the complete file. After the file is edited, it is regarded as a new file and is split and uploaded. Another possible synchronous editing method is that the user edits the core part on the terminal device, and the terminal device uploads the corresponding modified content or editing steps to the cloud server. The cloud server edits the additional part accordingly based on the modified content or editing steps of the core part, and modifies it to the same effect.
[0204] As an example, Fig.10 A flow chart of a method for realizing automatic linking of a core part and an additional part based on link feature values is shown in FIG. Fig.11 A schematic diagram of the method for generating link feature values and obtaining the original file based on the link feature values is shown in . A unique link feature value is calculated from the core content, and a mapping table (or other forms of correspondence) is maintained on the cloud to record the storage location of the additional part corresponding to each link feature value.
[0205] like Fig.10 and Fig.11 As shown, after splitting the original file (such as a picture, audio or video, etc.) to obtain the core part and the additional part, the terminal device can use MD5 (Message digest algorithm v5, message digest algorithm version 5) / SMA (Secure Hash Algorithm) or other hash algorithms to calculate the hash value corresponding to the core part, which can be called the "file hash value". The characteristics of the hash algorithm ensure that, except in extremely rare cases, the hash values of different files are different. That is, the corresponding file can be uniquely determined by the hash value. In addition to the above-mentioned hash algorithm, other algorithms can also be used to generate a unique link feature value corresponding to the file.
[0206] In rare cases, two different files may generate the same hash value, which is called a collision. To handle this situation, the terminal device can add a timestamp and / or user ID (UID) and / or device-related information (such as device ID, etc.) to the hash value, which is an optional step. The timestamp can be the time when the file was created, or the time when the splitting process occurred. In an optional method, the file hash value + timestamp + UID can be directly spliced together. This result is unique and is called a link feature value. Different files have different link feature values. The link feature value is stored locally on the terminal device. The link feature value can also be generated by [file hash value + timestamp], or [file hash value + UID], etc., and other algorithms can also be used to generate a unique value as a link feature value by [file hash value + timestamp and / or UID], etc.
[0207] In addition, if Fig.10 As shown in , optionally, similar to the process of generating the link feature value, another hash value can be generated by another hash algorithm, or the same hash algorithm set to different parameters. This hash value itself, or hash value + timestamp and / or UID, can be used as an encryption key for encryption / decryption of the additional part on the cloud.
[0208] For all files to be processed, that is, files to be split, the terminal device splits the files to obtain the core part and the additional part, and then generates the link feature value corresponding to each file to be split in the above manner.
[0209] When the device is idle, WIFI is available or network traffic is sufficient, the device uploads the attached part of the file to the cloud, and the cloud server updates the mapping table. The mapping table maintains the correspondence between the link feature value and the storage location information of the attached part. For example, a record is added to the table: [link feature value → corresponding actual storage location / URL of the attached part]. When necessary, the actual storage location of the attached part on the cloud can change. While adjusting the actual storage location of the attached part, the cloud server updates the mapping table and updates the actual storage location or URL corresponding to the link feature value to the adjusted value, ensuring that the link feature value + mapping table can always be used to find the actual storage location of the attached part. Among them, the attached part stored on the cloud can be the attached part encrypted using the above encryption key.
[0210] When the user needs to operate the split files on the terminal device, such as Fig.12 As shown, for example, when you need to click / open a file that has been split and uploaded on the terminal, the terminal device can immediately display the core part of the file. If the network status allows, such as WIFI is available or the remaining traffic is sufficient, the terminal device can upload the link feature value corresponding to the file to the cloud server. The cloud server retrieves the mapping table to obtain the actual storage location / URL of the additional part corresponding to the file, and obtains the additional part of the file. The cloud server transmits the additional part of the file back to the terminal device. After the terminal device receives the additional part of the file, if the additional part is encrypted, the device decrypts it (it can be decrypted in the cloud and sent to the terminal, or it can be decrypted after the terminal receives it). The terminal device merges the core part with the additional part / decrypted additional part to obtain the complete original file and displays it, as shown in FIG. Fig.11 As shown in . Among them, Fig.11 The device here refers to the terminal device, and the cloud refers to the cloud server.
[0211] If the network condition is moderate (limited network speed, insufficient remaining traffic), the cloud server may also return part of the additional part instead of the complete additional part. After the terminal device merges part of the additional part with the core part, it can generate and display a medium-quality file. The specific proportion of the additional part returned can be determined by the network condition and the file content. In actual applications, as much additional part as possible can be downloaded without causing obvious usage delay / within a reasonable and appropriate traffic range to maximize the quality of the displayed file.
[0212] As an example, Fig.13 The schematic diagram of the principle of a simple file sharing method that saves traffic is shown in FIG. The sending user sends the core part of the file, and the receiving user can directly preview its content and download the additional part as needed to obtain the complete file. Fig.13 As shown in , user A sends a file to user B. User A stores the core part of the file locally. User A sends the core part to user B and can also send a link feature value to user B. After user B receives the core part sent by user A, he can directly preview the content of the core part, and can automatically obtain the additional part according to the link feature value as needed, and merge it with the core part to obtain the original file, that is, reconstruct the original file.
[0213] As an example, Fig.14a A flowchart of a file sharing method is shown. Based on this method, user A can send a thumbnail version of a file to another user. When the sending user terminal receives an instruction from user A to send a file to receiving user B through an application (app), such as receiving an instruction from user A to "send a certain file to B", if user A does not specify to send the complete / original file, the thumbnail file can be sent by default according to the current app management.
[0214] Specifically, the user terminal device can compare the quality of the core part of the file with the default quality of the app. For example, when sharing pictures using a communication application, the application compresses oversized pictures to about 100kB by default, so the default size of the pictures shared by the application can be considered to be 100kB.
[0215] If the quality of the core part is higher than the default quality of the app, the core part is compressed to the default quality of the app and sent to the receiving user. If the quality of the core part is lower than the default quality of the app (the local core part is too small and the quality is too low), it can be sent directly, or the link feature value corresponding to the core part can be used to obtain a part of the corresponding additional part from the cloud, so that the core part + part of the additional part can be combined to obtain a file equivalent to the default quality of the app, wherein the number of additional parts to be obtained from the cloud can be determined according to the default quality of the app. After obtaining the merged file, the merged file can be sent directly, or the merged file can be randomly flipped after some bits (to protect the core part information) are flipped before being sent to the receiving user. In this way, the receiving user B can receive a small size / low quality file. If the subsequent sending user wants to send the complete file to the receiving user, the sending user terminal can send the link feature value of the file to the receiving user after receiving the instruction sent by user A to user B. The receiving user can use the link feature value to automatically obtain the additional part in the cloud and merge it with the core part to obtain the original file.
[0216] It can be understood that when the merged file is sent after randomly flipping some bits, the receiving user can still use the file, that is, the flipped file does not affect the receiving user's use. For example, when the file is a picture, the content in the picture can still be seen, but after the flipping process, it can be avoided that the recipient can obtain the original file based on the received file. In this way, the sending user can implement permission control over the files he sends.
[0217] Compared with the existing methods, the sending user does not need any additional operations. When the quality of the core part is higher than the default quality of the app, the traffic consumed by the sending action is consistent with the existing method; when the quality of the core part is lower than the default quality of the app, if the core part is sent directly, the traffic consumed by the sending action is less than the existing method. The receiving user experience has also been improved. The receiving user does not need to wait too long to receive the complete file, and can quickly receive and browse the core part.
[0218] Fig.14bA flowchart of another file sharing method is shown. Based on this method, when the sending user terminal receives an instruction from user A to send a file to receiving user B, and the sending user specifies to send a complete / original file, such as receiving an instruction from user A to "send a complete / original file to B", the terminal sends the core part, its corresponding encryption key (if the additional part is encrypted) and link feature value to the receiving user. Based on the received core part, the receiving user can directly preview the core part and obtain information about the file. The receiving user can use the link feature value corresponding to the core part at any time to obtain the corresponding complete additional part from the cloud, merge the additional part with the core part, and obtain the complete / original file. If the additional part has been encrypted, it can be encrypted using the encryption key and merged with the core part to obtain the complete / original file.
[0219] Based on this method, when the sending user needs to send the complete / original file to the receiving user, the core part of the file and information such as the link feature value are sent to the receiving user. The receiving user receives a small-size / low-quality file and can obtain the complete / original file at any time, that is, the complete file is obtained based on the received information. Compared with the existing method that requires the entire file to be sent directly to the receiving user, the traffic consumed by the sending action is significantly reduced compared with the existing method (only the core part needs to be sent). The receiving user experience is also improved. The receiving user does not need to wait too long to receive the complete file, and can quickly receive and browse the core part.
[0220] As an example, Fig.15 A schematic diagram of the principle of a file content verification method is shown in FIG. Fig.15 As shown in , the local device splits the file into a core part and an additional part. For the additional part, the additional part can be encrypted based on the content of the core part and uploaded to the cloud (the other devices in this example are cloud servers), and the content of the encrypted additional part can be used to verify whether the content of the local core part has changed.
[0221] As a specific example, Fig.16 A flowchart of a method for processing files that need to be verified for authenticity is shown in FIG. The files to be verified may be pictures, audio, video, etc. Fig.16As shown in , the file content is split into a larger core part and a smaller additional part in real time, and the additional part is uploaded to the cloud in real time. The additional part on the cloud can be used to verify the content of the local core part to verify the authenticity of the content. When the file is generated, the file is split based on the frequency domain characteristics and / or data bit characteristics of the file. Specifically, for recording files, since the recording has time continuity, as the file is generated, the terminal device can slice it according to the time sliding window and process each slice in real time. For video files, they can be processed frame by frame as the file is generated. Of course, the time sliding window can be set to process the image frames within a period of time corresponding to the time sliding window each time. The number of frames processed each time can also be set to process a fixed number of image frames each time. For pictures, each picture can be processed directly.
[0222] The terminal device can split each slice / frame of the image itself based on frequency domain features and / or data bit features. The specific meanings of the matrix of frequency domain elements and data bits shown in the figure can be found in the description of the example of splitting the split file to obtain sub-files in the previous text. Fig.16 , the file can be split to obtain the low-frequency high-bit component part as the core part, and the high-frequency part and the low-frequency low-bit component part as the additional part.
[0223] In an optional implementation, in this example, in the splitting operation, the control amount r1 and the control amount r2 in the target splitting ratio can be set to be close to 1. With this target splitting ratio, the main content of the file can be split into the core part, and the terminal locally saves the information content that is almost equivalent to the original record (i.e., the original content), which can maximize the security of the file; at the same time, because the additional part is very small (a very small high-frequency component part and a low-frequency low-bit component part), when uploading the sub-file corresponding to the divided additional part to other devices (such as the cloud server shown in the figure), the whole process will not generate too much traffic overhead.
[0224] When splitting by frequency components, i.e. based on frequency domain features, since r1 is very close to 1, most of the file content will be classified as the low-frequency component, and a small part of the file content will be classified as the high-frequency component. When further processing the low-frequency component, since r2 is very close to 1, most of the data bits will be classified as the low-frequency high-bit component, and a small part of the data bits will be planned to the low-frequency low-bit component.
[0225] After the division is completed, the low-frequency high-bit component part (core part) can be used to calculate the hash value, and the high-frequency part + low-frequency low-bit component part (additional part) can be encrypted with this hash value. The encrypted high-frequency part + low-frequency low-bit component part (encrypted additional part) is uploaded to the cloud and timestamped.
[0226] For audio and video, the above process can be processed in real time as the file is generated; for photos or pictures, it can be processed immediately after being taken.
[0227] The characteristics of the hash algorithm and encryption algorithm ensure that only the unmodified core part can decrypt the encrypted additional part. In other words, when the additional part is successfully decrypted, it can prove that the local core part is unmodified, that is, it has not been tampered with. At the same time, the additional part on the cloud carries a server timestamp, which is difficult to tamper with and can prove the real time when the file was generated.
[0228] In actual applications, in scenarios such as IoT (Internet of things), with the popularization of various smart homes, scenarios that require multiple devices to work together are becoming more and more common. In many scenarios, the same file content will be used by multiple devices. For example, users often use IoT devices to issue instructions: "Show the video of the last party on the smart TV", "Play the song I recorded yesterday on the smart speaker", etc. If a copy is saved on all devices that may use the file, it will greatly waste storage space. If all devices obtain file content from the same cloud storage, it will greatly reduce the file loading speed and create the risk of privacy leakage.
[0229] The core idea of the multi-device collaboration method provided in this example is that the smart terminals belonging to the same user / the same system can each store the core part of the required file, and the additional part of the file can be stored in the cloud server, and each smart terminal device can obtain the additional part from the cloud when needed. Therefore, it can enable each device in scenarios such as IoT to store data efficiently and securely, and use data quickly (the core part can be displayed first when downloading the additional part from the cloud).
[0230] Fig.17 17 shows a flowchart of a multi-device collaboration method in a specific example. As shown in FIG. 17 , the user issues a command with voice, such as a voice command of “play the photos / videos of the last trip on TV”, and the device receiving the voice command uses ASR (Automatic Speech Recognition, automatic speech recognition technology) + NLU (Natural Language Understanding, natural language understanding) technology to understand the intent of the command, including the action, target content, target device, etc. Of course, the user can also issue commands with the same effect in other ways.
[0231] The target device receives the processed instruction and checks whether its own storage contains the core part of the target content. If it does, the core part is displayed immediately, and the additional part is obtained from the cloud. If the additional part is encrypted, the additional part can be decrypted, merged with the core part into a complete / original file and displayed. If it is not included, all related devices are searched, and attempts are made to search for the core part of the target content on the related devices. Related devices include but are not limited to: devices registered with the same user ID, devices in the same WIFI, devices connected to each other, etc. If the core part is found in the related device, the target device obtains the core part from the related device, stores the core part, and displays the core part immediately. At the same time, the target device obtains the additional part from the cloud. If the additional part is encrypted, the additional part can be decrypted, merged with the core part into a complete / original file and displayed.
[0232] If the core part is not found in the relevant device, the user may be prompted: the corresponding content is not found, etc.
[0233] For IoT / multi-device collaborative environments, file deletion / editing and other operations can be further optimized. One implementation method is to maintain a series of reverse links in the mapping table on the cloud. The reverse link points to the core part of the same file stored in all local smart terminals belonging to the same user / the same system. For each file, when the additional part is uploaded for the first time, a reverse link pointing to the core part is created on the cloud; when other devices transfer this core part, the cloud server is notified to add the corresponding reverse link. Through the reverse link, all local core parts of the same file in the system can be found.
[0234] When a user deletes a file, he or she can choose to delete only the file stored in this terminal, or delete the file stored in some or all terminals. In the case of deleting only this terminal, the terminal device receiving the instruction sends a request to the cloud server to remove the reverse link pointing to itself and delete the core part stored by itself; in the case of deleting some or all terminals, the terminal receiving the instruction sends a request to the cloud server, and the cloud server issues a deletion instruction to the selected several or all terminals based on the reverse link, and the corresponding several or all terminals delete the local core part of the file, and the cloud server removes the corresponding reverse link; if all terminals delete the local part / the number of reverse links of the cloud server is zero, the cloud server can remove the additional part stored by itself.
[0235] When editing a file, the user can choose to edit only the file in the terminal or edit the files in multiple devices simultaneously. For the former, the terminal obtains the additional part from the cloud server and synthesizes the complete file. After the file is edited, it is regarded as a new file and the new file is split and uploaded.
[0236] For the latter (synchronous editing), the terminal can obtain the additional part and the reverse link from the cloud server and synthesize the complete file locally. After the user edits, the terminal splits the file and uploads the additional part to update the additional part stored in the cloud server. The cloud server sends the updated core part to other devices according to the corresponding reverse link obtained to update the core part on other devices.
[0237] Another possible synchronous editing method is that the user edits the core part stored locally on the terminal, and the terminal uploads the modified content / editing steps to the cloud server. The cloud server edits the corresponding additional parts according to the modified content / editing steps of the core part to modify them to the same effect. Afterwards, according to the corresponding reverse link, the corresponding modified content / editing steps are sent to other devices to enable other devices to update the core parts on other devices.
[0238] The solution of storing files through cloud servers in the prior art makes it easy for users to upload files in terminal devices to the cloud, freeing up device storage space. When there is a network connection, users can access / download file content at any time.
[0239] However, the existing file storage solutions have the following problems:
[0240] 1) Existing technologies cannot ensure the security of private content in files stored on cloud servers.
[0241] There are many possibilities for user file contents stored in cloud servers to be leaked, posing a serious threat to user privacy.
[0242] 2) Currently, storing files in the cloud requires a strong reliance on the network, which is inconvenient for users.
[0243] When a user's files are only stored in the cloud and the network connection is limited / unavailable (such as when the user is on an airplane / high-speed train or other scenario with no network connection, or when the user's terminal device has insufficient mobile network traffic / high traffic charges), the user cannot access the file content normally.
[0244] 3) Currently, storing files in the cloud creates an additional management burden for users and is cumbersome to use.
[0245] If a user has a large number of files, the user needs to remember the storage location of each file (local / cloud storage service A / cloud storage service B, etc.), which makes the user operation very cumbersome.
[0246] 4) Users need to manually manage local / cloud files, which is cumbersome to use.
[0247] In some cases, users need to download the file content they plan to use in advance so that they can be used without a network connection, or users need to manually upload some files to free up storage.
[0248] For example, if a user wants to watch a video on an airplane, and the video is only stored in the cloud, the user needs to download the file in advance. If the user forgets to download it, the user will not be able to watch the video.
[0249] For example, if the terminal device has insufficient storage space and the user is about to travel abroad, the user needs to manually select and upload some files to leave enough storage space for travel photos / videos. If the user forgets to do so, he or she may face insufficient storage during the trip.
[0250] 5) Current cloud storage technology can only be used as a storage extension and does not have a content verification function.
[0251] In certain situations, users may want to prove that the content recorded by the terminal device is authentic and unmodified. For example, after a traffic accident, photos / videos of the scene, or recordings of important conversations, etc., current cloud storage technology cannot meet this demand.
[0252] 6) Based on current cloud storage technology, users’ file sharing operations are cumbersome or consume a lot of traffic.
[0253] When a user wants to share a file stored in the cloud, he needs to open the corresponding management webpage / app, obtain the URL or sharing code corresponding to the file, and send it to the target user. The user who receives the file needs to perform subsequent operations to obtain the file content.
[0254] When a user wants to share a local file, the entire file needs to be transmitted to the recipient. If a mobile network is used, more traffic will be consumed.
[0255] 7) Current cloud storage technology does not use multi-device collaborative working scenarios.
[0256] In IoT scenarios, if a copy of a file is saved on all devices that may use it, storage space will be wasted. If all devices obtain file content from the same cloud storage, the file loading speed will be reduced and privacy leakage risks will be generated.
[0257] In summary, faced with the rapid growth of digital file content and limited device storage space, users are faced with a variety of problems such as privacy leakage, network dependence, and cumbersome file management, which makes it difficult for users to safely and easily store and use large amounts of files, causing great inconvenience to users in using terminal devices.
[0258] In response to the above problems of the prior art, this application proposes a cloud storage solution that is secure, has low network dependence, and is easy and flexible to manage, which greatly improves the security of cloud storage; reduces the dependence of cloud storage on network connections; eliminates the extra cumbersome user operations brought by cloud storage; greatly reduces the troubles of limited terminal device storage to users; and also brings other convenience improvements, such as automatic management of terminal files / storage space; allows users to save traffic and share files without additional operations; and improves storage efficiency and security in multi-device collaboration scenarios. Specifically:
[0259] 1) In view of the current security of the privacy content of cloud storage files and the strong dependence of cloud storage files on the network, this application proposes a cloud storage method based on file content splitting. The core idea is to split the file into at least two parts, such as a core part that only contains the main body of the content information and an additional part that only contains the details of the content information. Each part of the file (i.e., each sub-file) is stored in at least two devices respectively, such as saving the core part locally on the device and saving the additional part on the cloud server. As a result, the content stored in the cloud does not contain the main body of the content information, and even if it is leaked, it will not affect the privacy of the user. The locally stored content already contains the main body of the content information, and when merged with the additional part on the cloud, the original content can be restored; the core part can also be used independently, which is equivalent to a low-quality version of the original content.
[0260] Through the above solution, extremely high privacy security can be achieved, while allowing file content to be used without a network connection, greatly expanding the storage capacity of user terminal devices and improving the convenience of user file use.
[0261] 2) In view of the problem that current cloud storage imposes additional management burden on users and is cumbersome to use, this application proposes a method for automatically linking the core part and the additional part. The core idea is to calculate a unique feature value (called the link feature value) from the core part content, maintain a mapping table on the cloud, and record the storage location of the additional part corresponding to each link feature value.
[0262] As a result, users can use the local core part through a unified interface, and users can use all cloud content just like local files, greatly reducing the difficulty of user file management; terminal devices can automatically find the additional parts stored in the cloud, and download part or all of the additional parts depending on the network conditions, greatly simplifying user operations.
[0263] 3) In order to solve the problem that users need to manually manage local / cloud files, which is cumbersome, this application proposes an automatic storage management method based on user event prediction. The core idea is to predict the events that users are about to / plan to perform, and automatically adjust the local / cloud storage ratio of each file based on the event characteristics, local storage space and the characteristics of each file. This allows users to always have enough available storage space, and to store more files that users are about to use locally on the terminal device, ensuring the availability of files that users are about to use, so that users can get a better file management experience without burden.
[0264] 4) In view of the problem that current cloud storage can only be used as storage expansion and has no content verification function, this application proposes a content verification method based on a split secure cloud. The core idea is to split the file content into a larger core part and a smaller additional part in real time, and upload the additional part to the cloud in real time. The additional part stored in the cloud can be used to verify the local core part. This achieves content verification with very low network load, so that the user's content verification needs are met.
[0265] 5) In view of the problem that the user's file sharing operation is cumbersome or consumes a lot of traffic under the current cloud storage technology, this application proposes a simple and convenient file sharing method that saves traffic. The core idea is that the sending user sends the core part of the file, and the receiving user can directly preview its content and download the complete file on demand, so that both the sender and the receiver can realize the file sharing with low traffic without additional operation, thereby simplifying the operation of the sender and the receiver and saving the traffic consumption of both parties.
[0266] 6) In view of the problem that current cloud storage technology is not suitable for multi-device collaborative working scenarios, this application proposes a multi-device collaborative method based on a split secure cloud. The core idea is that the terminal devices belonging to the same user / the same system each store the core part of the required files and obtain additional parts from the cloud when needed, taking into account storage efficiency, response speed and privacy security.
[0267] In addition, in the prior art, if a user needs to send a file to a recipient user, it needs to be sent on a fixed dedicated web page / software / app; sending the original file will consume more data traffic for both parties and the sending efficiency is low; the cloud server corresponding to the application also needs to save a copy of the original file, creating an additional server burden; the file may also be time-sensitive, and if the recipient does not download the original file in time, the original file stored on the cloud server may expire; the receiving user must receive the entire file on the same interface at one time.
[0268] In the technical solution of the present application, the sub-files obtained by splitting a file can be transmitted through multiple channels, and the user who receives the file can store the sub-files locally, and can freely download other sub-files and merge them into a complete file without going through any special web page / software / app; when the sending user sends a complete file to the receiving party, there is no need to consume the traffic of the complete file, only the traffic of sending the sub-files; the cloud server only needs to save the additional part of the file, and the server burden is relatively small; the receiving party can download the additional part from the cloud at any time according to the link feature value, and there is no problem of expiration; the receiving user can receive the core part first, and then obtain the additional part, without having to receive the entire file on the same interface at one time.
[0269] Based on Figure 1 Based on the same principle as the file processing method shown in , the present application embodiment also provides a file processing device, such as Fig.18 As shown, the file processing device 110 may include an operation request receiving module 111 and a file processing module 112 .
[0270] An operation request receiving module 111 is used to receive an operation request for a file, where the file includes at least two sub-files, and the at least two sub-files are respectively stored in at least two devices;
[0271] The file processing module 112 is used to perform corresponding processing on at least one sub-file of the file according to the operation request.
[0272] It is to be understood that each module of the file processing device of the embodiment of the present application may have the function of implementing the corresponding steps in the file processing method shown in the embodiment of the present application. Among them, the function can be implemented by hardware, or the corresponding software can be implemented by hardware. The above modules can be software and / or hardware, and each module can be implemented separately or integrated with multiple modules. For the functional description of each module of the file processing device, please refer to the corresponding description in the above file processing method, which will not be repeated here.
[0273] In addition, in actual applications, the various functional modules of the file processing device in the embodiment of the present application can be run on a smart terminal, i.e., a terminal device and / or a server according to actual application scenarios.
[0274] The present application embodiment provides an electronic device, such as Fig.19 As shown, Fig.19The electronic device 2000 shown includes a processor 2001 and a memory 2003. The processor 2001 and the memory 2004 are connected, such as through a bus 2002. Optionally, the electronic device 2000 may further include a transceiver 2004. It should be noted that in actual applications, the transceiver 2004 is not limited to one, and the structure of the electronic device 2000 does not constitute a limitation on the embodiments of the present application.
[0275] The processor 2001 is used in the embodiment of the present application to implement Fig.18 The functions of each module of the file processing device shown in FIG. The transceiver 2004 includes a receiver and a transmitter. The transceiver 2004 is applied in the embodiment of the present application to realize the communication between the electronic device 2000 and other devices and realize the reception and transmission of data.
[0276] Processor 2001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0277] The bus 2002 may include a path to transmit information between the above components. The bus 2002 may be a PCI bus or an EISA bus, etc. The bus 2002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.19 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0278] The memory 2003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0279] Optionally, the memory 2003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 2001. The processor 2001 is used to execute the application code stored in the memory 2003 to implement the actions of the device provided in the embodiment of the present application.
[0280] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the file processing method shown in any embodiment of the present application is implemented.
[0281] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0282] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method performed by an electronic device, characterized in that: include: Receiving an operation request for a file, wherein the file includes at least two sub-files, and the at least two sub-files are respectively stored in at least two devices; wherein each sub-file of the file is obtained by splitting based on frequency domain characteristics and / or data bit characteristics of the file; Performing corresponding processing on at least one sub-file of the file according to the operation request; The at least two sub-files are obtained by: Determine the target splitting ratio for at least two sub-files of the file by determining a first control amount and a second control amount for the target splitting ratio based on user-related information, wherein the user-related information includes at least one of user attribute information, user behavior-related information, and user contact information, the first control amount controls the ratio of the low-frequency part to the high-frequency part, and the second control amount controls the ratio of the high data bit to the low data bit; Based on the target split ratio, the file is split into at least two sub-files.
2. The method according to claim 1, characterized in that At least one sub-file of the file is stored locally; and / or, At least one subfile of the file is stored in another device.
3. The method according to claim 1, characterized in that At least one subfile of the file includes at least one of the following: The first part or the second part obtained by splitting based on the frequency domain characteristics of the file, wherein the frequency domain characteristic value of the frequency domain elements of the second part is greater than the frequency domain characteristic value of the frequency domain elements of the first part; A third part or a fourth part obtained by splitting based on the data bit characteristics of the file, wherein the data bits of the fourth part are higher than the data bits of the third part; A fifth part and a sixth part obtained by splitting based on the data bit characteristics of the first part or based on the data bit characteristics of the second part, wherein the data bit of the fifth part is higher than the data bit of the sixth part; Based on the frequency domain characteristics of the frequency domain elements of the third part or the frequency domain characteristics of the frequency domain elements of the fourth part, the seventh part or the eighth part is split, and the frequency domain characteristic value of the frequency domain elements of the eighth part is greater than the frequency domain characteristic value of the frequency domain elements of the seventh part.
4. The method according to claim 3, characterized in that A first subfile including the first part is stored locally, and a second subfile including the second part is stored in another device; or, The fourth subfile including the fourth part is stored locally, and the third subfile including the third part is stored in another device; or, A fifth subfile including the fifth part obtained based on the first part is stored locally, and a sixth subfile including the second part and the sixth part obtained based on the first part is stored in another device; or, A seventh subfile including the first part and the fifth part obtained based on the second part is stored locally, and an eighth subfile including the sixth part obtained based on the second part is stored in another device; or, A ninth subfile including the seventh part obtained based on the fourth part is stored locally, and a tenth subfile including the third part and the eighth part obtained based on the fourth part is stored in other devices; or, An eleventh subfile including the fourth part and the seventh part obtained based on the third part is stored locally, and a twelfth subfile including the eighth part obtained based on the third part is stored in other devices.
5. The method according to claim 1, characterized in that Each sub-file of the file is associated with at least one of the following information; The file-related information of the file, device-related information of at least one device storing the sub-file, and user-related information.
6. The method according to claim 1, characterized in that The step of splitting the file into at least two sub-files based on the target split ratio includes: When the set file splitting condition is met, the file is split into at least two sub-files according to the target splitting ratio.
7. The method according to claim 6, characterized in that The file splitting condition is determined according to at least one of file-related information, device-related information, and user-related information.
8. The method according to claim 1, characterized in that The step of splitting the file into at least two sub-files based on the target split ratio includes at least one of the following: Splitting the file according to the target splitting ratio; According to the target split ratio, at least one subfile of the file is processed so that the split ratio of each subfile after the processing is equal to the target split ratio.
9. The method according to claim 1, characterized in that: Also includes: When the file to be split is a sub-file that has been split, and the difference between the target split ratio and the current split ratio is greater than a set threshold, the file before splitting corresponding to the file to be split is split.
10. The method according to claim 1, characterized in that Determine the target split ratio, including: A target split ratio is determined according to at least one item of the file-related information of the file and the device-related information of at least one of the at least two devices, and the user-related information.
11. The method according to claim 10, characterized in that Determine the target split ratio, including: Extracting corresponding feature information for at least one item of the file-related information of the file and the device-related information of at least one of the at least two devices, and the user-related information; Through the deep learning network, the target splitting ratio is determined based on the extracted feature information.
12. The method according to any one of claims 1 to 11, characterized in that The file to be split is at least one file determined based on at least one of the following information: file-related information, device-related information of at least one of the at least two devices, and user-related information.
13. The method according to any one of claims 1 to 11, characterized in that Also includes: At least one sub-file obtained by splitting is sent to at least one other device for storage.
14. The method according to claim 5, 7, 10 or 11, characterized in that The file-related information includes at least one of the following information: file type, file size, file tag, file level, file content, file operation information, file quality, file storage location; and / or The device-related information includes at least one of the following information: storage space, power level, network status, load status; and / or User-related information includes at least one of the following information: user attribute information, user behavior-related information, user contact information, and user setting information.
15. The method according to any one of claims 1 to 11, characterized in that If at least one sub-file of the file is stored locally and at least one sub-file is stored in another device, the at least one sub-file of the file is processed accordingly, including at least one of the following methods: Performing corresponding processing on at least one sub-file stored locally; At least one sub-file stored in other devices is processed accordingly.
16. The method according to claim 15, characterized in that The at least one sub-file stored in the other device is processed accordingly, including at least one of the following methods: Acquire at least one subfile of the file from other devices, and perform corresponding processing on the acquired subfile; Instructing other devices to perform corresponding processing on at least one stored sub-file; At least two sub-files stored in different devices are obtained, and the obtained at least two sub-files are merged.
17. The method according to claim 16, characterized in that Acquiring at least one subfile of the file from another device includes at least one of the following: Based on the device related information, obtaining at least one sub-file of the file from other devices; Obtaining part or all of the content of at least one sub-file of the file from another device; At least one sub-file of the file is obtained from other devices based on the link feature value corresponding to the file.
18. The method according to claim 17, characterized in that Acquiring at least one sub-file of the file from another device based on device-related information includes: When the device-related information of the local device and / or other devices storing the sub-files meets the set processing conditions, obtaining at least one sub-file of the file from the other devices; The device-related information includes at least one of the following information: storage space, power level, network status, and load status.
19. The method according to claim 17, characterized in that The link feature value is associated with at least one of the following: content of the file, time information, user-related information, and device-related information.
20. The method according to any one of claims 1 to 11, characterized in that The operation request includes at least one of the following requests: Browse requests, edit requests, delete requests, send requests, get requests.
21. The method according to claim 2, characterized in that The at least one sub-file stored on the other device is a sub-file encrypted based on the content of the at least one sub-file stored locally; The method further comprises: At least one sub-file stored on another device is decrypted according to the content of at least one sub-file stored locally. If the decryption is successful, it is confirmed that the content of at least one sub-file stored locally has not changed.
22. The method according to claim 2, 4 or 21, characterized in that The other device is a cloud server.
23. An electronic device, characterized in that: including memory and processor; The memory stores computer instructions; The processor is configured to call the computer instructions to execute the method according to any one of claims 1 to 22.
24. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 22 is implemented.
