File storage method and file receiving method

By splitting the file into file slices with incomplete byte counts and generating file names using preset functions and file names, the problem of insufficient security of file blocks being easily restored is solved, and high security of files in transmission and storage processes is achieved.

CN114003565BActive Publication Date: 2025-08-29CHINA TELECOM CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111293380.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-03
Publication Date
2025-08-29
Estimated Expiration
2041-11-03

AI Technical Summary

Technical Problem

In the prior art, due to the clear serial number of the file block during transmission and storage, it is easily intercepted and restored to the target file by unauthorized personnel, resulting in insufficient security.

Method used

The target file is divided into file slices with incomplete number of bytes, and the file name of each file slice is generated by preset functions or preset file name combinations. The slice size is determined using random numbers and Euler functions, and a linear table of file names is generated based on the principle of minimum energy or preset functions. It is difficult to identify the sequence number of file slices.

Benefits of technology

Improves the security of files in storage and transmission, making it difficult for non-authorized users to identify the serial number of file slices and restore the target file, and enhances the confidentiality of files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003565B_ABST
    Figure CN114003565B_ABST
Patent Text Reader

Abstract

The present disclosure provides a file saving method and a file receiving method. The file saving method includes: dividing the target file to be transmitted into multiple file slices, the number of bytes of each file slice is not exactly the same; generating a first file name linear table according to a preset function or a preset file name combination method, the first file name linear table includes multiple file names arranged in sequence, the file name ranked as i+1 is uniquely determined according to the file name ranked as i, i≥1; determining the file names of the multiple file slices according to the sequence numbers of the multiple file slices in the target file and the first file name linear table. The embodiment of the present disclosure can improve file security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer encryption technology, and in particular to a file storage method, a file receiving method, and corresponding devices and electronic devices capable of improving the security of file storage and transmission. Background Art

[0002] Currently, evenly dividing files into multiple file blocks for storage and batch transmission is the primary means of addressing data transfer restrictions. In related technologies, file blocks are typically named according to their sequence numbers. However, these file blocks can be easily intercepted and restored to their intended destination by unauthorized personnel, resulting in insufficient security during storage and transmission.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a file saving method, a file receiving method, and corresponding devices and electronic devices, which are used to at least to some extent overcome the problem of insufficient security after file segmentation due to limitations and defects in related technologies.

[0005] According to a first aspect of an embodiment of the present disclosure, a file saving method is provided, comprising: dividing a target file to be transmitted into multiple file slices, wherein the number of bytes of each file slice is not exactly the same; generating a first file name linear list according to a preset function or a preset file name combination method, wherein the first file name linear list includes multiple file names arranged in sequence, and the file name ranked as i+1 is uniquely determined based on the file name ranked as i, i≥1; determining the file names of the multiple file slices according to the sequence numbers of the multiple file slices in the target file and the first file name linear list.

[0006] In an exemplary embodiment of the present disclosure, dividing the target file to be transmitted into multiple file slices includes: obtaining n bytes arranged in sequence in the target file, and recording the n bytes as data to be divided; generating a target number m according to a random number, m<n; cutting the first m bytes of the data to be divided to generate file slices, and updating the data to be divided to the remaining (nm) bytes after cutting; randomly generating target numbers multiple times to cut the data to be divided multiple times and generate multiple file slices, and updating the data to be divided multiple times until the number of remaining bytes after cutting meets a preset condition; generating the last file slice of the target file according to the remaining bytes that meet the preset condition.

[0007] In an exemplary embodiment of the present disclosure, generating a target number m based on a random number includes: generating a random positive integer Z within a preset numerical range; and using the Euler function to determine the number of positive integers smaller than Z that are coprime with Z as the target number m.

[0008] In an exemplary embodiment of the present disclosure, generating the first file name linear list according to a preset function or a preset file name combination method includes: determining multiple levels sorted from high to low and the number of elements corresponding to each level; determining the file name corresponding to each level according to the number of elements corresponding to each level, each file name corresponding to each level includes the level name and the serial number of the file name in the level; determining the order of multiple file names corresponding to the multiple levels according to the level name and the serial number; and generating the first file name linear list according to the order of the multiple file names.

[0009] In an exemplary embodiment of the present disclosure, generating a first file name linear list according to a preset function or a preset file name combination includes: randomly generating an initial value and determining a target function from multiple preset functions; setting the initial value as the head element of the first file name linear list; bringing the initial value into the target function to determine the second element of the first file name linear list; bringing the current element into the target function to determine the next element of the first file name linear list, until the number of elements in the first file name linear list is equal to the number of file slices.

[0010] In an exemplary embodiment of the present disclosure, it also includes: storing the multiple file slices into the cache middleware through a queue according to the file names of the multiple file slices; and regularly batch transmitting the file slices in the cache middleware.

[0011] According to a second aspect of the present disclosure, a file receiving method is provided for obtaining a file slice generated by a file transfer method as described in any one of the above items, the file receiving method comprising: obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file; generating a second file name linear table according to the preset function or the preset file name combination method; determining a file name of the target file slice according to the second file name linear table; and obtaining the target file slice according to the file name of the target file slice].

[0012] In an exemplary embodiment of the present disclosure, obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generating a second file name linear list according to the preset function or the preset file name combination method include: obtaining a preset function and a random initial value corresponding to the target file through the configuration file; substituting the random initial value into the preset function to determine the second element of the second file name linear list; substituting the current element of the second file name linear list into the preset function to determine the next element of the second file name linear list, until the number of elements in the second file name linear list reaches a first preset value.

