WO2020233082A1 - 数据文件上传方法、***、存储介质和服务器 - Google Patents

数据文件上传方法、***、存储介质和服务器 Download PDF

Info

Publication number
WO2020233082A1
WO2020233082A1 PCT/CN2019/122461 CN2019122461W WO2020233082A1 WO 2020233082 A1 WO2020233082 A1 WO 2020233082A1 CN 2019122461 W CN2019122461 W CN 2019122461W WO 2020233082 A1 WO2020233082 A1 WO 2020233082A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
uploaded
data file
client
server
Prior art date
Application number
PCT/CN2019/122461
Other languages
English (en)
French (fr)
Inventor
汪露林
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020233082A1 publication Critical patent/WO2020233082A1/zh

Links

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]

Definitions

  • This application relates to the field of computer data processing, in particular to a data file upload method, system, storage medium and server.
  • the embodiments of the present application provide a data file upload method, system, storage medium, and server, aiming to solve the problem of low reliability of data file upload.
  • an embodiment of the present application provides a data file upload method, which includes:
  • the file record information is used to record the file status of the data file, and the file status includes an uploaded status and a pending upload status;
  • the client terminal determines the data file whose file status is to be uploaded as the data file to be uploaded;
  • the client computer calculates the first file digest corresponding to the data file to be uploaded according to the message digest algorithm;
  • the data file and the first file summary are uploaded to the server; if the client receives the response information returned by the server, the file record information is updated according to the response information.
  • an embodiment of the present application provides a data file upload system, the system includes a client and a server, and the client includes:
  • the first obtaining unit is configured to obtain a data file stored in the client and file record information corresponding to the data file.
  • the file record information is used to record the file status of the data file, and the file status includes uploaded Status and pending upload status;
  • the first determining unit is configured to determine, by the client, the data file whose file status is to be uploaded as the data file to be uploaded;
  • a first calculation unit configured for the client to calculate a first file summary corresponding to the data file to be uploaded according to a message summary algorithm; upload the data file to be uploaded and the first file summary to a server;
  • the update unit is configured to update the file record information according to the response information if the client receives the response information returned by the server.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the computer non-readable storage medium stores computer-readable instructions.
  • the implementation is as in the embodiments of the present application.
  • an embodiment of the present application provides a server, including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, and the processor executes the computer When the instruction is read, the steps of the data file upload method proposed in the first aspect of the embodiment of the present application are implemented.
  • the embodiments of the present application provide a data file upload method and system.
  • the method uploads the first file digest corresponding to the file to be uploaded calculated by the client to the server, and returns response information corresponding to the first file digest to the client through the server, so that the client can follow the response
  • the information updates the file record information.
  • the implementation of the embodiments of the present application can effectively solve the phenomenon of missed transmission and wrong transmission due to network failures and other reasons, which is beneficial to improve the reliability of data file upload.
  • FIG. 1 is a schematic flowchart of a method for uploading a data file according to an embodiment of the application
  • FIG. 2 is a schematic diagram of an application scenario of a data file upload method provided by an embodiment of this application;
  • FIG. 3 is a schematic diagram of another process of a method for uploading a data file according to an embodiment of the application
  • FIG. 4 is a schematic diagram of another process of a method for uploading a data file according to an embodiment of the application
  • FIG. 5 is a schematic diagram of another process of a method for uploading a data file provided by an embodiment of the application
  • FIG. 6 is a schematic diagram of another process of a method for uploading a data file according to an embodiment of the application.
  • FIG. 7 is a schematic block diagram of a data file uploading system provided by an embodiment of the application.
  • FIG. 8 is another schematic block diagram of a data file uploading system provided by an embodiment of this application.
  • FIG. 9 is a schematic block diagram of a client in a data file upload system provided by an embodiment of the application.
  • FIG. 10 is another schematic block diagram of a client in a data file upload system provided by an embodiment of the application.
  • FIG. 11 is another schematic block diagram of a client in a data file upload system provided by an embodiment of the application.
  • Fig. 12 is a schematic diagram of a server provided by an embodiment of the present application.
  • FIG. 1 and FIG. 2 are a schematic flow diagram and a schematic diagram of an application scenario of a data file upload method provided by an embodiment of the application.
  • the data file upload method provided in the embodiment of the present application can be applied to a data file upload system, and the data file upload system includes a client 10 and a server 20.
  • the client 10 may be an electronic terminal such as a mobile phone, a tablet computer, or a smart bracelet.
  • the server 20 may be an independent server or a server cluster composed of multiple servers.
  • the client 10 and the server 20 can exchange data.
  • the data file upload method includes steps S110-S140.
  • S110 Obtain a data file stored in the client and file record information corresponding to the data file, where the file record information is used to record the file status of the data file, and the file status includes an uploaded status and a pending upload status .
  • the data file is stored in the client, and the data file may be a data file that needs to be backed up, or an insurance policy data file that needs to be uploaded to a server, and so on.
  • the number of the data files can be one or more.
  • S120 The client terminal determines the data file whose file status is to be uploaded as the data file to be uploaded.
  • the file recording information is used to record the file status of the data file, and the file status includes an uploaded status and a pending upload status.
  • Each data file corresponds to a unique file status, for example, the file status corresponding to the A file is the pending upload status, and the file status corresponding to the B file is the uploaded status.
  • the client calculates a first file summary corresponding to the data file to be uploaded according to a message summary algorithm, and uploads the data file to be uploaded and the first file summary to a server.
  • the client computing the first file digest corresponding to the data file to be uploaded according to the message digest algorithm may be calculated by a preset algorithm, and the preset algorithm may be a message digest algorithm.
  • the message digest algorithm includes but not limited to MD algorithm (MD, Message Digest), SHA algorithm (SHA, Secure Hash Algorithm), MAC algorithm (MAC, Message Digest) Authentication Code).
  • the calculation of the first file digest corresponding to the data file to be uploaded according to the message digest algorithm is: taking the data file to be uploaded of any length as the input of the message digest algorithm (also called pre-mapped Pre-Image), and pass The message digest algorithm (such as MD algorithm, etc.) is transformed into a fixed-length output, which is the first file digest.
  • the message digest algorithm such as MD algorithm, etc.
  • S140 If the client receives the response information returned by the server, update the file record information according to the response information.
  • the method may further include steps S210-S230b.
  • the second file digest corresponding to the received data file to be uploaded may be calculated by the server according to the message digest algorithm, and the preset algorithm may be a message digest algorithm.
  • the message digest algorithm includes but not limited to MD algorithm (MD, Message Digest), SHA algorithm (SHA, Secure Hash Algorithm), MAC algorithm (MAC, Message Digest) Authentication Code).
  • the preset algorithm used by the server to calculate the second file summary corresponding to the data file to be uploaded and the preset algorithm used by the client to calculate the first file summary corresponding to the data file to be uploaded according to the message digest algorithm Let the algorithm be the same. For example, the server calculates the second file digest corresponding to the data file to be uploaded using the MD algorithm, and the client calculates the first file digest corresponding to the data file to be uploaded using the MD algorithm.
  • S220 Determine whether the first file abstract is the same as the second file abstract.
  • first document and the second document summary are compared with characters to determine whether the first document summary is the same as the second document summary.
  • the first file summary is the same as the second file summary, it indicates that the data file sent by the client to the server and the data file received by the server are the same and complete The performance is not damaged, and then the first response information is sent to the client.
  • the first response information is used to indicate that the data file to be uploaded has been successfully uploaded.
  • S230b If the first file summary is different from the second file summary, send second response information to the client.
  • the first file summary is different from the second file summary, it indicates that the integrity of the data file sent by the client to the server and the data file received by the server is damaged. Or the two do not belong to the same file, so the second response information is sent to the client. Wherein, the second response information is used to indicate that the data file to be uploaded is not successfully uploaded.
  • step S140 may include steps S140a and S140b.
  • S140a If the client receives the response information returned by the server as the first response information, modify the file status corresponding to the data file to be uploaded from the upload status to the uploaded status.
  • the first response information is used to indicate that the data file to be uploaded has been successfully uploaded. If the client receives the response information returned by the server as the first response information, the client determines that the data file to be uploaded has been successfully uploaded, and then changes the file status corresponding to the data file to be uploaded from the file to be uploaded The status is changed to uploaded status.
  • S140b If the client receives the response information returned by the server as the second response information, keep the file status corresponding to the data file to be uploaded as the status to be uploaded.
  • the second response information is used to indicate that the data file to be uploaded is not successfully uploaded. If the client receives the response information returned by the server as the second response information, the client determines that the data file to be uploaded is not successfully uploaded, and keeps the file status corresponding to the data file to be uploaded as pending. Upload status.
  • step S130 may include S131-S132.
  • S131 Sort the data files to be uploaded to generate a file queue according to the creation time corresponding to the data files to be uploaded.
  • the data file to be uploaded corresponds to a unique creation time.
  • the creation time is the time recorded when the data to be uploaded is created on the client.
  • the creation time corresponding to the data file to be uploaded can be 2019-1-3 19:15:19.
  • the number of data files to be uploaded may be one or more. If the number of data files to be uploaded is more than one, by comparing the creation time of the files to be uploaded, the data files to be uploaded are compared according to a preset arrangement rule. The data files are sorted to generate a file queue. Among them, the preset arrangement rule can be that the earlier the creation time, the higher the queue ranking.
  • S132 The client computer sequentially calculates the first file summary corresponding to the data file to be uploaded according to the sequence of the file queue. And upload the data file to be uploaded and the first file summary to the server according to the file queue.
  • the first file summary corresponding to the data file to be uploaded is calculated in sequence according to the sequence of the file queue, specifically: The earlier the creation time, the earlier the queue sequence, the earlier the first file summary corresponding to the file to be calculated will be calculated.
  • the implementation of the embodiments of this application can realize the orderly uploading of data files and prevent problems such as data upload confusion caused by data accumulation.
  • the method may further include step S150.
  • the client does not receive the response information returned by the server, it indicates that the client cannot determine whether the data file to be uploaded has been successfully sent.
  • the file status corresponding to the uploaded data file continues to be the pending upload status.
  • FIG. 7 is a schematic block diagram of a data file upload system 10 provided by an embodiment of the present application. As shown in Fig. 7, corresponding to the above data file uploading method, the present application also provides a data file uploading system 10.
  • the data file upload system 10 includes a unit for executing the above data file upload method,
  • the system 10 includes a client 100 and a server 200, and the client 100 includes a first obtaining unit 110, a first determining unit 120, a first calculating unit 130 and an updating unit 140.
  • the first obtaining unit 110 is configured to obtain a data file stored in the client 100 and file record information corresponding to the data file, the file record information is used to record the file status of the data file, and the file status includes Uploaded status and pending upload status.
  • the data file is stored in the client 100, and the data file may be a data file that needs to be backed up, or an insurance policy data file that needs to be uploaded to the server 200, and so on.
  • the number of the data files can be one or more.
  • the first determining unit 120 is configured to obtain, according to the data file and the file record information, the data file whose file status is the pending upload state, and determine the data file whose file status is the pending upload state as Data file to be uploaded.
  • the file recording information is used to record the file status of the data file, and the file status includes an uploaded status and a pending upload status.
  • Each data file corresponds to a unique file status, for example, the file status corresponding to the A file is the pending upload status, and the file status corresponding to the B file is the uploaded status.
  • the first calculation unit 130 is used for the client 100 to calculate the first file digest corresponding to the data file to be uploaded according to the message digest algorithm; and upload the data file to be uploaded and the first file digest to the server 200 .
  • the client 100 may calculate the first file digest corresponding to the data file to be uploaded by using a preset algorithm, and the preset algorithm may be a message digest algorithm.
  • the message digest algorithm includes but not limited to MD algorithm (MD, Message Digest), SHA algorithm (SHA, Secure Hash Algorithm), MAC algorithm (MAC, Message Digest) Authentication Code).
  • the update unit 140 is configured to update the file record information according to the response information if the client 100 receives the response information returned by the server 200.
  • the server 200 includes a second calculation unit 210, a first judgment unit 220, a first sending unit 230, and a second sending unit 240.
  • the second calculation unit 210 is configured to, if the server 200 receives the data file to be uploaded uploaded by the client 100 and the first file digest, calculate the first file corresponding to the received data file to be uploaded according to the message digest algorithm 2. Document summary.
  • the server 200 calculates the second file digest corresponding to the received data file to be uploaded according to the message digest algorithm, which may be calculated by a preset algorithm, and the preset algorithm may be a message digest algorithm.
  • the message digest algorithm includes but not limited to MD algorithm (MD, Message Digest), SHA algorithm (SHA, Secure Hash Algorithm), MAC algorithm (MAC, Message Digest) Authentication Code).
  • the calculation of the first file digest corresponding to the data file to be uploaded according to the message digest algorithm is: taking the data file to be uploaded of any length as the input of the message digest algorithm (also called pre-mapped Pre-Image), and pass The message digest algorithm (such as the MD algorithm, etc.) is transformed into a fixed-length output, which is the second file digest.
  • the message digest algorithm such as the MD algorithm, etc.
  • the server 200 calculates the second file summary corresponding to the data file to be uploaded by using the MD algorithm
  • the client 100 calculates the first file summary corresponding to the data file to be uploaded by using the MD algorithm.
  • the first judging unit 220 is configured to judge whether the first file abstract is the same as the second file abstract.
  • first document and the second document summary are compared with characters to determine whether the first document summary is the same as the second document summary.
  • the first sending unit 230 is configured to send first response information to the client 100 if the first document summary is the same as the second document summary.
  • the first file summary is the same as the second file summary, it indicates that the data file sent by the client 100 to the server 200 is the same file as the data file received by the server 200 , And the integrity is not damaged, and then send the first response message to the client 100.
  • the first response information is used to indicate that the data file to be uploaded has been successfully uploaded.
  • the second sending unit 240 is configured to send second response information to the client 100 if the first file summary is different from the second file summary.
  • the first file summary is different from the second file summary, it indicates that the data file sent by the client 100 to the server 200 is complete with the data file received by the server 200 It is damaged, or the two do not belong to the same file, so the second response message is sent to the client 100.
  • the second response information is used to indicate that the data file to be uploaded is not successfully uploaded.
  • the update unit 140 includes a first processing unit 140a and a second processing unit 140b.
  • the first processing unit 140a is configured to, if the client 100 receives the response information returned by the server 200 as the first response information, change the file status corresponding to the data file to be uploaded from the upload status to the uploaded status .
  • the first response information is used to indicate that the data file to be uploaded has been successfully uploaded. If the client 100 receives the response information returned by the server 200 as the first response information, the client 100 determines that the data file to be uploaded has been successfully uploaded, and then updates the file status corresponding to the data file to be uploaded Modified from pending upload status to uploaded status.
  • the second processing unit 140b is configured to, if the client 100 receives the response information returned by the server 200 as the second response information, continue to maintain the file status corresponding to the data file to be uploaded as the upload status.
  • the second response information is used to indicate that the data file to be uploaded is not successfully uploaded. If the client 100 receives the response information returned by the server 200 as the second response information, the client 100 determines that the data file to be uploaded is not successfully uploaded, and continues with the file status corresponding to the data file to be uploaded Stay in the pending upload state.
  • the first calculation unit 130 includes a generating unit 131 and an uploading unit 132.
  • the generating unit 131 is configured to sort the data files to be uploaded to generate a file queue according to the creation time corresponding to the data files to be uploaded.
  • the data file to be uploaded corresponds to a unique creation time.
  • the creation time is the time recorded when the data to be uploaded is created on the client 100.
  • the creation time corresponding to the data file to be uploaded can be 2019-1-3 19:15:19.
  • the number of data files to be uploaded may be one or more. If the number of data files to be uploaded is more than one, by comparing the creation time of the files to be uploaded, the data files to be uploaded are compared according to a preset arrangement rule. The data files are sorted to generate a file queue. Among them, the preset arrangement rule can be that the earlier the creation time, the higher the queue ranking.
  • the upload unit 132 is used for the client 100 to sequentially calculate the first file summary corresponding to the data file to be uploaded according to the sequence of the file queue. And upload the data file to be uploaded and the first file summary to the server 200 according to the file queue.
  • the client 100 further includes a holding unit 150.
  • the holding unit 150 is configured to, if the client 100 does not receive the response information returned by the server 200, continue to maintain the file status corresponding to the data file to be uploaded as the status to be uploaded.
  • the client 100 does not receive the response information returned by the server 200, it indicates that the client 100 cannot determine whether the data file to be uploaded has been successfully sent.
  • the file status corresponding to the data file to be uploaded continues to be the status to be uploaded.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, any one of those shown in FIGS. 1 to 6 is implemented.
  • the steps of a data file upload method are also provided.
  • An embodiment of the present application also provides a server, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions to implement Figures 1 to 6 show the steps of any data file upload method.
  • Fig. 12 is a schematic diagram of a server provided by an embodiment of the present application.
  • the server 120 in this embodiment includes a processor 1200, a memory 1201, and computer-readable instructions 1202 stored in the memory 1201 and running on the processor 1200.
  • the processor 1200 executes the computer-readable instructions 1202
  • the steps in the above embodiments of the camera depth resolution determination method are implemented, for example, steps S110 to S140 shown in FIG. 1.
  • the processor 1200 executes the computer-readable instructions 1202
  • the functions of the modules/units in the foregoing device embodiments for example, the functions of the units 110 to 140 shown in FIG. 7 are realized.
  • the computer readable instruction 1202 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 1201 and executed by the processor 1200.
  • the one or more modules/units may be a series of computer-readable instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 1202 in the server 120.
  • the server 120 may include, but is not limited to, a processor 1200 and a memory 1201. Those skilled in the art can understand that FIG. 12 is only an example of the server 120, and does not constitute a limitation on the server 120. It may include more or less components than shown, or a combination of certain components, or different components, such as The server 120 may also include input and output devices, network access devices, buses, and so on.
  • the processor 1200 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital SignaL Processor, DSP), ASIC (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the storage 1201 may be an internal storage unit of the server 120, such as a hard disk or a memory of the server 120.
  • the memory 1201 may also be an external storage device of the server 120, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a Secure Digital (SD) card equipped on the server 120, Flash memory card Card) etc.
  • the storage 1201 may also include both an internal storage unit of the server 120 and an external storage device.
  • the memory 1201 is used to store the computer readable instructions and other programs and data required by the server.
  • the memory 1201 can also be used to temporarily store data that has been output or will be output.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • the steps in the method of the embodiment of the present application can be adjusted, merged, and deleted in order according to actual needs.
  • the units in the system of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a terminal, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks, and other media that can store computer-readable instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请实施例提供了一种数据文件上传方法及***。该方法应用于数据处理技术领域,其包括获取储存于客户端中的数据文件以及数据文件对应的文件记录信息;客户端根据数据文件以及文件记录信息获取文件状态为待上传状态的数据文件,并将文件状态为待上传状态的数据文件确定为待上传数据文件;客户端计算待上传数据文件对应的第一文件摘要;并将待上传数据文件以及第一文件摘要上传至服务器;若客户端接收到服务器返回的响应信息,根据响应信息更新文件记录信息。实施本申请实施例,可有效解决因网络故障等原因导致出现漏传、错传等现象,有利于提升数据文件上传的可靠性。

