



技术领域technical field
本发明涉及大数据领域,尤其涉及一种文件上传方法、装置、电子设备及存储介质。The invention relates to the field of big data, and in particular, to a file uploading method, device, electronic device and storage medium.
背景技术Background technique
数据、算力、算法是驱动人工智能发展的三驾马车。但是如何将数据文件进行有效的上传存储,成为人工智能工程领域的一大挑战。Data, computing power, and algorithms are the troika that drives the development of artificial intelligence. However, how to effectively upload and store data files has become a major challenge in the field of artificial intelligence engineering.
目前业界是将数据文件直接上传到服务器,但是将数据文件直接上传到服务器是一个非常耗时的工作,如果数据在上传过程中损坏,用户无法直接发现,导致上传错误文件影响后续的使用,因此需要一种快速上传且校验准确的文件上传方法。At present, the industry uploads data files directly to the server, but uploading data files directly to the server is a very time-consuming task. If the data is damaged during the uploading process, the user cannot directly find it, resulting in uploading the wrong file and affecting subsequent use. Therefore, There is a need for a fast and accurate file upload method.
发明内容SUMMARY OF THE INVENTION
本发明提供一种文件上传方法、装置、系统、电子设备及存储介质,其主要目的在于提高文件上传的速度及准确度。The present invention provides a file uploading method, device, system, electronic device and storage medium, the main purpose of which is to improve the speed and accuracy of file uploading.
为实现上述目的,本发明提供的一种文件上传方法,包括:To achieve the above purpose, a file uploading method provided by the present invention includes:
获取待上传文件,对所述待上传文件进行分片处理,得到分片文件集;Obtaining a file to be uploaded, and performing fragmentation processing on the file to be uploaded to obtain a fragmented file set;
根据所述分片文件集生成上传请求,利用所述上传请求进行索引查询,得到请求校验结果;Generate an upload request according to the fragmented file set, and use the upload request to perform an index query to obtain a request verification result;
对所述请求校验结果进行签名计算得到期望签名集;Perform signature calculation on the request verification result to obtain a desired signature set;
对所述期望签名集进行签名查询得到查询结果;Performing a signature query on the desired signature set to obtain a query result;
根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,得到上传分片文件集;According to the query result, upload the fragmented file set to a preset server according to a preset upload rule to obtain an uploaded fragmented file set;
对所述上传分片文件集进行合并处理,得到目标上传文件。The uploading fragmented file set is merged to obtain the target uploading file.
可选地,所述根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,包括:Optionally, uploading the fragmented file set to a preset server according to a preset upload rule according to the query result includes:
根据所述分片文件集在所述服务端创建对应的空白文件;Create a corresponding blank file on the server according to the fragmented file set;
根据所述查询结果,判断所述期望签名集中的期望签名在所述服务端是否存在相同的文件签名;According to the query result, determine whether the desired signatures in the desired signature set have the same file signature on the server;
若所述期望签名在所述服务端存在相同的文件签名,将所述分片文件集中所述期望签名对应的分片文件索引指向所述服务端对应的文件签名的文件,得到对应的上传分片文件;If the expected signature has the same file signature on the server, point the fragmented file index corresponding to the expected signature in the fragmented file set to the file with the corresponding file signature on the server to obtain the corresponding upload score slice file;
若所述期望签名在所述服务端不存在相同的文件签名,将所述分片文件集中所述期望签名对应的分片文件包含的文件流传输至所述服务端,得到对应的上传分片文件;If the expected signature does not have the same file signature on the server, stream the files contained in the fragmented file corresponding to the expected signature in the fragmented file set to the server to obtain the corresponding upload fragment document;
汇总所有的所述上传分片文件,得到所述上传分片文件集。All the uploaded fragmented files are aggregated to obtain the uploaded fragmented file set.
可选地,所述对所述请求校验结果进行签名计算得到期望签名集,包括:Optionally, performing signature calculation on the request verification result to obtain an expected signature set, including:
若所述请求校验结果中所述分片文件集中对应的分片文件未上传,则计算所述分片文件的文件签名,将所述分片文件的文件签名作为该分片文件的期望文件签名;If the fragmented file corresponding to the fragmented file set in the request verification result has not been uploaded, the file signature of the fragmented file is calculated, and the file signature of the fragmented file is used as the expected file of the fragmented file sign;
若所述请求校验结果中所述分片文件集中对应的分片文件已上传,将所述请求校验结果中包含的所述分片文件的服务端文件签名作为该分片文件的期望文件签名;If the fragmented file corresponding to the fragmented file set in the request verification result has been uploaded, the server-side file signature of the fragmented file contained in the request verification result is taken as the expected file of the fragmented file sign;
汇总所有的所述期望文件签名,得到所述期望签名集。All the expected file signatures are aggregated to obtain the expected signature set.
可选地,所述对所述上传分片文件集进行合并处理,得到目标上传文件,包括:Optionally, performing the merging process on the uploading fragmented file set to obtain the target uploading file, including:
对所述上传分片文件集进行分片校验合并,得到上传文件;Performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file;
对所述上传文件进行分段读取校验,得到所述目标上传文件。Perform segment read verification on the upload file to obtain the target upload file.
可选地,所述对所述上传分片文件集进行分片校验合并,得到上传文件,包括:Optionally, performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file, including:
计算所述上传分片文件集中每个上传分片文件的文件签名,得到对应的上传分片文件签名;Calculate the file signature of each uploaded fragmented file in the uploaded fragmented file set to obtain the corresponding uploaded fragmented file signature;
汇总所有的所述上传分片文件签名,得到上传分片文件签名集;Summarize all the uploaded fragmented file signatures to obtain the uploaded fragmented file signature set;
判断所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名是否一致,得到上传结果;Determine whether each of the uploaded fragmented file signatures in the uploaded file signature set is consistent with the expected file signature of the fragmented file corresponding to the expected file signature set, and obtain the upload result;
若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名一致,将所述上传结果返回预设客户端,将所述上传分片文件集中所有的所述上传分片文件进行合并,得到所述上传文件;If the signature of each uploaded fragmented file in the uploaded file signature set is consistent with the expected file signature of the corresponding fragmented file in the expected file signature set, the uploading result is returned to the preset client, and the uploaded All the uploaded fragmented files in the fragmented file set are merged to obtain the uploaded file;
若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名不一致,将所述上传结果返回所述客户端。If the signature of each uploaded fragmented file in the uploaded file signature set is inconsistent with the expected file signature of the corresponding fragmented file in the expected file signature set, the uploading result is returned to the client.
可选地,所述对所述上传文件进行分段读取校验,得到所述目标上传文件,包括:Optionally, performing segment read verification on the upload file to obtain the target upload file, including:
根据所述上传分片文件签名集进行完整文件签名计算,得到完整文件签名;Calculate the complete file signature according to the uploaded fragmented file signature set to obtain the complete file signature;
对所述上传文件进行分段读取及签名计算处理,得到上传文件签名;Performing segmental reading and signature calculation processing on the uploaded file to obtain the uploaded file signature;
判断所述完整文件签名与所述上传文件签名是否一致;Determine whether the signature of the complete file is consistent with the signature of the uploaded file;
若所述完整文件签名与所述上传文件签名一致,将所述上传文件确定为所述目标上传文件,返回所述客户端上传成功提醒;If the signature of the complete file is consistent with the signature of the uploaded file, the uploaded file is determined as the target upload file, and a notification of successful uploading to the client is returned;
若所述完整文件签名与所述上传文件签名不一致,返回所述将所述上传分片文件集中所有的所述上传分片文件进行合并步骤,并记录返回次数,若所述返回次数达到预定次数且所述完整文件签名与所述上传文件签名仍不一致,返回所述客户端文件上传失败提醒。If the signature of the complete file is inconsistent with the signature of the uploaded file, return to the step of merging all the uploaded fragmented files in the uploaded fragmented file set, and record the number of returns, if the number of returns reaches a predetermined number of times And the complete file signature is still inconsistent with the uploaded file signature, and the client file upload failure reminder is returned.
可选地,所述对所述待上传文件进行分片处理,得到分片文件集,包括:Optionally, performing fragmentation processing on the to-be-uploaded file to obtain a fragmented file set, including:
根据预设的分片长度对所述待上传文件进行分片及id索引标记,得到所述分片文件集。The to-be-uploaded file is segmented and marked with an id index according to a preset segment length to obtain the segmented file set.
为了解决上述问题,本发明还提供一种文件上传装置,所述装置包括:In order to solve the above problems, the present invention also provides a file uploading device, the device comprising:
文件分片模块,用于获取待上传文件,对所述待上传文件进行分片处理,得到分片文件集;a file fragmentation module, used to obtain a file to be uploaded, perform fragmentation processing on the to-be-uploaded file, and obtain a fragmented file set;
分片上传模块,用于根据所述分片文件集生成上传请求,利用所述上传请求进行索引查询,得到请求校验结果;对所述请求校验结果进行签名计算得到期望签名集;对所述期望签名集进行签名查询得到查询结果;根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,得到上传分片文件集;A fragment upload module is used to generate an upload request according to the fragment file set, perform an index query by using the upload request, and obtain a request verification result; perform signature calculation on the request verification result to obtain an expected signature set; performing a signature query on the desired signature set to obtain a query result; according to the query result, uploading the fragmented file set to a preset server according to a preset upload rule to obtain an uploaded fragmented file set;
验证合并模块,用于对所述上传分片文件集进行合并处理,得到目标上传文件。The verification merging module is used for merging the uploaded fragmented file set to obtain the target upload file.
为了解决上述问题,本发明还提供一种电子设备,所述电子设备包括:In order to solve the above problems, the present invention also provides an electronic device, the electronic device includes:
至少一个处理器;以及,at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述所述的文件上传方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the file uploading method described above.
为了解决上述问题,本发明还提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述所述的文件上传方法。In order to solve the above problem, the present invention also provides a computer-readable storage medium storing a computer program, and the computer program implements the above-mentioned file uploading method when executed by a processor.
本发明实施例中利用对所述待上传文件进行分片处理,得到分片文件集实现文件的分片上传,对分片文件进行上传查询校验实现分片文件的分类上传,提高了文件上传速度,同时对所述上传分片文件集进行合并处理,得到目标上传文件,通过对所述上传分片文件集进行合并前验证及合并后验证,保证了文件上传的准确性。因此,本发明实施例所提出的文件上传方法、装置、电子设备及存储介质能够提高文件上传的速度及准确度。In the embodiment of the present invention, the files to be uploaded are processed into segments to obtain a segmented file set to realize the segmented upload of the files, and the upload query and verification of the segmented files are used to realize the classified upload of the segmented files, which improves the file uploading performance. At the same time, the upload fragmented file set is merged to obtain the target upload file, and the accuracy of file upload is ensured by performing pre-merging and post-merging verification on the uploaded fragmented file set. Therefore, the file uploading method, device, electronic device and storage medium proposed in the embodiments of the present invention can improve the speed and accuracy of file uploading.
附图说明Description of drawings
图1为本发明一实施例提供的文件上传方法的流程示意图;FIG. 1 is a schematic flowchart of a file uploading method according to an embodiment of the present invention;
图2为本发明一实施例提供的文件上传方法中得到目标上传文件的流程示意图;2 is a schematic flowchart of obtaining a target upload file in a file upload method provided by an embodiment of the present invention;
图3为本发明一实施例提供的文件上传装置的模块示意图;3 is a schematic diagram of a module of a file uploading device according to an embodiment of the present invention;
图4为本发明一实施例提供的实现文件上传方法的电子设备的内部结构示意图;4 is a schematic diagram of an internal structure of an electronic device implementing a file uploading method provided by an embodiment of the present invention;
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
本发明提供一种文件上传方法。所述文件上传方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述文件上传方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。The present invention provides a file uploading method. The execution body of the file uploading method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server and a terminal. In other words, the file uploading method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
参照图1所示,为本发明第一实施例提供的文件上传方法的流程示意图。在本实施例中,所述文件上传方法包括:Referring to FIG. 1 , it is a schematic flowchart of a file uploading method provided by the first embodiment of the present invention. In this embodiment, the file uploading method includes:
S1、获取待上传文件,对所述待上传文件进行分片处理,得到分片文件集;S1, obtain a file to be uploaded, and perform fragmentation processing on the file to be uploaded to obtain a fragmented file set;
本发明实施例中,所述待上传文件为包含的字节数过多的文件,所述待上传文件可以为执行深度学习训练所需语料。In the embodiment of the present invention, the to-be-uploaded file is a file containing too many bytes, and the to-be-uploaded file may be a corpus required for performing deep learning training.
进一步地,为了提升所述待上传文件的上传速度,本发明实施例对所述待上传文件进行分片处理,包括:根据预设的分片长度对所述待上传文件进行分片及id索引标记,得到分片文件集,其中,所述分片文件集包括每个分片文件的分片文件id及分片文件索引参数;例如:待上传文件A的大小为5T,预设的分片长度为1T,那么可以将待上传文件A依次分为分片文件A\0、分片文件A\1、分片文件A\2、分片文件A\3、分片文件A\4共5个分片文件,其中,A\0中A表示分片文件id,每个待上传文件对应一种分片文件id,所以同一个分片文件集中的每个分片文件的分片id均相同,0表示分片文件索引参数即分片文件的分片顺序,A\1、A\2、A\3、A\4以此类推,分片文件A\0、A\1、A\2、A\3、A\4组成分片文件集。Further, in order to improve the upload speed of the to-be-uploaded file, the embodiment of the present invention performs fragmentation processing on the to-be-uploaded file, including: fragmenting and id indexing the to-be-uploaded file according to a preset fragment length mark to obtain a fragmented file set, wherein the fragmented file set includes the fragmented file id and fragmented file index parameter of each fragmented file; for example: the size of the file A to be uploaded is 5T, and the preset fragmented file If the length is 1T, then the file A to be uploaded can be divided into shard file A\0, shard file A\1, shard file A\2, shard file A\3, shard file A\4 in order of 5. shard files, where A in A\0 represents the shard file id, and each file to be uploaded corresponds to a shard file id, so each shard file in the same shard file set has the same shard id , 0 represents the index parameter of the fragmented file, that is, the fragmentation order of the fragmented file, A\1, A\2, A\3, A\4 and so on, the fragmented file A\0, A\1, A\2 , A\3, and A\4 form a fragmented file set.
通过上述分片处理,后续将待上传文件分片并行上传,取代了待上传文件直接单一上传的上传方式,提高了文件的上传速度。Through the above-mentioned fragmentation processing, the files to be uploaded are subsequently uploaded in parallel in fragments, which replaces the uploading method of directly uploading the files to be uploaded in a single manner, and improves the uploading speed of the files.
S2、根据所述分片文件集生成上传请求,利用所述上传请求进行索引查询,得到请求校验结果;S2, generating an upload request according to the fragmented file set, and using the upload request to perform an index query to obtain a request verification result;
本发明实施例中,为了将所述分片文件集上传至所述服务端,首先根据所述分片文件集生成上传请求,包括:提取所述分片文件集中每个分片文件的分片文件id及分片文件索引参数得到对应的分片标识,汇总所有所述分片标识得到所述上传请求。In this embodiment of the present invention, in order to upload the fragmented file set to the server, an upload request is first generated according to the fragmented file set, including: extracting the fragment of each fragmented file in the fragmented file set The file id and the segmented file index parameter are used to obtain the corresponding segment identifiers, and all the segment identifiers are aggregated to obtain the upload request.
例如:分片文件集中包含分片文件A\0、A\1、A\2、A\3、A\4,其中A表示分片文件id,0、1、2、3、4表示对应的分片文件的分片文件索引参数,A\0、A\1、A\2、A\3、A\4表示对应的分片文件的分片标识,因此汇总A\0、A\1、A\2、A\3、A\4,得到上传请求。For example: the fragmented file set contains fragmented files A\0, A\1, A\2, A\3, A\4, where A represents the fragmented file id, and 0, 1, 2, 3, and 4 represent the corresponding The segment file index parameters of the segment file, A\0, A\1, A\2, A\3, A\4 represent the segment identifiers of the corresponding segment files, so A\0, A\1, A\2, A\3, A\4, get upload request.
进一步地,本发明实施例中,利用所述上传请求进行索引查询,查询所述服务端是否存在与所述上传请求中对应的文件,得到请求校验结果,例如:所述上传请求中包含文件标识A\0,A\0相当于分片文件A\0的索引地址表示A目录下的0文件,查询服务端A目录下的是否存在0文件,若分片文件0已经上传过,那么服务端存在A目录下的0文件,若分片文件A\0未上传过或上传未完成,那么服务端不存在A目录下的0文件,因此,服务端存在A目录下的0文件,所述请求校验结果为分片文件A\0已上传,服务端不存在A目录下的0文件,所述请求校验结果为分片文件A\0未上传。Further, in this embodiment of the present invention, the upload request is used to perform an index query to query the server for whether there is a file corresponding to the upload request, and a request verification result is obtained, for example: the upload request contains a file Identifies A\0, A\0 is equivalent to the index address of the segmented file A\0, which represents the 0 file in the A directory. It is queried whether there is a 0 file in the A directory of the server. If the segmented file 0 has been uploaded, then the service There are 0 files in the A directory on the server side. If the fragmented file A\0 has not been uploaded or the upload has not been completed, then the server side does not have 0 files in the A directory. Therefore, the server side has 0 files in the A directory. The verification result of the request is that the fragmented file A\0 has been uploaded, and there is no file 0 in the A directory on the server, and the verification result of the request is that the fragmented file A\0 has not been uploaded.
S3、对所述请求校验结果进行签名计算得到期望签名集;S3, performing signature calculation on the request verification result to obtain a desired signature set;
详细地,本发明实施例中,对所述请求校验结果进行签名计算得到期望签名集,包括:In detail, in this embodiment of the present invention, performing signature calculation on the request verification result to obtain an expected signature set, including:
步骤a、若所述请求校验结果中所述分片文件集中对应的分片文件未上传,则计算所述分片文件的文件签名,将所述分片文件的文件签名作为该分片文件的期望文件签名;Step a. If the corresponding fragmented file in the fragmented file set in the request verification result is not uploaded, calculate the file signature of the fragmented file, and use the file signature of the fragmented file as the fragmented file. expected document signature;
本发明实施例中,所述请求校验结果为判断所述分片文件集中每个分片文件是否上传所述服务端,例如:上传请求中包含分片标识A\0、A\1,不同待上传文件对应的分片文件的分片文件id是不同的,同一待上传文件对应的分片文件的分片索引参数是各不相同的,因此分片文件的分片标识A\0、A\1是唯一的,若A\0文件上传过服务端,则服务端中A目录下会存在0文件,若A\1文件上传过服务端,则服务端中A目录下会存在1文件,因此查询服务端中是否存在所述上传请求中对应文件路径的文件,从而判断哪些分片文件未上传过,得到请求校验结果,便于对文件进行续传筛选。In this embodiment of the present invention, the request verification result is to determine whether each fragmented file in the fragmented file set is uploaded to the server. For example, the upload request includes fragment identifiers A\0 and A\1, which are different. The shard file IDs of the shard files corresponding to the file to be uploaded are different, and the shard index parameters of the shard files corresponding to the same file to be uploaded are different. Therefore, the shard identifiers of the shard files are A\0, A \1 is unique. If the A\0 file has been uploaded to the server, there will be 0 files in the A directory of the server. If the A\1 file has been uploaded to the server, there will be 1 file in the A directory of the server. Therefore, it is queried whether there is a file corresponding to the file path in the upload request in the server, so as to determine which segmented files have not been uploaded, and obtain the request verification result, which is convenient for resuming the file selection.
较佳地,本发明实施例中所述期望文件签名为MD5签名。Preferably, the desired file signature in the embodiment of the present invention is an MD5 signature.
步骤b、若所述请求校验结果中所述分片文件集中对应的分片文件已上传,将所述请求校验结果中包含的所述分片文件的服务端文件签名作为该分片文件的期望文件签名;Step b. If the fragmented file corresponding to the fragmented file set in the request verification result has been uploaded, use the server-side file signature of the fragmented file included in the request verification result as the fragmented file expected document signature;
本发明实施例中,所述请求校验结果为判断服务端中是否存在相同的文件路径从而判断文件是否上传,例如:上传请求中包含分片标识A\0、A\1,若A\0文件上传过则服务器A目录下存在0文件,即请求校验结果中A\0已经上传过的,因此将服务端A目录下的0文件的文件签名作为该分片文件的期望文件签名。In the embodiment of the present invention, the request verification result is to determine whether the same file path exists in the server to determine whether the file is uploaded. For example, the upload request contains fragment identifiers A\0 and A\1. If A\0 If the file has been uploaded, there is a 0 file in the server A directory, that is, A\0 in the request verification result has been uploaded. Therefore, the file signature of the 0 file in the server A directory is used as the expected file signature of the fragmented file.
较佳地,本发明实施例中所述文件签名为MD5签名。Preferably, the file signature in the embodiment of the present invention is an MD5 signature.
步骤c、汇总所有的所述期望文件签名,得到所述期望签名集。Step c, summarizing all the desired file signatures to obtain the desired signature set.
本发明实施例中,所述期望签名集中的期望签名与所述分片文件集中的分片文件是一一对应的关系。In the embodiment of the present invention, the desired signatures in the desired signature set and the fragmented files in the fragmented file set are in a one-to-one correspondence.
本发明的另一实施例中,为了保证数据的隐私性,所述期望签名集可以存储在区块链节点中。In another embodiment of the present invention, in order to ensure the privacy of data, the desired signature set may be stored in a blockchain node.
S4、对所述期望签名集进行签名查询得到查询结果;S4, performing a signature query on the desired signature set to obtain a query result;
本发明实施例,查询所述期望签名集中的每个期望签名在所述服务端是否存在相同的文件签名,得到所述查询结果。In the embodiment of the present invention, the query result is obtained by querying whether each expected signature in the expected signature set has the same file signature on the server.
详细地,本发明实施例中,所述查询结果为在所述服务端是否存在与所述期望签名集中每个所述分片文件的期望文件签名相同的文件签名,若所述分片文件的期望文件签名在所述服务端存在相同的文件签名,则说明服务端已经存在所述分片文件。In detail, in this embodiment of the present invention, the query result is whether there is a file signature on the server that is the same as the expected file signature of each fragmented file in the expected signature set. If it is expected that the same file signature exists on the server side, it means that the fragmented file already exists on the server side.
S5、根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,得到上传分片文件集;S5. According to the query result, upload the fragmented file set to a preset server according to a preset upload rule to obtain an uploaded fragmented file set;
详细地,本发明实施例中,根据查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,包括:In detail, in this embodiment of the present invention, according to the query result, uploading the fragmented file set to the preset server according to preset upload rules includes:
步骤i、根据所述分片文件集在所述服务端创建对应的空白文件;Step i, create a corresponding blank file on the server side according to the fragmented file set;
例如:所述分片文件集包含分片文件A\0、A\1,则在所述服务创建A目录下的空白0文件及A目录下的空白1文件。For example, if the fragmented file set includes fragmented files A\0 and A\1, the service creates a blank 0 file in the A directory and a blank 1 file in the A directory.
步骤ii、根据所述查询结果,判断所述期望签名集中的期望签名在所述服务端是否存在相同的文件签名;Step ii, according to the query result, determine whether the desired signature in the desired signature set has the same file signature on the server;
步骤iii、若所述期望签名在所述服务端存在相同的文件签名,将所述期望签名对应的所述空白文件索引指向所述服务端对应文件签名对应的文件,得到对应的上传分片文件;Step iii. If the desired signature has the same file signature on the server, point the blank file index corresponding to the desired signature to the file corresponding to the corresponding file signature on the server, and obtain the corresponding uploaded fragmented file ;
本发明实施例中,若所述服务端存在与所述期望签名相同的文件签名,则说明服务端已经存在所述分片文件集中所述期望签名对应的分片文件相同的文件,不需要再重新上传该分片文件,将该分片文件的文件索引指向服务端对应的文件块,例如:分片文件A\0与服务端中C目录下的0文件的文件签名相同,并将A目录下空白0文件索引指向C目录下的0文件对应的文件块,得到分片文件A\0对应的上传分片文件,实现文件的急速上传。In this embodiment of the present invention, if the server has a file signature that is the same as the expected signature, it means that the server already has a file that is the same as the fragmented file corresponding to the expected signature in the fragmented file set, and there is no need to further Re-upload the fragmented file, and point the file index of the fragmented file to the corresponding file block on the server. For example, the file signature of the fragmented file A\0 is the same as the file signature of the 0 file in the C directory on the server, and the A directory The blank 0 file index below points to the file block corresponding to the 0 file in the C directory, and the uploaded fragment file corresponding to the fragment file A\0 is obtained to realize the rapid upload of the file.
步骤iv、若所述期望签名在所述服务端不存在相同的文件签名,将所述分片文件集中所述期望签名对应的分片文件包含的文件流传输并保存在所述期望签名应的所述空白文件中,得到对应的上传分片文件。Step iv. If the desired signature does not have the same file signature on the server, stream the file contained in the fragmented file corresponding to the desired signature in the fragmented file set and save it in the desired signature. In the blank file, the corresponding uploaded fragmented file is obtained.
本发明实施例中,若所述服务端不存在与所述期望签名相同的文件签名,则说明服务端不存在与所述分片文件集中所述期望签名对应的分片文件相同的文件,需要上传该分片文件的文件流并保存在对应的所述空白文件中,得到对应的上传分片文件。例如:,例如:所述服务端中不存文件的文件签名与分片文件A\0的期望签名相同,将分片文件A\0包含的文件流传输到服务端并保存在服务端A目录下空白0文件中,得到分片文件A\0对应的上传分片文件。In this embodiment of the present invention, if the server does not have a file signature that is the same as the expected signature, it means that the server does not have a file that is the same as the fragmented file corresponding to the expected signature in the fragmented file set. The file stream of the fragmented file is uploaded and stored in the corresponding blank file to obtain the corresponding uploaded fragmented file. For example: For example: the file signature of the unsaved file in the server is the same as the expected signature of the fragmented file A\0, stream the files contained in the fragmented file A\0 to the server and save it in the server A directory In the blank 0 file below, the uploaded fragment file corresponding to the fragment file A\0 is obtained.
步骤v、汇总所有的所述上传分片文件,得到所述上传分片文件集。Step v. Aggregate all the uploaded fragmented files to obtain the uploaded fragmented file set.
S6、对所述上传分片文件集进行合并处理,得到目标上传文件。S6. Perform merging processing on the uploaded file set to obtain a target upload file.
本发明实施例中,例如:所述分片文件集中包含分片文件A\0、分片文件A\1、分片文件A\2,服务端接收所述分片文件集,因此服务端对应创建A目录下的0、1、2文件,服务端A目录下的0、1、2文件对应的文件块集合为上传分片文件集。In this embodiment of the present invention, for example, the fragmented file set includes fragmented file A\0, fragmented file A\1, and fragmented file A\2, and the server receives the fragmented file set, so the server corresponds to Create files 0, 1, and 2 in the A directory, and the set of file blocks corresponding to the files 0, 1, and 2 in the A directory of the server is the set of uploaded fragmented files.
进一步地,参照图2所示,本发明实施例中所述对所述上传分片文件集进行合并处理,得到目标上传文件,包括:Further, referring to FIG. 2 , in the embodiment of the present invention, the uploading fragmented file set is merged to obtain the target uploading file, including:
S61、对所述上传分片文件集进行分片校验合并,得到上传文件;S61, performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file;
详细地,本发明实施例中对所述上传分片文件集进行分片校验合并,得到上传文件,包括:计算所述上传分片文件集中每个上传分片文件的文件签名,得到对应的上传分片文件签名;汇总所有的所述上传分片文件签名,得到上传分片文件签名集;判断所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名是否一致,得到上传结果;若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名一致,将所述上传结果返回预设客户端,将所述上传分片文件集中所有的所述上传分片文件进行合并,得到所述上传文件;若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名不一致,将所述上传结果所述客户端。In detail, in this embodiment of the present invention, performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file includes: calculating the file signature of each uploaded fragmented file in the uploaded fragmented file set, and obtaining the corresponding Uploading the signature of the segmented file; summarizing all the signatures of the uploaded segmented file to obtain the signature set of the uploaded segmented file; Whether the expected file signatures of the fragmented files are consistent, the upload result is obtained; if the signature of each uploaded fragmented file in the uploaded file signature set is consistent with the expected file signature of the corresponding fragmented file in the expected file signature set, Return the upload result to the preset client, and combine all the upload segment files in the upload segment file set to obtain the upload file; if each upload segment in the upload file signature set is If the fragment file signature is inconsistent with the expected file signature of the corresponding fragmented file in the expected file signature set, the client sends the upload result to the client.
例如:服务端A目录下0、1文件对应的文件块集合为上传分片文件集,所以计算服务端A目录下0文件对应的文件块的文件签名与分片文件A\0的文件签名进行比较判断,计算服务端A目录下1文件对应的文件块的文件签名与分片文件A\1的文件签名进行比较判断,从而验证上传分片文件与对应分片文件是否一致,若一致返回所述客户端分片文件A\0及分片文件A\1上传成功的上传结果并进行后续合并;若1文件对应的文件签名不一致说明对应的分片文件上传有误,返回所述客户端分片文件A\0上传成功、分片文件A\1上传失败的上传结果。For example: the set of file blocks corresponding to files 0 and 1 in the directory A of the server is the set of uploaded shard files, so the file signature of the file block corresponding to the file 0 in the directory A of the server is calculated and the file signature of the shard file A\0 is calculated. Comparing and judging, the file signature of the file block corresponding to file 1 in the A directory of the computing server is compared with the file signature of the fragmented file A\1, so as to verify whether the uploaded fragmented file is consistent with the corresponding fragmented file. Describe the successful upload results of the client-side segmented file A\0 and segmented file A\1 and perform subsequent merging; if the file signatures corresponding to file 1 are inconsistent, it means that the corresponding segmented file is uploaded incorrectly, and return the client-side segmented file. The upload result of the upload of the segment file A\0 is successful and the upload of the segment file A\1 is unsuccessful.
S62、对所述上传文件进行分段读取校验,得到所述目标上传文件;S62, performing segment read verification on the uploaded file to obtain the target upload file;
本发明实施例中,为了确保所述上传分片文件集中的上传分片文件在合并的过程中没有出现错误,需要对所述上传文件进行分段读取校验,包括:In this embodiment of the present invention, in order to ensure that the uploaded fragmented files in the uploaded fragmented file set do not have errors in the process of merging, it is necessary to perform segment read verification on the uploaded files, including:
步骤M、根据所述上传文件签名集进行完整文件签名计算,得到完整文件签名;Step M, carry out the complete file signature calculation according to the uploaded file signature set to obtain the complete file signature;
详细地,本发明实施例中,所述完整文件签名计算可用以下公式进行计算:In detail, in this embodiment of the present invention, the complete file signature calculation can be calculated by the following formula:
fakeMd5expect=∑md5ifakeMd5expect =∑md5i
其中,所述fakeMd5expect为完整文件签名,所述md5i为所述上传文件签名集中第i个上传分片文件的文件签名,i为所述上传文件签名集中对应的上传分片文件的分片文件索引参数。Wherein, the fakeMd5expect is the complete file signature, the md5i is the file signature of the i-th uploaded fragmented file in the uploaded file signature set, and i is the fragment of the uploaded fragmented file corresponding to the uploaded file signature set File index parameter.
步骤N、对所述上传文件进行分段读取及签名计算处理,得到上传文件签名;Step N, performing segmental reading and signature calculation processing on the uploaded file to obtain the uploaded file signature;
详细地,本发明实施例中,对所述上传文件进行分段读取及签名计算处理,包括:In detail, in this embodiment of the present invention, performing segment reading and signature calculation processing on the uploaded file includes:
步骤I、按照预设的分片长度依次对所述上传文件进行读取直至完全读取,计算每次读取的文件流的文件签名,得到读取文件签名集;Step 1, according to the preset fragment length, read the uploaded file successively until fully read, calculate the file signature of the file stream read each time, and obtain the read file signature set;
步骤II、利用所述读取文件签名集进行上传文件签名计算,得到所述上传文件签名;Step II, utilize the described read file signature set to carry out upload file signature calculation, obtain described upload file signature;
详细地,本发明实施例中,所述上传文件签名计算可用如下公式进行计算:In detail, in the embodiment of the present invention, the upload file signature calculation can be calculated by the following formula:
fakeMd5fact=∑MD5nfakeMd5fact =∑MD5n
其中,所述fakeMd5fact为所述上传文件签名,所述MD5n为所述上传文件读取过程中,第n次读取的文件流的文件签名,n表示所述上传文件读取过程文件流读取的顺序。Wherein, the fakeMd5fact is the signature of the uploaded file, the MD5n is the file signature of the file stream read for the nth time in the process of reading the uploaded file, and n represents the file stream in the reading process of the uploaded file read order.
步骤O、判断所述完整文件签名与所述上传文件签名是否一致;若所述完整文件签名与所述上传文件签名一致,将所述上传文件确定为所述目标上传文件,返回所述客户端上传成功提醒;若所述完整文件签名与所述上传文件签名不一致,返回所述将所述上传分片文件集中所有的所述上传分片文件进行合并步骤,并记录返回次数,若所述返回次数达到预定次数且所述完整文件签名与所述上传文件签名仍不一致,返回所述客户端文件上传失败提醒。Step O, judge whether the signature of the complete file is consistent with the signature of the uploaded file; if the signature of the complete file is consistent with the signature of the uploaded file, determine the uploaded file as the target upload file, and return to the client Upload successful reminder; if the complete file signature is inconsistent with the uploaded file signature, return to the step of merging all the uploaded fragmented files in the uploaded fragmented file set, and record the number of returns, if the return When the number of times reaches a predetermined number and the signature of the complete file is still inconsistent with the signature of the uploaded file, the client-side file upload failure notification is returned.
如图3所示,是本发明文件上传装置的功能模块图。As shown in FIG. 3 , it is a functional block diagram of the file uploading device of the present invention.
本发明所述文件上传装置100可以安装于电子设备中。根据实现的功能,所述文件上传装置可以包括文件分片模块101、分片上传模块102、验证合并模块103。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The file uploading apparatus 100 of the present invention can be installed in an electronic device. According to the implemented functions, the file uploading apparatus may include a file fragmentation module 101 , a fragmentation uploading module 102 , and a verification and merging module 103 . The modules described in the present invention can also be called units, which refer to a series of computer program segments that can be executed by the electronic device processor and can perform fixed functions, and are stored in the memory of the electronic device.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述文件分片模块101用于获取待上传文件,对所述待上传文件进行分片处理,得到分片文件集。The file fragmentation module 101 is configured to obtain a file to be uploaded, perform fragmentation processing on the to-be-uploaded file, and obtain a fragmented file set.
本发明实施例中,所述待上传文件为包含的字节数过多的文件,所述待上传文件可以为执行深度学习训练所需语料。In the embodiment of the present invention, the to-be-uploaded file is a file containing too many bytes, and the to-be-uploaded file may be a corpus required for performing deep learning training.
进一步地,为了提升所述待上传文件的上传速度,本发明实施例所述文件分片模块101对所述待上传文件进行分片处理,包括:根据预设的分片长度对所述待上传文件进行分片及id索引标记,得到分片文件集,其中,所述分片文件集包括每个分片文件的分片文件id及分片文件索引参数;例如:待上传文件A的大小为5T,预设的分片长度为1T,那么可以将待上传文件A依次分为分片文件A\0、分片文件A\1、分片文件A\2、分片文件A\3、分片文件A\4共5个分片文件,其中,A\0中A表示分片文件id,每个待上传文件对应一种分片文件id,所以同一个分片文件集中的每个分片文件的分片id均相同,0表示分片文件索引参数即分片文件的分片顺序,A\1、A\2、A\3、A\4以此类推,分片文件A\0、A\1、A\2、A\3、A\4组成分片文件集。Further, in order to improve the uploading speed of the to-be-uploaded file, the file fragmentation module 101 according to the embodiment of the present invention performs fragmentation processing on the to-be-uploaded file, including: according to a preset fragment length The file is fragmented and marked with an id index to obtain a fragmented file set, wherein the fragmented file set includes the fragmented file id and fragmented file index parameters of each fragmented file; for example: the size of the file A to be uploaded is 5T, the preset segment length is 1T, then the file A to be uploaded can be divided into segment file A\0, segment file A\1, segment file A\2, segment file A\3, segment file A\3, segment file A\1, segment file A\2, segment file A\3, segment file A\1 There are 5 shard files in the shard file A\4, where A in A\0 represents the shard file id, and each file to be uploaded corresponds to a shard file id, so each shard in the same shard file set The shard ids of the files are all the same. 0 indicates the index parameter of the shard file, that is, the shard order of the shard file, A\1, A\2, A\3, A\4 and so on. The shard file A\0, A\1, A\2, A\3, and A\4 form a fragmented file set.
通过上述分片处理,后续将待上传文件分片并行上传,取代了待上传文件直接单一上传的上传方式,提高了文件的上传速度。Through the above-mentioned fragmentation processing, the files to be uploaded are subsequently uploaded in parallel in fragments, which replaces the uploading method of directly uploading the files to be uploaded in a single manner, and improves the uploading speed of the files.
所述分片上传模块102用于根据所述分片文件集生成上传请求,利用所述上传请求进行索引查询,得到请求校验结果;对所述请求校验结果进行签名计算得到期望签名集;对所述期望签名集进行签名查询得到查询结果;根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,得到上传分片文件集。The segment uploading module 102 is configured to generate an upload request according to the segment file set, perform an index query by using the upload request, and obtain a request verification result; perform signature calculation on the request verification result to obtain an expected signature set; A signature query is performed on the desired signature set to obtain a query result; according to the query result, the fragmented file set is uploaded to a preset server according to a preset upload rule to obtain an uploaded fragmented file set.
本发明实施例中,为了将所述分片文件集上传至所述服务端,所述分片上传模块102根据所述分片文件集生成上传请求,包括:提取所述分片文件集中每个分片文件的分片文件id及分片文件索引参数得到对应的分片标识,汇总所有所述分片标识得到所述上传请求。In this embodiment of the present invention, in order to upload the fragmented file set to the server, the fragment uploading module 102 generates an upload request according to the fragmented file set, including: extracting each of the fragmented file sets The shard file id of the shard file and the shard file index parameter obtain the corresponding shard identifier, and all the shard identifiers are aggregated to obtain the upload request.
例如:分片文件集中包含分片文件A\0、A\1、A\2、A\3、A\4,其中A表示分片文件id,0、1、2、3、4表示对应的分片文件的分片文件索引参数,A\0、A\1、A\2、A\3、A\4表示对应的分片文件的分片标识,因此汇总A\0、A\1、A\2、A\3、A\4,得到上传请求。For example: the fragmented file set contains fragmented files A\0, A\1, A\2, A\3, A\4, where A represents the fragmented file id, and 0, 1, 2, 3, and 4 represent the corresponding The segment file index parameters of the segment file, A\0, A\1, A\2, A\3, A\4 represent the segment identifiers of the corresponding segment files, so A\0, A\1, A\2, A\3, A\4, get upload request.
进一步地,本发明实施例中,利用所述上传请求进行索引查询,查询所述服务端是否存在与所述上传请求中对应的文件,得到请求校验结果,例如:所述上传请求中包含文件标识A\0,A\0相当于分片文件A\0的索引地址表示A目录下的0文件,查询服务端A目录下的是否存在0文件,若分片文件0已经上传过,那么服务端存在A目录下的0文件,若分片文件A\0未上传过或上传未完成,那么服务端不存在A目录下的0文件,因此,服务端存在A目录下的0文件,所述请求校验结果为分片文件A\0已上传,服务端不存在A目录下的0文件,所述请求校验结果为分片文件A\0未上传。Further, in this embodiment of the present invention, the upload request is used to perform an index query to query the server for whether there is a file corresponding to the upload request, and a request verification result is obtained, for example: the upload request contains a file Identifies A\0, A\0 is equivalent to the index address of the segmented file A\0, which represents the 0 file in the A directory. It is queried whether there is a 0 file in the A directory of the server. If the segmented file 0 has been uploaded, then the service There are 0 files in the A directory on the server side. If the fragmented file A\0 has not been uploaded or the upload has not been completed, then the server side does not have 0 files in the A directory. Therefore, the server side has 0 files in the A directory. The verification result of the request is that the fragmented file A\0 has been uploaded, and there is no file 0 in the A directory on the server, and the verification result of the request is that the fragmented file A\0 has not been uploaded.
详细地,本发明实施例中,所述分片上传模块102利用如下手段对所述请求校验结果进行签名计算得到期望签名集,包括:In detail, in this embodiment of the present invention, the fragment uploading module 102 uses the following means to perform signature calculation on the request verification result to obtain a desired signature set, including:
若所述请求校验结果中所述分片文件集中对应的分片文件未上传,则计算所述分片文件的文件签名,将所述分片文件的文件签名作为该分片文件的期望文件签名;If the fragmented file corresponding to the fragmented file set in the request verification result has not been uploaded, the file signature of the fragmented file is calculated, and the file signature of the fragmented file is used as the expected file of the fragmented file sign;
本发明实施例中,所述请求校验结果为判断所述分片文件集中每个分片文件是否上传所述服务端,例如:上传请求中包含分片标识A\0、A\1,不同待上传文件对应的分片文件的分片文件id是不同的,同一待上传文件对应的分片文件的分片索引参数是各不相同的,因此分片文件的分片标识A\0、A\1是唯一的,若A\0文件上传过服务端,则服务端中A目录下会存在0文件,若A\1文件上传过服务端,则服务端中A目录下会存在1文件,因此查询服务端中是否存在所述上传请求中对应文件路径的文件,从而判断哪些分片文件未上传过,得到请求校验结果,便于对文件进行续传筛选。In this embodiment of the present invention, the request verification result is to determine whether each fragmented file in the fragmented file set is uploaded to the server. For example, the upload request includes fragment identifiers A\0 and A\1, which are different. The shard file IDs of the shard files corresponding to the file to be uploaded are different, and the shard index parameters of the shard files corresponding to the same file to be uploaded are different. Therefore, the shard identifiers of the shard files are A\0, A \1 is unique. If the A\0 file has been uploaded to the server, there will be 0 files in the A directory of the server. If the A\1 file has been uploaded to the server, there will be 1 file in the A directory of the server. Therefore, it is queried whether there is a file corresponding to the file path in the upload request in the server, so as to determine which segmented files have not been uploaded, and obtain the request verification result, which is convenient for resuming the file selection.
较佳地,本发明实施例中所述期望文件签名为MD5签名。Preferably, the desired file signature in the embodiment of the present invention is an MD5 signature.
若所述请求校验结果中所述分片文件集中对应的分片文件已上传,将所述请求校验结果中包含的所述分片文件的服务端文件签名作为该分片文件的期望文件签名;If the fragmented file corresponding to the fragmented file set in the request verification result has been uploaded, the server-side file signature of the fragmented file contained in the request verification result is taken as the expected file of the fragmented file sign;
本发明实施例中,所述请求校验结果为判断服务端中是否存在相同的文件路径从而判断文件是否上传,例如:上传请求中包含分片标识A\0、A\1,若A\0文件上传过则服务器A目录下存在0文件,即请求校验结果中A\0已经上传过的,因此将服务端A目录下的0文件的文件签名作为该分片文件的期望文件签名。In the embodiment of the present invention, the request verification result is to determine whether the same file path exists in the server to determine whether the file is uploaded. For example, the upload request contains fragment identifiers A\0 and A\1. If A\0 If the file has been uploaded, there is a 0 file in the server A directory, that is, A\0 in the request verification result has been uploaded. Therefore, the file signature of the 0 file in the server A directory is used as the expected file signature of the fragmented file.
较佳地,本发明实施例中所述文件签名为MD5签名。Preferably, the file signature in the embodiment of the present invention is an MD5 signature.
汇总所有的所述期望文件签名,得到所述期望签名集。All the expected file signatures are aggregated to obtain the expected signature set.
本发明实施例中,所述期望签名集中的期望签名与所述分片文件集中的分片文件是一一对应的关系。In the embodiment of the present invention, the desired signatures in the desired signature set and the fragmented files in the fragmented file set are in a one-to-one correspondence.
本发明的另一实施例中,为了保证数据的隐私性,所述期望签名集可以存储在区块链节点中。In another embodiment of the present invention, in order to ensure the privacy of data, the desired signature set may be stored in a blockchain node.
本发明实施例,所述分片上传模块102查询所述期望签名集中的每个期望签名在所述服务端是否存在相同的文件签名,得到所述查询结果。In this embodiment of the present invention, the segment uploading module 102 queries whether each desired signature in the desired signature set has the same file signature on the server, and obtains the query result.
详细地,本发明实施例中,所述查询结果为在所述服务端是否存在与所述期望签名集中每个所述分片文件的期望文件签名相同的文件签名,若所述分片文件的期望文件签名在所述服务端存在相同的文件签名,则说明服务端已经存在所述分片文件。In detail, in this embodiment of the present invention, the query result is whether there is a file signature on the server that is the same as the expected file signature of each fragmented file in the expected signature set. If it is expected that the same file signature exists on the server side, it means that the fragmented file already exists on the server side.
详细地,本发明实施例中,所述分片上传模块102利用如下手段将所述分片文件集上传到所述服务端,包括:In detail, in this embodiment of the present invention, the segment uploading module 102 uploads the segment file set to the server by using the following means, including:
根据所述分片文件集在所述服务端创建对应的空白文件;Create a corresponding blank file on the server according to the fragmented file set;
例如:所述分片文件集包含分片文件A\0、A\1,则在所述服务创建A目录下的空白0文件及A目录下的空白1文件。For example, if the fragmented file set includes fragmented files A\0 and A\1, the service creates a blank 0 file in the A directory and a blank 1 file in the A directory.
根据所述查询结果,判断所述期望签名集中的期望签名在所述服务端是否存在相同的文件签名;According to the query result, determine whether the desired signatures in the desired signature set have the same file signature on the server;
若所述期望签名在所述服务端存在相同的文件签名,将所述期望签名对应的所述空白文件索引指向所述服务端对应文件签名对应的文件,得到对应的上传分片文件;If the desired signature has the same file signature on the server, point the blank file index corresponding to the desired signature to the file corresponding to the corresponding file signature on the server to obtain the corresponding uploaded fragmented file;
本发明实施例中,若所述服务端存在与所述期望签名相同的文件签名,则说明服务端已经存在所述分片文件集中所述期望签名对应的分片文件相同的文件,不需要再重新上传该分片文件,将该分片文件的文件索引指向服务端对应的文件块,例如:分片文件A\0与服务端中C目录下的0文件的文件签名相同,并将A目录下空白0文件索引指向C目录下的0文件对应的文件块,得到分片文件A\0对应的上传分片文件,实现文件的急速上传。In this embodiment of the present invention, if the server has a file signature that is the same as the expected signature, it means that the server already has a file that is the same as the fragmented file corresponding to the expected signature in the fragmented file set, and there is no need to further Re-upload the fragmented file, and point the file index of the fragmented file to the corresponding file block on the server. For example, the file signature of the fragmented file A\0 is the same as the file signature of the 0 file in the C directory on the server, and the A directory The blank 0 file index below points to the file block corresponding to the 0 file in the C directory, and the uploaded fragment file corresponding to the fragment file A\0 is obtained to realize the rapid upload of the file.
若所述期望签名在所述服务端不存在相同的文件签名,将所述分片文件集中所述期望签名对应的分片文件包含的文件流传输并保存在所述期望签名应的所述空白文件中,得到对应的上传分片文件。If the expected signature does not have the same file signature on the server, stream the file contained in the fragmented file corresponding to the expected signature in the fragmented file set and save it in the blank corresponding to the expected signature file, get the corresponding uploaded fragment file.
本发明实施例中,若所述服务端不存在与所述期望签名相同的文件签名,则说明服务端不存在与所述分片文件集中所述期望签名对应的分片文件相同的文件,需要上传该分片文件的文件流并保存在对应的所述空白文件中,得到对应的上传分片文件。例如:,例如:所述服务端中不存文件的文件签名与分片文件A\0的期望签名相同,将分片文件A\0包含的文件流传输到服务端并保存在服务端A目录下空白0文件中,得到分片文件A\0对应的上传分片文件。In this embodiment of the present invention, if the server does not have a file signature that is the same as the expected signature, it means that the server does not have a file that is the same as the fragmented file corresponding to the expected signature in the fragmented file set. The file stream of the fragmented file is uploaded and stored in the corresponding blank file to obtain the corresponding uploaded fragmented file. For example: For example: the file signature of the unsaved file in the server is the same as the expected signature of the fragmented file A\0, stream the files contained in the fragmented file A\0 to the server and save it in the server A directory In the blank 0 file below, the uploaded fragment file corresponding to the fragment file A\0 is obtained.
汇总所有的所述上传分片文件,得到所述上传分片文件集。All the uploaded fragmented files are aggregated to obtain the uploaded fragmented file set.
所述验证合并模块103用于对所述上传分片文件集进行合并处理,得到目标上传文件。The verification and merging module 103 is configured to perform merging processing on the uploaded fragmented file set to obtain the target upload file.
本发明实施例中,例如:所述分片文件集中包含分片文件A\0、分片文件A\1、分片文件A\2,服务端接收所述分片文件集,因此服务端对应创建A目录下的0、1、2文件,服务端A目录下的0、1、2文件对应的文件块集合为上传分片文件集。In this embodiment of the present invention, for example, the fragmented file set includes fragmented file A\0, fragmented file A\1, and fragmented file A\2, and the server receives the fragmented file set, so the server corresponds to Create files 0, 1, and 2 in the A directory, and the set of file blocks corresponding to the files 0, 1, and 2 in the A directory of the server is the set of uploaded fragmented files.
进一步地,参照图2所示,本发明实施例中所述验证合并模块103利用如下手段对所述上传分片文件集进行合并处理,得到目标上传文件,包括:Further, as shown in FIG. 2 , in the embodiment of the present invention, the verification merging module 103 performs merging processing on the uploaded fragmented file set by using the following means to obtain a target upload file, including:
对所述上传分片文件集进行分片校验合并,得到上传文件;Performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file;
详细地,本发明实施例中对所述上传分片文件集进行分片校验合并,得到上传文件,包括:计算所述上传分片文件集中每个上传分片文件的文件签名,得到对应的上传分片文件签名;汇总所有的所述上传分片文件签名,得到上传分片文件签名集;判断所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名是否一致,得到上传结果;若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名一致,将所述上传结果返回预设客户端,将所述上传分片文件集中所有的所述上传分片文件进行合并,得到所述上传文件;若所述上传文件签名集中的每个所述上传分片文件签名与所述期望文件签名集中对应的分片文件的期望文件签名不一致,将所述上传结果所述客户端。In detail, in this embodiment of the present invention, performing fragment verification and merging on the uploaded fragmented file set to obtain the uploaded file includes: calculating the file signature of each uploaded fragmented file in the uploaded fragmented file set, and obtaining the corresponding Uploading the signature of the segmented file; summarizing all the signatures of the uploaded segmented file to obtain the signature set of the uploaded segmented file; Whether the expected file signatures of the fragmented files are consistent, the upload result is obtained; if the signature of each uploaded fragmented file in the uploaded file signature set is consistent with the expected file signature of the corresponding fragmented file in the expected file signature set, Return the upload result to the preset client, and combine all the upload segment files in the upload segment file set to obtain the upload file; if each upload segment in the upload file signature set is If the fragment file signature is inconsistent with the expected file signature of the corresponding fragmented file in the expected file signature set, the client sends the upload result to the client.
例如:服务端A目录下0、1文件对应的文件块集合为上传分片文件集,所以计算服务端A目录下0文件对应的文件块的文件签名与分片文件A\0的文件签名进行比较判断,计算服务端A目录下1文件对应的文件块的文件签名与分片文件A\1的文件签名进行比较判断,从而验证上传分片文件与对应分片文件是否一致,若一致返回所述客户端分片文件A\0及分片文件A\1上传成功的上传结果并进行后续合并;若1文件对应的文件签名不一致说明对应的分片文件上传有误,返回所述客户端分片文件A\0上传成功、分片文件A\1上传失败的上传结果。For example: the set of file blocks corresponding to files 0 and 1 in the directory A of the server is the set of uploaded shard files, so the file signature of the file block corresponding to the file 0 in the directory A of the server is calculated and the file signature of the shard file A\0 is calculated. Comparing and judging, the file signature of the file block corresponding to file 1 in the A directory of the computing server is compared with the file signature of the fragmented file A\1, so as to verify whether the uploaded fragmented file is consistent with the corresponding fragmented file. Describe the successful upload results of the client-side segmented file A\0 and segmented file A\1 and perform subsequent merging; if the file signatures corresponding to file 1 are inconsistent, it means that the corresponding segmented file is uploaded incorrectly, and return the client-side segmented file. The upload result of the upload of the segment file A\0 is successful and the upload of the segment file A\1 is unsuccessful.
对所述上传文件进行分段读取校验,得到所述目标上传文件;Perform segmental read verification on the uploaded file to obtain the target upload file;
本发明实施例中,为了确保所述上传分片文件集中的上传分片文件在合并的过程中没有出现错误,所述验证合并模块103利用如下手段对所述上传文件进行分段读取校验,包括:In this embodiment of the present invention, in order to ensure that there is no error in the process of merging the uploaded fragmented files in the uploaded fragmented file set, the verification and merging module 103 uses the following means to perform fragment read verification on the uploaded files ,include:
根据所述上传文件签名集进行完整文件签名计算,得到完整文件签名;Perform complete file signature calculation according to the uploaded file signature set to obtain a complete file signature;
详细地,本发明实施例中,所述完整文件签名计算可用以下公式进行计算:In detail, in this embodiment of the present invention, the complete file signature calculation can be calculated by the following formula:
fakeMd5expect=∑md5ifakeMd5expect =∑md5i
其中,所述fakeMd5expect为完整文件签名,所述md5i为所述上传文件签名集中第i个上传分片文件的文件签名,i为所述上传文件签名集中对应的上传分片文件的分片文件索引参数。Wherein, the fakeMd5expect is the complete file signature, the md5i is the file signature of the i-th uploaded fragmented file in the uploaded file signature set, and i is the fragment of the uploaded fragmented file corresponding to the uploaded file signature set File index parameter.
对所述上传文件进行分段读取及签名计算处理,得到上传文件签名;Performing segmental reading and signature calculation processing on the uploaded file to obtain the uploaded file signature;
详细地,本发明实施例中,所述验证合并模块103利用如下手段对所述上传文件进行分段读取及签名计算处理,包括:In detail, in this embodiment of the present invention, the verification and merging module 103 uses the following means to perform segment reading and signature calculation processing on the uploaded file, including:
按照预设的分片长度依次对所述上传文件进行读取直至完全读取,计算每次读取的文件流的文件签名,得到读取文件签名集;Read the uploaded file in sequence according to the preset fragment length until it is completely read, calculate the file signature of the file stream read each time, and obtain the read file signature set;
利用所述读取文件签名集进行上传文件签名计算,得到所述上传文件签名;Utilize the read file signature set to perform upload file signature calculation to obtain the upload file signature;
详细地,本发明实施例中,所述上传文件签名计算可用如下公式进行计算:In detail, in the embodiment of the present invention, the upload file signature calculation can be calculated by the following formula:
fakeMd5fact=∑MD5nfakeMd5fact =∑MD5n
其中,所述fakeMd5fact为所述上传文件签名,所述MD5n为所述上传文件读取过程中,第n次读取的文件流的文件签名,n表示所述上传文件读取过程文件流读取的顺序。Wherein, the fakeMd5fact is the signature of the uploaded file, the MD5n is the file signature of the file stream read for the nth time in the process of reading the uploaded file, and n represents the file stream in the reading process of the uploaded file read order.
判断所述完整文件签名与所述上传文件签名是否一致;若所述完整文件签名与所述上传文件签名一致,将所述上传文件确定为所述目标上传文件,返回所述客户端上传成功提醒;若所述完整文件签名与所述上传文件签名不一致,返回所述将所述上传分片文件集中所有的所述上传分片文件进行合并步骤,并记录返回次数,若所述返回次数达到预定次数且所述完整文件签名与所述上传文件签名仍不一致,返回所述客户端文件上传失败提醒。Determine whether the signature of the complete file is consistent with the signature of the uploaded file; if the signature of the complete file is consistent with the signature of the uploaded file, determine the uploaded file as the target upload file, and return a notification of successful upload to the client ; If the signature of the complete file is inconsistent with the signature of the uploaded file, return to the step of merging all the uploaded fragmented files in the uploaded fragmented file set, and record the number of times of return, if the number of times of return reaches the predetermined number of times number of times and the complete file signature is still inconsistent with the uploaded file signature, return the client file upload failure reminder.
如图4所示,是本发明实现文件上传方法的电子设备的结构示意图。As shown in FIG. 4 , it is a schematic structural diagram of an electronic device implementing the file uploading method according to the present invention.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如文件上传程序。The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a file upload program.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如文件上传程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 . In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code of a file uploading program, etc., but also can be used to temporarily store data that has been output or will be output.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如文件上传程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits. Central processing unit (Central Processing Unit, CPU), microprocessor, digital processing chip, graphics processor and combination of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and by running or executing the programs or modules (such as files) stored in the memory 11. upload programs, etc.), and call the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (extended industry standard architecture, EISA for short) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
图4仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图4示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 4 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 4 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the drawings. components, or a combination of certain components, or a different arrangement of components.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management The device implements functions such as charge management, discharge management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device 1 may further include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. The display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the described embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的文件上传程序12是多个指令的组合,在所述处理器10中运行时,可以实现:The file uploading program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
获取待上传文件,对所述待上传文件进行分片处理,得到分片文件集;Obtaining a file to be uploaded, and performing fragmentation processing on the file to be uploaded to obtain a fragmented file set;
根据所述分片文件集生成上传请求,利用所述上传请求进行索引查询,得到请求校验结果;Generate an upload request according to the fragmented file set, and use the upload request to perform an index query to obtain a request verification result;
对所述请求校验结果进行签名计算得到期望签名集;Perform signature calculation on the request verification result to obtain a desired signature set;
对所述期望签名集进行签名查询得到查询结果;Performing a signature query on the desired signature set to obtain a query result;
根据所述查询结果,将所述分片文件集按照预设的上传规则上传到预设服务端,得到上传分片文件集;According to the query result, upload the fragmented file set to a preset server according to a preset upload rule to obtain an uploaded fragmented file set;
对所述上传分片文件集进行合并处理,得到目标上传文件。The uploading fragmented file set is merged to obtain the target uploading file.
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instruction by the processor 10, reference may be made to the description of the relevant steps in the corresponding embodiment of FIG. 1, and details are not described herein.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the modules/units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) .
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。Further, the computer usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like; using the created data, etc.
在本发明所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the invention is to be defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the claims. All changes within the meaning and range of the equivalents of , are included in the present invention. Any reference signs in the claims shall not be construed as limiting the involved claim.
本发明所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。Furthermore, it is clear that the word "comprising" does not exclude other elements or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011220406.2ACN112347042A (en) | 2020-11-05 | 2020-11-05 | File uploading method and device, electronic equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011220406.2ACN112347042A (en) | 2020-11-05 | 2020-11-05 | File uploading method and device, electronic equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN112347042Atrue CN112347042A (en) | 2021-02-09 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011220406.2APendingCN112347042A (en) | 2020-11-05 | 2020-11-05 | File uploading method and device, electronic equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN112347042A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113392066A (en)* | 2021-06-11 | 2021-09-14 | 上海妙一生物科技有限公司 | Universal catalog management method and device and computer equipment |
| CN113792323A (en)* | 2021-11-15 | 2021-12-14 | 聊城高新生物技术有限公司 | Sensitive data encryption method and device based on agricultural products and electronic equipment |
| CN114024955A (en)* | 2021-11-01 | 2022-02-08 | 北京来也网络科技有限公司 | File processing method, device, equipment and medium based on RPA and AI |
| CN115002100A (en)* | 2022-05-27 | 2022-09-02 | 平安普惠企业管理有限公司 | File transmission method and device, electronic equipment and storage medium |
| CN115150388A (en)* | 2022-06-24 | 2022-10-04 | 中国建设银行股份有限公司 | File uploading and file uploading state query method, equipment and storage medium thereof |
| CN115174555A (en)* | 2022-06-28 | 2022-10-11 | 平安科技(深圳)有限公司 | File transmission method and device, electronic equipment and storage medium |
| CN116233120A (en)* | 2023-05-10 | 2023-06-06 | 深圳普菲特信息科技股份有限公司 | Large file fragment transmission method, system and medium based on data processing |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106101291A (en)* | 2016-08-26 | 2016-11-09 | 苏州蓝海彤翔系统科技有限公司 | A kind of transmit the method for file, system, server and client |
| CN109213738A (en)* | 2018-11-20 | 2019-01-15 | 武汉理工光科股份有限公司 | A kind of cloud storage file-level data de-duplication searching system and method |
| CN109496419A (en)* | 2018-05-23 | 2019-03-19 | 优视科技新加坡有限公司 | Document handling method, device and system |
| CN109831487A (en)* | 2019-01-08 | 2019-05-31 | 平安科技(深圳)有限公司 | Fragmented file verification method and terminal equipment |
| CN111414334A (en)* | 2020-02-21 | 2020-07-14 | 平安科技(深圳)有限公司 | File fragment uploading method, device, equipment and storage medium based on cloud technology |
| CN111708743A (en)* | 2020-05-28 | 2020-09-25 | 浪潮电子信息产业股份有限公司 | File storage management method, file management client and file storage management system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106101291A (en)* | 2016-08-26 | 2016-11-09 | 苏州蓝海彤翔系统科技有限公司 | A kind of transmit the method for file, system, server and client |
| CN109496419A (en)* | 2018-05-23 | 2019-03-19 | 优视科技新加坡有限公司 | Document handling method, device and system |
| WO2019222934A1 (en)* | 2018-05-23 | 2019-11-28 | 优视科技新加坡有限公司 | File processing method, apparatus and system |
| CN109213738A (en)* | 2018-11-20 | 2019-01-15 | 武汉理工光科股份有限公司 | A kind of cloud storage file-level data de-duplication searching system and method |
| CN109831487A (en)* | 2019-01-08 | 2019-05-31 | 平安科技(深圳)有限公司 | Fragmented file verification method and terminal equipment |
| CN111414334A (en)* | 2020-02-21 | 2020-07-14 | 平安科技(深圳)有限公司 | File fragment uploading method, device, equipment and storage medium based on cloud technology |
| CN111708743A (en)* | 2020-05-28 | 2020-09-25 | 浪潮电子信息产业股份有限公司 | File storage management method, file management client and file storage management system |
| Title |
|---|
| PMPROTO: "《大胖 • 小课》- 说说大文件分片和断点续传 - 知乎", pages 1 - 8, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/89914960>* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113392066A (en)* | 2021-06-11 | 2021-09-14 | 上海妙一生物科技有限公司 | Universal catalog management method and device and computer equipment |
| CN114024955A (en)* | 2021-11-01 | 2022-02-08 | 北京来也网络科技有限公司 | File processing method, device, equipment and medium based on RPA and AI |
| CN114024955B (en)* | 2021-11-01 | 2024-03-12 | 北京来也网络科技有限公司 | File processing method, device, equipment and medium based on RPA and AI |
| CN113792323A (en)* | 2021-11-15 | 2021-12-14 | 聊城高新生物技术有限公司 | Sensitive data encryption method and device based on agricultural products and electronic equipment |
| CN115002100A (en)* | 2022-05-27 | 2022-09-02 | 平安普惠企业管理有限公司 | File transmission method and device, electronic equipment and storage medium |
| CN115002100B (en)* | 2022-05-27 | 2024-03-08 | 河北燕鸣科技有限公司 | File transmission method and device, electronic equipment and storage medium |
| CN115150388A (en)* | 2022-06-24 | 2022-10-04 | 中国建设银行股份有限公司 | File uploading and file uploading state query method, equipment and storage medium thereof |
| CN115150388B (en)* | 2022-06-24 | 2024-04-26 | 中国建设银行股份有限公司 | File uploading and file uploading state query method and equipment and storage medium thereof |
| CN115174555A (en)* | 2022-06-28 | 2022-10-11 | 平安科技(深圳)有限公司 | File transmission method and device, electronic equipment and storage medium |
| CN116233120A (en)* | 2023-05-10 | 2023-06-06 | 深圳普菲特信息科技股份有限公司 | Large file fragment transmission method, system and medium based on data processing |
| CN116233120B (en)* | 2023-05-10 | 2023-07-14 | 深圳普菲特信息科技股份有限公司 | Large file fragment transmission method, system and medium based on data processing |
| Publication | Publication Date | Title |
|---|---|---|
| CN112347042A (en) | File uploading method and device, electronic equipment and storage medium | |
| WO2022121171A1 (en) | Similar text matching method and apparatus, and electronic device and computer storage medium | |
| WO2021189899A1 (en) | Link state tracking method and apparatus, and electronic device and computer storage medium | |
| CN112052370A (en) | Message generation method and device, electronic equipment and computer readable storage medium | |
| CN112699142A (en) | Cold and hot data processing method and device, electronic equipment and storage medium | |
| WO2021189905A1 (en) | Distributed data retrieval method and apparatus, and electronic device and storage medium | |
| CN112506486A (en) | Search system establishing method and device, electronic equipment and readable storage medium | |
| WO2021212757A1 (en) | Upgrade maintenance method and apparatus for cluster, and electronic device and storage medium | |
| CN114185895A (en) | Data import and export method, device, electronic device and storage medium | |
| CN111429085A (en) | Contract data generation method, device, electronic device and storage medium | |
| CN112486532A (en) | Method and device for managing configuration file, electronic equipment and storage medium | |
| CN114881616A (en) | Business process execution method and device, electronic equipment and storage medium | |
| CN113434542B (en) | Data relationship identification method and device, electronic equipment and storage medium | |
| CN116225973B (en) | Chip code testing method and device based on embedded implementation electronic equipment | |
| CN115033605A (en) | Data query method and device, electronic equipment and storage medium | |
| CN114626103A (en) | Data consistency comparison method, device, equipment and medium | |
| CN116340295A (en) | Data migration method and device based on multi-type data sources | |
| CN115543198A (en) | Method, device, electronic equipment and storage medium for unstructured data into lake | |
| CN116842012A (en) | Method, device, equipment and storage medium for storing Redis cluster in fragments | |
| CN112925753B (en) | File additional writing method and device, electronic equipment and storage medium | |
| CN115145870A (en) | Method, device, electronic device and storage medium for locating cause of failed task | |
| CN114610340A (en) | Project deployment method, device, equipment and storage medium | |
| WO2022179122A1 (en) | Big-data-based data storage method and apparatus, and electronic device and storage medium | |
| CN114519084A (en) | Block chain-based medical data inspection method, device, equipment and medium | |
| CN112685384A (en) | Data migration method and device, electronic equipment and storage medium |
| 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 |