[0013] In an exemplary embodiment of the present disclosure, obtaining a preset function or a preset file name combination corresponding to the target file through a configuration file, and generating a second file name linear list according to the preset function or the preset file name combination includes: obtaining multiple levels and the order of the multiple levels through the configuration file, automatically configuring a second preset value of file names for each level, each file name including a level name and a serial number of the file name in the corresponding level; determining the order of each file name among all the file names according to the order of the multiple levels; and generating the second file name linear list according to the order of all the file names.

[0014] In an exemplary embodiment of the present disclosure, the number of bytes of multiple file slices of the target file is not exactly the same, and determining the file name of the target file slice according to the second file name linear table includes: determining the file names of the multiple file slices corresponding to the target file and a first file name linear table according to the second file name linear table, the number of elements in the first file name linear table is equal to the number of the multiple file slices corresponding to the target file, the element with sequence number i in the first file name linear table is the file name of the file slice with sequence number i in the target file, i≥1; determining the target sequence number of the target file slice in all the file slices of the target file; and determining the file name of the target file slice in the first file name linear table according to the target sequence number.

[0015] In an exemplary embodiment of the present disclosure, all file slices of the target file except the last file slice have a third preset value of bytes, and determining the target sequence number of the target file slice in all the file slices of the target file includes: obtaining a target reading position; and determining the target sequence number of the target file slice in all the file slices of the target file based on the target reading position and the third preset value.

[0016] According to a third aspect of an embodiment of the present disclosure, a file saving device is provided, including: a file cutting module, configured to divide a target file to be transmitted into multiple file slices, and the number of bytes of each file slice is not exactly the same; a linear table generating module, configured to generate a first file name linear table according to a preset function or a preset file name combination method, the first file name linear table includes multiple file names arranged in sequence, and the file name ranked as i+1 is uniquely determined according to the file name ranked as i, i≥1; a file slice naming module, configured to determine the file names of the multiple file slices according to the serial numbers of the multiple file slices in the target file and the first file name linear table.

[0017] According to a fourth aspect of an embodiment of the present disclosure, a file receiving device is provided, including: an information restoration module, configured to obtain a preset function or a preset file name combination corresponding to the target file through a configuration file, and generate a second file name linear table according to the preset function or the preset file name combination; a file slice positioning module, configured to determine the file name of the target file slice according to the second file name linear table; and a file slice acquisition module, configured to obtain the target file slice according to the file name of the target file slice.

[0018] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the methods described above based on instructions stored in the memory.

[0019] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which a program is stored, and when the program is executed by a processor, the file saving method as described in any one of the above items is implemented.

[0020] The disclosed embodiment divides the target file into file slices with different numbers of bytes, and uses a preset function or a preset file name combination to generate a file name for each file slice. This makes it difficult for unauthorized persons to identify the serial numbers of the file slices and, in turn, to restore the target file. This overcomes the defect in related technologies that file slices can be easily restored by unauthorized persons, and effectively improves the security of files in storage and transmission.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0023] Figure 1 is a flowchart of a file saving method in an exemplary embodiment of the present disclosure.

[0024] Figure 2 It is a sub-flowchart of step S1 in one embodiment of the present disclosure.

[0025] Figure 3 It is a sub-flowchart of step S12 in one embodiment of the present disclosure.

[0026] Figure 4 It is a sub-flowchart of step S2 in one embodiment of the present disclosure.

[0027] Figure 5 It is a schematic diagram of a preset file name combination method in one embodiment of the present disclosure.

[0028] Figure 6 It is a sub-flowchart of step S2 in another embodiment of the present disclosure.

[0029] Figure 7 It is a flowchart of a file receiving method in one embodiment of the present disclosure.

[0030] Figure 8 It is a sub-flowchart of step S71 in one embodiment of the present disclosure.

[0031] Figure 9 It is a sub-flowchart of step S71 in one embodiment of the present disclosure.

[0032] Figure 10 It is a sub-flowchart of step S72 in one embodiment of the present disclosure.

[0033] Figure 11 It is a sub-flowchart of step S722 in one embodiment of the present disclosure.

[0034] Figure 12 It is a block diagram of a file storage device in an exemplary embodiment of the present disclosure.

[0035] Figure 13 It is a block diagram of a file receiving apparatus in an exemplary embodiment of the present disclosure.

[0036] Figure 14 is a block diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0038] The accompanying drawings are merely schematic illustrations of the present disclosure. Identical reference numerals in the drawings denote identical or similar components, and thus their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0040] Figure 1 is a flowchart of a file saving method in an exemplary embodiment of the present disclosure.

[0041] refer to Figure 1 , the file saving method 100 may include:

[0042] Step S1, dividing the target file to be transmitted into multiple file slices, wherein the number of bytes of each file slice is not exactly the same;

[0043] Step S2, generating a first file name linear list according to a preset function or a preset file name combination method, wherein the first file name linear list includes a plurality of file names arranged in sequence, and the file name ranked as i+1 is uniquely determined based on the file name ranked as i, i≥1;

[0044] Step S3: determining the file names of the multiple file slices according to the sequence numbers of the multiple file slices in the target file and the first file name linear table.

[0045] The disclosed embodiment divides the target file into file slices with different numbers of bytes, and uses a preset function or a preset file name combination to generate a file name for each file slice. This makes it difficult for unauthorized persons to identify the serial numbers of the file slices and, in turn, to restore the target file. This overcomes the defect in related technologies that file slices can be easily restored by unauthorized persons, and effectively improves the security of files in storage and transmission.

[0046] Next, each step of the file storage method 100 is described in detail.

