WO2019057023A1 - 数据恢复方法、发送/接收装置和计算机可读存储介质 - Google Patents

数据恢复方法、发送/接收装置和计算机可读存储介质 Download PDF

Info

Publication number
WO2019057023A1
WO2019057023A1 PCT/CN2018/106137 CN2018106137W WO2019057023A1 WO 2019057023 A1 WO2019057023 A1 WO 2019057023A1 CN 2018106137 W CN2018106137 W CN 2018106137W WO 2019057023 A1 WO2019057023 A1 WO 2019057023A1
Authority
WO
WIPO (PCT)
Prior art keywords
fragment
information
data
abnormal
verification information
Prior art date
Application number
PCT/CN2018/106137
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 WO2019057023A1 publication Critical patent/WO2019057023A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection
    • 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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Definitions

  • the present disclosure relates to, but is not limited to, the field of communication technologies, and in particular, to a data recovery method, a transmitting/receiving apparatus, and a computer readable storage medium.
  • the method adopted by the industry is often to send the MD5 value of the file to the receiving end after the transmitting end sends the file itself, and the receiving end uses the received file to perform an MD5 calculation. If the MD5 value sent by the sender is the same, the file is complete. If it is different, the file is destroyed and the file is directly discarded. Then either prompt the user for processing or re-transmit.
  • An embodiment of the present disclosure provides a data recovery method, including: dividing a file to be transmitted into at least two fragments according to a preset fragmentation rule, and calculating verification information of each fragment; and acquiring each fragment
  • the information is sent to the data receiving device, so that the data receiving device acquires the content of each fragment according to the acquired information; and receives the actual verification information of each fragment sent by the data receiving device, wherein the actual verification information acquires each fragment for the data receiving device.
  • the verification information calculated according to the content of each fragment is matched; the verification information of each fragment is matched with the actual verification information, the fragment that fails the matching is regarded as an abnormal fragment; and the abnormal fragment is sent to the data receiving apparatus.
  • New access to information including: dividing a file to be transmitted into at least two fragments according to a preset fragmentation rule, and calculating verification information of each fragment; and acquiring each fragment
  • the information is sent to the data receiving device, so that the data receiving device acquires the content of each fragment according to the acquired information; and receive
  • Another embodiment of the present disclosure further provides a data recovery method, including: dividing a file to be transmitted into at least two fragments according to a preset fragmentation rule, and calculating verification information of each fragment; The verification information, and the acquisition information of each fragment are sent to the data receiving device; so that the data receiving device acquires the content of each fragment according to the acquisition information; and receives the identification information of the abnormal fragment sent by the data receiving device, wherein the abnormal fragmentation After acquiring the shards for the data receiving device and calculating the actual check information of each shard, if the check information of each shard is matched with the actual check information, the failed shards are matched; and the abnormality is determined according to the identification information. The location of the fragment in the file to be transmitted, the new acquisition information of the abnormal fragment is sent to the data receiving device.
  • Another embodiment of the present disclosure further provides a data recovery method, including: receiving verification information of each fragment of a file to be transmitted sent by the data sending apparatus, and obtaining information of each fragment, and acquiring according to the acquired information of each fragment
  • the shards are obtained according to the content of each shard obtained, and the verification information of each shard is matched with the actual verification information, and the fragment that fails the matching is used as the abnormal shard.
  • a data transmitting apparatus including a processor, a memory, and a communication bus, wherein the communication bus is configured to implement connection communication between the processor and the memory; the processor is configured to execute in the memory Storing at least one program to implement the following steps: dividing the file to be transmitted into at least two fragments according to a preset fragmentation rule, and calculating verification information of each fragment; and sending the information of each fragment to the data Receiving, so that the data receiving device acquires the content of each slice according to the acquired information; and receives the actual verification information of each slice sent by the data receiving device, wherein the actual verification information is obtained by the data receiving device according to each segment.
  • the verification information obtained by calculating the content of the slice; matching the verification information of each slice with the actual verification information, using the fragment that fails the matching as the abnormal fragmentation; and transmitting the new acquisition of the abnormal fragment to the data receiving apparatus information.
  • Another embodiment of the present disclosure further provides a computer readable storage medium storing at least one program, wherein at least one program is executable by a processor to implement the following steps: according to a preset fragmentation
  • the rule divides the file to be transmitted into at least two shards, and obtains the verification information of each shard; sends the acquisition information of each shard to the data receiving device; so that the data receiving device acquires the content of each shard according to the obtained information; And receiving the actual verification information of each fragment sent by the data receiving device, where the actual verification information is verification information calculated according to the content of each fragment after the data receiving device acquires each fragment; and verifying each fragment
  • the information is matched with the actual verification information, and the fragment that fails the matching is regarded as an abnormal fragment; and the new acquisition information of the abnormal fragment is transmitted to the data receiving apparatus.
  • a data transmitting apparatus including a processor, a memory, and a communication bus, wherein the communication bus is configured to implement connection communication between the processor and the memory; the processor is configured to execute in the memory Storing at least one program to implement the following steps: dividing the file to be transmitted into at least two fragments according to a preset fragmentation rule, and calculating verification information of each fragment; and verifying information of each fragment, and The acquisition information of each fragment is sent to the data receiving device, so that the data receiving device acquires the content of each fragment according to the acquisition information; and receives the identification information of the abnormal fragment sent by the data receiving device, wherein the abnormal fragment is obtained by the data receiving device.
  • the abnormal shard is determined to be transmitted according to the identification information. The location in the middle, sending new acquisition information of the abnormal fragment to the data receiving device.
  • Another embodiment of the present disclosure further provides a computer readable storage medium storing at least one program, wherein at least one program is executable by a processor to implement the following steps: according to a preset fragmentation
  • the rule divides the file to be transmitted into at least two fragments, and calculates verification information of each fragment; and sends verification information of each fragment and acquisition information of each fragment to the data receiving device, so that the data receiving device is configured according to Acquiring information to obtain the content of each fragment; receiving the identification information of the abnormal fragment sent by the data receiving device, wherein the abnormal fragment is obtained after the data receiving device acquires each fragment and calculates the actual verification information of each fragment. If the verification information of the fragment matches the actual verification information, the fragment that fails the matching is matched; and the location of the abnormal fragment in the file to be transmitted is determined according to the identification information, and the new acquisition information of the abnormal fragment is sent to the data receiving apparatus. .
  • Another embodiment of the present disclosure also provides a data receiving apparatus including a processor, a memory, and a communication bus, wherein the communication bus is configured to implement connection communication between the processor and the memory; the processor is configured to execute the memory Storing at least one program to implement the following steps: receiving verification information of each fragment of the file to be transmitted sent by the data sending apparatus, and obtaining information of each fragment, and acquiring each fragment according to the acquired information of each fragment; The content of each fragment is calculated to obtain the actual verification information of each fragment; the verification information of each fragment is matched with the actual verification information, and the fragment that fails the matching is regarded as an abnormal fragment, and the identification of the abnormal fragment is determined.
  • the information is sent to the data transmitting apparatus, wherein the identification information is used to locate the location of the abnormal fragment in the file to be transmitted; and the new acquisition information of the abnormal fragment sent by the data transmitting apparatus is received, and the new acquisition information is acquired according to the new acquisition information.
  • Another embodiment of the present disclosure further provides a computer readable storage medium storing at least one program, wherein at least one program is executable by a processor to implement the step of: receiving a data transmission device The verification information of each fragment of the file to be transmitted, and the acquisition information of each fragment, obtains each fragment according to the acquisition information of each fragment; and calculates the actual verification information of each fragment according to the content of each fragment obtained; The matching information of each fragment is matched with the actual verification information, and the fragment that fails the matching is used as the abnormal fragment, and the identification information of the abnormal fragment is sent to the data transmitting apparatus, where the identification information is used for the abnormal fragmentation. Positioning in a location in the file to be transmitted; and receiving new acquisition information of the abnormal fragment sent by the data transmitting apparatus, and acquiring a new fragment in the location of the abnormal fragment in the file to be transmitted according to the new acquisition information.
  • FIG. 1 is a flow chart of a data recovery method in accordance with an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a data transmitting apparatus according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a data recovery method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a data transmitting apparatus according to an embodiment of the present disclosure.
  • FIG. 5 is a flowchart of a data recovery method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a data receiving apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a flowchart of a data recovery method according to an embodiment of the present disclosure.
  • FIG. 8 is a flowchart of another data recovery method in accordance with an embodiment of the present disclosure.
  • the embodiment provides a data recovery method, and the file to be transmitted is transmitted in a fragmented manner.
  • the sender side calculates the shards of the file to be transmitted to obtain the check information.
  • the shards are calculated to obtain the actual check information of each shard, according to the check information.
  • the actual verification information to determine whether each fragment is transmitted incorrectly, thereby discovering the falsified part of the file to be transmitted, and performing a small part of data recovery on the falsified part, thereby achieving the effect of saving transmission time and saving transmission traffic.
  • the data recovery method in this embodiment includes:
  • S102 Send the acquisition information of each fragment to the data receiving apparatus, so that the data receiving apparatus acquires the content of each fragment according to the acquired information.
  • S103 Receive actual verification information of each fragment sent by the data receiving apparatus, where the actual verification information is verification information calculated according to content of each fragment after the data receiving apparatus acquires each fragment;
  • S105 Send new acquisition information of the abnormal fragment to the data receiving apparatus, so that the data receiving apparatus reacquires the new fragment of the location of the abnormal fragment in the file to be transmitted according to the new acquired information.
  • the data receiving device may be a mobile terminal such as a mobile phone, a tablet, or a notebook computer.
  • the data receiving device may also be a fixed terminal such as a desktop computer or a server.
  • the file to be transmitted in this embodiment may be an audio file, a video file, a file in a text format, an APP application, or the like, which is not limited in this embodiment.
  • fragmenting the file to be transferred in S101 is performed when a file to be transmitted needs to be transmitted to the data receiving device.
  • the file to be transmitted may be fragmented, and the verification information of each fragment is calculated.
  • the server finds that an application on a terminal, such as the QQ version, is not the latest version, it needs to send a QQ upgrade file to a terminal.
  • the data receiving apparatus may actively send a file download request to request a file to be transmitted, and receive a file download request sent by the data receiving apparatus at the data transmitting end.
  • the data receiving end sends a file download request to request a certain movie
  • the requested movie is divided into multiple fragments according to a preset fragmentation rule, and the calculation is performed.
  • Check information for each shard is performed.
  • the verification information in this embodiment is information for indicating the integrity of the fragmented content, and the verification information may be summary information such as an MD5 value.
  • the process of comparing the verification information of each slice before being downloaded with the actual verification information after downloading occurs on the data transmitting end side. Therefore, in this embodiment, the data receiving end acquires the content of each fragment after receiving the acquisition information of each fragment, calculates the actual verification information of each fragment, and then sends the actual verification information to the data transmitting end.
  • One side can be. It can be understood that, when the acquisition information of each fragment is sent to the data receiving end in S102, the correspondence between each fragment of the data receiving apparatus and the acquired information is inevitably notified, and the fragments of the fragments sent by the data receiving apparatus are inevitable. When the actual verification information is obtained, the correspondence between each fragment of the data transmitting end and each actual verification information is also necessarily notified.
  • the verification information of a certain fragment is different from the actual verification information, it may be determined that the content of the fragment received by the data receiving apparatus is incorrect, and the fragment is defined as an abnormal fragment.
  • the abnormal fragment is retransmitted, and the new acquired information of the abnormal fragment is transmitted to the data receiving apparatus.
  • the data receiving device reacquires the location of the fragment before the new fragment replacement in the file to be transmitted according to the new acquisition information, and obtains the complete correct file to be transmitted.
  • the data is Recovery methods also include:
  • the verification information corresponding to the new fragment is the verification information of the fragment of the same fragment as the location of the file to be transmitted in S101.
  • the verification information of the new shard is the verification information of the fifth shard calculated in the step S101.
  • the verification of the new shard can also be performed on the data receiving device side, and the data receiving device side performs the calculation of the actual verification information on the new shard after the new shard according to the new acquisition information.
  • the actual verification information of the fragment is matched with the verification information, and the new fragment that fails the matching is used as the abnormal fragment.
  • the data recovery method further includes:
  • the actual verification information of the fragment obtained by the data receiving device may be performed after all the fragments are downloaded. That is to say, after the data receiving apparatus downloads all the fragments, the actual verification information of each fragment is calculated according to the downloaded fragments, and the actual verification information is sent to the data receiving end.
  • the actual receiving information of each slice calculated by the data receiving device may be performed during the downloading process of the slice. For example, after each fragment download is completed, the data receiving apparatus calculates the actual verification information of each fragment, and sends the actual verification information of the fragment to the data transmitting end.
  • the data receiving apparatus after receiving each fragment, sends the actual verification information of the fragment to the data transmitting end for verification.
  • the actual verification information is also calculated, and then the actual verification information is sent to the data sending end for verification, until the verification information and the actual verification information of each fragment are verified. All are the same, it is determined that the file to be transmitted received by the data receiving device is correct and complete.
  • the data recovery method in this embodiment can be used for a device such as a mobile phone to request audio and video files from the server, various application software, and can also be used for MMS transmission to ensure correct transmission/reception of the MMS.
  • dividing the file to be transmitted into at least two shards according to a preset sharding rule in S101 includes: acquiring data receiving The current access network type of the device, parsing the IP address of the data receiving device, determining the downlink bandwidth of the data receiving device, and dividing the file to be transmitted into at least two points according to the access network type, the downlink bandwidth, and the size of the file to be transmitted. sheet.
  • the data access network type is a type of network used by the data receiving device to access the data transmitting end, such as a WiFi network, an LTE network, or the like.
  • the step of acquiring the current access network type of the data receiving device includes: detecting the current access network type of the data receiving device; or receiving the access network type reported by the data receiving device.
  • the downlink bandwidth is the bandwidth when the data receiving device downloads data.
  • the data transmitting end can find the downlink bandwidth of the data receiving device by analyzing the IP address of the data receiving device and finding the current node to perform downlink bandwidth measurement.
  • the file to be transmitted is divided into 50 fragments; if the current network is WIFI access, If the downstream bandwidth is >300 KB, the file to be transmitted is divided into 20 fragments.
  • the acquisition information includes at least one of the content of each slice and the download address of each slice. That is, in S102, the data receiving device may be sent to each of the fragments, and/or the download address of each slice.
  • the data receiving apparatus can perform the download of the slice by the download address, and the data receiving apparatus saves each slice and the actual download address of each slice. It can be understood that the actual download address of each slice may come from the same download source or from different download sources.
  • the data sending end detects the abnormal fragmentation and sends the new acquisition information of the abnormal fragment to the data receiving apparatus, the data receiving apparatus can identify which one of the abnormal fragments is based on the correspondence between the obtained information and the abnormal fragment.
  • an address request may be sent to the data sending apparatus, where the address request is used to request the actual data of the fragment from the data receiving apparatus.
  • IP address After receiving the actual IP address of the fragment, the data receiving end sends the key data verification information to the IP address to verify the validity of the IP address. If the IP address does not respond or returns an error value, the domain name is hijacked, the IP address is regarded as an illegal hijacking IP address, and the data receiving device is notified of the illegality of the hijacking IP address, so that the data receiving device hijacks the IP address. Data is intercepted and processed.
  • the data key calculates the HMAC value based on the file data to be transmitted, and the formula: H (B64 (H (username: password)): nonce: B64 (H (message body))), (of course, this embodiment also Other formulas can be used, where username and password have been agreed, nonce uses the file size to be transferred, and message body uses the file data.
  • the data transmitting terminal includes a processor 21, a memory 22, and a communication bus 23, wherein:
  • the communication bus 23 is configured to implement connection communication between the processor 21 and the memory 22;
  • the processor 21 is configured to execute at least one program stored in the memory 22 to implement the steps of the data recovery method described above in accordance with an embodiment of the present disclosure.
  • the embodiment further provides a computer readable storage medium storing at least one program, at least one program executable by at least one processor, to implement the steps of the data recovery method described above in the embodiment.
  • the data recovery method, the data transmitting apparatus, and the computer readable storage medium realize a small portion recovery of abnormal data by restoring abnormal fragments in the file to be transmitted received by the data receiving apparatus; saving abnormal data in The time and traffic required for recovery. Further, the situation that the infinite recovery download due to the network hijacking cannot be downloaded to the normal data is avoided. Further, the intelligent fragmentation of the file to be transmitted helps to reduce the download time of the data receiving device and the recovery time of the abnormal data.
  • the data recovery method may: when the data receiving device determines that the fragmentation of the file to be transmitted is abnormal, send the new acquisition information of the fragment to the data receiving device, implement small data recovery, save transmission traffic, and reduce time required for recovering data. .
  • the file to be transmitted is divided into at least two fragments according to a preset fragmentation rule, and the verification information of each fragment is calculated.
  • the identification information of the abnormal fragment sent by the data receiving apparatus is received, where the abnormal fragment is the verification information of each fragment after the data receiving apparatus acquires each fragment and calculates the actual verification information of each fragment. Matching failed fragments when the actual verification information is matched;
  • S304 Determine, according to the identification information, a location of the abnormal fragment in the file to be transmitted, and send new acquisition information of the abnormal fragment to the data receiving apparatus.
  • the above steps can be performed on the data transmitting side.
  • the matching process of the verification information of each slice and the actual verification information can be performed on the data receiving apparatus.
  • the data transmitting end of the embodiment sends the acquisition information of the fragment and the verification information of each fragment to the data receiving apparatus.
  • the device for implementing the above steps S301-S304 in this embodiment may be a server, or may be a mobile terminal such as a mobile phone, a tablet, a notebook computer, a fixed terminal such as a desktop computer, or the like.
  • the data receiving device may also be a server, a mobile terminal, a fixed terminal, or the like.
  • the data recovery method in this embodiment can be used for a terminal, such as a mobile phone, to download a file to be transmitted from a server, or can be used for data transmission between two terminals through a server.
  • the method of this embodiment can be used for transmission of files such as audio, video, text, APP applications, and the like, and can also be used for MMS services.
  • the end of transmitting the acquisition information is in communication connection with the data receiving device.
  • the fragmentation processing of the file to be transmitted is performed in S301 when it is required to transmit the file to be transmitted to the data receiving apparatus.
  • the file to be transmitted is actively sent to the data receiving apparatus, the file to be transmitted is sliced, and the verification information of each slice is calculated.
  • the data receiving apparatus may actively send a file download request to request a file to be transmitted, and receive a file download request sent by the data receiving apparatus at the data transmitting end.
  • the data receiving end sends a file download request to request a certain movie
  • the requested movie is divided into multiple fragments according to a preset fragmentation rule, and the calculation is performed.
  • Check information for each shard is performed.
  • the verification information in this embodiment is information for indicating the integrity of the fragmented content, and the verification information may be summary information such as an MD5 value. It can be understood that, when the acquisition information of each fragment and the verification information of each fragment are transmitted to the data receiving end in S302, the correspondence between each fragment of the data receiving apparatus and the acquisition information and the verification information is inevitably notified. On the other hand, when the identification information of the abnormal fragment transmitted by the data receiving apparatus is transmitted, the correspondence between each abnormal fragment of the data transmitting end and each identification information is inevitably notified.
  • the actual verification information of the fragment obtained by the data receiving apparatus may be performed after all the fragments are downloaded, that is, after the data receiving apparatus downloads all the fragments, according to the downloaded fragments.
  • the actual verification information of each fragment is calculated, and the verification information of each fragment is matched with the actual verification information.
  • the step of the data receiving apparatus calculating the actual verification information of each slice may be performed during the downloading process of the slice. For example, after each fragment download is completed, the data receiving apparatus calculates the actual verification information of each fragment according to the content of each fragment, and matches the verification information of each fragment with the actual verification information.
  • the data receiving apparatus acquires the new fragment according to the new acquisition information. It does not mean that the new shard is directly used to process the data for data recovery.
  • the actual verification information can be acquired on the new fragmentation side on the data receiving device side, and The verification information of the new fragment is matched with the actual verification information, and the new fragment that fails the matching is used as the abnormal fragment, and the identification information of the abnormal fragment is sent to the data transmitting apparatus.
  • the data recovery method further includes: receiving identification information of the abnormal fragment sent by the data receiving apparatus, determining a position of the abnormal fragment in the file to be transmitted according to the identification information, and transmitting a new abnormal fragment to the data receiving apparatus. Get information.
  • the verification of the new slice acquired according to the new acquisition information may be performed on the data transmitting apparatus side, and after S304, the data recovery method further includes: receiving the new transmission by the data receiving apparatus The actual verification information of the fragment is matched with the verification information of the new fragment; if the matching fails, the new fragment that fails the matching is an abnormal fragment, and the new fragment is abnormally fragmented.
  • the obtaining information is sent to the data receiving device; if the matching is successful, the feedback information is sent to the data receiving device, and the feedback information is used to indicate that the new fragment content is correct.
  • dividing the file to be transmitted into at least two shards according to the preset sharding rules in S301 includes: acquiring data receiving The current access network type of the device, parsing the IP address of the data receiving device, determining the downlink bandwidth of the data receiving device, and dividing the file to be transmitted into at least two fragments according to the access network type, the downlink bandwidth, and the size of the file to be transmitted. .
  • the data access network type is a type of network used by the data receiving device to access the data transmitting end, such as a WiFi network, an LTE network, or the like.
  • the step of acquiring the current access network type of the data receiving device includes: detecting the current access network type of the data receiving device; or receiving the access network type reported by the data receiving device.
  • the downlink bandwidth is the bandwidth when the data receiving device downloads the data, and the data transmitting end can find the current node to perform the downlink bandwidth measurement to obtain the downlink bandwidth of the data receiving device by analyzing the IP address of the data receiving device.
  • the file to be transmitted is divided into 50 fragments; or, in the current network, the WIFI is accessed.
  • the downstream bandwidth is >300 KB, the file to be transmitted is divided into 20 fragments.
  • the identification information is used to help the data transmitting end determine the abnormal fragment in the fragment of the file to be transmitted.
  • the identification information includes at least one of positioning information for determining a start position and an end position of the abnormal slice in the file to be downloaded, and a download address of the abnormal slice.
  • the positioning information may be a starting position and an ending position of the fragment in the file to be transmitted, or when the data receiving end has a serial number for each fragment, the positioning information may be a sequence number of the abnormal fragment.
  • the acquisition information includes at least one of the content of each slice and the download address of each slice. That is, in S302, the data receiving device may be sent to each of the shards, and/or the download address of each shard.
  • the data receiving device can perform the download of the slice through the download address, and the data receiving device saves each slice and the actual download address of each slice. It can be understood that the actual download address of each slice may come from the same download source or from different download sources.
  • the IP address of the abnormal fragment can be recorded as the hijacking IP address, in the process of downloading the fragment.
  • the data receiving device detects that the downloaded data (or fragmentation) is from the hijacking IP address, the data (or fragmentation) is interrupted and the data is re-routed.
  • the data sender requests data (or fragmentation) to further reduce the traffic loss caused by hijacking the IP address and avoid the data leakage of the IP address to the user, causing privacy leakage and property loss.
  • the data transmitting apparatus includes a processor 41, a memory 42, and a communication bus 43, wherein:
  • the communication bus 43 is configured to implement connection communication between the processor 41 and the memory 42;
  • the processor 41 is configured to execute at least one program stored in the memory 42 to implement the steps of the data recovery method described above in accordance with an embodiment of the present disclosure.
  • the embodiment further provides a computer readable storage medium storing at least one program, at least one program executable by at least one processor, to implement the steps of the data recovery method described above in the embodiment.
  • the data recovery method, the data sending device and the computer readable storage medium provided by the embodiments of the present disclosure save time and traffic required for recovery of abnormal data, and avoid downloading to normal data due to infinite recovery download caused by network hijacking. In the case, the download time of the data receiving device and the recovery time of the abnormal data are reduced.
  • a data recovery method includes:
  • S501 Receive verification information of each fragment of the file to be transmitted sent by the data sending apparatus, and obtaining information of each fragment, and acquire each fragment according to the acquired information of each fragment;
  • the shard is positioned at a position in the file to be transmitted;
  • the data receiving device may be a mobile terminal such as a mobile phone, a tablet, a notebook computer, a fixed terminal such as a desktop computer, or the like.
  • the data recovery method in this embodiment can be used for a terminal, such as a mobile phone, to download a file to be transmitted from a server, or can be used for data transmission between two terminals through a server.
  • the method of this embodiment can be used for the transmission of files such as audio, video, text, and APP applications, and also for the MMS service, etc., which is not limited in this embodiment.
  • the data receiving device and one end of the data transmission have a communication connection, and the network accessed by the data receiving device includes but is not limited to a 2G, 3G, 4G, 5G network and a WiFi network.
  • the data sending apparatus may actively send the information about the fragment of the file to be transmitted; or the data receiving end may actively request the data transmitting apparatus to transmit the file, that is, before S501, the data recovery method is further The method includes: sending a file download request of the file to be transmitted to the data sending device.
  • the verification information in this embodiment is information for indicating the integrity of the fragmented content, and the verification information may be summary information such as an MD5 value. It can be understood that, in S501, the acquisition information of each fragment and the verification information of each fragment are received, and the data transmitting apparatus necessarily informs the corresponding relationship between each fragment of the data receiving apparatus and the acquisition information and the verification information. When the identification information of the abnormal fragment transmitted by the data receiving apparatus is also inevitable, the correspondence relationship between each abnormal fragment of the data transmitting end and each identification information is inevitably notified.
  • the calculation of the actual verification information of each fragment and the matching of the verification information and the actual verification information may be performed during the downloading process of the fragment, or after all the fragments are downloaded. get on. For example, after downloading all the fragments, the data receiving device calculates the actual verification information of each fragment according to each downloaded fragment, and matches the verification information of each fragment with the actual verification information; or, the data After the downloading of each fragment is completed, the receiving device calculates the actual verification information of the fragment according to the content of the fragment, and matches the verification information of the fragment with the actual verification information.
  • the abnormal segment determined by the data receiving device side acquires a new point according to the new acquired information.
  • the film does not mean that the new shard is directly used for data recovery of the transmitted file.
  • a new location of the abnormal shard in the file to be transmitted is obtained according to the new obtained information.
  • the matching information corresponding to the new fragment is matched with the actual verification information; if the matching is successful, the data is restored by using the new fragment to be processed; if the matching fails, the new fragment is regarded as an abnormal fragment, and the abnormality is divided.
  • the piece of identification information is sent to the data transmitting device.
  • the determination of the new shard may be performed on the data transmitting apparatus side, and the data is restored after acquiring the new shard of the location of the abnormal shard in the file to be transmitted according to the new acquisition information.
  • the method also includes:
  • each new slice can be further verified until the actual check information of each slice is the same as the check information.
  • the data transmitting apparatus needs to divide the file to be transmitted into at least two fragments according to a preset fragmentation rule.
  • the data recovery method before receiving the verification information of each fragment of the file to be transmitted sent by the data sending apparatus, the data recovery method further includes: reporting the current access network type to the data sending apparatus.
  • the step of the data transmitting apparatus performing fragmentation on the transmission file includes: acquiring a current access network type of the data receiving apparatus, parsing an IP address of the data receiving apparatus, and determining a downlink bandwidth of the data receiving apparatus; according to the access network type, the downlink bandwidth, and The size of the file to be transferred divides the file to be transmitted into at least two fragments. For example, in the case that the current type of data receiving device accesses the network is a data network, if the downlink bandwidth is ⁇ 300 KB and the file is smaller than 1 GB, the data transmitting device divides the file to be transmitted into 50 fragments; or, the current network is WIFI. In the case of access, if the downlink bandwidth is >300 KB, the data transmitting device divides the file to be transmitted into 20 fragments.
  • the identification information is used to assist the data transmitting device in determining an abnormal slice in the slice of the file to be transmitted.
  • the identification information includes at least one of positioning information for determining a start position and an end position of the abnormal slice in the file to be downloaded, and a download address of the abnormal slice.
  • the positioning information may be a starting position and an ending position of the fragment in the file to be transmitted, or when the data receiving end has a serial number for each fragment, the positioning information may be a sequence number of the abnormal fragment.
  • the acquisition information includes at least one of the content of each slice and the download address of each slice. That is, in S501, the data transmitting apparatus may transmit each fragment, and/or a download address of each fragment.
  • the data receiving device can perform the download of the slice through the download address, and the data receiving device saves each slice and the actual download address of each slice. It can be understood that the actual download address of each slice may come from the same download source or from different download sources.
  • the IP address of the abnormal fragment can be recorded as the hijacking IP address, in the process of downloading the fragment.
  • the data receiving device detects that the downloaded data (or fragmentation) is from the hijacking IP address, the data (or fragmentation) is interrupted and the data is re-routed.
  • the data transmitting device requests data (or fragmentation) to further reduce the traffic loss caused by the hijacking of the IP address and avoid the data leakage of the IP address to cause privacy leakage and property loss to the user.
  • the data transmitting apparatus includes a processor 61, a memory 62, and a communication bus 63, wherein:
  • Communication bus 63 is configured to effect connection communication between processor 61 and memory 62;
  • the processor 61 is configured to execute at least one program stored in the memory 62 to implement the steps of the data recovery method described above in the embodiment.
  • the embodiment further provides a computer readable storage medium storing at least one program executable by at least one processor to implement the steps of the above data recovery method according to an embodiment of the present disclosure. .
  • the data recovery method, the data receiving and transmitting device and the computer readable storage medium provided by the embodiments of the present disclosure save time and traffic required for recovery of abnormal data, and avoid downloading to normal after unlimited recovery download due to network hijacking. In the case of data, the download time of the data receiving device and the recovery time of the abnormal data are reduced.
  • FIG. 7 illustrates a data recovery method according to an embodiment of the present disclosure, including:
  • the user mobile phone sends a file download request for the file to be transmitted to the server.
  • the server After receiving the file download request, the server determines, according to the file download request, the file to be transmitted.
  • the server obtains a current network type, a downlink bandwidth, and a file size of the file to be transmitted, and divides the file to be transmitted into at least two pieces according to the network type, the downlink bandwidth, and the file size of the file to be transmitted.
  • the downlink bandwidth is ⁇ 300 KB, the file is less than 1 GB, and the fragmentation is 50 copies;
  • the server calculates verification information of each fragment according to content of each fragment.
  • the server sends the verification information of each fragment and each fragment to the user's mobile phone.
  • S706 The user mobile phone receives the verification information of each fragment and each fragment, and calculates actual verification information of each fragment according to the content of each fragment after the download;
  • the above identification information includes, but is not limited to, the sequence number of the abnormal slice, the download address (the download address sent by the server), and at least one of the start and end positions of the abnormal slice in the file to be transmitted.)
  • the server receives the identification information, identifies the location of the abnormal fragment in the file to be transmitted, and generates a new fragment according to the data of the location and sends the fragment to the user's mobile phone.
  • S710 The user mobile phone receives a new shard, calculates actual check information of the new shard, and determines whether the actual check information of the new shard matches the check information. If yes, the data recovery method according to the embodiment is ended. Otherwise, , return to S708.
  • FIG. 8 illustrates a data recovery method according to an embodiment of the present disclosure, including:
  • the user mobile phone sends a file download request for the file to be transmitted to the server.
  • the server After receiving the file download request, the server determines, according to the file download request, the file to be transmitted.
  • the server obtains a current network type, a downlink bandwidth, and a file size of the file to be transmitted, and divides the file to be transmitted into at least two pieces according to the network type, the downlink bandwidth, and the file size of the file to be transmitted.
  • the downlink bandwidth is ⁇ 300 KB
  • the file is less than 1 GB
  • the fragmentation is 50
  • the downlink bandwidth > 300KB, the file is divided into 20 copies.
  • the server calculates verification information of each fragment according to content of each fragment.
  • the server sends each fragment to the user's mobile phone
  • the user mobile phone After receiving the shards, the user mobile phone calculates the actual verification information of each shard according to the content of each shard after downloading;
  • the user mobile phone sends the actual verification information of each fragment to the server.
  • S808 The server matches the verification information of each fragment with the actual verification information; if all the pieces match, the file to be transmitted downloaded by the user's mobile phone is correct and complete; if the matching fails, the process proceeds to S809;
  • the server determines a location of the abnormal fragment that fails to match in the file to be transmitted, generates a new fragment according to the data of the location, and sends the new fragment to the user mobile phone.
  • the user mobile phone receives a new fragment, calculates actual verification information of the new fragment, and sends the actual verification information to the server.
  • the S811 server determines whether the actual verification information of the new fragment matches the verification information, and if so, ends according to the embodiment, otherwise, returns to S809.
  • the data recovery method in this embodiment can not only reduce the time required for downloading files, but also can re-download data only for the wrong part when the file is in error, saving data recovery time and traffic required for data recovery, which is beneficial to the data recovery method. Reduce the cost of traffic on your phone.
  • modules or steps of the above embodiments of the present disclosure may be implemented by a general computing device, which may be concentrated on a single computing device or distributed among multiple computing devices. On the network, optionally, they may be implemented by program code executable by the computing device, such that they may be stored in a computer storage medium (ROM/RAM, disk, optical disk) by a computing device, and at some In some cases, the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps may be fabricated into a single integrated circuit module. . Therefore, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本公开公开了一种数据恢复方法、发送/接收装置、计算机可读存储介质。数据恢复方法包括根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各个分片的获取信息发送给数据接收装置;接收数据接收装置发送的各个分片的实际校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及向数据接收装置发送异常分片的新的获取信息。

