CN102281121B - Method, equipment and system for transmitting and verifying data file - Google Patents

Method, equipment and system for transmitting and verifying data file Download PDF

Info

Publication number
CN102281121B
CN102281121B CN201010207720.7A CN201010207720A CN102281121B CN 102281121 B CN102281121 B CN 102281121B CN 201010207720 A CN201010207720 A CN 201010207720A CN 102281121 B CN102281121 B CN 102281121B
Authority
CN
China
Prior art keywords
data slot
crc value
data
fragment
parameter fragment
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.)
Expired - Fee Related
Application number
CN201010207720.7A
Other languages
Chinese (zh)
Other versions
CN102281121A (en
Inventor
王光辉
贾晓强
谢大
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201010207720.7A priority Critical patent/CN102281121B/en
Priority to PCT/CN2011/072118 priority patent/WO2011157074A1/en
Publication of CN102281121A publication Critical patent/CN102281121A/en
Application granted granted Critical
Publication of CN102281121B publication Critical patent/CN102281121B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0041Arrangements at the transmitter end

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The invention discloses a method, equipment and system for transmitting and verifying a data file. The main content of the invention is that: a data file is divided into a plurality of data slots by source equipment, each data slot and a crc (cyclic redundancy check) value of the data slot are respectively transmitted after the crc value of each data slot is calculated, so that target equipment which receives the data slots and the crc values of the data slots can perform verification aiming at each data slot, and therefore the target equipment can find out errors appearing in a data file transmission process in time when the data file is not transmitted completely.

Description

A kind of method of transmitting data file and verification, equipment and system
Technical field
The present invention relates to Information & Communication Technology, relate in particular to method, the equipment and system of a kind of transmitting data file and verification.
Background technology
Normal operation in order to ensure communication system, between equipment in communication system, often relate to the transmission (comprising wireless transmission or wire transmission) of data file, because the state of network in transmitting procedure is poor or the unstable problems such as encoding and decoding mistake that cause data file packet loss or data file of transmission channel, may cause the content that is transferred to the data file on target device to go wrong.For fear of the content due to data file, go wrong and cause target device to utilize wrong data file to carry out the situation of business operation failure, target device, after receiving the data file of source device transmission, need to carry out verification to this data file.
At present, the method that target device carries out verification to the data file receiving is the verification for cyclic redundancy check (CRC) (crc) field.Specific practice is:
First, source device generates data file waiting for transmission, calculates crc value, and will behind the fixed position of the crc value data writing file calculating, be transferred to target device for whole data file;
Then, target device recalculates crc value for the whole data file receiving, and the crc value that the fixed position of the crc value that target device is calculated and data file writes relatively, thereby the correctness of the data file receiving is carried out to verification.If the crc value that the crc value that comparative result is target device to be calculated writes with the fixed position of data file is mated, represent that this data file does not go wrong in transmitting procedure; Otherwise, represent that this data file goes wrong in transmitting procedure.
Above-mentioned target device to the checking procedure of data file in, source device and target device all calculate crc value for whole data file, therefore, only could checking data after the complete received data file of target device the correctness of file transfer, even also cannot find in time when the partial document data receiving has gone wrong.
Summary of the invention
The embodiment of the present invention provides method, the equipment and system of a kind of transmitting data file and verification, in order to solve in prior art, can not find in time the wrong problem in transmitting data file process.
A method for transmitting data file, the method comprises:
Source device carries out segmentation to data file waiting for transmission, obtains a plurality of data slots;
Source device calculates the cyclic redundancy check (CRC) crc value of each data slot;
Source device is placed in the crc value of each data slot in parameter fragment, and calculates the crc value of the parameter fragment after the crc value of inserting data slot, and the crc value of this parameter fragment is placed in parameter fragment;
Source device is transferred to target device by described parameter fragment and each data slot, and wherein, parameter fragment is transmitted prior to data slot.
A method for data file verification, described method comprises:
Target device, for the parameter fragment receiving, calculates the crc value of this parameter fragment, when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment of carrying in this parameter fragment, determines described parameter fragment verification succeeds;
Target device is determined the crc value of each data slot carrying in described parameter fragment;
Target device, for the data slot receiving, calculates the crc value of this data slot, and the crc value of the data slot of calculating and the crc value of the data slot receiving are compared;
If target device is determined the crc value of data slot and the crc value of this data slot receiving calculated and mated, determine this data slot verification succeeds; Otherwise, determine this data slot verification failure.
An equipment for transmitting data file, this equipment comprises:
Segmentation module, for data file is carried out to segmentation, obtains a plurality of data slots, also for generating parameter fragment;
The one crc value computing module, for calculating the cyclic redundancy check (CRC) crc value of each data slot, also for calculating the crc value of the parameter fragment after the crc value of inserting data slot;
Transport module, for transmitting the crc value of data slot and this data slot, also for transformation parameter fragment, wherein, parameter fragment is transmitted prior to data slot;
Information is inserted module, for the crc value of each data slot is placed in parameter fragment, and the crc value of this parameter fragment is placed in parameter fragment.
An equipment for data file verification, this equipment comprises:
Receiver module, for receiving the crc value of data slot and this data slot, also for receiving the crc value of parameter fragment and this parameter fragment;
The 2nd crc value computing module, for calculating the crc value of the data slot receiving, also for calculating the crc value of the parameter fragment receiving;
Correction verification module, for the crc value of the data slot of the 2nd crc value computing module calculating and the crc value of the data slot receiving are compared, if the crc value of data slot and the crc value of this data slot receiving calculated are mated, determine this data slot verification succeeds; Otherwise, determine this data slot verification failure, also, for when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment receiving, determine described parameter fragment verification succeeds;
Information determination module, for determining the crc value of each data slot that described parameter fragment is carried.
A data file check system, described system comprises source device and target device, wherein:
Source device, for data file is carried out to segmentation, obtain a plurality of data slots, calculate the cyclic redundancy check (CRC) crc value of each data slot, and just the crc value of each data slot is placed in parameter fragment, and calculates the crc value of the parameter fragment after the crc value of inserting data slot, and the crc value of this parameter fragment is placed in parameter fragment, again described parameter fragment and each data slot are transferred to target device, wherein, parameter fragment is transmitted prior to data slot; ;
Target device, be used for for the parameter fragment receiving, calculate the crc value of this parameter fragment, when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment of carrying in this parameter fragment, determine described parameter fragment verification succeeds, determine again the crc value of each data slot carrying in described parameter fragment, and for the data slot receiving, calculate the crc value of this data slot, and the crc value of the data slot of calculating and the crc value of the data slot receiving are compared, if determining the crc value of data slot and the crc value of this data slot receiving calculated mates, determine this data slot verification succeeds, otherwise, determine this data slot verification failure.
The present invention is divided into a plurality of data slots by source device by data file, and calculate after the crc value of each data slot, crc value to each data slot and data slot is transmitted respectively, the target device that makes to receive the crc value of data slot and data slot can carry out verification for each data slot, makes target device can when data file is not also transmitted completely, find the mistake occurring in transmitting data file process in time.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention one transmitting data file;
Fig. 2 (a) is the embodiment of the present invention one data file schematic diagram;
Fig. 2 (b) and Fig. 2 (c) are the data slot schematic diagram after segmentation in the embodiment of the present invention one;
Fig. 3 is the method flow schematic diagram of the embodiment of the present invention two data file verifications;
Fig. 4 is the embodiment of the present invention four transmitting data file device structure schematic diagrames;
Fig. 5 is the embodiment of the present invention five data file calibration equipment structural representations;
Fig. 6 is the embodiment of the present invention six data file check system structural representations.
Embodiment
In order to realize the object of the invention, the embodiment of the present invention proposes data file to carry out segmentation, in source device side, for each data slot, calculate crc value respectively, and the crc value of data slot and this data slot is all sent to target device, and in target device side, target device is after receiving data slot, the crc value of calculated data fragment again, the crc value of this data slot that the crc value of then target device being calculated for a certain data slot and source device send is mated, and then determines that whether the verification of this data slot is successful.Under mode of the present invention, target device can just carry out verification to the correctness of the data file receiving when receiving partial document data, when partial document data sends mistake, can find in time, has improved the accuracy of transmitting data file.
Below in conjunction with Figure of description, embodiments of the invention are elaborated.
Embodiment mono-:
As shown in Figure 1, the method for a kind of transmitting data file providing for the embodiment of the present invention one, concrete steps are:
Step 101: source device carries out segmentation to data file.
In this step, source device can carry out segmentation to data file according to the length of predefined data slot quantity and each data slot.Include but not limited to following two kinds of segmentation methods.
Method one:
Set a fragment length, according to the fragment length of setting, data file is on average divided into a plurality of data slots, if data file length cannot completely on average be divided, the length of last data slot can be less than the fragment length of setting.For example, as shown in Fig. 2 (a), be a data file that length is 0x00012000,32 byte content that only shown in Fig. 2 (a) that data file starts and 32 byte content of ending.Setting fragment length is 0x4000, and, as shown in Fig. 2 (b), whole data file is divided into 5 data slots, before the length of 4 data slots be 0x4000, last data slot is not write full, only having length is that the part of 0x2000 has write content.
Method two:
Data file is divided into the incomplete same data slot of a plurality of length, for example, data file before division still as shown in Fig. 2 (a), length is 0x00012000, data file is divided into 4 data slots as shown in Fig. 2 (c), and each data slot length respectively is 0x2000,0x6000,0x7000,0x3000.
By above-mentioned either type, data file is carried out to segmentation and obtain after data slot, need to identify each data slot successively allocated segment.For sake of convenience, to each data slot successively allocation identification, be 1,2......n.
Step 102: source device calculates the cyclic redundancy check (CRC) crc value of each data slot.
Source device is divided into data file after a plurality of data slots, utilizes cyclic redundancy check method, calculates the crc value of each data slot.
At source device, calculate after the crc value of each data slot, the embodiment of the present invention one provides but is not limited to following three kinds of methods of preserving the crc value of each data slot:
Method one: the fixed position that crc value is kept to each data slot.
Source device is kept at the crc value of each data slot calculating the fixed position of corresponding data fragment.Further, can add in the ending of non-last data slot content fragment end mark, whether the in the end ending of a data segment contents adds an EOF, so that target device can correctly judge the transmission of data slot and data file, complete.
Method two: crc value is kept in parameter fragment.
In the method, source device increases a parameter fragment at the data head of data file, for this fragment allocation sheet segment identification, for sake of convenience, for this fragment allocation sign 0, the length of fragment 0 can be to set according to actual transfer of data demand, as long as the length of fragment 0 is more than or equal to the required space of content that need to carry.
Source device writes fragment 0 by the crc value of each data slot calculating.In order to make target device that the crc value of each data slot can correctly be identified from fragment 0, when writing crc value in fragment 0, also record data slot corresponding to each crc value; Or, in fragment 0, open up the region of the crc value that is exclusively used in storage data slot, the order of the sign ascending (or descending) according to data slot, the crc value of data writing fragment successively, makes target device according to the correct relation of identification data fragment and crc value of the order of the order of the data slot receiving and the crc value that reads.
Further, the length of the length of original document total length, each data slot and parameter fragment can also be write to the relevant position of fragment 0.Whether above-mentioned three parameters can be used for the transmission that succeeding target equipment judges data file, certain data slot or parameter fragment and complete.
After above-mentioned every content that need to be kept at fragment 0 has write, source device calculates the crc value of fragment 0, and the crc value of the parameter fragment calculating is write to the fixed position of fragment 0, for succeeding target equipment according to whether success of the transmission of the crc value verification fragment 0 of parameter fragment.
Method three: crc value is kept in request message.
Source device generates a request message, and the crc value of each data slot calculating is kept in the fixed position of request message.
Further, the length of data file total length and each data slot can be write to the relevant position of request message.Whether above-mentioned two parameters can be used for the transmission that succeeding target equipment judges data file or certain data slot and complete, to determine next step operation.
Step 103: source device is transferred to target device by the crc value of data slot and this data slot.
For three kinds of methods of preserving crc value in step 102, following three kinds of transmission modes are also provided in this step, the crc value of data slot and data slot is sent to target device:
Transmission mode one:
If source device is kept at crc value the fixed position of each data slot,, in this step, source device is directly transferred to target device by each data slot.
Transmission mode two:
If source device is kept at crc value in the parameter fragment of extra setting, in this step, because the content of parameter fragment provides target device the follow-up operating basis to data slot, therefore, source device is the condition prior to data slot transmission according to parameter fragment, and described parameter fragment and each data slot are transferred to target device.More preferably, can receive after the successful response message of parameter fragments for transport that target device returns at source device, then continue transmission data slot.
Transmission mode three:
If source device is kept at crc value in request message, because the content of request message provides target device the follow-up operating basis to data slot, therefore, source device is first to target device transfer request message, and after request message transmission success, then continue transmission data slot.
By the scheme of the embodiment of the present invention one, source device sends to target device by the crc value of data slot and each data slot in several ways, due to data file burst, therefore, target device can carry out reception, the verification of data for the shorter data slot of length, has improved the accuracy of transmitting data file.
Embodiment bis-:
The embodiment of the present invention two, on the basis of the transmission data file of embodiment mono-, provides a kind of method of data file verification, as shown in Figure 3, comprises the following steps:
Step 201: target device, after receiving data slot, calculates the crc value of this data slot.
In this step, target device and source device adopt the crc value of identical algorithm calculated data fragment.
Step 202: the crc value of this data slot that the crc value that target device calculates self and source device send compares; If comparative result is crc value coupling, perform step 203; Otherwise, execution step 204.
Step 203: target device is determined this data slot verification succeeds.
Step 204: target device is determined this data slot verification failure.
Consider that source device in embodiment mono-has three kinds at least to the transmission mode of target device transmission data slot, therefore, in the scheme of the present embodiment two, target device receives data slot, and also can comprise following three kinds to the mode that data slot carries out verification:
Checking mode one:
If source device sends the crc value of data slot and data slot to target device according to the transmission mode one in step 103, after the data slot that target device reception sources equipment directly transmits, first whether the fragment end mark/EOF judgement by each data slot completes the reception of data slot/data file, and the data slot finishing receiving is carried out to verification.Its verification mode is: when target device often finishes receiving a data slot, calculate the crc value of this data slot, and compare with the crc value that is kept at fixed position in this fragment, if two crc values are not mated, the verification failure of this data slot, target device request source equipment retransmits the data slot of verification failure; Otherwise, the verification succeeds of this data slot, target device continues to receive and other data slots of verification.Until judge being transmitted of whole data file according to EOF, and during the equal verification succeeds of each fragment, target device is integrated each data slot again, obtains the data file of source device transmission.
Checking mode two:
If source device sends the crc value of data slot and data slot to target device according to the transmission mode two in step 103, first target device receives parameter fragment, and judge by the length of the parameter fragment that provides in parameter fragment whether parameter fragment is transmitted, in judgement, receive after whole parameter fragment, the crc value of the parameter fragment that calculating receives, and compare with the crc value that is kept at fixed position in parameter fragment, if two crc values are not mated, the verification failure of parameter fragment, request source equipment retransmits parameter fragment, otherwise, the verification succeeds of parameter fragment, target device extracts the crc value of each data slot carrying from parameter fragment, and the crc value checking data fragment of utilization extraction.
Target device can carry out verification to the data slot receiving according to the mode of single-threaded or multithreading.
Under single-threaded verification mode, target device is after parameter fragment verification succeeds, receive again first data slot, and judge according to the length of each data slot in parameter fragment whether the transmission of first data slot completes, in judgement, receive after first complete data slot, calculate the crc value of this first data slot, and compare with the crc value that is kept at this first data slot in parameter fragment, if two crc values are not mated, the verification failure of this data slot, target device request source equipment retransmits the data slot of verification failure; Otherwise, the verification succeeds of this data slot, continue to receive second data slot, and in the manner described above second data slot carried out to verification, until judge whole data file according to the original document total length in parameter fragment, be transmitted, and the equal verification succeeds of each data slot, target device completes the verification of whole data file.
It should be noted that, under single-threaded verification mode, target device can receive only a data slot at every turn, and receives next data slot when this data slot verification succeeds again; Target device also can receive only the individual data slot of N (N is greater than 1 positive integer) at every turn, and N data slot after this N data slot all receives during verification succeeds again; If there is not verification succeeds of at least one data slot in N data slot, target device retransmits request source equipment the data slot of verification failure, until N data slot complete verification success.
Under multithreading verification mode, target device is after parameter fragment verification succeeds, target device is to receiving when full data slot carries out verification, if target device current, do not receive in addition data slot completely, while will carry out data slot verification and receive other data slot.At current at least one data slot that carries out verification all during verification succeeds, continuation is determined and is not also carried out the data slot of data check from the data slot having received, and calculate the crc value that continues established data fragment, and carry out verification to continuing established data fragment; Otherwise request source equipment retransmits the data slot of verification failure.
Checking mode three:
If source device sends the crc value of data slot and data slot according to the transmission mode three-dimensional target device in step 103, first target device receives request message, extracts the information such as length of the crc value of each data slot and original document total length, each data slot from request message.
Target device receives after data slot, whether the transmission that judges this data slot according to the length of each data slot carrying in request message completes, in judgement, receive after complete data slot, the crc value of the data slot that calculating receives, and with request message in the crc value of this data slot of carrying compare, if two crc values are not mated, the verification of this data slot failure, target device retransmits request source equipment the data slot of verification failure; Otherwise, the verification succeeds of this data slot, continues other data slots of verification, until judge being transmitted of whole data file according to the data file total length in request message, and the equal verification succeeds of each data slot, target device completes the verification of whole data file.
Embodiment tri-:
The embodiment of the present invention three describes the scheme of embodiment mono-and embodiment bis-by concrete example.
The data file shown in transmission diagram 2 (a) of still take is example, and in the present embodiment three, source device comprises to the method that target device sends data file and target device carries out verification to the data file receiving:
The first step, setting section length are 0x4000, according to this fragment length, data file is carried out to segmentation, because data file total length is 0x00012000, so data file can be divided into 5 data slots, each data slot number consecutively is 1,2......5,0x4000 size that last data slot is not enough, segmentation result is as shown in Fig. 2 (b).
Second step, at data file head, increase the parameter fragment of a 0x4000 size, this parameter segment number is 0.In the present embodiment, the data file increasing after parameter fragment can be called to new file, the data file while not increasing parameter fragment is called original document.Due to before increasing parameter fragment, the total big or small 0x00012000 of data file, therefore, the deviation post of original file content in new file is 0x4000, except last data slot, the size of each data slot is 0x4000.
The 3rd step, the 1st of file the to the 5th data slot calculated respectively to crc value, obtain the 1st to the 5th crc1 that data slot is corresponding, crc2, crc3, crc4, crc5, and the crc value obtaining is write respectively to corresponding position in fragment 0.
The 4th step, the length of the length of the total length of described data file, each data slot and described parameter fragment is placed in to the relevant position in described parameter fragment.
The 5th step, calculating have increased the crc of the fragment 0 after every terms of information, and have write the fixed position of fragment 0.
The 6th step, the fragment of new file 0 is transferred to target device.
After the 7th step, the complete reception fragment 0 of length of target device according to parameter fragment, fragment 0 is carried out to verification.
Target device calculates the crc value of fragment 0, and with fragment 0 in the crc value of this fragment 0 of fixed position preservation compare, if comparative result is inconsistent, verification is not passed through, target device is downloaded fragment 0 again by request, turns back to the 6th step; If comparative result is consistent, verification is passed through, and represents the transmission success of fragment 0, carries out the 8th step.
The 8th step, source device arrive target device by a data fragments for transport.
The 9th step, target device receive after this data slot according to the length of data slot is complete, calculate the crc value of this fragment, and the crc value of this data slot writing in result of calculation and fragment 0 is made comparisons, if two crc values are consistent, represent this data slot transmission success, jump to the tenth step; If it is inconsistent to judge crc value, this data slot is downloaded in request again, and when the data slot verification succeeds of again downloading, jumps to the tenth step.
The tenth step, target device judge current whether complete received data file according to the length of the total length of data file and data slot, if, will receive and the data slot of verification succeeds is integrated into data file, and the operation of end data file transfer and verification; Otherwise, jump to the 8th step.
Repeat the 8th step to the ten steps, all data slots all transmit with verification succeeds after, represent the success of whole file transfer.
By the present invention program, data file is divided into a plurality of data slots and transmits, by target device, respectively the correctness of each data slot transmission is carried out to timely verification, by timely discovery erroneous transmissions, can effectively improve the accuracy of transmission; Simultaneously, target device is when finding some or a plurality of data slot error of transmission, only need request source equipment that the data slot that error of transmission occurs is transmitted again, reduced channel resource and the transmission time that while retransmitting, need to take, improved the efficiency of transmission of data file.
Embodiment tetra-:
The embodiment of the present invention four provides a kind of transmitting data file equipment, and as shown in Figure 4, this equipment comprises segmentation module 11, crc value computing module 12 and a transport module 13, wherein:
Segmentation module 11, for data file is carried out to segmentation, obtains a plurality of data slots; The one crc value computing module 12 is for calculating the cyclic redundancy check (CRC) crc value of each data slot; Transport module 13 is for transmitting the crc value of data slot and this data slot.
Described segmentation module 11 is also for generating parameter fragment; A described crc value computing module 12 is also for calculating the crc value of the parameter fragment after the crc value of inserting data slot; Described transport module 13 is also for transformation parameter fragment, and wherein, parameter fragment is transmitted prior to data slot.
Described equipment also comprises: information is inserted module 14, for the crc value of each data slot is placed in parameter fragment, and the crc of this parameter fragment is placed in parameter fragment; Further, described information is inserted module 14 also for the length of the length of the total length of described data file, each data slot and described parameter fragment is placed in described parameter fragment.
Embodiment five:
The embodiment of the present invention five provides a kind of data file calibration equipment, and as shown in Figure 5, this equipment comprises receiver module 21, the 2nd crc value computing module 22 and correction verification module 23, wherein:
Receiver module 21 is for receiving the crc value of data slot and this data slot; The 2nd crc value computing module 22 is for calculating the crc value of the data slot receiving; Correction verification module 23 is for comparing the crc value of the data slot of the 2nd crc value computing module calculating and the crc value of the data slot receiving, if the crc value of data slot and the crc value of this data slot receiving calculated are mated, determine this data slot verification succeeds; Otherwise, determine this data slot verification failure.
Described receiver module 21 is also for receiving the crc value of parameter fragment and this parameter fragment; Described the 2nd crc value computing module 22 is also for calculating the crc value of the parameter fragment receiving; Described correction verification module 23 also, for when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment receiving, is determined described parameter fragment verification succeeds.
Described equipment also comprises: information determination module 24 is for determining the crc value of each data slot that described parameter fragment is carried.
Described correction verification module 23 is also for after determining this data slot verification failure, the data slot of request retransmission verification failure.
Described correction verification module 23, specifically for often receiving after at least one data slot, calculate the crc value of described at least one data slot, and the crc value of at least one data slot calculating and the crc value that receives described at least one data slot are compared, determining that described at least one data slot is all during verification succeeds, continue to receive data slot, and calculate the crc value of the data slot continue to receive, and the data slot that continues to receive is carried out to verification, otherwise request source equipment retransmits the data slot of verification failure.
Described correction verification module 23, specifically for determining the data slot from having received after at least one data slot, the crc value of described at least one data slot of calculative determination, and the crc value of described at least one data slot calculating and the crc value that receives described at least one data slot are compared, determining that described at least one data slot is all during verification succeeds, continuation is determined and is not also carried out the data slot of data check from the data slot having received, and calculating continues the crc value of established data fragment, and carry out verification to continuing established data fragment, otherwise, request source equipment retransmits the data slot of verification failure.
The equipment providing in embodiment tetra-and embodiment five can be two physical equipments independently, realize respectively the various functions of transmitting data file, data file verification in embodiment mono-to embodiment bis-, also can be integrated in a physical equipment, the physical equipment of integrated embodiment tetra-and embodiment five, when to other equipment transmission data files, can use the Implement of Function Module data transfer operation relating in embodiment tetra-; Meanwhile, this physical equipment, when receiving the data file that other equipment transmit, can use the operation of the Implement of Function Module verification relating in embodiment five.
The embodiment of the present invention six provides a kind of data file check system, and as shown in Figure 6, this equipment comprises and connect source device 31 and target device 32, wherein:
Source device 31, for data file is carried out to segmentation, obtains a plurality of data slots, calculates the cyclic redundancy check (CRC) crc value of each data slot, and the crc value of data slot and this data slot is sent to target device 32; Target device 32 is for the data slot for receiving, calculate the crc value of this data slot, and the crc value of the data slot of calculating and the crc value of the data slot receiving are compared, if the definite crc value of data slot and crc value of this data slot receiving of calculating mated, determine this data slot verification succeeds; Otherwise, determine this data slot verification failure.
The source device 31 relating in the embodiment of the present invention six can be to realize the source device relating in embodiment mono-to embodiment tri-, and has the various functional modules that relate in embodiment tetra-; Target device 32 is to realize the target device relating in embodiment mono-to embodiment tri-, and has the various functional modules that relate in embodiment five, does not repeat them here.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.

Claims (7)

1. a method for transmitting data file, is characterized in that, the method comprises:
Source device carries out segmentation to data file, obtains a plurality of data slots;
Source device calculates the cyclic redundancy check (CRC) crc value of each data slot;
Source device is placed in the crc value of each data slot in parameter fragment, and calculates the crc value of the parameter fragment after the crc value of inserting data slot, and the crc value of this parameter fragment is placed in parameter fragment;
Source device is transferred to target device by described parameter fragment and each data slot, and wherein, parameter fragment is transmitted prior to data slot.
2. a method for data file verification, is characterized in that, described method comprises:
Target device, for the parameter fragment receiving, calculates the crc value of this parameter fragment, when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment of carrying in this parameter fragment, determines described parameter fragment verification succeeds;
Target device is determined the crc value of each data slot carrying in described parameter fragment;
Target device, for the data slot receiving, calculates the crc value of this data slot, and the crc value of the data slot of calculating and the crc value of the data slot receiving are compared;
If target device is determined the crc value of data slot and the crc value of this data slot receiving calculated and mated, determine this data slot verification succeeds; Otherwise, determine this data slot verification failure.
3. method as claimed in claim 2, is characterized in that, after determining this data slot verification failure, described method also comprises:
Target device request source equipment retransmits the data slot of verification failure.
4. an equipment for transmitting data file, is characterized in that, this equipment comprises:
Segmentation module, for data file is carried out to segmentation, obtains a plurality of data slots, also for generating parameter fragment;
The one crc value computing module, for calculating the cyclic redundancy check (CRC) crc value of each data slot, also for calculating the crc value of the parameter fragment after the crc value of inserting data slot;
Transport module, for transmitting the crc value of data slot and this data slot, also for transformation parameter fragment, wherein, parameter fragment is transmitted prior to data slot;
Information is inserted module, for the crc value of each data slot is placed in parameter fragment, and the crc value of this parameter fragment is placed in parameter fragment.
5. an equipment for data file verification, is characterized in that, this equipment comprises:
Receiver module, for receiving the crc value of data slot and this data slot, also for receiving the crc value of parameter fragment and this parameter fragment;
The 2nd crc value computing module, for calculating the crc value of the data slot receiving, also for calculating the crc value of the parameter fragment receiving;
Correction verification module, for the crc value of the data slot of the 2nd crc value computing module calculating and the crc value of the data slot receiving are compared, if the crc value of data slot and the crc value of this data slot receiving calculated are mated, determine this data slot verification succeeds, otherwise, determine this data slot verification failure; And described correction verification module also, for when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment receiving, is determined described parameter fragment verification succeeds;
Information determination module, for determining the crc value of each data slot that described parameter fragment is carried.
6. equipment as claimed in claim 5, is characterized in that,
Described correction verification module, also for after determining this data slot verification failure, the data slot of request retransmission verification failure.
7. a data file check system, is characterized in that, described system comprises source device and target device, wherein:
Source device, for data file is carried out to segmentation, obtain a plurality of data slots, calculate the cyclic redundancy check (CRC) crc value of each data slot, the crc value of each data slot is placed in parameter fragment, and calculate the crc value of the parameter fragment after the crc value of inserting data slot, and the crc value of this parameter fragment is placed in parameter fragment, again described parameter fragment and each data slot are transferred to target device, wherein, parameter fragment is transmitted prior to data slot;
Target device, be used for for the parameter fragment receiving, calculate the crc value of this parameter fragment, when the crc value of determining the parameter fragment of calculating is mated with the crc value of the parameter fragment of carrying in this parameter fragment, determine described parameter fragment verification succeeds, determine again the crc value of each data slot carrying in described parameter fragment, and for the data slot receiving, calculate the crc value of this data slot, and the crc value of the data slot of calculating and the crc value of the data slot receiving are compared, if determining the crc value of data slot and the crc value of this data slot receiving calculated mates, determine this data slot verification succeeds, otherwise, determine this data slot verification failure.
CN201010207720.7A 2010-06-13 2010-06-13 Method, equipment and system for transmitting and verifying data file Expired - Fee Related CN102281121B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201010207720.7A CN102281121B (en) 2010-06-13 2010-06-13 Method, equipment and system for transmitting and verifying data file
PCT/CN2011/072118 WO2011157074A1 (en) 2010-06-13 2011-03-24 Method, device and system for transferring and checking data files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010207720.7A CN102281121B (en) 2010-06-13 2010-06-13 Method, equipment and system for transmitting and verifying data file

Publications (2)

Publication Number Publication Date
CN102281121A CN102281121A (en) 2011-12-14
CN102281121B true CN102281121B (en) 2014-10-29

Family

ID=45106323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010207720.7A Expired - Fee Related CN102281121B (en) 2010-06-13 2010-06-13 Method, equipment and system for transmitting and verifying data file

Country Status (2)

Country Link
CN (1) CN102281121B (en)
WO (1) WO2011157074A1 (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752283B (en) * 2012-05-30 2015-05-13 福建省三奥信息科技股份有限公司 Method and system for transmitting files with large data sizes
CN107622025B (en) * 2012-11-22 2021-03-23 华为终端有限公司 Data transmission method and equipment
CN103106068B (en) * 2013-02-28 2015-03-18 江苏中科物联网科技创业投资有限公司 Internet of things big data fast calibration method
GB2519140B (en) * 2013-10-11 2021-03-10 Advanced Risc Mach Ltd Cumulative error detection in data transmission
CN104579948A (en) * 2013-10-29 2015-04-29 国家计算机网络与信息安全管理中心 Method and device for fragmenting message
CN103957080B (en) * 2014-04-30 2017-05-31 浙江中控技术股份有限公司 A kind of data integrity verifying method and system
CN105491132A (en) * 2015-12-11 2016-04-13 北京元心科技有限公司 File server, terminal and file subpackage transmission method
CN106161473A (en) * 2016-09-06 2016-11-23 北京恒华伟业科技股份有限公司 The method for uploading of a kind of data and system
CN106843958A (en) * 2017-01-18 2017-06-13 成都黑盒子电子技术有限公司 A kind of embedded firmware upgrading method
CN108512809A (en) * 2017-02-24 2018-09-07 北京优朋普乐科技有限公司 A kind of transmission method and equipment of media file
CN107172174A (en) * 2017-06-01 2017-09-15 重庆高略启达智慧城市信息技术有限公司 The quick upload of file is realized between clients and servers
CN107509085B (en) * 2017-08-24 2019-12-24 山东浪潮商用系统有限公司 Storage method and device of streaming media file
CN109525542A (en) * 2017-09-20 2019-03-26 中兴通讯股份有限公司 Data reconstruction method, transmitting/receiving means and computer readable storage medium
CN108900282A (en) * 2018-06-29 2018-11-27 南昌华勤电子科技有限公司 The method of checking data integrity
CN109194593A (en) * 2018-08-29 2019-01-11 百度在线网络技术(北京)有限公司 Method for sending information, device, equipment and computer readable storage medium
CN111104248A (en) * 2018-10-26 2020-05-05 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for verifying cached files
CN111464258B (en) * 2019-01-18 2022-10-11 阿里巴巴集团控股有限公司 Data verification method, device, computing equipment and medium
CN110138867A (en) * 2019-05-17 2019-08-16 哈工大机器人(山东)智能装备研究院 File transmission and method of reseptance, computer equipment and storage medium
CN110363027B (en) * 2019-06-21 2021-04-09 捷德(中国)科技有限公司 Electronic contract generation and electronic signature method
WO2021077335A1 (en) * 2019-10-23 2021-04-29 深圳市欢太科技有限公司 Abnormality recovery method, abnormality recovery apparatus, and mobile terminal
WO2021134418A1 (en) * 2019-12-31 2021-07-08 华为技术有限公司 Data checking method and apparatus
CN111314021A (en) * 2020-02-07 2020-06-19 北京字节跳动网络技术有限公司 Data transmission method and device, electronic equipment and computer readable storage medium
CN113872735B (en) * 2020-06-30 2023-10-24 京东方科技集团股份有限公司 Data transmission method, device and equipment
CN112655243B (en) * 2020-12-14 2022-10-28 华为技术有限公司 Data transmission method and data transmission device
CN115314486A (en) * 2022-07-20 2022-11-08 交控科技股份有限公司 Software upgrading method and device for train control system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159514A (en) * 2007-10-31 2008-04-09 中兴通讯股份有限公司 Method of adding cyclic redundancy code of transmission block
CN101272221A (en) * 2008-05-04 2008-09-24 中兴通讯股份有限公司 Transmission, receiving method and device of file data
EP2026470A1 (en) * 2007-08-17 2009-02-18 Panasonic Corporation Running cyclic redundancy check over coding segments

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673296B (en) * 2009-09-02 2011-07-20 太仓市同维电子有限公司 Method for checking file in the process of data communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2026470A1 (en) * 2007-08-17 2009-02-18 Panasonic Corporation Running cyclic redundancy check over coding segments
CN101159514A (en) * 2007-10-31 2008-04-09 中兴通讯股份有限公司 Method of adding cyclic redundancy code of transmission block
CN101272221A (en) * 2008-05-04 2008-09-24 中兴通讯股份有限公司 Transmission, receiving method and device of file data

Also Published As

Publication number Publication date
WO2011157074A1 (en) 2011-12-22
CN102281121A (en) 2011-12-14

Similar Documents

Publication Publication Date Title
CN102281121B (en) Method, equipment and system for transmitting and verifying data file
CN102546784B (en) Method for conducting batch upgrading for device firmware based on controller area network (CAN) bus
CN101031110B (en) Apparatus and method for processing bursts in wireless communication system
US7003710B2 (en) Communications method, communications apparatus and communications system using same communications apparatus
CN112217599B (en) Data frame receiving method and device, and communication method and system
CN108279910B (en) Program code programming method and device, computer equipment and storage medium
CN106031072A (en) Harq frame data structure and method of transmitting and receiving with harq in systems using blind detection
CN106843942A (en) The firmware upgrade method and Wearable of Wearable
US11356210B2 (en) Data verification information generation and feedback method, data verification information receiving method and device
US20100138573A1 (en) System including transmitter and receiver
CN111290769B (en) Method for updating configuration data on line
CN107425943A (en) Message data transmission method and device, electronic equipment and computer storage medium
CN111752579B (en) Bluetooth terminal upgrading method and device, storage medium and electronic equipment
CN101325475A (en) Method for remotely upgrading embedded system software
JP3996928B2 (en) How to handle corrupted data
CN106656424A (en) Verification method of data transmission
CN109451443B (en) Data transmission method, device and system based on Lora wireless
CN101401347B (en) Method, module and apparatus for receiving data packet frames
EP3764576A1 (en) System and method for implementing a hybrid automatic repeat request process
CN110789580A (en) Communication detection method, equipment and system of train network control system
CN117318869A (en) Message time stamp verification method, electronic equipment and storage medium
CN109286472B (en) Concurrent data asynchronous transmission method based on Beidou satellite navigation system
CN107852275A (en) Data transmission device and data transmission method, reception device and method of reseptance, program and data transmission system
CN109039536A (en) Transmission method, equipment and the readable medium of data
EP1750454A1 (en) Method, device and program for receiving and verifying payload data of a transport stream

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141029

Termination date: 20170613