Description

数据文件上传方法、***、存储介质和服务器
本申请要求于2019年05月22日提交中国专利局、申请号为201910428908.5、申请名称为“数据文件上传方法及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机数据处理领域,尤其涉及一种数据文件上传方法、***、存储介质和服务器。
背景技术
在互联网应用中,通常需要将各类的数据文件上传至服务器,以实现备份、分析等功能。现有技术中,数据文件在传输过程中可能会因网络故障等原因导致出现漏传、错传等现象。因此,如何提升数据文件传输的可靠性是亟需解决的问题。
技术问题
有鉴于此,本申请实施例提供了一种数据文件上传方法、***、存储介质和服务器,旨在解决数据文件上传可靠性低等问题。
技术解决方案
第一方面,本申请实施例提供了一种数据文件上传方法,其包括:
获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
第二方面,本申请实施例提供了一种数据文件上传***,所述***包括客户端以及服务器,所述客户端包括:
第一获取单元,用于获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;
第一确定单元,用于所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;
第一计算单元,用于所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;
更新单元,用于若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
第三方面,本申请实施例提供了一种计算机可读存储介质,所述计算机非可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如本申请实施例的第一方面提出的数据文件上传方法的步骤。
第四方面,本申请实施例提供了一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如本申请实施例的第一方面提出的数据文件上传方法的步骤。
有益效果
本申请实施例提供一种数据文件上传方法及***。该方法通过将客户端所计算得到的待上传文件对应的第一文件摘要上传至服务器,并通过服务器向客户端返回与所述第一文件摘要对应的响应信息,进而使客户端根据所述响应信息更新所述文件记录信息。实施本申请实施例,可有效解决因网络故障等原因导致出现漏传、错传等现象,有利于提升数据文件上传的可靠性。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一实施例提供的一种数据文件上传方法的流程示意图;
图2为本申请一实施例提供的一种数据文件上传方法的应用场景示意图;
图3为本申请一实施例提供的一种数据文件上传方法的另一流程示意图;
图4为本申请一实施例提供的一种数据文件上传方法的另一流程示意图;
图5为本申请一实施例提供的一种数据文件上传方法的另一流程示意图;
图6为本申请一实施例提供的一种数据文件上传方法的另一流程示意图;
图7为本申请一实施例提供的一种数据文件上传***的示意性框图;
图8为本申请一实施例提供的一种数据文件上传***的另一示意性框图;
图9为本申请一实施例提供的一种数据文件上传***中客户端的示意性框图;
图10为本申请一实施例提供的一种数据文件上传***中客户端的另一示意性框图;
图11为本申请一实施例提供的一种数据文件上传***中客户端的另一示意性框图。
图12是本申请一实施例提供的服务器的示意图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或一个以上其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
请参照图1以及图2,其为本申请一实施例提供的一种数据文件上传方法的流程示意图以及应用场景示意图。本申请实施例所提供的数据文件上传方法可应用于数据文件上传***中,该数据文件上传***包括客户端10以及服务器20。所述客户端10可以是手机、平板电脑、智能手环等电子终端。所述服务器20可以是独立的服务器,也可以是多个服务器组成的服务器集群。所述客户端10与服务器20之间可进行数据交互。如图1所示,该数据文件上传方法包括步骤S110-S140。
S110,获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态。
具体地,所述数据文件储存于所述客户端中,数据文件可以为需要备份的数据文件,或者是需要上传至服务器的保单数据文件等等。所述数据文件的数量可以为一个或者多个。
S120,所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件。
具体地,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态。每个数据文件对应唯一的文件状态,例如A文件对应的文件状态为待上传状态,B文件对应的文件状态为已上传状态。通过在所述数据文件中获取文件状态为待上传状态的数据文件,并将所述文件状态为待上传状态的数据文件确定为待上传数据文件,以备后续上传数据文件时快速获取待上传数据文件,以避免出现漏传、错传等现象。
S130,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要,并将所述待上传数据文件以及所述第一文件摘要上传至服务器。
具体地,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要可通过预设算法计算,该预设算法可以是消息摘要算法。其中,消息摘要算法包括但不限于MD算法(MD,Message Digest)、SHA算法(SHA,Secure Hash Algorithm)、MAC算法(MAC,Message Authentication Code)。
具体地,所述根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要为:将把任意长度的待上传数据文件作为消息摘要算法的输入(又叫做预映射Pre-Image),通过消息摘要算法(例如MD算法等)变换成固定长度的输出,该输出就是第一文件摘要。
S140,若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
在一些实施例中,如图3所示,所述方法还可以包括步骤S210-S230b。
S210,若所述服务器接收到所述客户端上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要。
具体地,所述服务器根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要可通过预设算法计算,该预设算法可以是消息摘要算法。其中,消息摘要算法包括但不限于MD算法(MD,Message Digest)、SHA算法(SHA,Secure Hash Algorithm)、MAC算法(MAC,Message Authentication Code)。
其中,所述服务器计算所述待上传数据文件对应的第二文件摘要所使用的预设算法与所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要所使用的预设算法相同。例如,所述服务器通过MD算法计算所述待上传数据文件对应的第二文件摘要,所述客户端通过MD算法计算所述待上传数据文件对应的第一文件摘要。
S220,判断所述第一文件摘要与所述第二文件摘要是否相同。
具体地,通过将所述第一文件与所述第二文件摘进行字符比对,以判断所述第一文件摘要与所述第二文件摘要是否相同。
S230a,若所述第一文件摘要与所述第二文件摘要相同,向所述客户端发送第一响应信息。
具体地,若所述第一文件摘要与所述第二文件摘要相同,表明所述客户端向所述服务器所发送的数据文件与所述服务器所接收到的数据文件为同一个文件,且完整性未受到破坏,进而向所述客户端发送第一响应信息。其中,所述第一响应信息用于表示所述待上传数据文件已成功上传。
S230b,若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端发送第二响应信息。
具体地,若所述第一文件摘要与所述第二文件摘要不相同,表明所述客户端向所述服务器所发送的数据文件与所述服务器所接收到的数据文件的完整性受到破坏,或者二者不属于同一个文件,故向所述客户端发送第二响应信息。其中,所述第二响应信息用于表示所述待上传数据文件未成功上传。
在一些实施例中,如图4所示,步骤S140可包括步骤S140a以及S140b。
S140a,若所述客户端接收到所述服务器返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态。
具体地,所述第一响应信息用于表示所述待上传数据文件已成功上传。若所述客户端接收到所述服务器返回的响应信息为第一响应信息,所述客户端确定所述待上传数据文件已成功上传,进而将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态。
S140b,若所述客户端接收到所述服务器返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
具体地,所述第二响应信息用于表示所述待上传数据文件未成功上传。若所述客户端接收到所述服务器返回的响应信息为第二响应信息,所述客户端确定所述待上传数据文件未成功上传,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
在一些实施例中,如图5所示,步骤S130可包括S131-S132。
S131,根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列。
具体地,所述待上传数据文件对应唯一的创建时间。创建时间为所述待上传数据创建于所述客户端时所记录的时间。例如,待上传数据文件对应的创建时间可以为2019-1-3 19:15:19。
所述待上传数据文件的数量可以为一个或者多个,若所述待上传数据文件的数量为多个,通过比较所述待上传文件的创建时间,按照预设的排列规则对所述待上传数据文件进行排序,以生成文件队列。其中,预设的排列规则可以为创建时间越早,队列排名越靠前。
S132,所述客户端根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要。并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。
具体地,通过根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。例如,假设预设的排列规则为创建时间越早,队列排名越靠前,根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要具体为:待上传数据文件的创建时间越早,列队顺序越靠前,则越早计算该待计算文件对应的第一文件摘要。实施本申请实施例,可实现数据文件上传的有序化,防止因数据堆积而造成数据上传混乱等问题。
在一些实施例中,如图6所示,所述方法还可以包括步骤S150。
S150,若所述客户端未接收到所述服务器返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
具体地,若所述客户端未接收到所述服务器返回的响应信息,表明所述客户端无法确定所述待上传数据文件是否已成功发送,为防止未经出现漏传,进而将所述待上传数据文件对应的文件状态继续保持为待上传状态。
图7是本申请实施例提供的一种数据文件上传***10的示意性框图。如图7所示,对应于以上数据文件上传方法,本申请还提供一种数据文件上传***10。该数据文件上传***10包括用于执行上述数据文件上传方法的单元,
所述***10包括客户端100以及服务器200,所述客户端100包括第一获取单元110、第一确定单元120、第一计算单元130以及更新单元140。
第一获取单元110,用于获取储存于客户端100中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态。
具体地,所述数据文件储存于所述客户端100中,数据文件可以为需要备份的数据文件,或者是需要上传至服务器200的保单数据文件等等。所述数据文件的数量可以为一个或者多个。
第一确定单元120,用于所述客户端100根据所述数据文件以及所述文件记录信息获取文件状态为待上传状态的数据文件,并将所述文件状态为待上传状态的数据文件确定为待上传数据文件。
具体地,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态。每个数据文件对应唯一的文件状态,例如A文件对应的文件状态为待上传状态,B文件对应的文件状态为已上传状态。通过在所述数据文件中获取文件状态为待上传状态的数据文件,并将所述文件状态为待上传状态的数据文件确定为待上传数据文件,以备后续上传数据文件时快速获取待上传数据文件,以避免出现漏传、错传等现象。
第一计算单元130,用于所述客户端100根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器200。
具体地,所述客户端100计算所述待上传数据文件对应的第一文件摘要可通过预设算法计算,该预设算法可以是消息摘要算法。其中,消息摘要算法包括但不限于MD算法(MD,Message Digest)、SHA算法(SHA,Secure Hash Algorithm)、MAC算法(MAC,Message Authentication Code)。
更新单元140,用于若所述客户端100接收到所述服务器200返回的响应信息,根据所述响应信息更新所述文件记录信息。
在一些实施例中,如图8所示,所述服务器200包括第二计算单元210、第一判断单元220、第一发送单元230以及第二发送单元240。
第二计算单元210,用于若所述服务器200接收到所述客户端100上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要。
具体地,所述服务器200根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要可通过预设算法计算,该预设算法可以是消息摘要算法。其中,消息摘要算法包括但不限于MD算法(MD,Message Digest)、SHA算法(SHA,Secure Hash Algorithm)、MAC算法(MAC,Message Authentication Code)。
具体地,所述根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要为:将把任意长度的待上传数据文件作为消息摘要算法的输入(又叫做预映射Pre-Image),通过消息摘要算法(例如MD算法等)变换成固定长度的输出,该输出就是第二文件摘要。
其中,所述服务器200计算所述待上传数据文件对应的第二文件摘要所使用的预设算法与所述客户端100计算所述待上传数据文件对应的第一文件摘要所使用的预设算法相同。例如,所述服务器200通过MD算法计算所述待上传数据文件对应的第二文件摘要,所述客户端100通过MD算法计算所述待上传数据文件对应的第一文件摘要。
第一判断单元220,用于判断所述第一文件摘要与所述第二文件摘要是否相同。
具体地,通过将所述第一文件与所述第二文件摘进行字符比对,以判断所述第一文件摘要与所述第二文件摘要是否相同。
第一发送单元230,用于若所述第一文件摘要与所述第二文件摘要相同,向所述客户端100发送第一响应信息。
具体地,若所述第一文件摘要与所述第二文件摘要相同,表明所述客户端100向所述服务器200所发送的数据文件与所述服务器200所接收到的数据文件为同一个文件,且完整性未受到破坏,进而向所述客户端100发送第一响应信息。其中,所述第一响应信息用于表示所述待上传数据文件已成功上传。
第二发送单元240,用于若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端100发送第二响应信息。
具体地,若所述第一文件摘要与所述第二文件摘要不相同,表明所述客户端100向所述服务器200所发送的数据文件与所述服务器200所接收到的数据文件的完整性受到破坏,或者二者不属于同一个文件,故向所述客户端100发送第二响应信息。其中,所述第二响应信息用于表示所述待上传数据文件未成功上传。
在一些实施例中,如图9所示,所述更新单元140包括第一处理单元140a以及第二处理单元140b。
第一处理单元140a,用于若所述客户端100接收到所述服务器200返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态。
具体地,所述第一响应信息用于表示所述待上传数据文件已成功上传。若所述客户端100接收到所述服务器200返回的响应信息为第一响应信息,所述客户端100确定所述待上传数据文件已成功上传,进而将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态。
第二处理单元140b,用于若所述客户端100接收到所述服务器200返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
具体地,所述第二响应信息用于表示所述待上传数据文件未成功上传。若所述客户端100接收到所述服务器200返回的响应信息为第二响应信息,所述客户端100确定所述待上传数据文件未成功上传,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
在一些实施例中,如图10所示,所述第一计算单元130包括生成单元131以及上传单元132。
生成单元131,用于根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列。
具体地,所述待上传数据文件对应唯一的创建时间。创建时间为所述待上传数据创建于所述客户端100时所记录的时间。例如,待上传数据文件对应的创建时间可以为2019-1-3 19:15:19。
所述待上传数据文件的数量可以为一个或者多个,若所述待上传数据文件的数量为多个,通过比较所述待上传文件的创建时间,按照预设的排列规则对所述待上传数据文件进行排序,以生成文件队列。其中,预设的排列规则可以为创建时间越早,队列排名越靠前。
上传单元132,用于所述客户端100根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要。并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器200。
具体地,通过根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器200,可实现数据文件上传的有序化,防止因数据堆积而造成数据上传混乱等问题。
在一些实施例中,如图11所示,所述客户端100还包括保持单元150。所述保持单元150用于若所述客户端100未接收到所述服务器200返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
具体地,若所述客户端100未接收到所述服务器200返回的响应信息,表明所述客户端100无法确定所述待上传数据文件是否已成功发送,为防止未经出现漏传,进而将所述待上传数据文件对应的文件状态继续保持为待上传状态。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述数据文件上传***10和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如图1至图6表示的任意一种数据文件上传方法的步骤。
本申请实施例还提供一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如图1至图6表示的任意一种数据文件上传方法的步骤。
图12是本申请一实施例提供的服务器的示意图。如图12所示,该实施例的服务器120包括:处理器1200、存储器1201以及存储在所述存储器1201中并可在所述处理器1200上运行的计算机可读指令1202。所述处理器1200执行所述计算机可读指令1202时实现上述各个相机深度分辨率确定方法实施例中的步骤,例如图1所示的步骤S110至S140。或者,所述处理器1200执行所述计算机可读指令1202时实现上述各装置实施例中各模块/单元的功能,例如图7所示单元110至140的功能。
示例性的,所述计算机可读指令1202可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器1201中,并由所述处理器1200执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令1202在所述服务器120中的执行过程。
所述服务器120可包括,但不仅限于,处理器1200、存储器1201。本领域技术人员可以理解,图12仅仅是服务器120的示例,并不构成对服务器120的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述服务器120还可以包括输入输出设备、网络接入设备、总线等。
所述处理器1200可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital SignaL Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器1201可以是所述服务器120的内部存储单元,例如服务器120的硬盘或内存。所述存储器1201也可以是所述服务器120的外部存储设备,例如所述服务器120上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器1201还可以既包括所述服务器120的内部存储单元也包括外部存储设备。所述存储器1201用于存储所述计算机可读指令以及所述服务器所需的其他程序和数据。所述存储器1201还可以用于暂时地存储已经输出或者将要输出的数据。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成。该计算机可读指令可存储于一存储介质中,该存储介质为计算机可读存储介质。该计算机可读指令被该计算机***中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的***和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***和方法,可以通过其它的方式实现。例如,以上所描述的***实施例仅仅是示意性的。例如,各个单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如一个以上单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例***中的单元可以根据实际需要进行合并、划分和删减。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储计算机可读指令的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种数据文件上传方法,其特征在于,所述方法包括:
    获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;
    所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;
    所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;
    若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    若所述服务器接收到所述客户端上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要;
    判断所述第一文件摘要与所述第二文件摘要是否相同;
    若所述第一文件摘要与所述第二文件摘要相同,向所述客户端发送第一响应信息;
    若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端发送第二响应信息。
  3. 如权利要求2所述的方法,其特征在于,所述若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息,包括:
    若所述客户端接收到所述服务器返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态;
    若所述客户端接收到所述服务器返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  4. 如权利要求1所述的方法,其特征在于,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器,包括:
    根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列;
    所述客户端根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。
  5. 如权利要求1所述的方法,其特征在于,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器之后,还包括:
    若所述客户端未接收到所述服务器返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  6. 一种数据文件上传***,其特征在于,所述***包括客户端以及服务器,所述客户端包括:
    第一获取单元,用于获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;
    第一确定单元,用于所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;
    第一计算单元,用于所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;
    更新单元,用于若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
  7. 如权利要求6所述的***,其特征在于,所述服务器包括:
    第二计算单元,用于若所述服务器接收到所述客户端上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要;
    第一判断单元,用于判断所述第一文件摘要与所述第二文件摘要是否相同;
    第一发送单元,用于若所述第一文件摘要与所述第二文件摘要相同,向所述客户端发送第一响应信息;
    第二发送单元,用于若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端发送第二响应信息。
  8. 如权利要求7所述的***,其特征在于,所述更新单元包括:
    第一处理单元,用于若所述客户端接收到所述服务器返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态;
    第二处理单元,用于若所述客户端接收到所述服务器返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  9. 如权利要求6所述的***,其特征在于,所述第一计算单元包括:
    生成单元,用于根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列;
    上传单元,用于所述客户端根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。
  10. 如权利要求6所述的***,其特征在于,所述客户端还包括:
    保持单元,用于若所述客户端未接收到所述服务器返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;
    所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;
    所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;
    若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
  12. 根据权利要求11所述的计算机可读存储介质,其特征在于,所述计算机可读指令被处理器执行时还实现如下步骤:
    若所述服务器接收到所述客户端上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要;
    判断所述第一文件摘要与所述第二文件摘要是否相同;
    若所述第一文件摘要与所述第二文件摘要相同,向所述客户端发送第一响应信息;
    若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端发送第二响应信息。
  13. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息,包括:
    若所述客户端接收到所述服务器返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态;
    若所述客户端接收到所述服务器返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  14. 根据权利要求11所述的计算机可读存储介质,其特征在于,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器,包括:
    根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列;
    所述客户端根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。
  15. 根据权利要求11所述的计算机可读存储介质,其特征在于,在所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器之后,还包括:
    若所述客户端未接收到所述服务器返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  16. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取储存于客户端中的数据文件以及所述数据文件对应的文件记录信息,所述文件记录信息用于记录所述数据文件的文件状态,所述文件状态包括已上传状态以及待上传状态;
    所述客户端将所述文件状态为待上传状态的数据文件确定为待上传数据文件;
    所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器;
    若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息。
  17. 根据权利要求16所述的服务器,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若所述服务器接收到所述客户端上传的待上传数据文件以及所述第一文件摘要,根据消息摘要算法计算所接收到的待上传数据文件对应的第二文件摘要;
    判断所述第一文件摘要与所述第二文件摘要是否相同;
    若所述第一文件摘要与所述第二文件摘要相同,向所述客户端发送第一响应信息;
    若所述第一文件摘要与所述第二文件摘要不相同,向所述客户端发送第二响应信息。
  18. 根据权利要求17所述的服务器,其特征在于,所述若所述客户端接收到所述服务器返回的响应信息,根据所述响应信息更新所述文件记录信息,包括:
    若所述客户端接收到所述服务器返回的响应信息为第一响应信息,将所述待上传数据文件对应的文件状态由待上传状态修改为已上传状态;
    若所述客户端接收到所述服务器返回的响应信息为第二响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
  19. 根据权利要求16所述的服务器,其特征在于,所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器,包括:
    根据所述待上传数据文件对应的创建时间,对所述待上传数据文件进行排序以生成文件队列;
    所述客户端根据所述文件队列的先后顺序依次计算所述待上传数据文件对应的第一文件摘要;并根据所述文件队列将所述待上传数据文件以及所述第一文件摘要上传至服务器。
  20. 根据权利要求16所述的服务器,其特征在于,在所述客户端根据消息摘要算法计算所述待上传数据文件对应的第一文件摘要;并将所述待上传数据文件以及所述第一文件摘要上传至服务器之后,还包括:
    若所述客户端未接收到所述服务器返回的响应信息,将所述待上传数据文件对应的文件状态继续保持为待上传状态。