Description

数据恢复方法、发送/接收装置和计算机可读存储介质 技术领域
本公开涉及但不限于通信技术领域,具体涉及一种数据恢复方法、发送/接收装置和计算机可读存储介质。
背景技术
随着移动通信的高速发展,手机已经不再是传统意义上的打电话和发短信的通讯工具。具有强大的性能和丰富的应用的手机极大地提升了人们的生活、工作和娱乐的质量。随之而来的是苹果、Android***的尺寸越来越大,包含了越来越多的应用数据。同时,单个应用的尺寸也越来越大,常常达到几百M。如果下载完成后的完整性检查不通过而需要重新下载,则浪费了时间和流量。
这个问题是因为目前在网络下有非常多的数据劫持情况存在,依靠劫持DNS(Domain Name System,域名***)解析,或者劫持数据传送侧的传送的数据进行非法篡改从而达到该目的。
为了保证数据传输的可靠性,业界采用的方法往往是在发送端发送完文件本身之后,再发送一个该文件的MD5值给接收端,接收端用收到的文件做一个MD5计算。如果和发送端发送的MD5值一样则说明文件是完整,不一样则说明文件被破坏,将文件直接丢弃。然后要么提示用户处理,要么重新传送。
发明内容
本公开的一个实施例提供一种数据恢复方法,包括:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的各个分片的实际校验信息,其中,实际校验信息为数据接收装置获取各个分片后根据各个分片的内容计算得到的校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片;以 及向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种数据恢复方法,包括:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各分片的校验信息,以及各个分片的获取信息发送给数据接收装置;以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的异常分片的识别信息,其中,异常分片为数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及根据识别信息确定异常分片在待传输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种数据恢复方法,包括:接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据各个分片的获取信息获取各个分片;根据获取的各个分片的内容计算得到各个分片的实际校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片,将异常分片的识别信息发送给数据发送装置,其中,识别信息用于对异常分片在待传输文件中的位置进行定位;以及接收数据发送装置发送的异常分片的新的获取信息,根据新的获取信息获取在待传输文件中异常分片所在位置的新分片。
本公开的另一个实施例还提供一种数据发送装置,包括处理器、存储器及通信总线,其中,通信总线被配置为实现处理器和存储器之间的连接通信;处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的各个分片的实际校验信息,其中,实际校验信息为数据接收装置获取各个分片后根据各个分片的内容计算得到的校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,其中,至少一个程序可被处理器执行,以实现如下步骤:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各个分片的获取信息发送给数据接收装置;以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的各个分片的实际校验信息,其中,实际校验信息为数据接收装置获取各个分片后根据各个分片的内容计算得到的校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种数据发送装置,包括处理器、存储器及通信总线,其中,通信总线被配置为实现处理器和存储器之间的连接通信;处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各分片的校验信息,以及各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的异常分片的识别信息,其中,异常分片为数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及根据识别信息确定异常分片在待传输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,其中,至少一个程序可被处理器执行,以实现如下步骤:根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;将各分片的校验信息,以及各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;接收数据接收装置发送的异常分片的识别信息,其中,异常分片为数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及根据识别信息确定异常分片在待传 输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
本公开的另一个实施例还提供一种数据接收装置,包括处理器、存储器及通信总线,其中,通信总线被配置为实现处理器和存储器之间的连接通信;处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据各个分片的获取信息获取各个分片;根据获取的各个分片的内容计算得到各个分片的实际校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片,将异常分片的识别信息发送给数据发送装置,其中,识别信息用于对异常分片在待传输文件中的位置进行定位;以及接收数据发送装置发送的异常分片的新的获取信息,根据新的获取信息获取在待传输文件中异常分片所在位置的新分片。
本公开的另一个实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,其中,至少一个程序可被处理器执行,以实现如下步骤:接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据各个分片的获取信息获取各个分片;根据获取的各个分片的内容计算得到各个分片的实际校验信息;对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片,将异常分片的识别信息发送给数据发送装置,其中,识别信息用于对异常分片在待传输文件中的位置进行定位;以及接收数据发送装置发送的异常分片的新的获取信息,根据新的获取信息获取在待传输文件中异常分片所在位置的新分片。
附图说明
图1为根据本公开实施例的一种数据恢复方法的流程图;
图2为根据本公开实施例的一种数据发送装置的结构示意图;
图3为根据本公开实施例的一种数据恢复方法的流程图;
图4为根据本公开实施例的一种数据发送装置的结构示意图;
图5为根据本公开实施例的一种数据恢复方法的流程图;
图6为根据本公开实施例的一种数据接收装置的结构示意图;
图7为根据本公开实施例的一种数据恢复方法的流程图;
图8为根据本公开实施例的另一种数据恢复方法的流程图。
具体实施方式
为了使本公开的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本公开实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。
为了解决当传输的数据出错时在接收端需要重新下载数据导致的数据传输时间长、浪费传输流量的问题,本实施例提供一种数据恢复方法,对待传输文件按照分片的方式进行传输,在发送端一侧对待传输文件的各分片进行计算得到校验信息,在接收端一侧下载各分片后,对各分片进行计算得到各分片的实际校验信息,根据这校验信息和实际校验信息来确定各个分片是否传输错误,由此发现待传输文件中被篡改的部分,并对被篡改的部分进行小部分数据恢复,达到节约传输时间和节约传输流量的效果。
请参见图1,本实施例的数据恢复方法包括:
S101、根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
S102、将各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;
S103、接收数据接收装置发送的各个分片的实际校验信息,其中,实际校验信息为数据接收装置获取各个分片后根据各个分片的内容计算得到的校验信息;
S104、对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及
S105、向数据接收装置发送异常分片的新的获取信息,以便数据接收装置根据新的获取信息重新获取在待传输文件中异常分片所在位置的新分片。
在本实施例中,数据接收装置可以是移动终端如手机、平板、笔 记本电脑。数据接收装置也可以是固定终端如台式电脑或服务器等。本实施例中的待传输文件可以是音频文件、视频文件、文本格式的文件、APP应用程序等等,本实施例对此没有限制。
可以理解,发送获取信息的一端与数据接收装置之间通信连接。在一个实施例中,在S101中对待传输文件进行分片是在需要向数据接收装置发送待传输文件时进行的。在一个示例性实施例中,在需要主动向数据接收装置发送待传输文件时,可以对待传输文件进行分片,计算各个分片的校验信息。例如,当服务器发现某个终端上的某个应用如QQ版本不是最新版本时,需要向某终端发送QQ升级文件。在另一个示例性实施例中,数据接收装置可以主动发送文件下载请求来请求待传输文件,在数据发送端接收到数据接收装置发送的文件下载请求。例如,在数据接收端发送文件下载请求来请求某部电影的情况下,在数据发送端接收到文件下载请求后,将被请求的电影根据预设的分片规则分为多个分片,计算每个分片的校验信息。
本实施例中的校验信息是用于对分片内容的完整性进行指示的信息,该校验信息可以是摘要信息如MD5值。在本实施例中,对各个分片在被下载前的校验信息和下载后的实际校验信息进行比较的过程发生在数据发送端一侧。因此,在本实施例中,数据接收端只要在接收到各分片的获取信息后获取各分片内容,计算出各分片的实际校验信息,然后将实际校验信息发送给数据发送端一侧即可。其中,可以理解的是,在S102中将各分片的获取信息发送给数据接收端时,必然告知数据接收装置各个分片与获取信息的对应关系,而在数据接收装置发送的各分片的实际校验信息时,也必然告知数据发送端各分片与各个实际校验信息的对应关系。
当某个分片的校验信息和实际校验信息不同,则可以判定数据接收装置接收的该分片的内容错误,并将该分片定义为异常分片。为了实现数据接收装置的数据恢复,且降低数据恢复需要的时间和流量,本实施例中,只对异常分片进行再传输,将异常分片的新的获取信息发送给数据接收装置。数据接收装置根据新的获取信息重新获取新的分片替换之前的分片在待传输文件中的位置,就可以得到完整的正确 的待传输文件。
进一步的,为了确保根据新的获取信息获取的新分片的正确性,避免该新分片再次出错,本实施例中,在向数据接收装置发送异常分片的新的获取信息后,该数据恢复方法还包括:
接收数据接收装置发送的新分片的实际校验信息,其中,新分片为数据接收装置根据新的获取信息获取的分片;以及
对所述新分片对应的校验信息和实际校验信息进行匹配,其中,在匹配失败的情况下,则将匹配失败的新分片作为异常分片,将异常分片的新的获取信息发送给数据接收装置。
可以理解的是,新分片对应的校验信息是在S101中与新分片在待传输文件的位置相同的分片的校验信息。例如,如果该新分片是待传输文件中的第五个分片,则该新分片的校验信息是在S101步骤中计算得到的第五个分片的校验信息。
在本实施例中,对新分片的校验还可以在数据接收装置侧进行,数据接收装置侧根据新的获取信息在新分片后对新分片进行实际校验信息的计算,将新分片的实际校验信息和校验信息进行匹配,并且匹配失败的新分片作为异常分片。本实施例的一个示例中,在向数据接收装置发送异常分片的新的获取信息后,该数据恢复方法还包括:
接收数据接收装置发送的异常分片的识别信息,根据识别信息确定异常分片在待传输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
根据上述的两种方式可以有效保证在数据接收装置一侧,S104中匹配出的异常分片能够被替换为正常分片,保证待传输文件的正确性。
可以理解的是,数据接收装置计算得到分片的实际校验信息可以是在所有的分片都下载完成后进行。也就是说,数据接收装置在下载完所有的分片后,根据下载的各分片计算得到各分片的实际校验信息,将实际校验信息发送给数据接收端。另外,数据接收装置计算得到各分片的实际校验信息可以是在分片的下载过程中进行。例如,数据接收装置在每一个分片下载完成后,计算每个分片的实际校验信息,将该分片的实际校验信息发送给数据发送端。
可以理解的是,在本实施例中,数据接收装置在接收到每一个分片后都会将该分片的实际校验信息发送给数据发送端进行校验。对于通过S105中新的获取信息获取的分片,也会计算其实际校验信息,然后将实际校验信息发送给数据发送端进行校验,直到各个分片的校验信息和实际校验信息都相同,才确定数据接收装置接收的待传输文件正确且完整。
本实施例的数据恢复方法,可以用于手机等装置向服务器请求音、视频文件,各种应用软件,还可以用于彩信传输以确保彩信的正确发送/接收。
可以理解,待传输文件的分片数量以及各个分片的大小,会影响异常分片在恢复时所需的时间和流量。为了尽可能地加快分片的下载速度以及待下载文件的恢复速度,在一个实施例中,S101中的根据预设的分片规则将待传输文件分为至少两个分片包括:获取数据接收装置当前的接入网络类型,解析数据接收装置的IP地址,确定数据接收装置的下行带宽;以及根据接入网络类型、下行带宽、以及待传输文件的大小将待传输文件分为至少两个分片。
在一个示例性实施例中,数据接入网络类型是数据接收装置接入数据发送端使用的网络的类型,例如WiFi网络,LTE网络等等。获取数据接收装置当前的接入网络类型的步骤包括:检测数据接收装置当前的接入网络类型;或者接收数据接收装置上报的接入网络类型。下行带宽是数据接收装置下载数据时的带宽。数据发送端可以通过解析数据接收装置的IP地址,查找当前的节点进行下行带宽测速得到数据接收装置的下行带宽。例如,在当前数据接收装置接入网络的类型是数据网络的情况下,如果下行带宽<300KB,文件小于1GB,则将待传输文件分成50个分片;在当前网络是WIFI接入的情况下,如果下行带宽>300KB,则将待传输文件分成20个分片。
在本实施例中,获取信息包括各个分片的内容和各个分片的下载地址中的至少一个。即在S102中,发送给数据接收装置的可以是各个分片,和/或是各个分片的下载地址。当发送的是各分片的下载地址时,数据接收装置可以通过该下载地址进行分片的下载,数据接收装置保 存各个分片以及各分片的实际下载地址。可以理解的是,各分片的实际下载地址可能来自相同的下载源也可能来自不同的下载源。当数据发送端检测到异常分片,并将异常分片的新的获取信息发送给数据接收装置后,数据接收装置可以根据获取信息与异常分片的对应关系识别出异常分片是哪一个分片,并将异常分片的IP地址记为劫持IP地址,在本次分片下载过程中。或者,在以后的数据下载(或者文件分片下载)过程中,当数据接收装置检测到下载的数据来自劫持IP地址时,则中断数据(或分片)的下载,重新向数据发送端请求数据(或分片),进一步降低劫持IP地址给用户带来的流量损失以及避免劫持IP地址的数据给用户造成隐私泄露、财产损失等问题。
进一步的,本实施例中,当发现某分片的校验信息和实际校验信息不相同时,可以向数据发送装置发送地址请求,该地址请求用于向数据接收装置请求该分片的实际IP地址。数据接收端接收到分片的实际IP地址后,向该IP地址发送密钥数据校验信息进行该IP地址的合法性校验。若是该IP地址未响应或者返回错误值,则为域名劫持,将该IP地址视为非法的劫持IP地址,并告知数据接收装置该劫持IP地址的非法性,以便数据接收装置对劫持IP地址的数据进行拦截等处理。这里,数据密钥以待传输文件数据为基础计算出HMAC值,公式:H(B64(H(username:password)):nonce:B64(H(message body))),(当然,本实施例也可以采用其他公式),其中username、password已经约定,nonce采用待传输文件大小值,message body使用文件数据。
本公开的一个实施例还提供了一种数据发送终端。参见图2所示,数据发送终端包括处理器21、存储器22及通信总线23,其中:
通信总线23被配置为实现处理器21和存储器22之间的连接通信;
处理器21被配置为执行存储器22中存储的至少一个程序,以实现根据本公开实施例的上述的数据恢复方法的步骤。
本实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,至少一个程序可被至少一个处理器执行,以实现本实施例上述的数据恢复方法的步骤。
本公开实施例提供的数据恢复方法、数据发送装置和计算机可读 存储介质,通过对数据接收装置接收的待传输文件中异常分片的恢复实现了异常数据的小部分恢复;节约了异常数据在恢复时需要的时间以及流量。进一步的,避免了因为存在网络劫持引起的无限恢复下载都无法下载到正常数据的情况。进一步的,对待传输文件的智能分片有助于降低数据接收装置的下载时间以及异常数据的恢复时间。
参见图3,本实施例公开了另一种数据恢复方法。该数据恢复方法可以数据接收装置判断出待传输文件的分片异常时,将该分片的新的获取信息发送给数据接收装置,实现小数据的恢复,节约传输流量,降低恢复数据需要的时间。
S301、根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
S302、将各分片的校验信息以及各个分片的获取信息发送给数据接收装置,以便数据接收装置根据获取信息获取各个分片的内容;
S303、接收数据接收装置发送的异常分片的识别信息,其中,异常分片为数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及
S304、根据识别信息确定异常分片在待传输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
在本实施例中,上述的步骤可以在数据发送端一侧进行。对各分片的校验信息和实际校验信息的匹配过程可以在数据接收装置上进行。为了实现数据接收装置的该匹配过程,本实施例的数据发送端将分片的获取信息和各分片的校验信息都发送给数据接收装置。本实施例中实现上述的S301-S304步骤的装置可以是服务器,也可以是移动终端如手机、平板、笔记本电脑,固定终端如台式电脑等。数据接收装置也可以是服务器,移动终端,固定终端等。本实施例的数据恢复方法可以用于终端如手机从服务器上下载待传输文件,也可以用于两个终端之间通过服务器进行数据的传输。本实施例的方法既可以用于音频、视频、文本、APP应用程序等文件的传输,也可以用于彩信业务。
可以理解,发送获取信息的一端与数据接收装置之间通信连接。在一个实施例中,在S301中在需要向数据接收装置发送待传输文件时进行待传输文件的分片处理。具体的,在一个示例性实施例中,可以在需要主动向数据接收装置发送待传输文件时,对待传输文件进行分片,计算各个分片的校验信息。例如,当运营商服务器需要主动向数据接收装置发送彩信时,对该彩信进行分片以及校验信息的计算。在另一个示例性实施例中,在S301中,数据接收装置可以主动发送文件下载请求来请求待传输文件,在数据发送端接收到数据接收装置发送的文件下载请求。例如,在数据接收端发送文件下载请求来请求某部电影的情况下,在数据发送端接收到文件下载请求后,将被请求的电影根据预设的分片规则分为多个分片,计算每个分片的校验信息。
本实施例中的校验信息是用于对分片内容的完整性进行指示的信息,该校验信息可以是摘要信息如MD5值。可以理解的是,在S302中将各分片的获取信息以及各分片的校验信息发送给数据接收端时,必然告知数据接收装置各个分片与获取信息以及校验信息的对应关系。而在数据接收装置发送的异常分片的识别信息时,也必然告知数据发送端各异常分片与各个识别信息的对应关系。
在数据接收装置侧,当检验到某个分片的校验信息和实际校验信息不同时,则可以判定数据接收装置接收的该分片的内容错误,将该分片定义为异常分片。可以理解的是,数据接收装置计算得到分片的实际校验信息可以是在所有的分片都下载完成后进行的,即数据接收装置在下载完所有的分片后,根据下载的各分片计算得到各分片的实际校验信息,对各分片的校验信息和实际校验信息进行匹配。另外,数据接收装置计算得到各分片的实际校验信息的步骤可以是在分片的下载过程中进行。例如,数据接收装置在每一个分片下载完成后,根据各分片的内容计算每个分片的实际校验信息,对各分片的校验信息和实际校验信息进行匹配。
可以理解的是,本实施例中,对于数据接收装置判断出的异常分片,在通过S305下发该异常分片的新的获取信息后,数据接收装置根据新的获取信息获取新分片,并不意味者新分片直接用来对待传输文 件进行数据恢复。为了确定新分片的正确性和完整性,避免根据新的获取信息获取的新分片异常,在本实施中,可以在数据接收装置侧对新分片进行实际校验信息的获取,以及对新分片的校验信息和实际校验信息进行匹配,将匹配失败的新分片作为异常分片,向数据发送装置发送异常分片的识别信息。所以在S304之后,该数据恢复方法还包括:接收数据接收装置发送的异常分片的识别信息,根据识别信息确定异常分片在待传输文件中的位置,向数据接收装置发送异常分片的新的获取信息。
在另一个示例性实施例中,对于根据新的获取信息获取的新分片的校验可以在数据发送装置一侧进行,在S304之后,该数据恢复方法还包括:接收数据接收装置发送的新分片的实际校验信息,对所述新分片的实际校验信息与校验信息进行匹配;若匹配失败,则将匹配失败的新分片为异常分片,将异常分片的新的获取信息发送给数据接收装置;如匹配成功,则向数据接收装置发送反馈信息,反馈信息用于表示所述新分片内容正确。
可以理解,待传输文件的分片数量以及各个分片的大小,会影响异常分片在恢复时所需的时间和流量。为了尽可能地加快分片的下载速度以及待下载文件的恢复速度,在一个实施例中,S301中的根据预设的分片规则将待传输文件分为至少两个分片包括:获取数据接收装置当前的接入网络类型,解析数据接收装置的IP地址,确定数据接收装置的下行带宽;根据接入网络类型、下行带宽、以及待传输文件的大小将待传输文件分为至少两个分片。这里,数据接入网络类型是数据接收装置接入数据发送端使用的网络的类型,例如WiFi网络,LTE网络等等。获取数据接收装置当前的接入网络类型的步骤包括:检测数据接收装置当前的接入网络类型;或者接收数据接收装置上报的接入网络类型。下行带宽是数据接收装置下载数据时的带宽,数据发送端可以通过解析数据接收装置的IP地址,查找当前的节点进行下行带宽测速得到数据接收装置的下行带宽。例如,在当前数据接收装置接入网络的类型是数据网络的情况下,如果下行带宽<300KB,文件小于1GB,则将待传输文件分成50个分片;或者,在当前网络是WIFI接 入的情况下,如果下行带宽>300KB,则将待传输文件分成20个分片。
在本实施例中,识别信息用于帮助数据发送端确定待传输文件的分片中的异常分片。具体的,识别信息包括用于确定异常分片在待下载文件中的起始位置和结束位置的定位信息,和异常分片的下载地址中的至少一种。该定位信息可以是该分片在待传输文件中的起始位置和结束位置,或者,当数据接收端对各个分片设有序号时,该定位信息可以是异常分片的序号。
在本实施例中,获取信息包括各个分片的内容和各个分片的下载地址中的至少一个。即在S302中,发送给数据接收装置的可以是各个分片,和/或是各个分片的下载地址。当发送的是各分片的下载地址时,数据接收装置可以通过该下载地址进行分片的下载,数据接收装置保存各个分片以及各分片的实际下载地址。可以理解的是,各分片的实际下载地址可能来自相同的下载源也可能来自不同的下载源。当数据接收装置检测到异常分片后,可以将异常分片的IP地址记为劫持IP地址,在本次分片下载过程中。或者,在以后的数据下载(或者文件分片下载)过程中,当数据接收装置检测到下载的数据(或分片)来自劫持IP地址时,则中断数据(或分片)的下载,重新向数据发送端请求数据(或分片),进一步降低劫持IP地址给用户带来的流量损失以及避免劫持IP地址的数据给用户造成隐私泄露、财产损失等问题。
本公开的一个实施例还提供了一种数据发送装置。参见图4所示,该数据发送装置包括处理器41、存储器42及通信总线43,其中:
通信总线43被配置为实现处理器41和存储器42之间的连接通信;
处理器41被配置为执行存储器42中存储的至少一个程序,以实现根据本公开实施例的上述的数据恢复方法的步骤。
本实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,至少一个程序可被至少一个处理器执行,以实现本实施例上述的数据恢复方法的步骤。
本公开实施例提供的数据恢复方法、数据发送装置和计算机可读存储介质,节约了异常数据在恢复时需要的时间以及流量,避免了因为存在网络劫持引起的无限恢复下载都无法下载到正常数据的情况, 降低了数据接收装置的下载时间以及异常数据的恢复时间。
参见图5,根据本公开的一个实施例提供了一种数据恢复方法,包括:
S501、接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据各个分片的获取信息获取各个分片;
S502、根据获取的各个分片的内容计算得到各个分片的实际校验信息;
S503、对各个分片的校验信息和实际校验信息进行匹配,将匹配失败的分片作为异常分片,将异常分片的识别信息发送给数据发送装置,其中,识别信息用于对异常分片在待传输文件中的位置进行定位;
S504、接收数据发送装置发送的异常分片的新的获取信息,根据新的获取信息获取在待传输文件中异常分片所在位置的新分片。
上述的方法步骤在数据接收装置侧实现,数据接收装置可以是移动终端如手机、平板、笔记本电脑,固定终端如台式电脑等。本实施例的数据恢复方法可以用于终端如手机从服务器上下载待传输文件,也可以用于两个终端之间通过服务器进行数据的传输。本实施例的方法既可以用于音频、视频、文本、APP应用程序等文件的传输,也可以用于彩信业务等等,本实施例对此没有限制。
可以理解,数据接收装置和发送数据的一端具有通信连接,数据接收装置接入的网络包括但不限于2G、3G、4G、5G网络以及WiFi网络。本实施例中,可以是数据发送装置主动发送待传输文件的分片的获取信息;也可以是数据接收端一侧主动向数据发送装置请求待传输文件,即在S501前,该数据恢复方法还包括:向数据发送装置发送待传输文件的文件下载请求。
本实施例中的校验信息是用于对分片内容的完整性进行指示的信息,该校验信息可以是摘要信息如MD5值。可以理解的是,在S501中接收各分片的获取信息以及各分片的校验信息,数据发送装置必然告知了数据接收装置各个分片与获取信息以及校验信息的对应关系。数据接收装置发送的异常分片的识别信息时也必然告知数据发送端各 异常分片与各个识别信息的对应关系。
在本实施例中,对各分片的进行实际校验信息的计算以及进行校验信息和实际校验信息的匹配,可以在分片的下载过程中进行,也可以在分片全部下载完后进行。例如,数据接收装置在下载完所有的分片后,根据下载的各分片计算得到各分片的实际校验信息,对各分片的校验信息和实际校验信息进行匹配;或者,数据接收装置在每一个分片下载完成后,根据该分片的内容计算该分片的实际校验信息,对该分片的校验信息和实际校验信息进行匹配。
可以理解的是,本实施例中,对于数据接收装置侧判断出的异常分片,在接收到数据发送装置下发的该异常分片的新的获取信息后,根据新的获取信息获取新分片,并不意味者新分片直接用来对待传输文件进行数据恢复,为了确定新分片的正确性和完整性,在根据新的获取信息获取在待传输文件中异常分片所在位置的新分片后,该数据恢复方法还包括:
根据新分片的内容计算得到新分片的实际校验信息;
将新分片对应的校验信息与实际校验信息进行匹配;若匹配成功,则以新分片对待传输文件进行数据恢复;若匹配失败,则将新分片作为异常分片,将异常分片的识别信息发送给数据发送装置。
在另一个示例性实施例中,对于新分片的判断可以在数据发送装置一侧进行,在根据新的获取信息获取在待传输文件中异常分片所在位置的新分片后,该数据恢复方法还包括:
根据所述新分片的内容计算得到所述新分片的实际校验信息,将新分片的实际校验信息发送给数据发送装置;以便数据发送装置对新分片的校验信息和实际校验信息进行匹配;
接收数据发送装置发送反馈信息或异常分片的新的获取信息;其中,反馈信息用于表示所述新分片内容正确;可以理解的是,若是新分片的匹配失败,则该新分片也会作为异常分片。
由此,各个新分片都可以进行进一步的校验,直到各个分片的实际校验信息与校验信息相同。
可以理解,待传输文件的分片数量以及各个分片的大小,会影响 异常分片在恢复时所需的时间和流量。为了尽可能地加快分片的下载速度以及待下载文件的恢复速度,需要数据发送装置根据预设的分片规则将待传输文件分为至少两个分片。在一个实施例中,在接收数据发送装置发送的待传输文件各分片的校验信息前,该数据恢复方法还包括:向数据发送装置上报自身当前的接入网络类型。数据发送装置对待传输文件进行分片的步骤包括:获取数据接收装置当前的接入网络类型,解析数据接收装置的IP地址,确定数据接收装置的下行带宽;根据接入网络类型、下行带宽、以及待传输文件的大小将待传输文件分为至少两个分片。例如,在当前数据接收装置接入网络的类型是数据网络的情况下,如果下行带宽<300KB,文件小于1GB,则数据发送装置将待传输文件分成50个分片;或者,在当前网络是WIFI接入的情况下,如果下行带宽>300KB,则数据发送装置将待传输文件分成20个分片。
在本实施例中,识别信息用于帮助数据发送装置确定待传输文件的分片中的异常分片。具体的,识别信息包括用于确定异常分片在待下载文件中的起始位置和结束位置的定位信息,和异常分片的下载地址中的至少一种。该定位信息可以是该分片在待传输文件中的起始位置和结束位置,或者,当数据接收端对各个分片设有序号时,该定位信息可以是异常分片的序号。
在本实施例中,获取信息包括各个分片的内容和各个分片的下载地址中的至少一个。即在S501中,数据发送装置发送的可以是各个分片,和/或是各个分片的下载地址。当发送的是各分片的下载地址时,数据接收装置可以通过该下载地址进行分片的下载,数据接收装置保存各个分片以及各分片的实际下载地址。可以理解的是,各分片的实际下载地址可能来自相同的下载源也可能来自不同的下载源。当数据接收装置检测到异常分片后,可以将异常分片的IP地址记为劫持IP地址,在本次分片下载过程中。或者,在以后的数据下载(或者文件分片下载)过程中,当数据接收装置检测到下载的数据(或分片)来自劫持IP地址时,则中断数据(或分片)的下载,重新向数据发送装置请求数据(或分片),进一步降低劫持IP地址给用户带来的流量损失 以及避免劫持IP地址的数据给用户造成隐私泄露、财产损失等问题。
本公开的一个实施例还提供了一种数据接收装置。参见图6所示,该数据发送装置包括处理器61、存储器62及通信总线63,其中:
通信总线63被配置为实现处理器61和存储器62之间的连接通信;
处理器61被配置为执行存储器62中存储的至少一个程序,以实现本实施例上述的数据恢复方法的步骤。
本实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有至少一个程序,至少一个程序可被至少一个处理器执行,以实现根据本公开实施例的上述的数据恢复方法的步骤。
本公开实施例提供的数据恢复方法、数据接收发送装置和计算机可读存储介质,节约了异常数据在恢复时需要的时间以及流量,避免了因为存在网络劫持引起的无限恢复下载都无法下载到正常数据的情况,降低了数据接收装置的下载时间以及异常数据的恢复时间。
下面结合图7和图8对数据恢复方法进行详细的示例说明。假设数据发送装置是服务器,数据接收装置是用户手机。图7示出了根据本公开一个实施例的一种数据恢复方法,包括:
S701、用户手机向服务器发送对待传输文件的文件下载请求;
S702、服务器接收到文件下载请求后,根据文件下载请求确定待传输文件;
S703、服务器获取用户手机当前的网络类型、下行带宽,以及待传输文件的文件大小,根据网络类型、下行带宽,以及待传输文件的文件大小将待传输文件分为至少两片;
(例如,(1)在当前网络是数据网络的情况下,下行带宽<300KB,文件小于1GB,则将分片成50份;(2)在当前网络是WIFI接入的情况下,下行带宽>300KB,则将文件分片成20份。)
S704、服务器根据各个分片的内容计算各分片的校验信息;
S705、服务器将各分片的校验信息以及各个分片发送给用户手机;
S706、用户手机接收各分片以及各分片的校验信息,根据下载后各分片的内容计算各分片的实际校验信息;
S707、对各分片的校验信息和实际校验信息进行匹配;若全部分片匹配都通过,则全部分片都是正确、完整的分片;若匹配未通过,则进入S708;
S708、将匹配失败的异常分片的识别信息发送给服务器;
(上述的识别信息包括但不限于异常分片的序号,下载地址(服务器发送的下载地址)、异常分片在待传输文件中的启起始和结束位置中的至少一个。)
S709、服务器接收识别信息,识别异常分片在待传输文件中的位置,根据该位置的数据生成新的分片下发给用户手机;
S710、用户手机接收新的分片,计算新分片的实际校验信息,判断新分片的实际校验信息与校验信息是否匹配,若是,则结束根据本实施例的数据恢复方法,否则,返回S708。
图8示出了根据本公开一个实施例的数据恢复方法,包括:
S801、用户手机向服务器发送对待传输文件的文件下载请求;
S802、服务器接收到文件下载请求后,根据文件下载请求确定待传输文件;
S803、服务器获取用户手机当前的网络类型、下行带宽,以及待传输文件的文件大小,根据网络类型、下行带宽,以及待传输文件的文件大小将待传输文件分为至少两片;
(例如,(1)在当前网络是数据网络的情况下,下行带宽<300KB,文件小于1GB,则将分片成50份,(2)在当前网络是WIFI接入的情况下,下行带宽>300KB,则将文件分片成20份。)
S804、服务器根据各个分片的内容计算各分片的校验信息;
S805、服务器将各个分片发送给用户手机;
S806、用户手机接收各分片后,根据下载后各分片的内容计算各分片的实际校验信息;
S807、用户手机将各分片的实际校验信息发送给服务器;
S808、服务器对各分片的校验信息和实际校验信息进行匹配;若全部分片匹配通过,则用户手机下载的待传输文件是正确、完整的;若匹配未通过,则进入S809;
S809、服务器确定匹配失败的异常分片在待传输文件中的位置,根据该位置的数据生成新的分片,将该新分片发送给用户手机;
S810、用户手机接收新的分片,计算新分片的实际校验信息,将该实际校验信息发送给服务器;
S811服务器判断新分片的实际校验信息与校验信息是否匹配,若是,则结束根据本实施例,否则,返回S809。
通过本实施例的数据恢复方法,不仅可以降低下载文件需要的时间,在文件出错时,还可以只针对错误的部分进行数据的再下载,节约数据恢复时间和数据恢复所需的流量,有利于降低用户手机的流量费用。
显然,本领域的技术人员应该明白,上述本公开实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本公开不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本公开实施例所作的进一步详细说明,不能认定本公开的具体实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保护范围。