[0047] In step S1 , the target file to be transmitted is divided into a plurality of file slices, and the number of bytes of each file slice is not exactly the same.

[0048] The target files disclosed herein may be written files (e.g., text files of various file types, spreadsheet files, presentation files), multimedia files (e.g., audio files, video files, animated image files), program files (e.g., application packages, databases, plug-in files, library files), etc. The disclosure does not impose any special restrictions on the types of target files.

[0049] Figure 2 This is a sub-flowchart of step S1 in one embodiment of the present disclosure. Figure 2 The illustrated embodiment can divide multiple file slices into multiple file slices with different byte numbers according to random numbers.

[0050] refer to Figure 2 In one embodiment, step S1 may include:

[0051] Step S11, obtaining n bytes arranged in sequence in the target file, and recording the n bytes as data to be segmented;

[0052] Step S12, generating a target number m according to a random number;

[0053] Step S13, cutting the first m bytes of the data to be segmented to generate file slices, and updating the data to be segmented to the remaining (nm) bytes after the segmentation;

[0054] Step S14, randomly generating target numbers multiple times to cut the data to be split multiple times and generate multiple file slices, and updating the data to be split multiple times until the number of remaining bytes after cutting meets a preset condition;

[0055] Step S15: Generate the last file slice of the target file according to the remaining bytes that meet the preset conditions.

[0056] exist Figure 2In the illustrated embodiment, a target number is randomly generated before each cut, and then the target number of bytes are cut to generate a file slice until the number of remaining bytes meets a preset condition. In one embodiment, the preset condition may be, for example, that the number of remaining bytes is less than a threshold, such as that the number of remaining bytes is less than 1kb. Finally, the remaining bytes are used to generate the last file slice of the target file. By using the remaining bytes that meet the preset condition to generate the last file slice, a large difference in the number of bytes in the last file slice and the number of bytes in other file slices can be avoided. The number of the above-mentioned preset conditions can be determined based on the target number used to determine the number of bytes in other file slices.

[0057] In one embodiment, the Euler function may be used to generate a target number for determining the number of bytes of a file slice.

[0058] Figure 3 It is a sub-flowchart of step S12 in one embodiment of the present disclosure.

[0059] refer to Figure 3 In one embodiment, the process of randomly generating the target number m may be, for example:

[0060] Step S121, generating a random positive integer Z within a preset value range;

[0061] Step S122: Use the Euler function to determine the number of positive integers smaller than Z that are relatively prime to Z as the target number m.

[0062] The relationship between the target number m and the random positive integer Z is given by the following Euler function get:

[0063]

[0064] m represents the number of positive integers not exceeding Z that are relatively prime to Z. For example, etc.

[0065] In one embodiment, the preset numerical range may be, for example, [200, 300], ie, Z∈[200, 300]. The preset numerical range may be determined by the file size of the target file and the number of file slices to be generated, and the present disclosure does not impose any particular limitation on this.

[0066] By using the Euler function and random numbers to determine the target number m, the byte size of each file slice can be made random but constrained within a certain range. This makes it difficult for unauthorized users to locate key information based on the byte size of the file slices. To obtain key information, unauthorized users must fully restore the target file using all of its file slices. The following embodiments of the present disclosure further enhance the difficulty of restoring the target file without authorization information.

[0067] In step S2, a first file name linear list is generated according to a preset function or a preset file name combination method. The first file name linear list includes multiple file names arranged in sequence. The file name ranked i+1 is uniquely determined based on the file name ranked i, and i≥1.

[0068] Figure 4 It is a sub-flowchart of step S2 in one embodiment of the present disclosure.

[0069] refer to Figure 4 In one embodiment, a first file name linear table may be generated according to a preset file name combination method. Step S2 may include:

[0070] Step S21, determining multiple levels sorted from high to low and the number of elements corresponding to each level;

[0071] Step S22, determining the file name corresponding to each level according to the number of elements corresponding to each level, wherein each file name corresponding to each level includes the level name and the sequence number of the file name in the level;

[0072] Step S23, determining the order of the multiple file names corresponding to the multiple levels according to the level names and sequence numbers;

[0073] Step S24: Generate a first file name linear list according to the order of the multiple file names.

[0074] exist Figure 4 In the illustrated embodiment, the levels are used to determine a preset file name combination, which is then used to generate file slice file names, allowing for further sorting of the file slice file names in subsequent steps. The level name and ranking of each level can be stored separately as a password and sent to authorized users who have read access to the target file.

[0075] exist Figure 4In the preset file name combination method determined by level as shown, the file name of each file slice includes the level name and the sequence number within the level. In one embodiment, the preset file name combination method can be set according to the arrangement of electrons in the atomic energy level, and the arrangement of electrons in the atomic energy level is, for example, the minimum energy principle. The minimum energy principle means that when the electrons outside the nucleus of a ground state multi-electron atom are arranged, they always occupy the lowest energy orbit first. When the low energy orbit is full, they are arranged into the high energy orbit to minimize the energy of the entire atom.

[0076] Figure 5 It is a schematic diagram of a preset file name combination method in one embodiment of the present disclosure.

[0077] refer to Figure 5 Four levels can be set, from low to high: s, p, d, and f. Level s has seven elements, 1s to 7s; level p has six elements, 2p to 7p; level d has four elements, 3d to 6d; and level f has two elements, 4f and 5f. According to the principle of minimum energy, the lower the level, the more elements there are. The number of levels, level names, and the number of elements in each level can be set according to the number of file slices. This disclosure does not impose any special restrictions on this.

