CN111031110B - File uploading method and device, electronic equipment and storage medium - Google Patents

File uploading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111031110B
CN111031110B CN201911204962.8A CN201911204962A CN111031110B CN 111031110 B CN111031110 B CN 111031110B CN 201911204962 A CN201911204962 A CN 201911204962A CN 111031110 B CN111031110 B CN 111031110B
Authority
CN
China
Prior art keywords
file
files
server
fragmented
confirmation result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911204962.8A
Other languages
Chinese (zh)
Other versions
CN111031110A (en
Inventor
刘一烜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN201911204962.8A priority Critical patent/CN111031110B/en
Publication of CN111031110A publication Critical patent/CN111031110A/en
Application granted granted Critical
Publication of CN111031110B publication Critical patent/CN111031110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a file uploading method, a file uploading device, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: carrying out fragmentation operation on a mirror image file of a system according to a preset fragmentation rule to obtain a plurality of fragmented files; extracting target fragmented files from all fragmented files, and calculating a check value corresponding to each target fragmented file; sending all the check values to a server so that the server can confirm whether the same check values exist or not, and generating a first confirmation result to be returned to the browser; if the first confirmation result is that the first confirmation result does not exist, all the fragmented files are uploaded to the server, so that the server can calculate and store the check values corresponding to all the fragmented files, and all the fragmented files are combined into the mirror image file. The file uploading method provided by the application avoids the problems that the same file is uploaded for multiple times, so that the server is too much used for storage and the server bandwidth occupies too large load due to multiple uploads, and avoids the problem that the check value of the whole image file is too slow to obtain.

Description

File uploading method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a file uploading method and apparatus, an electronic device, and a computer-readable storage medium.
Background
A user uploads the mirror image file of the system to the server through the browser, and the mirror image file of the same version of the same system is uploaded to the server for multiple times due to the fact that the mirror image file is an oversized file, so that the occupied bandwidth is large, and the load of the server is too high. As multiple users can multiplex the same image file for operating system installation and deployment, the image of the same version of the same system does not need to store copies uploaded by multiple users.
Therefore, how to prevent the image file of the system from being repeatedly submitted to the server is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a file uploading method and device, an electronic device and a computer readable storage medium, and the method and device can prevent the mirror image file of a system from being repeatedly submitted to a server.
In order to achieve the above object, the present application provides a file uploading method, applied to a browser, including:
carrying out fragmentation operation on a mirror image file of a system according to a preset fragmentation rule to obtain a plurality of fragmented files;
extracting target fragmented files from all the fragmented files, and calculating a check value corresponding to each target fragmented file;
sending all the check values to a server so that the server can confirm whether the same check values exist or not, and generating a first confirmation result to return to the browser;
if the first confirmation result is that the first confirmation result does not exist, all the fragmented files are uploaded to the server, so that the server can calculate and store check values corresponding to all the fragmented files conveniently, and all the fragmented files are combined into the mirror image file.
Before extracting the target fragmented file from all the fragmented files, the method further includes:
sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether the duplicate name file exists or not, generate a second confirmation result and return the second confirmation result to the browser;
and if the second confirmation result is that the target fragment file does not exist, executing the step of extracting the target fragment file from all the fragment files.
Wherein, still include:
and if the first confirmation result is that the image file exists, outputting a prompt message that the image file already exists.
Wherein, the extracting the target fragment file from all the fragment files includes:
extracting a first fragment file and a last fragment file of the mirror image file as the target fragment files;
acquiring accuracy, and calculating the extraction quantity according to the accuracy; wherein the extraction number is the product of the accuracy and the number of all the fragmented files;
and extracting the target fragmented files with the extracted number from all the fragmented files.
Wherein, the extracting the target fragmented file from all the fragmented files includes:
and extracting a preset number of fragment files from all the fragment files as the target fragment files.
To achieve the above object, the present application provides a file uploading apparatus, including:
the system comprises a fragmentation module, a file management module and a file management module, wherein the fragmentation module is used for carrying out fragmentation operation on a mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmentation files;
the computing module is used for extracting target fragmented files from all the fragmented files and computing a check value corresponding to each target fragmented file;
the first sending module is used for sending all the check values to a server so that the server can confirm whether the same check values exist or not, generate a first confirmation result and return the first confirmation result to the browser;
and the uploading module is used for uploading all the fragmented files to the server when the first confirmation result is that the fragmented files do not exist, so that the server can calculate and store check values corresponding to all the fragmented files and merge all the fragmented files into the image file.
Wherein, still include:
the second sending module is used for sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether a duplicate name file exists or not, generate a second confirmation result and return the second confirmation result to the browser; and if the second confirmation result is that the first confirmation result does not exist, starting the working process of the first sending module.
Wherein the calculation module comprises:
the first sampling unit is used for extracting a first fragment file and a last fragment file of the image file into the target fragment file;
the first calculation unit is used for acquiring the accuracy and calculating the extraction quantity according to the accuracy; wherein the extraction number is the product of the accuracy and the number of all the fragmented files;
the second sampling unit is used for extracting the target fragment files with the extracted number from all the fragment files;
and the second calculating unit is used for calculating the check value corresponding to each target fragment file.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the file uploading method when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, realizes the steps of the above file uploading method.
According to the scheme, the file uploading method comprises the following steps: carrying out fragmentation operation on the mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmented files; extracting target fragmented files from all the fragmented files, and calculating a check value corresponding to each target fragmented file; sending all the check values to a server so that the server can confirm whether the same check values exist or not, and generating a first confirmation result to be returned to the browser; if the first confirmation result is that the first confirmation result does not exist, uploading all the fragmented files to the server so that the server can calculate and store check values corresponding to all the fragmented files and combine all the fragmented files into the image file.
According to the file uploading method, before the mirror image file of the system is uploaded, the file contents are compared, so that the fact that only one mirror image file with the same content is stored on the server is guaranteed, and the problems that the server is too much in storage and use due to the fact that the same file is uploaded for multiple times and the server bandwidth occupies too much load due to the fact that the same file is uploaded for multiple times are avoided. In addition, all the fragment files are sampled to obtain a target fragment file, and the check values of the target fragment file are used for comparing the file contents, so that the problems of slow check value acquisition and low efficiency of the whole image file are solved. The application also discloses a file uploading device, an electronic device and a computer readable storage medium, and the technical effects can be realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts. The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a method for uploading a file in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating another method of uploading a file in accordance with an illustrative embodiment;
FIG. 3 is a block diagram illustrating a file upload apparatus in accordance with an exemplary embodiment;
FIG. 4 is a block diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application discloses a file uploading method, which prevents mirror image files of a system from being repeatedly submitted to a server.
Referring to fig. 1, a flowchart of a file uploading method according to an exemplary embodiment is shown, as shown in fig. 1, including:
s101: carrying out fragmentation operation on the mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmented files;
the execution subject of the embodiment is a browser, and the purpose is to upload an image file of the system to a server. In this embodiment, the browser and the server support fragment uploading, and a developer may formulate a fragment rule of the image file, that is, a preset fragment rule in this step, for example, a fragment size of the 1G image file, and a fragment start and end identifier. And carrying out fragmentation operation on the mirror image files of the system at the browser end according to the preset fragmentation rule, wherein the result is a plurality of fragment files.
S102: extracting target fragmented files from all the fragmented files, and calculating a check value corresponding to each target fragmented file;
because the contents of the image files of the system are basically consistent under the same version, and the difference of the image files of different systems of different versions is very large, the content verification can be carried out in a sampling mode. In this step, all the fragmented files are sampled to obtain target sampled files, and a check value corresponding to each target fragmented file is calculated. Here, the specific form of the check value is not limited, and may be, for example, an MD5 value.
It should be noted that, in this embodiment, a specific sampling method is not limited, and a preset number of fragment files may be extracted from all the fragment files as target fragment files. Preferably, the step of extracting the target fragmented file from all the fragmented files includes: extracting a first fragment file and a last fragment file of the image file as the target fragment file; obtaining accuracy, and calculating the extraction quantity according to the accuracy; wherein the extraction number is the product of the accuracy and the number of all the fragmented files; and extracting the target fragment files with the extracted number from all the fragment files.
In specific implementation, a first fragment file and a last fragment file of an image file are extracted, a sampling number of indexes are randomly generated, and the fragment file corresponding to the extracted index is a target fragment file. That is to say, the target fragmented files include a first fragmented file, a last fragmented file, and a randomly extracted number of fragmented files, and the number of target fragmented files is the number of samples plus two. The accuracy can be adjusted according to actual needs, and if the actual needed accuracy is higher, the accuracy is improved by increasing the proportion of the number of the target fragmented files to the number of all fragmented files.
In order to improve the efficiency of detecting whether the mirror image file exists in the server, duplicate name detection may be performed before content verification. Namely, before this step, the method further comprises: sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether a duplicate name file exists or not, and generating a second confirmation result to return to the browser; if the second confirmation result is not present, the step is executed. In specific implementation, when a user requests to upload a mirror image file, a browser first requests a server to perform duplicate name detection, and if the duplicate name file exists, the browser directly prohibits the uploading request and outputs prompt information to prompt the user that the mirror image file exists.
S103: sending all the check values to a server so that the server can confirm whether the same check values exist or not, and generating a first confirmation result to be returned to the browser;
the method comprises the following steps of performing content verification on the mirror image file in the previous step, determining whether the server side has the mirror image file with the same content as the mirror image file, and avoiding repeated uploading. Specifically, the browser sends the check value of the target fragment file calculated in the previous step to the server to request content check from the server, and the server determines that the same check value is stored in the time length and returns a determination result to the browser.
S104: if the first confirmation result is that the first confirmation result does not exist, all the fragmented files are uploaded to the server, so that the server can calculate and store check values corresponding to all the fragmented files conveniently, and all the fragmented files are combined into the mirror image file.
In a specific implementation, if the same check value does not exist in the server, it is determined that the image file is the first upload server. After receiving all the fragmented files, the server firstly calculates the check values of all the fragmented files, stores the check values by taking the system name plus the version number as a unique identifier, and then merges all the fragmented files to obtain a complete image file.
S105: and if the first confirmation result is that the image file exists, outputting the prompt information that the image file exists.
In a specific implementation, if the same check value exists in the server, it is indicated that the image file has been uploaded to the server, and in order to avoid repeated uploading, the uploading request is prohibited, and a prompt message is output to prompt the user that the image file already exists.
According to the file uploading method, before the mirror image file of the system is uploaded, the file contents are compared, so that the fact that the mirror image file with the same content is stored on the server is guaranteed, and the problems that the server is too much used for storage due to repeated uploading of the same file and the server bandwidth occupies too much load due to repeated uploading are solved. In addition, all the fragment files are sampled to obtain a target fragment file, and the check values of the target fragment file are used for comparing the file contents, so that the problems of slow check value and low efficiency of obtaining the whole image file are solved.
The embodiment of the application discloses a file uploading method, and compared with the previous embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
referring to fig. 2, a flowchart of another file uploading method according to an exemplary embodiment is shown, and as shown in fig. 2, includes:
s201: carrying out fragmentation operation on the mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmented files;
s202: sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether a duplicate name file exists, and if so, entering S206; if not, entering S203;
s203: extracting target fragmented files from all the fragmented files, and calculating a check value corresponding to each target fragmented file;
s204: sending all the check values to a server so that the server can confirm whether the same check values exist or not, and if so, entering S206; if not, the process goes to S205;
s205: and uploading all the fragmented files to the server so that the server can calculate and store check values corresponding to all the fragmented files and merge all the fragmented files into the mirror image file.
S206: and outputting the existing prompt information of the mirror image file.
In the following, a document uploading apparatus provided in an embodiment of the present application is introduced, and a document uploading apparatus described below and a document uploading method described above may be referred to each other.
Referring to fig. 3, a block diagram of a file uploading apparatus according to an exemplary embodiment is shown, as shown in fig. 3, including:
the fragmentation module 301 is configured to perform fragmentation operation on an image file of a system according to a preset fragmentation rule to obtain a plurality of fragmented files;
a calculating module 302, configured to extract target fragmented files from all the fragmented files, and calculate a check value corresponding to each target fragmented file;
a first sending module 303, configured to send all the check values to a server, so that the server confirms whether the same check value exists, generates a first confirmation result, and returns the first confirmation result to the browser;
an uploading module 304, configured to upload all the fragmented files to the server when the first confirmation result is that the fragmented files do not exist, so that the server calculates and stores check values corresponding to all the fragmented files, and merges all the fragmented files into the image file.
The file uploading device provided by the embodiment of the application compares the file contents before uploading the image files of the system to ensure that only one image file with the same content is stored on the server, and the problems that the server is too much used for storage and the server bandwidth occupies too much load due to repeated uploading of the same file are avoided. In addition, all the fragment files are sampled to obtain a target fragment file, and the check values of the target fragment file are used for comparing the file contents, so that the problems of slow check value and low efficiency of obtaining the whole image file are solved.
On the basis of the above embodiment, as a preferred embodiment, the method further includes:
the second sending module is used for sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether a duplicate name file exists or not, and a second confirmation result is generated and returned to the browser; and if the second confirmation result is that the first confirmation result does not exist, starting the working process of the first sending module.
On the basis of the above embodiment, as a preferred implementation, the method further includes:
and the output module is used for outputting the existing prompt information of the mirror image file when the first confirmation result is that the mirror image file exists.
On the basis of the foregoing embodiment, as a preferred implementation, the calculating module 302 includes:
the first sampling unit is used for extracting a first fragment file and a last fragment file of the image file into the target fragment file;
the first calculation unit is used for acquiring the accuracy and calculating the extraction quantity according to the accuracy; wherein the extraction number is the product of the accuracy and the number of all the fragmented files;
the second sampling unit is used for extracting the target fragment files with the extracted number from all the fragment files;
and the second calculating unit is used for calculating the check value corresponding to each target fragmented file.
On the basis of the foregoing embodiment, as a preferred implementation manner, the calculating module 302 is specifically a module that extracts a preset number of fragmented files from all the fragmented files as the target fragmented files, and calculates a check value corresponding to each target fragmented file.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The present application further provides an electronic device, and referring to fig. 4, a structure diagram of an electronic device 400 provided in an embodiment of the present application, as shown in fig. 4, may include a processor 11 and a memory 12. The electronic device 400 may also include one or more of a multimedia component 13, an input/output (I/O) interface 14, and a communication component 15.
The processor 11 is configured to control the overall operation of the electronic device 400, so as to complete all or part of the steps in the file uploading method. The memory 12 is used to store various types of data to support operation at the electronic device 400, such as instructions for any application or method operating on the electronic device 400 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 12 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically Erasable Programmable Read-Only Memory (EEPROM), erasable Programmable Read-Only Memory (EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 13 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving an external audio signal. The received audio signal may further be stored in the memory 12 or transmitted via the communication component 15. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 14 provides an interface between the processor 11 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 15 is used for wired or wireless communication between the electronic device 400 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, near Field Communication (NFC for short), 2G, 3G or 4G, or a combination of one or more of them, so that the corresponding Communication component 15 may comprise: wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-mentioned file uploading method.
In another exemplary embodiment, there is also provided a computer readable storage medium including program instructions, which when executed by a processor, implement the steps of the above-described file uploading method. For example, the computer readable storage medium may be the memory 12 described above including program instructions that are executable by the processor 11 of the electronic device 400 to perform the file upload method described above.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (7)

1. A file uploading method is applied to a browser and comprises the following steps:
carrying out fragmentation operation on the mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmented files;
extracting target fragmented files from all the fragmented files, and calculating a check value corresponding to each target fragmented file;
sending all the check values to a server so that the server can confirm whether the same check values exist or not, and generating a first confirmation result to return to the browser;
if the first confirmation result is that the first confirmation result does not exist, uploading all the fragmented files to the server so that the server can calculate and store check values corresponding to all the fragmented files conveniently, and combining all the fragmented files into the mirror image file;
if the first confirmation result is that the image file exists, outputting a prompt message that the image file exists;
wherein, the extracting the target fragment file from all the fragment files includes:
extracting a first fragment file and a last fragment file of the mirror image file as the target fragment files;
obtaining accuracy, and calculating the extraction quantity according to the accuracy; wherein the extraction number is the product of the accuracy and the number of all the fragmented files;
and extracting the target fragment files with the extracted number from all the fragment files.
2. The file uploading method according to claim 1, wherein before extracting the target fragmented file from all the fragmented files, the method further comprises:
sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether the duplicate name file exists or not, generate a second confirmation result and return the second confirmation result to the browser;
and if the second confirmation result is that the target fragment file does not exist, executing the step of extracting the target fragment file from all the fragment files.
3. The file uploading method according to claim 1 or 2, wherein the extracting a target fragmented file from all the fragmented files comprises:
and extracting a preset number of fragment files from all the fragment files as the target fragment files.
4. A file uploading device is applied to a browser and comprises:
the system comprises a fragmentation module, a file management module and a file management module, wherein the fragmentation module is used for carrying out fragmentation operation on a mirror image file of the system according to a preset fragmentation rule to obtain a plurality of fragmentation files;
the computing module is used for extracting target fragmented files from all the fragmented files and computing a check value corresponding to each target fragmented file;
the first sending module is used for sending all the check values to a server so that the server can confirm whether the same check values exist or not, and a first confirmation result is generated and returned to the browser;
the uploading module is used for uploading all the fragmented files to the server when the first confirmation result is that the fragmented files do not exist, so that the server can calculate and store check values corresponding to all the fragmented files and combine all the fragmented files into the image file;
the output module is used for outputting the existing prompt information of the mirror image file when the first confirmation result is that the mirror image file exists;
wherein the calculation module comprises:
the first sampling unit is used for extracting a first fragment file and a last fragment file of the image file into the target fragment file;
the first calculation unit is used for acquiring the accuracy and calculating the extraction quantity according to the accuracy; wherein the extraction quantity is the product of the accuracy and the quantity of all the fragmented files;
the second sampling unit is used for extracting the target fragment files with the extracted number from all the fragment files;
and the second calculating unit is used for calculating the check value corresponding to each target fragment file.
5. The file uploading apparatus according to claim 4, further comprising:
the second sending module is used for sending the system name of the system and the file name of the mirror image file to the server so that the server can confirm whether a duplicate name file exists or not, generate a second confirmation result and return the second confirmation result to the browser; and if the second confirmation result is that the first confirmation result does not exist, starting the working process of the first sending module.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the file uploading method according to any of claims 1 to 3 when executing the computer program.
7. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the file uploading method according to any one of claims 1 to 3.
CN201911204962.8A 2019-11-29 2019-11-29 File uploading method and device, electronic equipment and storage medium Active CN111031110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911204962.8A CN111031110B (en) 2019-11-29 2019-11-29 File uploading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911204962.8A CN111031110B (en) 2019-11-29 2019-11-29 File uploading method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111031110A CN111031110A (en) 2020-04-17
CN111031110B true CN111031110B (en) 2023-01-24

Family

ID=70207310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911204962.8A Active CN111031110B (en) 2019-11-29 2019-11-29 File uploading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111031110B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970357A (en) * 2020-08-14 2020-11-20 北京金和网络股份有限公司 Video uploading method, device and system
CN112383614A (en) * 2020-11-11 2021-02-19 常州微亿智造科技有限公司 File transmission method and device
CN112416257B (en) * 2020-12-02 2024-07-09 北京中指讯博数据信息技术有限公司 Resource storage method and device
CN112540776B (en) * 2020-12-25 2024-07-26 麒麟软件有限公司 Operating system image management method based on ISO9660 image fragmentation and deduplication technology
CN113300875B (en) * 2021-02-10 2024-09-20 阿里巴巴集团控股有限公司 Method, server, system and storage medium for checking back source data
CN115129665A (en) * 2021-03-25 2022-09-30 易保网络技术(上海)有限公司 File processing method, system, computer equipment and medium
CN113868059B (en) * 2021-09-27 2023-06-20 苏州浪潮智能科技有限公司 Service system start detection method and device, electronic equipment and storage medium
CN113938269B (en) * 2021-12-15 2022-05-13 亿次网联(杭州)科技有限公司 File fragment uploading verification method and system
CN114363321A (en) * 2021-12-30 2022-04-15 支付宝(杭州)信息技术有限公司 File transmission method, equipment and system
CN115190117A (en) * 2022-07-11 2022-10-14 南京国盛华兴科技有限公司 File uploading control method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635324A (en) * 2016-03-17 2016-06-01 新浪网技术(中国)有限公司 Big file uploading and continuous uploading method and device for browser or server
CN107360233A (en) * 2017-07-14 2017-11-17 世纪龙信息网络有限责任公司 Method, apparatus, equipment and the readable storage medium storing program for executing that file uploads
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN109831487A (en) * 2019-01-08 2019-05-31 平安科技(深圳)有限公司 Fragmented file verification method and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635324A (en) * 2016-03-17 2016-06-01 新浪网技术(中国)有限公司 Big file uploading and continuous uploading method and device for browser or server
CN107360233A (en) * 2017-07-14 2017-11-17 世纪龙信息网络有限责任公司 Method, apparatus, equipment and the readable storage medium storing program for executing that file uploads
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN109831487A (en) * 2019-01-08 2019-05-31 平安科技(深圳)有限公司 Fragmented file verification method and terminal equipment

Also Published As

Publication number Publication date
CN111031110A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN111031110B (en) File uploading method and device, electronic equipment and storage medium
JP6629697B2 (en) Method and apparatus for extracting a virtual machine image file
CN112866310B (en) CDN back-to-source verification method and verification server, and CDN cluster
CN109542361B (en) Distributed storage system file reading method, system and related device
CN108108127B (en) File reading method and system
CN108647317B (en) Incremental file generation method and device, storage medium and electronic equipment
CN107911222B (en) Digital signature generating method, digital signature verifying method, digital signature generating apparatus, digital signature verifying apparatus, and storage medium storing digital signature verifying program
US20170109371A1 (en) Method and Apparatus for Processing File in a Distributed System
CN111158597A (en) Metadata reading method and device, electronic equipment and storage medium
CN109948334B (en) Vulnerability detection method and system, electronic equipment and storage medium
CN111124308A (en) Performance analysis method and device, electronic equipment and storage medium
CN109144998B (en) Node data display method and device, storage medium and electronic equipment
EP3207461A1 (en) Compression of cascading style sheet files
CN111209727A (en) Picture processing method and device, electronic equipment and storage medium
CN111198885A (en) Data processing method and device
CN108255672B (en) Data verification method and device, storage medium and electronic equipment
CN114416883A (en) Block chain light node data synchronization method, device, equipment and readable storage medium
CN111143650A (en) Method, device, medium and electronic equipment for acquiring page data
CN111177088A (en) Data deduplication method and device, electronic equipment and storage medium
CN113708983A (en) Distributed node ID generation method, device, equipment and storage medium
CN113852665A (en) File uploading method and device, electronic equipment, storage medium and program product
CN116841978A (en) Path analysis method, device and storage medium based on distributed file system
CN111078437A (en) Remote calling method and device of verification code, electronic equipment and readable storage medium
CN115987685A (en) Cloud service data sharing method and system
CN114371887A (en) Method, device, equipment and medium for preloading application program based on Weex framework

Legal Events

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