Claims (17)

  1. 一种数据恢复方法,包括:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的所述各个分片的实际校验信息,其中,所述实际校验信息为所述数据接收装置获取所述各个分片后根据各个分片的内容计算得到的校验信息;
    对所述各个分片的校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及
    向所述数据接收装置发送所述异常分片的新的获取信息。
  2. 如权利要求1所述的数据恢复方法,其中,所述根据预设的分片规则将待传输文件分为至少两个分片的步骤包括:
    获取所述数据接收装置当前的接入网络类型,确定所述数据接收装置的下行带宽;以及
    根据所述接入网络类型、所述下行带宽、以及所述待传输文件的大小将所述待传输文件分为至少两个分片。
  3. 如权利要求1或2所述的数据恢复方法,其中,所述获取信息包括各个分片的内容和各个分片的下载地址中的至少一个。
  4. 如权利要求1或2所述的数据恢复方法,其中,在向所述数据接收装置发送所述异常分片的新的获取信息后,所述数据恢复方法还包括:
    接收所述数据接收装置发送的新分片的实际校验信息,其中,所述新分片为所述数据接收装置根据所述新的获取信息获取的分片;以及
    对所述新分片对应的校验信息和实际校验信息进行匹配,其中,在匹配失败的情况下,则将匹配失败的所述新分片作为异常分片,将所述异常分片的新的获取信息发送给所述数据接收装置。
  5. 一种数据恢复方法,包括:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各分片的所述校验信息,以及各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的异常分片的识别信息,其中,所述异常分片为所述数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时匹配失败的分片;以及
    根据所述识别信息确定所述异常分片在所述待传输文件中的位置,向所述数据接收装置发送所述异常分片的新的获取信息。
  6. 如权利要求5所述的数据恢复方法,其中,所述根据预设的分片规则将待传输文件分为至少两个分片的步骤包括:
    获取所述数据接收装置当前的接入网络类型,确定所述数据接收装置的下行带宽;以及
    根据所述接入网络类型、所述下行带宽、以及所述待传输文件的大小将所述待传输文件分为至少两个分片。
  7. 如权利要求5或6所述的数据恢复方法,其中,所述识别信息包括用于确定所述异常分片在所述待下载文件中的起始位置和结束位置的定位信息,和所述异常分片的所述下载地址中的至少一者。
  8. 如权利要求5或6所述的数据恢复方法,其中,所述获取信息包括所述各个分片的内容和所述各个分片的下载地址中的至少一者。
  9. 一种数据恢复方法,包括:
    接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据所述各个分片的获取信息获取各个分片;
    根据获取的各个分片的内容计算得到各个分片的实际校验信息;
    对各个分片的所述校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片,将所述异常分片的识别信息发送给所述数据发送装置,其中,所述识别信息用于对所述异常分片在所述待传输文件中的位置进行定位;以及
    接收所述数据发送装置发送的所述异常分片的新的获取信息,根据所述新的获取信息获取在所述待传输文件中所述异常分片所在位置的新分片。
  10. 如权利要求9所述的数据恢复方法,其中,所述识别信息包括用于确定所述异常分片在所述待下载文件中的起始位置和结束位置的定位信息,和所述异常分片的下载地址中的至少一者。
  11. 如权利要求9所述的数据恢复方法,其中,根据所述新的获取信息获取在所述待传输文件中所述异常分片所在位置的新分片后,所述数据恢复方法还包括:
    根据所述新分片的内容计算得到所述新分片的实际校验信息;
    将所述新分片对应的所述校验信息与所述实际校验信息进行匹配,其中,在匹配成功的情况下,则以所述新分片对所述待传输文件进行数据恢复;在匹配失败的情况下,则将所述新分片作为异常分片,将所述异常分片的识别信息发送给所述数据发送装置。
  12. 一种数据发送装置,包括处理器、存储器及通信总线,其中
    所述通信总线被配置为实现处理器和存储器之间的连接通信;
    所述处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的所述各个分片的实际校验信息,其中,所述实际校验信息为所述数据接收装置获取所述各个分片后根据各个分片的内容计算得到的校验信息;
    对所述各个分片的校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及
    向所述数据接收装置发送所述异常分片的新的获取信息。
  13. 一种计算机可读存储介质,存储有至少一个程序,其中,所述至少一个程序被处理器执行,以实现如下步骤:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的所述各个分片的实际校验信息,其中,所述实际校验信息为所述数据接收装置获取所述各个分片后根据各个分片的内容计算得到的校验信息;
    对所述各个分片的校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片;以及
    向所述数据接收装置发送所述异常分片的新的获取信息。
  14. 一种数据发送装置,包括处理器、存储器及通信总线,其中
    所述通信总线被配置为实现处理器和存储器之间的连接通信;
    所述处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各分片的所述校验信息,以及各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的异常分片的识别信息,其中,所述异常分片为所述数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及
    根据所述识别信息确定所述异常分片在所述待传输文件中的位置,向所述数据接收装置发送所述异常分片的新的获取信息。
  15. 一种计算机可读存储介质,存储有至少一个程序,其中,所述至少一个程序被处理器执行,以实现如下步骤:
    根据预设的分片规则将待传输文件分为至少两个分片,计算得到各个分片的校验信息;
    将各分片的所述校验信息,以及各个分片的获取信息发送给数据接收装置,以便所述数据接收装置根据所述获取信息获取所述各个分片的内容;
    接收所述数据接收装置发送的异常分片的识别信息,其中,所述异常分片为所述数据接收装置获取各个分片并计算得到各个分片的实际校验信息后,对各分片的校验信息和实际校验信息进行匹配时,匹配失败的分片;以及
    根据所述识别信息确定所述异常分片在所述待传输文件中的位置,向所述数据接收装置发送所述异常分片的新的获取信息。
  16. 一种数据接收装置,包括处理器、存储器及通信总线,其中
    所述通信总线被配置为实现处理器和存储器之间的连接通信;
    所述处理器被配置为执行存储器中存储的至少一个程序,以实现如下步骤:
    接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据所述各个分片的获取信息获取各个分片;
    根据获取的各个分片的内容计算得到各个分片的实际校验信息;
    对各个分片的所述校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片,将所述异常分片的识别信息发送给所述数据发送装置,其中,所述识别信息用于对所述异常分片在所述待传输文件中的位置进行定位;
    接收所述数据发送装置发送的所述异常分片的新的获取信息,根据所述新的获取信息获取在所述待传输文件中所述异常分片所在位置的新分片。
  17. 一种计算机可读存储介质,存储有至少一个程序,其中,所述至少一个程序被处理器执行,以实现如下步骤:
    接收数据发送装置发送的待传输文件各个分片的校验信息,以及各个分片的获取信息,根据所述各个分片的获取信息获取各个分片;
    根据获取的各个分片的内容计算得到各个分片的实际校验信息;
    对各个分片的所述校验信息和所述实际校验信息进行匹配,将匹配失败的分片作为异常分片,将所述异常分片的识别信息发送给所述数据发送装置,其中,所述识别信息用于对所述异常分片在所述待传输文件中的位置进行定位;以及
    接收所述数据发送装置发送的所述异常分片的新的获取信息,根据所述新的获取信息获取在所述待传输文件中所述异常分片所在位置的新分片。