PCT/CN2019/122461 2019-05-22 2019-12-02 数据文件上传方法、***、存储介质和服务器 WO2020233082A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910428908.5A CN110300151B (zh) 2019-05-22 2019-05-22 数据文件上传方法及***
CN201910428908.5 2019-05-22

Publications (1)

Publication Number Publication Date
WO2020233082A1 true WO2020233082A1 (zh) 2020-11-26

Family

ID=68027153

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122461 WO2020233082A1 (zh) 2019-05-22 2019-12-02 数据文件上传方法、***、存储介质和服务器

Country Status (2)

Country Link
CN (1) CN110300151B (zh)
WO (1) WO2020233082A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726838A (zh) * 2021-06-17 2021-11-30 武汉理工数字传播工程有限公司 文件传输方法、装置、设备及存储介质
CN113726842A (zh) * 2021-07-09 2021-11-30 北京房江湖科技有限公司 一种文件上传方法和装置、电子设备及存储介质
CN114095493A (zh) * 2021-11-17 2022-02-25 兰州乐智教育科技有限责任公司 一种基于断点重传的文件上传方法和***
CN114826591A (zh) * 2022-05-26 2022-07-29 京东方科技集团股份有限公司 一种跨设备的数据传输方法、***及终端
CN115617760A (zh) * 2022-12-20 2023-01-17 中化现代农业有限公司 一种大批量文件快速上传的方法
CN116305192A (zh) * 2023-02-07 2023-06-23 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300151B (zh) * 2019-05-22 2022-02-11 深圳壹账通智能科技有限公司 数据文件上传方法及***
CN112532700B (zh) * 2020-11-17 2023-09-05 华帝股份有限公司 一种传输数据的方法及相关设备
CN113986835B (zh) * 2021-10-27 2024-05-17 平安国际智慧城市科技股份有限公司 FastDFS分布式文件的管理方法、装置、设备及存储介质
CN114242211A (zh) * 2021-12-20 2022-03-25 王兆河 保障云pacs***影像数据传输完整性的方法及装置
CN116527539B (zh) * 2023-05-15 2023-11-28 合芯科技(苏州)有限公司 数据一致性校验方法、装置及计算机设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103841144A (zh) * 2012-11-23 2014-06-04 中兴通讯股份有限公司 云存储***、方法、用户端及云存储服务器
CN103929453A (zh) * 2013-01-15 2014-07-16 腾讯科技(深圳)有限公司 一种上传数据的处理方法、装置及***
CN105072183A (zh) * 2015-08-10 2015-11-18 浪潮(北京)电子信息产业有限公司 云os软件仓库的管理方法和管理装置
CN110300151A (zh) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 数据文件上传方法及***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571709A (zh) * 2010-12-16 2012-07-11 腾讯科技(北京)有限公司 文件上传的方法、客户端、服务器及***
CN105306568A (zh) * 2015-10-23 2016-02-03 无锡天脉聚源传媒科技有限公司 一种基于浏览器续传任务的方法及装置
CN106708658B (zh) * 2016-11-29 2018-12-04 维沃移动通信有限公司 一种数据备份方法、移动终端及存储服务器
CN107465676B (zh) * 2017-07-31 2020-03-03 广州视源电子科技股份有限公司 一种向海量数据文件存储***中上传文件的方法及其装置
CN107786665A (zh) * 2017-11-06 2018-03-09 成都宏亚佳新科技有限公司 一种适应各种环境的数据传输的方法及***
CN108156245A (zh) * 2017-12-27 2018-06-12 校脸科技(北京)有限公司 一种信息上传方法及装置
CN109218435B (zh) * 2018-09-30 2021-07-23 湖北华联博远科技有限公司 一种数据上传方法及***

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103841144A (zh) * 2012-11-23 2014-06-04 中兴通讯股份有限公司 云存储***、方法、用户端及云存储服务器
CN103929453A (zh) * 2013-01-15 2014-07-16 腾讯科技(深圳)有限公司 一种上传数据的处理方法、装置及***
CN105072183A (zh) * 2015-08-10 2015-11-18 浪潮(北京)电子信息产业有限公司 云os软件仓库的管理方法和管理装置
CN110300151A (zh) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 数据文件上传方法及***

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726838A (zh) * 2021-06-17 2021-11-30 武汉理工数字传播工程有限公司 文件传输方法、装置、设备及存储介质
CN113726838B (zh) * 2021-06-17 2023-09-19 武汉理工数字传播工程有限公司 文件传输方法、装置、设备及存储介质
CN113726842A (zh) * 2021-07-09 2021-11-30 北京房江湖科技有限公司 一种文件上传方法和装置、电子设备及存储介质
CN114095493A (zh) * 2021-11-17 2022-02-25 兰州乐智教育科技有限责任公司 一种基于断点重传的文件上传方法和***
CN114826591A (zh) * 2022-05-26 2022-07-29 京东方科技集团股份有限公司 一种跨设备的数据传输方法、***及终端
CN115617760A (zh) * 2022-12-20 2023-01-17 中化现代农业有限公司 一种大批量文件快速上传的方法
CN115617760B (zh) * 2022-12-20 2023-04-18 中化现代农业有限公司 一种大批量文件快速上传的方法
CN116305192A (zh) * 2023-02-07 2023-06-23 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质
CN116305192B (zh) * 2023-02-07 2023-11-14 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110300151A (zh) 2019-10-01
CN110300151B (zh) 2022-02-11

