CN116614495A - Data uploading method, device, equipment, storage medium and program product - Google Patents

Data uploading method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN116614495A
CN116614495A CN202310747019.1A CN202310747019A CN116614495A CN 116614495 A CN116614495 A CN 116614495A CN 202310747019 A CN202310747019 A CN 202310747019A CN 116614495 A CN116614495 A CN 116614495A
Authority
CN
China
Prior art keywords
target file
information
data
information abstract
abstract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310747019.1A
Other languages
Chinese (zh)
Inventor
刘健
杨艳光
卞永锋
张玉鑫
张同虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202310747019.1A priority Critical patent/CN116614495A/en
Publication of CN116614495A publication Critical patent/CN116614495A/en
Pending legal-status Critical Current

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]
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a data uploading method, a device, equipment, a storage medium and a program product. The invention relates to the technical field of big data. The method comprises the following steps: receiving a data uploading request sent by a client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file; retrieving a basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; if the search result is basic information matched with the first information abstract and the size of the target file, receiving a second information abstract sent by the client; and determining a data uploading strategy based on the second information abstract. And whether the target file is stored in the server is determined by comparing the two information summaries, so that the verification accuracy can be ensured, and the reliability of data uploading is improved.

Description

Data uploading method, device, equipment, storage medium and program product
Technical Field
The embodiment of the invention relates to the technical field of big data, in particular to a data uploading method, a device, equipment, a storage medium and a program product.
Background
The hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) is a request-response protocol commonly used for interactions between a browser and a server. When using a browser, a user may typically download files from a server or upload files to a server using HTTP technology. When a user transmits a large file to a server by using an HTTP technology, a Message-Digest Algorithm (md5) is generally used to calculate an MD5 value of the large file by using a browser, and after receiving the MD5 value, the server can check whether the uploaded file is consistent, thereby ensuring the file transmission integrity of the browser.
In an enterprise-level file uploading scene, a scene that the same file is repeatedly uploaded by a plurality of people with a plurality of different file names is frequently encountered, so that a large amount of storage resources of a server are wasted, and network traffic resources are wasted.
Disclosure of Invention
The embodiment of the invention provides a data uploading method, a device, equipment, a storage medium and a program product, which can save storage resources and network traffic resources.
In a first aspect, an embodiment of the present invention provides a data uploading method, including:
receiving a data uploading request sent by a client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
Retrieving a basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
if the search result is basic information matched with the first information abstract and the size of the target file, receiving a second information abstract sent by the client; wherein the second message digest is determined based on the complete data of the target file;
and determining a data uploading strategy based on the second information abstract.
In a second aspect, an embodiment of the present invention further provides a data uploading method, including:
sending a data uploading request corresponding to a target file to a server, so that the server retrieves a basic information table according to the data uploading request to obtain a retrieval result; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
receiving a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
If the search result is basic information matched with the first information abstract and the size of the target file, determining a second information abstract according to the complete data of the target file;
and sending the second information abstract to the server side, so that the server side determines a data uploading strategy according to the second information abstract.
In a third aspect, an embodiment of the present invention further provides a data uploading device, including:
the data uploading request receiving module is used for receiving a data uploading request sent by the client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
the retrieval result acquisition module is used for retrieving the basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
the second information abstract receiving module is used for receiving a second information abstract sent by the client if the search result is basic information matched with the sizes of the first information abstract and the target file; wherein the second message digest is determined based on the complete data of the target file;
And the data uploading policy determining module is used for determining the data uploading policy based on the second information abstract.
In a fourth aspect, an embodiment of the present invention further provides a data uploading device, including:
the data uploading request sending module is used for sending a data uploading request corresponding to the target file to the server, so that the server retrieves the basic information table according to the data uploading request to obtain a retrieval result; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
the search result receiving module is used for receiving a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
the second information abstract determining module is used for determining a second information abstract according to the complete data of the target file if the search result is basic information matched with the first information abstract and the size of the target file;
and the data uploading policy determining module is used for sending the second information abstract to the server side so that the server side determines the data uploading policy according to the second information abstract.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of being executed by the processor, where the processor executes the computer program to implement a data uploading method according to the embodiment of the present invention.
In a sixth aspect, a computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a data uploading method according to an embodiment of the present invention.
In a seventh aspect, a computer program product comprises a computer program which, when executed by a processor, implements a data uploading method according to an embodiment of the invention.
The embodiment of the invention discloses a data uploading method, a device, equipment, a storage medium and a program product. Receiving a data uploading request sent by a client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file; retrieving the basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file; if the search result is that basic information matched with the first information abstract and the size of the target file is searched, receiving a second information abstract sent by the client; wherein the second message digest is determined based on the complete data of the target file; a data upload policy is determined based on the second message digest. According to the data uploading method provided by the embodiment of the invention, the server side firstly searches the basic information table according to the first information abstract uploaded by the client side and the size of the target file, and if basic information matched with the first information abstract and the size of the target file is searched, the second information abstract is received to determine the data uploading strategy according to the second information abstract.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a data uploading method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data uploading method according to an embodiment of the present invention;
fig. 3 is a flowchart of a data uploading method according to an embodiment of the present invention
Fig. 4 is a signaling diagram of a data uploading method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data uploading device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data uploading device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
Fig. 1 is a flowchart of a data uploading method provided by the embodiment of the present application, where the embodiment of the present application is suitable for a case of uploading data, the method may be performed by a data uploading device, and the device may be implemented in a form of software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like. As shown in fig. 1, the method includes:
s110, receiving a data uploading request sent by a client.
The data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first message digest is determined based on the data of the set bytes of the target file. The data of the set bytes of the target file may include data of the set bytes before the target file and/or data of the set bytes after the target file, and may be, for example, data of the first 1024 bytes, data of the second 1024 bytes, or data of the first 1024 bytes and data of the second 1024 bytes of the target file.
In this embodiment, the data upload request is generated by the client. Specifically, after a target file to be uploaded is selected by a user, a browser application in a client side acquires the target file selected by the user and reads the size of the target file, if the size of the target file is greater than or equal to a set byte, a first Message Digest (MD5) corresponding to data of the set byte of the target file is calculated, and if the size of the target file is less than the set byte, a first MD5 corresponding to full-byte data of the target file is calculated; then, a unique uploading task Identification (ID) is created, a data uploading request is generated according to the first information abstract, the size of the target file and the uploading task identification, and the data uploading request is sent to the server.
And S120, searching the basic information table according to the first information abstract and the size of the target file to obtain a search result.
The search result comprises basic information which is or is not searched and matched with the first information abstract and the size of the target file. The basic information table may be understood as a table for storing basic information of an uploaded file, which may include the following information: a storage record identification, a size of a storage file, a first information digest of the storage file, a complete information digest, storage node information, physical path information of the storage file, and the like.
In this embodiment, retrieving the basic information table according to the first information abstract and the size of the target file may be understood as: comparing the sizes of the first information abstract and the target file in the received data uploading request with the sizes of the first information abstract and the storage file of the storage file in the basic information table, if the basic information of the first information abstract and the first information abstract of the storage file in the basic information table is searched, and the size of the target file is the same as the size of the storage file, the basic information matched with the sizes of the first information abstract and the target file is searched, otherwise, the basic information matched with the sizes of the first information abstract and the target file is not searched.
And S130, if the search result is that the basic information matched with the first information abstract and the size of the target file is searched, receiving a second information abstract sent by the client.
Wherein the second message digest is determined based on the complete data of the target file. In this embodiment, if the search result is that the basic information matched with the first information abstract and the size of the target file is searched, it indicates that the target file may already exist in the server, and at this time, the client needs to determine the information abstract corresponding to the complete data of the target file, that is, the second information abstract, and send the second information abstract to the server, so that the server verifies whether the target file already exists again according to the second information abstract.
And S140, determining a data uploading strategy based on the second information abstract.
In this embodiment, the process of determining the data uploading policy based on the second information abstract may be: consistency detection is carried out on the second information abstract and the complete information abstract in the basic information table; if the second information abstract is consistent with the complete information abstract in the basic information table, creating an uploading record of the target file, and returning the existing information of the target file to the client so that the client ends the data uploading task.
The complete information abstract is understood to be the size of the storage file retrieved in the previous step and the complete information abstract corresponding to the first information abstract of the storage file. The target file is indicated to exist in the server only if the file size, the first information abstract and the complete information abstract are all the same.
Specifically, the consistency detection of the second information abstract and the complete information abstract in the basic information table can be understood as follows: and comparing the second information abstract with the retrieved size of the storage file and the complete information abstract corresponding to the first information abstract of the storage file, and judging whether the second information abstract and the complete information abstract are consistent. If the second information abstract is consistent with the complete information abstract in the basic information table, the target file is indicated to exist in the server side, at the moment, an uploading record of the target file is created, and information existing in the target file is returned to the client side, so that the client side finishes a data uploading task, second uploading of the target file is realized, the phenomenon that the same file is repeatedly uploaded to waste storage space can be avoided, and network traffic resources can be saved.
Alternatively, the manner of creating the upload record of the target file may be: acquiring service characteristic information of a target file; and associating the service characteristic information with the uploading task identifier to obtain an uploading record of the target file.
Wherein the service characteristic information comprises at least one of the following: user identification, object file storage name and storage identification. The user identifier may be understood as an identifier of a user uploading the target file, the storage name of the target file may be understood as an outward presentation name of the target file, and the storage identifier may be a unique identifier created by the server and used for characterizing the storage task at this time. In this embodiment, after the service feature information of the target file is obtained, the service feature information is associated with the uploading task identifier, so as to obtain an uploading record of the target file, and the uploading record is stored, thereby realizing second uploading of the target file.
Optionally, the manner of determining the data uploading policy based on the second information summary may be: if the second information abstract is inconsistent with the complete information abstract in the basic information table, returning information which does not exist in the target file to the client so that the client can upload the target file in a slicing way; and receiving the target file uploaded by the client side in a slicing way.
Specifically, if the second information abstract is inconsistent with the complete information abstract in the basic information table, the target file is indicated to be not in the server, and at the moment, information that the target file is not in the server is returned to the client, so that the client performs fragment uploading on the target file and receives the target file uploaded by the client in fragments.
In this embodiment, if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, it indicates that the target file does not exist in the server, and the client needs to upload the target file in fragments. And feeding back the search result to the client so that the client can upload the target file in fragments and receive the target file uploaded by the client in fragments. In this embodiment, the method for uploading the target file by the client in fragments is not limited.
Optionally, determining a target storage node according to the first information abstract; and storing the target file uploaded by the client in the fragment manner to a target storage node.
The target storage node may be understood as a server node for storing the target file. In this embodiment, the correspondence between the storage node and the sub-message digest with the set number of bits before the first message digest is preconfigured. The determining of the target storage node according to the first message digest may be: first, extracting a sub-information abstract with a set bit number before a first information abstract, and then determining a storage node corresponding to the sub-information abstract as a target storage node. After the target storage node is determined, storing the target file uploaded by the client fragment to the target storage node.
According to the technical scheme, a data uploading request sent by a client is received; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file; retrieving the basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file; if the search result is that basic information matched with the first information abstract and the size of the target file is searched, receiving a second information abstract sent by the client; wherein the second message digest is determined based on the complete data of the target file; a data upload policy is determined based on the second message digest. According to the data uploading method provided by the embodiment of the invention, if the basic information matched with the first information abstract and the size of the target file is retrieved, the second information abstract is received, so that the data uploading strategy is determined according to the second information abstract.
Fig. 2 is a flowchart of a data uploading method provided by the embodiment of the present invention, where on the basis of the foregoing embodiment, the embodiment of the present invention is suitable for a case of uploading data, and the method may be performed by a data uploading device, where the device may be implemented in a form of software and/or hardware, and optionally, the method may be implemented by an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like, and the electronic device supports a browser application program. As shown in fig. 2, the method comprises the steps of:
s210, sending a data uploading request corresponding to the target file to the server, so that the server retrieves the basic information table according to the data uploading request, and obtaining a retrieval result.
The data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first message digest is determined based on the data of the set bytes of the target file. The data of the set bytes may include data of the set bytes before the target file and/or data of the set bytes after the target file, and may be, for example, data of the first 1024 bytes, data of the second 1024 bytes, or data of the first 1024 bytes and data of the second 1024 bytes of the target file.
Specifically, after a target file to be uploaded is selected by a user, a browser application in a client side acquires the target file selected by the user (for example, acquired through an onchange event) and reads the size of the target file, if the size of the target file is greater than or equal to a set byte, a first MD5 corresponding to the data of the set byte of the target file is calculated, and if the size of the target file is less than the set byte, a first MD5 corresponding to the full-byte data of the target file is calculated; then, a unique uploading task Identification (ID) is created, a data uploading request is generated according to the first information abstract, the size of the target file and the uploading task identification, and the data uploading request is sent to the server. After receiving a data uploading request, the server retrieves a basic information table according to the first information abstract and the size of the target file in the data uploading request to obtain a retrieval result, and returns the retrieval result to the client. The process of obtaining the search result may be referred to the above embodiment, and will not be described herein.
S220, receiving a search result returned by the server.
The search result comprises basic information which is or is not searched and matched with the first information abstract and the size of the target file.
And S230, if the search result is that the basic information matched with the first information abstract and the size of the target file is searched, determining a second information abstract according to the complete data of the target file.
In this embodiment, if the search result is that the basic information matched with the first information abstract and the size of the target file is searched, it indicates that the target file may already exist in the server, and at this time, the client needs to determine the information abstract corresponding to the complete data of the target file, that is, the second information abstract, and send the second information abstract to the server, so that the server verifies whether the target file already exists again according to the second information abstract.
And S240, the second information abstract is sent to the server side, so that the server side determines a data uploading strategy according to the second information abstract.
The method for determining the data uploading policy by the server according to the second information abstract may be: the server detects consistency between the second information abstract and the complete information abstract in the basic information table, if the second information abstract is consistent with the complete information abstract in the basic information table, an uploading record of the target file is created, and information existing in the target file is returned to the client, so that the client finishes a data uploading task; and if the second information abstract is inconsistent with the complete information abstract in the basic information table, returning information which does not exist in the target file to the client so that the client can upload the target file in a slicing way.
Specifically, after the second information abstract is sent to the server side, so that the server side determines the data uploading policy according to the second information abstract, the method further includes the following steps: if the information that the target file exists and returned by the server side is received, ending the data uploading task; and if the information that the target file does not exist is received and returned by the server, the target file is uploaded in a slicing way.
The process of the server side performing the consistency detection on the second information abstract and the complete information abstract in the basic information table can be referred to the above embodiment, and will not be described herein again. When the client receives the information that the server returns to the existing state of the target file, the data uploading task is ended, and the second transmission of the target file is completed; and when receiving the information that the target file does not exist and returned by the server, carrying out fragment uploading on the target file. In this embodiment, when the target file already exists at the server, it is not necessary to upload the target file, so that not only can the same file be avoided from being repeatedly uploaded and wasting storage space, but also network traffic resources can be saved.
In this embodiment, if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, it indicates that the target file does not exist in the server, and the client needs to upload the target file in fragments. In this embodiment, the method for uploading the target file by the client in fragments is not limited.
According to the technical scheme, a data uploading request corresponding to the target file is sent to the server side, so that the server side searches the basic information table according to the data uploading request, and a search result is obtained; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file; receiving a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file; if the search result is that basic information matched with the first information abstract and the size of the target file is searched, determining a second information abstract according to the complete data of the target file; and sending the second information abstract to the server side, so that the server side determines a data uploading strategy according to the second information abstract. And whether the target file is stored in the server is determined by comparing the two information summaries, so that the verification accuracy can be ensured, and the reliability of data uploading is improved.
In one embodiment, fig. 3 is a flowchart of a data uploading method according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
S301, a client generates a data uploading request comprising a first MD5, a target file size and an uploading task identifier based on a triggered data uploading operation of a user, and sends the data uploading request to a server;
s302, the server retrieves the basic information table according to the first MD5 and the size of the target file, obtains a retrieval result, and sends the retrieval result to the client;
s303, the client judges whether basic information matched with the first MD5 and the target file size is searched according to the search result; if yes, executing S304, if not, executing S308;
s304, the client determines a second MD5 according to the complete data of the target file, and sends the second MD5 to the server;
s305, the server judges whether the second MD5 is consistent with the complete information abstract in the basic information table, if so, S306 is executed, and if not, S307 is executed;
s306, the server creates an uploading record of the target file and sends information existing in the target file to the client;
s307, information that the target file does not exist is sent to the client;
s308, slicing the target file and uploading the sliced target file;
s309, the server stores the fragmented target file to a target storage node.
On the basis of the foregoing embodiment, fig. 4 is a signaling diagram of a data uploading method according to an embodiment of the present invention, as shown in fig. 4, where the method includes the following steps: 1. the client generates a data uploading request containing a first MD5, a target file size and an uploading task identifier; 2. the client sends a data uploading request to the server; 3. the server retrieves the basic information table according to the first MD5 and the size of the target file to obtain a retrieval result; 4. the server side sends the search result to the client side; 5. the client judges whether basic information matched with the first MD5 and the target file in size is searched according to the search result; 6. if the basic information matched with the first MD5 and the target file size is retrieved, the client determines a second MD5 according to the complete data of the target file; 7. the client determines a second MD5 according to the complete data of the target file; 8. the client sends a second MD5 to the server; 9. the server side judges whether the second MD5 is consistent with the complete information abstract in the basic information table; 10. if the target file is consistent, creating an uploading record of the target file; 11. transmitting information of the existing target file to a client; 12. if the target files are inconsistent, information that the target files do not exist is sent to the client; 13. when the basic information matched with the first MD5 and the target file size is not retrieved or the information that the target file does not exist is received, fragmenting the target file; 14. uploading the fragmented target file by the client; 15. and the server stores the fragmented target file to a target storage node.
Fig. 5 is a schematic structural diagram of a data uploading device according to an embodiment of the present invention, where, as shown in fig. 5, the device includes:
a data upload request receiving module 410, configured to receive a data upload request sent by a client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
the retrieval result obtaining module 420 is configured to retrieve a basic information table according to the first information abstract and the size of the target file, so as to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
a second information abstract receiving module 430, configured to receive a second information abstract sent by the client if the search result is that basic information matching the sizes of the first information abstract and the target file is searched; wherein the second message digest is determined based on the complete data of the target file;
a data uploading policy determining module 440, configured to determine a data uploading policy based on the second information summary.
Optionally, the data upload policy determining module 440 is further configured to:
performing consistency detection on the second information abstract and the complete information abstract in the basic information table;
if the second information abstract is consistent with the complete information abstract in the basic information table, creating an uploading record of the target file, and returning the existing information of the target file to the client so that the client ends the data uploading task.
Optionally, the data upload policy determining module 440 is further configured to:
acquiring service characteristic information of the target file; wherein the service characteristic information comprises at least one of the following: user identification, target file storage name and storage identification;
and associating the service characteristic information with the uploading task identifier to obtain the uploading record of the target file.
Optionally, the data uploading policy determining module is further configured to:
if the second information abstract is inconsistent with the complete information abstract in the basic information table, returning information that the target file does not exist to the client so that the client can upload the target file in a slicing way;
and receiving the target file uploaded by the client side in a slicing way.
Optionally, if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, the method further includes: the target file receiving module is used for:
the retrieval result is fed back to the client, so that the client carries out fragment uploading on the target file;
and receiving the target file uploaded by the client side in a slicing way.
Optionally, the method further comprises: a target storage node determining module, configured to:
determining a target storage node according to the first information abstract;
and storing the target file uploaded by the client in the fragmentation way to the target storage node.
Fig. 6 is a schematic structural diagram of a data uploading device according to an embodiment of the present invention, as shown in fig. 6, where the device includes:
a data uploading request sending module 510, configured to send a data uploading request corresponding to a target file to a server, so that the server retrieves a basic information table according to the data uploading request, and obtains a retrieval result; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
the search result receiving module 520 is configured to receive a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
A second information abstract determining module 530, configured to determine a second information abstract according to the complete data of the target file if the search result is that basic information matching the sizes of the first information abstract and the target file is searched;
the data uploading policy determining module 540 is configured to send the second information abstract to the server, so that the server determines a data uploading policy according to the second information abstract.
Optionally, the data upload policy determining module 540 is further configured to:
the second information abstract is sent to the server side, so that the server side carries out consistency detection on the second information abstract and the complete information abstract in the basic information table;
if the information that the target file exists and returned by the server side is received, ending the data uploading task;
and if the information that the target file does not exist is received and returned by the server, the target file is uploaded in a slicing way.
Optionally, if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, the method further includes: the fragment uploading module is used for:
and uploading the target file in a slicing way.
Fig. 7 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the data upload method.
In some embodiments, the data uploading method may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data upload method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data upload method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements a data uploading method as provided by any of the embodiments of the present application.
Computer program product in the implementation, the computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (15)