[0078] The element name (file name) of each level is the level name plus the sequence number within the level. For example, 1s refers to the first element (file name) of level s. When sorting all element names, you can sort by the level and sequence number of the element. For example, the sorting is determined by the sum of the level sequence number and the sequence number of the element within the level. The larger the sum of the sequence numbers, the lower the ranking. If two elements have the same sequence number sum, the lower the ranking is. Figure 5 The element in the middle is the file name, and the following is described with the file name.

[0079] like Figure 5 As shown, filename 2s has a rank of s and a rank number of 1. Filename 2s's rank within the rank is 2, so filename 2s has a rank sum of 3, as calculated by 1 + 2 = 3. Filename 2p has a rank of 2 and a rank within the rank is 2. Filename 2p has a rank sum of 4, as calculated by 2 + 2 = 4. Therefore, filename 2p is ranked after filename 2s. Similarly, filename 3s has a rank of 4, as calculated by 1 + 3 = 4. Since the sum of the rank numbers of both filename 3s and filename 2p is 4, filename 2p, with a higher rank, is ranked first.

[0080] Finally, a first file name linear list is generated according to the file name sorting, wherein the file names with higher rankings are located at the front end of the first file name linear list, and the file names with lower rankings are located at the back end of the first file name linear list.

[0081] Since the file slices are named sequentially using files such as 2s and 2p according to the principle of minimum energy, it is difficult for unauthorized persons to interpret the order relationship between file slices. When the file slices of multiple target files are mixed and stored, if the level names are completely different, it is even difficult for unauthorized persons to find all the file slices of a target file by using the file names and the sizes of the file slices. This makes it more difficult to restore the target file without authorization information. Of course, the preset file name combination method of setting the file name according to the principle of minimum energy is only an example. There are many other ways to sort the file names according to the preset file name combination method. Those skilled in the art can use it according to Figure 5 As shown, you can set up a variety of preset file name combinations that are difficult to identify the order and the target files they belong to.

[0082] In another embodiment, the first file name linear list may be generated according to a preset function.

[0083] Figure 6 It is a sub-flowchart of step S2 in another embodiment of the present disclosure.

[0084] refer to Figure 6 In another embodiment, step S2 may include:

[0085] Step S25, randomly generating an initial value and determining an objective function from a plurality of preset functions;

[0086] Step S26, setting the initial value as the head element of the first file name linear list;

[0087] Step S27, bringing the initial value into the objective function to determine the second element of the first file name linear list;

[0088] Step S28: bring the current element into the target function to determine the next element of the first file name linear list, until the number of elements in the first file name linear list is equal to the number of file slices.

[0089] In one embodiment, the elements in the first file name linear list can be determined by calculating the previous element, and the first head element can be a random number, which is expressed by the following formula:

[0090] x i+1 =f(x i ),i≥1 (2)

[0091] Among them, x i+1 is the i+1th element in the first file name linear list, x i is the i-th element in the first file name linear list, f() is a preset function, and i is an integer greater than or equal to 1.

[0092] The types of preset functions include but are not limited to mathematical functions and logical functions. Mathematical functions can be continuous or discontinuous mathematical functions. For example, when the file name is a number, a mathematical function is used to calculate the digital file name to obtain the next file name, or when the file name is non-numeric characters, a mathematical function is used to calculate the binary encoding of the file name to obtain the next file name.

[0093] The logic function can be a bit-by-bit logical operation on the binary code of the file name of the previous element. The types of logical operations can be, for example, AND, OR, NOT, AND-NON, OR-NON, etc. For example, every two binary codes are ORed to generate a binary code of the new file name. In one embodiment, the 0th bit of the next file name can be generated based on the 0th and 1st bits of a file name, and the 1st bit of the next file name can be generated based on the 1st and 2nd bits of the file name, and the 2nd bit of the next file name can be automatically written as 1, thereby generating the 0th bit, 1st bit, and 2nd bit of the next file name.

[0094] Furthermore, a combination of mathematical functions and logical functions may be used, for example, first performing mathematical calculations on the file name and then performing logical calculations, or first performing logical calculations on the file name and then performing mathematical calculations, etc. There may be many types of preset functions, and those skilled in the art may set them according to actual circumstances.

[0095] In step S3, the file names of the multiple file slices are determined according to the sequence numbers of the multiple file slices in the target file and the first file name linear table.

[0096] After determining the first file name linear table, the first element in the first file name linear table can be set to the file name of the file slice with sequence number 1 in target file 1, the second element can be set to the file name of the file slice with sequence number 2 in target file 2, and so on.

[0097] By naming the file slices according to the association between the file names, it is difficult for unauthorized persons to grasp the sequential relationship between the file slices when they obtain the file slices. Since the file names in the first file name linear table are generated based on random numbers, the overlap between the file names of the file slices of different target files is extremely low, and there is a unique sequential relationship within the file slices of a target file, and this sequential relationship cannot be jumped. For example, the file name of the 7th file slice can only be determined based on the file name of the 6th file slice, but before that, the file names of the 1st, 2nd, 3rd, 4th, and 5th file slices need to be cracked, and it is impossible to directly determine which is the 7th file slice of the target file. When the file slices of multiple target files are stored together, it is even difficult for unauthorized persons to locate all the file slices of a target file, which greatly improves the storage security of the files.

[0098] In some embodiments, after naming, each file slice can be encrypted separately. The encryption method can be various, such as extracting summary information, etc., and the present disclosure does not impose any special restrictions on this.

[0099] After generating, naming, and encrypting multiple file slices, you can save them locally or transfer them via a pre-set communication method. Whether storing only or storing and then transferring, you can mix file slices from multiple target files to further enhance confidentiality.