Similar Documents

Publication Publication Date Title
WO2020233082A1 (zh) 数据文件上传方法、***、存储介质和服务器
US10754989B2 (en) Runtime self-correction for blockchain ledgers
EP3673376B1 (en) Log-structured storage systems
US11151236B2 (en) File verification database system
US20190372772A1 (en) Blockchain implementing delta storage
CN111344706B (zh) 管理区块链上的交易的方法和***
US10789215B1 (en) Log-structured storage systems
EP3669263B1 (en) Log-structured storage systems
EP3695303B1 (en) Log-structured storage systems
US11422728B2 (en) Log-structured storage systems
WO2019228571A2 (en) Log-structured storage systems
CN110995776B (zh) 区块链的区块分发方法、装置、计算机设备和存储介质
EP3695328A2 (en) Log-structured storage systems
EP3695586A2 (en) Log-structured storage systems
CN108959407B (zh) 数据的强一致性写入方法及终端设备
CN112035472B (zh) 数据处理方法、装置、计算机设备和存储介质
US20180341558A1 (en) Data recovery in a multi-pipeline data forwarder
US20200021602A1 (en) Trace-based transaction validation and commitment
US20200387432A1 (en) Snapshot restoration
CN110618974A (zh) 一种数据存储方法、装置、设备及存储介质
CN112214519A (zh) 一种数据查询方法、装置、设备及可读介质
US10664349B2 (en) Method and device for file storage
US11106811B2 (en) Object storage for guaranteed content for backup and retention
CN113468118B (zh) 一种基于区块链的文件增量存储方法、装置及存储介质
CN112817912B (zh) 文件管理方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929565

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19929565

Country of ref document: EP

Kind code of ref document: A1