PCT/CN2018/106137 2017-09-20 2018-09-18 数据恢复方法、发送/接收装置和计算机可读存储介质 WO2019057023A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710855524.2A CN109525542A (zh) 2017-09-20 2017-09-20 数据恢复方法、发送/接收装置和计算机可读存储介质
CN201710855524.2 2017-09-20

Publications (1)

Publication Number Publication Date
WO2019057023A1 true WO2019057023A1 (zh) 2019-03-28

Family

ID=65769367

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106137 WO2019057023A1 (zh) 2017-09-20 2018-09-18 数据恢复方法、发送/接收装置和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109525542A (zh)
WO (1) WO2019057023A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112969198A (zh) * 2021-02-24 2021-06-15 天冕信息技术(深圳)有限公司 数据传输方法、终端及存储介质
CN116185512A (zh) * 2023-04-25 2023-05-30 深圳艾为电气技术有限公司 用于ptc驱动器的驱动加载方法、装置、设备及介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314021A (zh) * 2020-02-07 2020-06-19 北京字节跳动网络技术有限公司 数据传输方法、装置、电子设备及计算机可读存储介质
CN111368279B (zh) * 2020-02-25 2023-04-18 深圳市腾讯计算机***有限公司 数据处理方法、装置、计算机可读存储介质和计算机设备
CN112165533B (zh) * 2020-10-21 2023-04-18 苏州智加科技有限公司 数据校验、传输方法、装置、设备、***及存储介质
CN113541865A (zh) * 2021-06-21 2021-10-22 浙江中控技术股份有限公司 组态传输方法、装置、电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001038990A1 (en) * 1999-11-24 2001-05-31 Telia Ab Procedure and system for determining a measure of probability regarding the identity between different examples of a data file
CN101179392A (zh) * 2006-12-12 2008-05-14 腾讯科技(深圳)有限公司 一种上传文件的方法和***
CN103731499A (zh) * 2013-12-31 2014-04-16 兴天通讯技术(天津)有限公司 终端和文件传输方法
CN104539739A (zh) * 2015-01-26 2015-04-22 浙江大学 一种文件上传的***、方法及装置
CN105119967A (zh) * 2015-07-15 2015-12-02 天脉聚源(北京)教育科技有限公司 一种图片分割传输方法及装置
CN106686078A (zh) * 2016-12-26 2017-05-17 北汽福田汽车股份有限公司 数据传输方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453478B (zh) * 2007-11-28 2013-07-03 新奥特(北京)视频技术有限公司 一种在文件传输中的完整性校验方法
CN101291195B (zh) * 2008-05-23 2011-01-19 中兴通讯股份有限公司 实现断点续传的文件下载的方法、***及终端
CN101848188A (zh) * 2009-03-25 2010-09-29 上海聚力传媒技术有限公司 对数据块校验信息进行更新的方法和装置
CN102281121B (zh) * 2010-06-13 2014-10-29 中兴通讯股份有限公司 一种数据文件传输和校验的方法、设备及***
CN104185216B (zh) * 2013-05-28 2018-09-04 腾讯科技(深圳)有限公司 一种文件的传输方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001038990A1 (en) * 1999-11-24 2001-05-31 Telia Ab Procedure and system for determining a measure of probability regarding the identity between different examples of a data file
CN101179392A (zh) * 2006-12-12 2008-05-14 腾讯科技(深圳)有限公司 一种上传文件的方法和***
CN103731499A (zh) * 2013-12-31 2014-04-16 兴天通讯技术(天津)有限公司 终端和文件传输方法
CN104539739A (zh) * 2015-01-26 2015-04-22 浙江大学 一种文件上传的***、方法及装置
CN105119967A (zh) * 2015-07-15 2015-12-02 天脉聚源(北京)教育科技有限公司 一种图片分割传输方法及装置
CN106686078A (zh) * 2016-12-26 2017-05-17 北汽福田汽车股份有限公司 数据传输方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112969198A (zh) * 2021-02-24 2021-06-15 天冕信息技术(深圳)有限公司 数据传输方法、终端及存储介质
CN116185512A (zh) * 2023-04-25 2023-05-30 深圳艾为电气技术有限公司 用于ptc驱动器的驱动加载方法、装置、设备及介质
CN116185512B (zh) * 2023-04-25 2023-07-21 深圳艾为电气技术有限公司 用于ptc驱动器的驱动加载方法、装置、设备及介质