[0100] In one embodiment, the message middleware can be used to queue the multiple file slices into the cache middleware according to their file names, and then the file slices in the cache middleware can be transferred in batches at a scheduled time. The upload address can be, for example, a preset server or a receiving terminal different from the uploading terminal.

[0101] In addition to the method for saving and transmitting the target file, the present disclosure also provides a corresponding method for receiving file slices of the target file generated and saved according to the above embodiment, and then restoring and reading the target file.

[0102] Figure 7 It is a flowchart of a file receiving method in one embodiment of the present disclosure. Figure 7 The method shown can be used to receive, read Figures 1 to 6 The illustrated embodiment generates file slices.

[0103] refer to Figure 7 In one embodiment, the file receiving method 700 may include:

[0104] Step S71, obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generating a second file name linear table according to the preset function or the preset file name combination method;

[0105] Step S72, determining the file name of the target file slice according to the second file name linear table;

[0106] Step S73: Obtain the target file slice according to the file name of the target file slice.

[0107] exist Figures 1 to 6 In the illustrated embodiment, a configuration file related to the target file slices can be sent to the authorized terminal, thereby enabling the authorized terminal to receive and interpret the file slices of the target file. In some embodiments, corresponding configuration information can also be agreed upon with the receiving terminal through other online or offline methods, and the receiving terminal can independently generate a configuration file for parsing the file slices of the target file. This disclosure does not impose any special restrictions on the configuration file generation process.

[0108] The configuration file may record a preset function or a preset file name combination corresponding to the target file. For specific usage, please refer to the following embodiment.

[0109] Figure 8 It is a sub-flowchart of step S71 in one embodiment of the present disclosure.

[0110] refer to Figure 8 When the file name of the file slice of the target file is determined by a preset function, step S71 may include:

[0111] Step S711, obtaining a preset function and a random initial value corresponding to the target file through the configuration file;

[0112] Step S712, substituting the random initial value into the preset function to determine the second element of the second file name linear list;

[0113] Step S713: Substitute the current element of the second file name linear list into the preset function to determine the next element of the second file name linear list, until the number of elements in the second file name linear list reaches a first preset value.

[0114] The process of generating the second file name linear list is similar to the process of generating the first file name linear list, the difference is that the preset function and the random initial value are fixed, while the number of elements can be fixed or uncertain. If the number of file slices of the target file is recorded in the configuration file, the number of elements of the second file name linear list, that is, the first preset value, can be directly set to the number of file slices of the target file. Otherwise, a first preset value can be set within the preset numerical range. In the subsequent file slice positioning process, if the first preset value of file slices of the target file can be found, the number of elements in the second file name linear list will continue to increase according to the preset function until the file slice with the same file name as the last element of the second file name linear list cannot be found. At this time, all the file slices representing the target file have been found.

[0115] When file slices from multiple target files are mixed and saved, to further distinguish them, you can set different target files to have completely different random initialization values ​​and preset functions. Because each target file has a different random initialization value and preset function, the file slices' file names have less overlap and similarity. This means that all file slices of a target file can be located based on their file names, without needing to include the target file's identifier in the file slices' file names.

[0116] Figure 9 It is a sub-flowchart of step S71 in one embodiment of the present disclosure.

[0117] refer to Figure 9 When the file name of the file slice of the target file is determined by a preset file name combination, step S71 may include:

[0118] Step S714, obtaining multiple levels and the order of the multiple levels through the configuration file, and automatically configuring a second preset number of file names for each level, each of the file names including the level name and the sequence number of the file name in the corresponding level;

[0119] Step S715, determining the ranking of each file name among all the file names according to the ranking of the multiple levels;

[0120] Step S716: Generate the second file name linear list according to the order of all the file names.

[0121] Figure 9 The second file name linear table generated by the embodiment shown is the same as Figure 4 and Figure 5 The first file name linear list generated by the embodiment shown corresponds to the configuration file. The configuration file can record the level order, for example, Figure 5 In the illustrated embodiment, the configuration can simply record the level code (spdf), without having to record the number of elements in each level. Unauthorized personnel who obtain the level code cannot determine the function it belongs to. To further enhance security, the level code sequence can be set bit by bit to an English word (for example, setting the level bit by bit to spring). This English word is then recorded in the configuration file, making it difficult for unauthorized personnel to understand its meaning even if they read it.

[0122] In the process of determining the second file name linear list according to the level name and level sorting, in order to improve security, there is no need to record in the configuration file in advance how many elements each level has. It is only necessary to generate a second preset value of file names for each level, and then Figure 4 and Figure 5 The method shown in the embodiment is to sort all file names according to the class name and the order within the class, and obtain a second file name linear list containing more redundant file names. Next, the file slice of the target file is found according to the redundant second file name linear list.

[0123] When multiple target files are stored mixedly, in order to prevent the file slices of different target files from having overlapping or similar file names, completely different level names can be set for different target files. The receiving terminal that obtains the receiving authorization for different target files only needs to select file slices in the mixed storage space according to the level names and level name sorting mentioned in the configuration file.

[0124] In the process of searching for the target file slice described above, when the file slice is stored on the local computer and read by the local computer, the search address is the search address of the local computer. When the file slice is uploaded to a server or cloud storage space, the search address is the server or cloud storage space.

[0125] By restoring the second file name linear table that records the file names of all file slices of the target file, the target file slice can be quickly located and the target file can be restored.

[0126] Figure 10 It is a sub-flowchart of step S72 in one embodiment of the present disclosure.