1. A method for uploading data, comprising:
receiving a data uploading request sent by a client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
Retrieving a basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
if the search result is basic information matched with the first information abstract and the size of the target file, receiving a second information abstract sent by the client; wherein the second message digest is determined based on the complete data of the target file;
and determining a data uploading strategy based on the second information abstract.
2. The method of claim 1, wherein determining a data upload policy based on the second message digest comprises:
performing consistency detection on the second information abstract and the complete information abstract in the basic information table;
if the second information abstract is consistent with the complete information abstract in the basic information table, creating an uploading record of the target file, and returning the existing information of the target file to the client so that the client ends the data uploading task.
3. The method of claim 2, wherein creating an upload record of the target file comprises:
Acquiring service characteristic information of the target file; wherein the service characteristic information comprises at least one of the following: user identification, target file storage name and storage identification;
and associating the service characteristic information with the uploading task identifier to obtain the uploading record of the target file.
4. The method of claim 2, wherein determining a data upload policy based on the second message digest comprises:
if the second information abstract is inconsistent with the complete information abstract in the basic information table, returning information that the target file does not exist to the client so that the client can upload the target file in a slicing way;
and receiving the target file uploaded by the client side in a slicing way.
5. The method of claim 1, wherein if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, feeding back the search result to the client so that the client performs fragment uploading on the target file;
and receiving the target file uploaded by the client side in a slicing way.
6. The method according to claim 4 or 5, further comprising:
Determining a target storage node according to the first information abstract;
and storing the target file uploaded by the client in the fragmentation way to the target storage node.
7. A method for uploading data, comprising:
sending a data uploading request corresponding to a target file to a server, so that the server retrieves a basic information table according to the data uploading request to obtain a retrieval result; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
receiving a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
if the search result is basic information matched with the first information abstract and the size of the target file, determining a second information abstract according to the complete data of the target file;
and sending the second information abstract to the server side, so that the server side determines a data uploading strategy according to the second information abstract.
8. The method of claim 7, wherein transmitting the second message digest to the server so that the server determines a data upload policy according to the second message digest comprises:
The second information abstract is sent to the server side, so that the server side carries out consistency detection on the second information abstract and the complete information abstract in the basic information table;
if the information that the target file exists and returned by the server side is received, ending the data uploading task;
and if the information that the target file does not exist is received and returned by the server, the target file is uploaded in a slicing way.
9. The method of claim 7, wherein if the search result is that the basic information matching the first information abstract and the size of the target file is not searched, uploading the target file in fragments.
10. A data uploading device, comprising:
the data uploading request receiving module is used for receiving a data uploading request sent by the client; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
the retrieval result acquisition module is used for retrieving the basic information table according to the first information abstract and the size of the target file to obtain a retrieval result; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
The second information abstract receiving module is used for receiving a second information abstract sent by the client if the search result is basic information matched with the sizes of the first information abstract and the target file; wherein the second message digest is determined based on the complete data of the target file;
and the data uploading policy determining module is used for determining the data uploading policy based on the second information abstract.
11. The apparatus of claim 10, wherein the data upload policy determination module is further configured to:
performing consistency detection on the second information abstract and the complete information abstract in the basic information table;
if the second information abstract is consistent with the complete information abstract in the basic information table, creating an uploading record of the target file, and returning the existing information of the target file to the client so that the client ends the data uploading task.
12. A data uploading device, comprising:
the data uploading request sending module is used for sending a data uploading request corresponding to the target file to the server, so that the server retrieves the basic information table according to the data uploading request to obtain a retrieval result; the data uploading request comprises a first information abstract, the size of a target file and an uploading task identifier; the first information abstract is determined based on the data of the set bytes of the target file;
The search result receiving module is used for receiving a search result returned by the server; the retrieval result comprises basic information which is or is not retrieved and is matched with the first information abstract and the size of the target file;
the second information abstract determining module is used for determining a second information abstract according to the complete data of the target file if the search result is basic information matched with the first information abstract and the size of the target file;
and the data uploading policy determining module is used for sending the second information abstract to the server side so that the server side determines the data uploading policy according to the second information abstract.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, wherein the processor implements the data uploading method according to any of claims 1-6 or 7-9 when executing the computer program.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a data uploading method according to any of claims 1-6 or 7-9.
15. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the data uploading method according to any of claims 1-6 or 7-9.
CN202310747019.1A 2023-06-21 2023-06-21 Data uploading method, device, equipment, storage medium and program product Pending CN116614495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310747019.1A CN116614495A (en) 2023-06-21 2023-06-21 Data uploading method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310747019.1A CN116614495A (en) 2023-06-21 2023-06-21 Data uploading method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN116614495A true CN116614495A (en) 2023-08-18