Also Published As

Publication number Publication date
CN109525542A (zh) 2019-03-26

Similar Documents

Publication Publication Date Title
WO2019057023A1 (zh) 数据恢复方法、发送/接收装置和计算机可读存储介质
US10681127B2 (en) File upload method and system
JP5989807B2 (ja) ソフトウェアのインストール方法、デバイスおよびシステム
CN109586969B (zh) 内容分发网络容灾方法、装置、计算机设备及存储介质
CN110166201B (zh) 一种副链路数据的指示方法及终端设备
WO2017092348A1 (zh) 一种键值对数据库中的客户端配置更新方法、设备及***
WO2022193447A1 (zh) 数据报文去重与传输方法、电子设备及存储介质
US10630530B2 (en) Cache method, cache edge server, cache core server, and cache system
WO2016015573A1 (zh) 一种终端建立连接的方法、装置及***
CN105338090A (zh) 一种基于WebSocket的断点续传方法及装置
CN106656966B (zh) 一种拦截业务处理请求的方法和装置
CN110557255A (zh) 一种证书管理的方法和装置
WO2017097106A1 (zh) 一种文件差量的传输方法以及装置
CN112839003A (zh) 数据校验方法及***
CN111083049B (zh) 一种用户表项恢复方法、装置、电子设备及存储介质
CN112087475B (zh) 一种云平台组件应用的消息推送方法、装置及消息服务器
CN110740163A (zh) 幂等性控制方法、装置、电子设备及可读存储介质
CN112131041A (zh) 用于管理数据放置的方法、设备和计算机程序产品
JP6089346B2 (ja) オブジェクトを取得する方法、装置およびシステム
JP6478191B2 (ja) メッセージ送信方法、モバイルブロードバンド装置およびホスト
WO2014032553A1 (zh) 一种网络资源管理方法、装置、客户端及***
WO2017071430A1 (zh) 处理报文的方法、网卡及***、更新信息的方法及主机
WO2017113240A1 (zh) 一种处理保活探测报文的方法、装置及***
WO2019205895A1 (zh) 寻呼方法、网络设备及终端
CN112688905B (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: 18858205

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 1205 DATED 08/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18858205

Country of ref document: EP

Kind code of ref document: A1