[0127] refer to Figure 10 When the byte quantities of the multiple file slices of the target file are not exactly the same, step S72 may include:

[0128] Step S721, determining the file names of the multiple file slices corresponding to the target file and a first file name linear table based on the second file name linear table, wherein the number of elements in the first file name linear table is equal to the number of the multiple file slices corresponding to the target file, and the element with sequence number i in the first file name linear table is the file name of the file slice with sequence number i in the target file, where i≥1;

[0129] Step S722, determining a target sequence number of the target file slice among all the file slices of the target file;

[0130] Step S723: Determine the file name of the target file slice in the first file name linear table according to the target sequence number.

[0131] exist Figure 10 In the embodiment shown, if the number of file slices of the target file is recorded in the configuration file, the second file name linear table can be determined to be the first file name linear table without processing the second file name linear table. Figure 8 In the embodiment shown, the elements of the second file name linear list are dynamically generated until the file slice corresponding to the last element of the second file name linear list cannot be found. After deleting the last element of the second file name linear list, it is determined that the second file name linear list at this time is the first file name linear list corresponding to the target file. Figure 9In the illustrated embodiment, file slices are searched according to the elements in the redundant second file name linear list. If a file slice with a file name that matches an element in the second file name linear list is found, the element is retained. If a file slice with a file name that matches an element in the second file name linear list is not found, the element is deleted. Finally, based on all the found file slices, a first file name linear list containing the file name order of all file slices of the target file is generated.

[0132] Next, the target slice to be obtained is determined. In one embodiment, the file slices can be obtained according to the order in which the file slices appear in the target file. In this case, for example, the complete target file is restored and parsed. In another embodiment, the sequence number of the target file slice to be obtained can be directly located, and then the file name corresponding to the element of the sequence number can be found through the first file name linear table. In this case, for example, a certain segment of the multimedia file can be selected for broadcast or skipped.

[0133] Figure 11 It is a sub-flowchart of step S722 in one embodiment of the present disclosure.

[0134] refer to Figure 11 When all file slices of the target file except the last file slice have a third preset value of bytes, step S722 may include:

[0135] Step S7221, obtaining the target reading position;

[0136] Step S7222: Determine a target sequence number of the target file slice in all the file slices of the target file according to the target reading position and the third preset value.

[0137] In one embodiment, if the file slices are of relatively uniform size, the target read position can be determined based on the content, thereby determining the position of the target file slice and then determining the sequence number of the target file. For example, if a user wants to download or buffer a video starting at the 3rd minute and 51st second, and if each file slice is 1000 KB and corresponds to x seconds of video, the 3rd minute and 51 seconds of video can be automatically determined to be at y MB, and the file slice can then be located as the zth file slice, where x, y, and z are all examples.

[0138] Setting all file slices except the last file slice (formed by the remaining bytes of the target file) to the third preset value byte can locate the position of the target file slice, which helps the receiving end improve receiving efficiency. However, compared with setting the size of the file slice to a random number, it has lower confidentiality. Those skilled in the art can make their own choice according to their needs.

[0139] The file saving method and file receiving method provided by the embodiments of the present disclosure can store multiple file slices of multiple target files in a mixed manner, making it difficult for unauthorized persons to obtain the file slices of the target files, obtain the order of the file slices of the target files, and subsequently steal the information of the target files. Combined with other encryption methods (for example, multiple encryption of file slices and configuration files), the security of the target files can be effectively improved.

[0140] Corresponding to the above method embodiment, the present disclosure also provides a file storage device, which can be used to execute the above method embodiment.

[0141] Figure 12 It is a block diagram of a file storage device in an exemplary embodiment of the present disclosure.

[0142] refer to Figure 12 , the file storage device 1200 may include:

[0143] The file cutting module 121 is configured to divide the target file to be transmitted into a plurality of file slices, wherein the number of bytes of each file slice is not exactly the same;

[0144] a linear list generating module 122 configured to generate a first file name linear list according to a preset function or a preset file name combination method, wherein the first file name linear list includes a plurality of file names arranged in sequence, and the file name ranked as i+1 is uniquely determined based on the file name ranked as i, where i≥1;

[0145] The file slice naming module 123 is configured to determine the file names of the multiple file slices according to the sequence numbers of the multiple file slices in the target file and the first file name linear table.

[0146] In an exemplary embodiment of the present disclosure, the file cutting module 121 is configured to: obtain n bytes arranged in sequence in the target file, and record the n bytes as data to be split; generate a target number m based on a random number; cut the first m bytes of the data to be split to generate file slices, and update the data to be split to the remaining (nm) bytes after cutting; randomly generate target numbers multiple times to cut the data to be split multiple times and generate multiple file slices, and update the data to be split multiple times until the number of remaining bytes after cutting meets a preset condition; generate the last file slice of the target file based on the remaining bytes that meet the preset condition.

[0147] In an exemplary embodiment of the present disclosure, the file cutting module 121 is configured to: generate a random positive integer Z within a preset numerical range; and use the Euler function to determine the number of positive integers less than Z that are coprime with Z as the target number m.

[0148] In an exemplary embodiment of the present disclosure, the linear list generation module 122 is configured to: determine multiple levels sorted from high to low and the number of elements corresponding to each level; determine the file name corresponding to each level according to the number of elements corresponding to each level, and each file name corresponding to each level includes the level name and the serial number of the file name in the level; determine the sorting of multiple file names corresponding to the multiple levels according to the level name and the serial number; and generate the first file name linear list according to the sorting of the multiple file names.