Family

ID=87680139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310747019.1A Pending CN116614495A (en) 2023-06-21 2023-06-21 Data uploading method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN116614495A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962523A (en) * 2023-09-21 2023-10-27 深圳依时货拉拉科技有限公司 Data uploading method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962523A (en) * 2023-09-21 2023-10-27 深圳依时货拉拉科技有限公司 Data uploading method and device, computer equipment and storage medium
CN116962523B (en) * 2023-09-21 2023-12-08 深圳依时货拉拉科技有限公司 Data uploading method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108334516B (en) Information pushing method and device
CN116614495A (en) Data uploading method, device, equipment, storage medium and program product
US10938633B2 (en) Facilitating resilient and fault tolerant asynchronous messaging
CN107885634B (en) Method and device for processing abnormal information in monitoring
CN112969198A (en) Data transmission method, terminal and storage medium
CN105610596B (en) Resource directory management method and network terminal
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN114172998B (en) File transmission method and device, electronic equipment and storage medium
CN114567506B (en) File uploading method and device, computer equipment and storage medium
CN114706774A (en) Interface test method, device, equipment and storage medium
CN108804195B (en) Page display method and device, server and client
CN114048059A (en) Method and device for adjusting timeout time of interface, computer equipment and storage medium
CN112732728A (en) Data synchronization method and system
CN115766696A (en) File uploading method and device, electronic equipment and storage medium
CN113722193A (en) Method and device for detecting page abnormity
CN112699116A (en) Data processing method and system
CN116610643B (en) Method, device and program product for monitoring directory compression downloading process
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN113722642B (en) Webpage conversion method and device, electronic equipment and storage medium
CN114650252B (en) Routing method and device based on enterprise service bus and computer equipment
CN114500438B (en) File sharing method and device, electronic equipment and storage medium
CN116170432A (en) File processing method and device, electronic equipment and medium
CN112069428B (en) Interface display method and device and server
CN111769965B (en) Information processing method, device and equipment
CN116455889A (en) File uploading processing method, device and system, electronic equipment and storage medium

Legal Events

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