[0149] In an exemplary embodiment of the present disclosure, the linear list generation module 122 is configured to: randomly generate an initial value and determine a target function from a plurality of preset functions; set the initial value as the head element of the first file name linear list; bring the initial value into the target function to determine the second element of the first file name linear list; bring the current element into the target function to determine the next element of the first file name linear list, until the number of elements in the first file name linear list is equal to the number of file slices.

[0150] In an exemplary embodiment of the present disclosure, the file storage device 1200 also includes a transmission module 124, which is configured to: store the multiple file slices into the cache middleware through a queue according to the file names of the multiple file slices; and periodically batch transmit the file slices in the cache middleware.

[0151] Figure 13 It is a block diagram of a file receiving apparatus in an exemplary embodiment of the present disclosure.

[0152] refer to Figure 12 The file receiving device 1300 is used to obtain file slices generated by the file transfer method as described in any of the above items, and may include: an information restoration module 131, configured to obtain a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generate a second file name linear table according to the preset function or the preset file name combination method; a file slice positioning module 132, configured to determine the file name of the target file slice according to the second file name linear table; a file slice acquisition module 133, configured to obtain the target file slice according to the file name of the target file slice.

[0153] In an exemplary embodiment of the present disclosure, the information restoration module 131 is configured to: obtain a preset function and a random initial value corresponding to the target file through the configuration file; substitute the random initial value into the preset function to determine the second element of the second file name linear list; substitute the current element of the second file name linear list into the preset function to determine the next element of the second file name linear list, until the number of elements in the second file name linear list reaches a first preset value.

[0154] In an exemplary embodiment of the present disclosure, the information restoration module 131 is configured to: obtain multiple levels and the order of the multiple levels through the configuration file, automatically configure a second preset value of file names for each level, each of the file names includes the level name and the serial number of the file name in the corresponding level; determine the order of each file name among all the file names according to the order of the multiple levels; and generate the second file name linear list according to the order of all the file names.

[0155] In an exemplary embodiment of the present disclosure, the number of bytes of multiple file slices of the target file is not exactly the same, and the file slice positioning module 132 is configured to: determine the file names of the multiple file slices corresponding to the target file and the first file name linear list based on the second file name linear list, the number of elements in the first file name linear list is equal to the number of the multiple file slices corresponding to the target file, the element with sequence number i in the first file name linear list is the file name of the file slice with sequence number i in the target file, i≥1; determine the target sequence number of the target file slice in all the file slices of the target file; and determine the file name of the target file slice in the first file name linear list based on the target sequence number.

[0156] In an exemplary embodiment of the present disclosure, all file slices of the target file except the last file slice have a third preset value of bytes, and the file slice positioning module 132 is configured to: obtain the target reading position; determine the target sequence number of the target file slice in all the file slices of the target file according to the target reading position and the third preset value.

[0157] Since the functions of the apparatus 1200 and the apparatus 1300 have been described in detail in their corresponding method embodiments, they will not be described in detail herein.

[0158] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0159] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0160] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Therefore, various aspects of the present invention may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0161] Refer to the following Figure 14 An electronic device 1400 according to this embodiment of the present invention will be described. Figure 14 The electronic device 1400 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0162] like Figure 14 As shown, the electronic device 1400 is presented in the form of a general-purpose computing device. The components of the electronic device 1400 may include, but are not limited to: the at least one processing unit 1410 mentioned above, the at least one storage unit 1420 mentioned above, and a bus 1430 connecting different system components (including the storage unit 1420 and the processing unit 1410). The storage unit stores a program code, and the program code can be executed by the processing unit 1410, so that the processing unit 1410 performs the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above. For example, the processing unit 1410 can execute the method shown in the embodiment of the present disclosure.

[0163] Storage unit 1420 may include readable media in the form of volatile storage units, such as random access memory (RAM) 14201 and / or cache memory 14202, and may further include read-only memory (ROM) 14203. Storage unit 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205. Such program modules 14205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Bus 1430 may represent one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0164] Electronic device 1400 can also communicate with one or more external devices 1500 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1400, and / or any device that enables electronic device 1400 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via input / output (I / O) interface 1450. Furthermore, electronic device 1400 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 1460. As shown, network adapter 1460 communicates with other modules of electronic device 1400 via bus 1430. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with electronic device 1400, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0165] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0166] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.

[0167] The program product for implementing the above-described method according to an embodiment of the present invention may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0168] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0169] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0170] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0171] Furthermore, the above-described figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention and are not intended to be limiting. It is readily understood that the processes illustrated in the above-described figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0172] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

Claims

1. A file storage method, characterized in that: include: Splitting the target file to be transferred into a plurality of file slices, wherein the number of bytes of each file slice is not exactly the same; Generate a first file name linear list according to a preset function or a preset file name combination method, wherein the first file name linear list includes a plurality of file names arranged in sequence, and the file name ranked i+1 is uniquely determined based on the file name ranked i, i≥1; Determining file names of the plurality of file slices according to sequence numbers of the plurality of file slices in the target file and the first file name linear table; The step of generating the first file name linear table according to a preset function or a preset file name combination method includes: Determine a plurality of levels sorted from high to low and the number of elements corresponding to each level; Determine a file name corresponding to each level according to the number of elements corresponding to each level, wherein each file name corresponding to each level includes the level name and the sequence number of the file name in the level; Determining the order of the multiple file names corresponding to the multiple levels according to the level names and the sequence numbers; The first file name linear list is generated according to the order of the multiple file names.

2. The file storage method according to claim 1, wherein: The step of dividing the target file to be transferred into a plurality of file slices comprises: Obtain n bytes arranged in sequence in the target file, and record the n bytes as data to be segmented; Generate a target number m according to a random number, m<n; Cut the first m bytes of the data to be split to generate file slices, and update the data to be split to the remaining (nm) bytes after cutting; Randomly generate target numbers multiple times to cut the data to be split multiple times and generate multiple file slices, and update the data to be split multiple times until the number of remaining bytes after cutting meets the preset conditions; Generate a last file slice of the target file according to the remaining bytes that meet the preset condition.

3. The file storage method according to claim 2, wherein: Generating the target number m according to the random number includes: Generate a random positive integer Z within a preset value range; The number of positive integers smaller than Z that are relatively prime to Z is determined using the Euler function as the target number m.

4. The file storage method according to claim 1, wherein: Generating the first file name linear table according to the preset function or the preset file name combination method includes: Randomly generate initial values ​​and determine an objective function from multiple preset functions; Setting the initial value as the head element of the first file name linear list; Substitute the initial value into the objective function to determine the second element of the first file name linear list; The current element is brought into the objective function to determine the next element of the first file name linear list until the number of elements in the first file name linear list is equal to the number of file slices.

5. The file storage method according to claim 1, wherein: Also includes: Storing the multiple file slices in the cache middleware through a queue according to the file names of the multiple file slices; The file slices in the cache middleware are transmitted in batches at regular intervals.

6. A file receiving method, characterized in that: The method for obtaining a file slice generated by the file saving method according to any one of claims 1 to 5 comprises: Obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generating a second file name linear table according to the preset function or the preset file name combination method; Determine the file name of the target file slice according to the second file name linear table; The target file slice is obtained according to the file name of the target file slice.

7. The file receiving method according to claim 6, wherein: The step of obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generating a second file name linear table according to the preset function or the preset file name combination method comprises: Obtaining a preset function and a random initial value corresponding to the target file through the configuration file; Substitute the random initial value into the preset function to determine the second element of the second file name linear list; The current element of the second file name linear list is brought into the preset function to determine the next element of the second file name linear list, until the number of elements in the second file name linear list reaches a first preset value.

8. The file receiving method according to claim 6, wherein: The step of obtaining a preset function or a preset file name combination method corresponding to the target file through a configuration file, and generating a second file name linear table according to the preset function or the preset file name combination method comprises: Acquire multiple levels and the order of the multiple levels through the configuration file, and automatically configure a second preset value of file names for each level, each of the file names including a level name and a sequence number of the file name in the corresponding level; Determining the ranking of each file name among all the file names according to the ranking of the multiple levels; The second file name linear list is generated according to the order of all the file names.

9. The file receiving method according to any one of claims 6 to 8, wherein: The number of bytes of the multiple file slices of the target file is not completely the same, and determining the file name of the target file slice according to the second file name linear table includes: Determining the file names of the multiple file slices corresponding to the target file and a first file name linear list according to the second file name linear list, wherein the number of elements in the first file name linear list is equal to the number of the multiple file slices corresponding to the target file, and the element with a sequence number i in the first file name linear list is the file name of the file slice with a sequence number i in the target file, where i ≥ 1; Determine a target sequence number of the target file slice among all the file slices of the target file; The file name of the target file slice is determined in the first file name linear table according to the target sequence number.

10. The file receiving method according to claim 9, wherein: All file slices of the target file except the last file slice have a third preset value of bytes, and determining the target sequence number of the target file slice in all the file slices of the target file includes: Get the target read position; A target sequence number of the target file slice in all the file slices of the target file is determined according to the target reading position and the third preset value.

11. A file storage device, characterized in that: include: A file cutting module is configured to split the target file to be transferred into a plurality of file slices, wherein the number of bytes of each file slice is not exactly the same; a linear list generating module configured to generate a first file name linear list according to a preset function or a preset file name combination method, wherein the first file name linear list includes a plurality of file names arranged in sequence, and the file name ranked as i+1 is uniquely determined based on the file name ranked as i, where i≥1; A file slice naming module, configured to determine the file names of the multiple file slices according to the sequence numbers of the multiple file slices in the target file and the first file name linear table; Among them, the linear list generation module is configured to: determine multiple levels sorted from high to low and the number of elements corresponding to each level; determine the file name corresponding to each level according to the number of elements corresponding to each level, and each file name corresponding to each level includes the level name and the serial number of the file name in the level; determine the sorting of multiple file names corresponding to the multiple levels according to the level name and the serial number; and generate the first file name linear list according to the sorting of the multiple file names.

12. A file receiving device, characterized in that: The method for obtaining a file slice generated by the file saving method according to any one of claims 1 to 5 comprises: An information restoration module is configured to obtain a preset function or a preset file name combination method corresponding to a target file through a configuration file, and generate a second file name linear table according to the preset function or the preset file name combination method; A file slice positioning module, configured to determine the file name of a target file slice according to the second file name linear table; The file slice acquisition module is configured to acquire the target file slice according to the file name of the target file slice.

13. An electronic device, characterized in that: include: Memory; as well as A processor coupled to the memory, the processor being configured to execute the file saving method according to any one of claims 1 to 5 or the file receiving method according to any one of claims 6 to 10 based on instructions stored in the memory.

14. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the program implements the file saving method according to any one of claims 1 to 5 or the file receiving method according to any one of claims 6 to 10.

Citation Information

Patent Citations

  • Naming method of data stream

    CN104581435A

  • Video live broadcast method and device

    CN108235151A

  • System and method suitable for file transmission of multiple supercomputing centers

    CN110290186A