CN115604251A - File breakpoint continuous transmission method, device, equipment and readable storage medium - Google Patents

File breakpoint continuous transmission method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN115604251A
CN115604251A CN202211233445.5A CN202211233445A CN115604251A CN 115604251 A CN115604251 A CN 115604251A CN 202211233445 A CN202211233445 A CN 202211233445A CN 115604251 A CN115604251 A CN 115604251A
Authority
CN
China
Prior art keywords
transmitted
packet
data
packet data
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211233445.5A
Other languages
Chinese (zh)
Inventor
刘延朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hollysys Automation Co Ltd
Original Assignee
Hangzhou Hollysys Automation Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hollysys Automation Co Ltd filed Critical Hangzhou Hollysys Automation Co Ltd
Priority to CN202211233445.5A priority Critical patent/CN115604251A/en
Publication of CN115604251A publication Critical patent/CN115604251A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a file breakpoint continuous transmission method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: receiving packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and checking the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file; if the verification fails, taking the packet number of the currently received packet data as a first packet number, and updating an interrupt record through the first packet number and a first interrupt mark; when the packet data to be transmitted is retransmitted, continuous transmission is carried out according to the interrupt record; if the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed. The problem of transmission efficiency is low because data transmission is restarted after transmission interruption is solved.

Description

File breakpoint continuous transmission method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of data transmission, and in particular, to a method, an apparatus, a device, and a readable storage medium for file breakpoint resume.
Background
With the development of technology, in industrial production, an industrial configuration file needs to be issued to a controller to realize control calling. The existing industrial configuration files are mainly distributed to a controller through a network in a network sub-packet mode by using an Ethernet as a carrier.
In the process of issuing the industrial configuration file, in order to ensure the accuracy of the data, a check bit is added at the end of each packet of data, the whole data is checked after the data is sent, and if any packet fails to be issued, the transmission is restarted from the beginning in the whole sending process. When the data volume of the industrial configuration file is large, the industrial configuration file only checks the data integrity, the front and back sequence of the data is easily disordered, the network abnormality of the controller occurs in the transmission process of the system at the moment, the transmission fails, the data which is transmitted is covered by the transmission from the beginning again, and the transmission efficiency of the configuration file is extremely reduced if the data is transmitted to the last packet in an extreme case and the transmission fails suddenly.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device and a readable storage medium for breakpoint resuming a file, which solve the problem in the prior art that if transmission is interrupted, data transmission needs to be resumed, resulting in low transmission efficiency.
In order to solve the technical problem, the invention provides a file breakpoint resuming method, which comprises the following steps:
receiving packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and verifying the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
if the verification fails, taking the packet number of the currently received packet data as a first packet number, and updating an interrupt record through the first packet number and a first interrupt mark;
when the packet data to be transmitted is retransmitted, continuing transmission according to the interrupt record;
if the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed.
Optionally, the receiving packet data to be transmitted includes:
judging whether the packet data to be transmitted has an interruption record or not;
if so, reading a first packet number and a first interrupt mark corresponding to the interrupt record, and receiving the packet data to be transmitted with the first packet number as a starting point;
if not, receiving the data of the packet to be transmitted.
Optionally, after the transmission of the packet data to be transmitted is completed, the method further includes:
verifying the data content integrity of the data of the packet to be transmitted;
and if the verification is successful, determining that the transmission of the packet data to be transmitted is finished.
Optionally, the checking the packet number sequence and the data content integrity of the currently received packet data includes:
checking the check bit of the currently received packet data; the check bit is generated according to the packet number and the data content of the packet data to be transmitted.
Optionally, after the step of taking the packet number of the currently received packet data as a first packet number and updating the interrupt record through the first packet number and a first interrupt flag if the checking fails, the method further includes:
and outputting the information of the interruption of the packet data transmission to be transmitted.
Optionally, before outputting the information of the packet data transmission interruption to be transmitted, the method further includes:
and generating the information of the packet data transmission interruption to be transmitted according to the first packet number and the first interruption mark.
The invention also provides a file breakpoint continuous transmission device, which comprises:
the first execution module is used for receiving the packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and verifying the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
an interruption updating module, configured to, if the checking fails, take a packet number of the currently received packet data as a first packet number, and update an interruption record through the first packet number and a first interruption flag;
the sub-packet continuous transmission module is used for carrying out continuous transmission according to the first interrupt record when the packet data to be transmitted is retransmitted;
and the second execution module is used for continuously executing the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data until the transmission of the packet data to be transmitted is finished if the verification is successful.
Optionally, the first execution module includes:
the judging unit is used for judging whether the packet data to be transmitted has an interrupt record;
the first execution unit is used for reading a second packet number and a second interrupt mark corresponding to the interrupt record if the packet data to be transmitted has the interrupt record, and receiving the packet data to be transmitted with the second packet number as a starting point;
and the second execution unit is used for receiving the packet data to be transmitted if the packet data to be transmitted does not have the interrupt record.
The invention also provides a file breakpoint continuous transmission device, which comprises:
a transmission section for performing transmission of packet data to be transmitted; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled according to the sequence of the industrial configuration file;
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the file breakpoint resuming method.
The invention further provides a readable storage medium for storing a computer program, wherein the computer program realizes the steps of the file breakpoint resuming method when being executed by a processor.
The invention can be seen in that the data package to be transmitted is received, the data package to be transmitted is transmitted according to the package number sequence of the data package to be transmitted, and the package number sequence and the data content integrity of the currently received data package are verified, wherein the data package to be transmitted is the data which is subjected to sub-package processing and labeled according to the sequence by the industrial configuration file. And if the verification fails, taking the packet number of the currently received packet data as a first packet number, updating the interrupt record through the first packet number and the first interrupt mark, and continuing to transmit according to the interrupt record when the packet data to be transmitted is retransmitted. If the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed. The invention can ensure the sequence of the data to be transmitted and improve the checking efficiency by performing sub-packet processing on the industrial configuration file, labeling each packet of data to obtain the data of the data to be transmitted and checking the sequence of the packet number and the data integrity of each packet of data. If the verification fails, the current packet number and the interrupt mark are stored so as to accurately position the interrupt position when the transmission is to be restarted, and the problem of low transmission efficiency caused by restarting data transmission if the transmission is interrupted in the prior art is solved.
In addition, the invention also provides a file breakpoint continuous transmission device, equipment and a readable storage medium, and the device, the equipment and the readable storage medium also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a file breakpoint resuming method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for receiving packet data to be transmitted according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for resuming a file breakpoint according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a file breakpoint resuming device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a file breakpoint resuming device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a file breakpoint resuming method according to an embodiment of the present invention. The method can comprise the following steps:
s101: and receiving the packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and checking the packet number sequence and the data content integrity of the currently received packet data.
The execution subject of this embodiment is a terminal. The present embodiment is not limited to the type of the terminal, and may be any terminal as long as it can complete the operation of resuming the file transmission after the file is powered off in the present embodiment, and for example, the terminal may be a general-purpose terminal or a dedicated terminal. The data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence by the industrial configuration file. The present embodiment does not limit the basis for the number of packets to be packetized for the industrial profile, as long as the packetized transmission of the industrial profile can be completed after the packetized processing, for example, the packetized processing may be performed according to the transmission speed, the faster the transmission speed is, the smaller the number of packets is, or the packetized processing may be performed according to the data size of the industrial profile, and the larger the data size of the industrial profile is, the larger the number of packets is. It should be noted that the packet data to be transmitted in this embodiment may be packet data transmitted for the first time, or packet data retransmitted after interruption, where if the packet data to be transmitted is packet data retransmitted after interruption, the received packet data to be transmitted takes the interruption as a start position.
The present embodiment does not limit the starting time of the program for receiving the packet data to be transmitted, and the packet data to be transmitted may be received when it needs to be transmitted, for example, the packet data to be transmitted may be received after being prepared, or may be received after receiving the starting instruction. The frequency of receiving the packet data to be transmitted is not limited in this embodiment, and the operation of receiving the packet data to be transmitted can be completed in time, for example, the packet data to be transmitted can be received in real time, or the packet data can be received once every preset receiving time period. The preset value of the preset receiving time period is not limited in this embodiment, and may be, for example, 5 seconds or 7 seconds. In order to ensure that the packet data to be transmitted can be received in time and the real-time property of file breakpoint continuous transmission is ensured, the embodiment may adopt a real-time receiving mode.
Further, in order to ensure that the packet data to be transmitted is accurately received, the receiving of the packet data to be transmitted may include the following steps, specifically referring to fig. 2, where fig. 2 is a flowchart of a method for receiving the packet data to be transmitted according to an embodiment of the present invention, and specifically includes:
s201: and judging whether the packet data to be transmitted has an interrupt record. If the packet data to be transmitted has an interruption record, executing step S202; if the packet data to be transmitted does not have the interruption record, step S203 is executed.
S202: if the packet data to be transmitted has the interrupt record, reading a first packet number and a first interrupt mark corresponding to the interrupt record, and receiving the packet data to be transmitted with the first packet number as a starting point.
In this embodiment, if the packet data to be transmitted has the interrupt record, the packet data to be transmitted at the interrupt position is searched through the interrupt record, and the packet data to be transmitted is transmitted using the interrupt record as a starting point. It should be noted that, the packet data to be transmitted at the interrupted position is searched through the interrupt record, so that the transmission efficiency of the packet data to be transmitted is improved, and the problem that the packet data needs to be retransmitted after transmission failure is solved.
S203: and if the packet data to be transmitted does not have the interrupt record, receiving the packet data to be transmitted.
In this embodiment, if there is no interrupt record in the packet data to be transmitted, the packet data to be transmitted is directly received. It should be noted that if there is no interruption record in the packet data to be transmitted, the packet data to be transmitted may be determined as the first transmission.
Further, in order to improve the efficiency of checking the packet number sequence and the data content integrity of the currently received packet data, the checking the packet number sequence and the data content integrity of the currently received packet data may include: and checking the check bit.
In this embodiment, the check bits are generated according to the packet number and the data content of the packet data to be transmitted. It should be noted that the operation of verifying the packet number sequence and the data content integrity of the currently received packet data can be completed by verifying the check bits of the currently received packet data.
S102: and if the verification fails, taking the packet number of the currently received packet data as a first packet number, and updating the interrupt record through the first packet number and the first interrupt mark.
In this embodiment, if the checking of the packet number sequence and the data content integrity of the currently received packet data fails, the packet number of the currently received packet data is used as the first packet number, and the interrupt record is updated by the first packet number and the first interrupt flag. The first interrupt mark is identification information generated after verification fails.
Further, in order to output the information of the packet data transmission interruption to be transmitted in time so that the operator can take measures, if the verification fails, the method may further include, after updating the interruption record by using the first packet number and the first interruption flag, the packet number of the currently received packet data as the first packet number: and outputting the information of the interruption of the transmission of the packet data to be transmitted.
In this embodiment, after the existence of the information of the interruption of the packet data transmission to be transmitted is detected, the information is output. The present embodiment does not limit the frequency of detecting the information of the packet data transmission interruption to be transmitted, and may be configured as long as the information of the packet data transmission interruption to be transmitted can be detected in time and output, for example, the detection may be performed in real time, that is, after each detection operation is performed, the next detection operation is performed immediately, or the detection operation may be performed once every preset detection time period. The preset value of the preset detection time period is not limited in this embodiment, and may be, for example, 1 second or 3 seconds. The setting basis of the set value of the preset detection time period is not limited in this embodiment, for example, the setting may be performed according to the data volume of each packet of the to-be-transmitted packet data, and the smaller the data volume of each packet of the to-be-transmitted packet data is, the smaller the set value of the preset detection time period is; the setting may also be performed according to the transmission speed of the packet data to be transmitted, and the faster the transmission speed of the packet data to be transmitted is, the smaller the setting value of the preset detection time period is. In order to ensure that the information of the packet data transmission interruption to be transmitted can be output in time, the embodiment may adopt a real-time detection mode, and output the information after detecting the information of the packet data transmission interruption to be transmitted.
Further, in order to output a specific interruption position where the transmission of the packet data to be transmitted is interrupted, before outputting the information that the transmission of the packet data to be transmitted is interrupted, the method may further include: and generating the information of the packet data transmission interruption to be transmitted according to the first packet number and the first interruption mark.
In this embodiment, information of interruption of packet data transmission to be transmitted is generated according to the first packet number and the first interruption flag, and is used to output a specific interruption position of the packet data transmission to be transmitted.
S103: and when the packet data to be transmitted is retransmitted, continuing transmission according to the interrupt record.
It should be noted that, when the packet data to be transmitted is retransmitted, the packet number at the interrupt position of the packet data to be transmitted is read according to the interrupt record, and the packet data to be transmitted with the packet number as the starting point is received and transmitted.
S104: if the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed.
In this embodiment, if the packet number sequence and the data content integrity of the currently received packet data are successfully verified, the steps of transmitting the packet data according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed.
Further, in order to ensure the integrity of the packet data to be transmitted and improve the efficiency of file breakpoint continuous transmission, after the transmission of the packet data to be transmitted is completed, the method further comprises the following steps:
s301: and verifying the data content integrity of the packet data to be transmitted. If the verification is successful, step S302 is executed.
It should be noted that, the integrity of the data content of the packet data to be transmitted is checked, which is to check the entire data, so that the data integrity of the industrial configuration file is ensured.
S302: and if the verification is successful, determining that the transmission of the packet data to be transmitted is finished.
And if the integrity of the data content of the packet data to be transmitted is successfully verified, determining that the transmission of the packet data to be transmitted is finished.
In order to facilitate understanding of the present invention, please refer to fig. 3 specifically, where fig. 3 is a flowchart illustrating a file breakpoint resuming method according to an embodiment of the present invention, which may specifically include:
step S1: and judging whether the packet data to be transmitted is ready to be transmitted. If yes, go to step S2.
In this embodiment, after the industrial configuration file to be transmitted is subjected to packet packaging processing and each packet of data is labeled, it can be determined that the packet data to be transmitted is ready to be transmitted.
Step S2: if yes, reading the interrupt record of the data of the packet to be transmitted.
And step S3: whether an interruption record of the packet data to be transmitted exists is judged. If yes, performing step S4; if not, go to step S5.
And step S4: if the packet number exists, the packet number of the packet data to be transmitted at the interrupted position is searched, the corresponding packet data to be transmitted is received by taking the packet number as the starting position, and the packet data to be transmitted is transmitted.
If the interruption record of the packet data to be transmitted exists, the packet number of the packet data to be transmitted at the interruption position is searched, and the packet data to be transmitted is received and transmitted by taking the packet number as the starting position.
Step S5: if not, directly receiving the data of the packet to be transmitted and transmitting the data.
If the interrupt record of the data of the packet to be transmitted does not exist, the data of the packet to be transmitted is directly received and transmitted.
Step S6: the packet number order and data content integrity of the received packet data are checked.
Step S7: if the verification is successful, the transmission of the packet data to be transmitted is continued.
And if the packet number sequence and the data content integrity of the received packet data are successfully verified, continuing to transmit the packet data to be transmitted.
Step S8: and if the verification fails, updating the interrupt record through the packet number and the interrupt mark of the currently received packet data. And when the transmission of the packet data to be transmitted is carried out again, the transmission is carried out according to the interrupt record.
And if the packet number sequence and the data content integrity check of the received packet data fail, updating the interrupt record through the packet number and the interrupt mark of the currently received packet data. And when the transmission of the packet data to be transmitted is carried out again, the transmission is carried out according to the interrupt record.
Step S9: and verifying the data content integrity of the packet data to be transmitted, and if the verification is successful, determining that the transmission of the packet data to be transmitted is finished.
By applying the method for file breakpoint continuous transmission provided by the embodiment of the invention, the data of the packet to be transmitted is received, the transmission is carried out according to the packet number sequence of the data of the packet to be transmitted, and the packet number sequence and the data content integrity of the currently received data of the packet are checked, wherein the data of the packet to be transmitted is the data which is subjected to sub-packet processing and labeled according to the sequence of the industrial configuration file. And if the verification fails, taking the packet number of the currently received packet data as a first packet number, updating the interrupt record through the first packet number and the first interrupt mark, and continuing to transmit according to the interrupt record when the packet data to be transmitted is retransmitted. If the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed. The embodiment of the invention carries out sub-packet processing on the industrial configuration file, labels are carried out on each packet of data to obtain the packet data to be transmitted, and the sequence of the packet number of each packet and the integrity of the data are verified, so that the sequence of the packet data to be transmitted can be ensured, and the verification efficiency is improved. If the verification fails, the current packet number and the interrupt mark are stored so as to accurately position the interrupt position when the transmission is to be restarted, and the problem of low transmission efficiency caused by restarting data transmission if the transmission is interrupted in the prior art is solved. By judging whether the interruption record exists or not and outputting the information of the interruption of the transmission of the packet data to be transmitted, the accurate reception of the packet data to be transmitted is ensured, and the efficiency of file breakpoint continuous transmission is improved.
In the following, the file breakpoint resume device provided in the embodiment of the present invention is introduced, and the file breakpoint resume device described below and the file breakpoint resume method described above may be referred to in correspondence with each other.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a file breakpoint resuming device according to an embodiment of the present invention, where the file breakpoint resuming device includes:
a first execution module 100, configured to receive packet data to be transmitted, transmit the packet data according to a packet number sequence of the packet data to be transmitted, and check the packet number sequence and data content integrity of currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
an interrupt update module 200, configured to, if the verification fails, take a packet number of the currently received packet data as a first packet number, and update an interrupt record through the first packet number and a first interrupt flag;
a sub-packet continuous transmission module 300, configured to continue transmission according to the first interrupt record when the packet data to be transmitted is retransmitted;
a second executing module 400, configured to, if the verification is successful, continue to execute the steps of transmitting according to the packet number sequence of the packet data to be transmitted, and verifying the packet number sequence and the data content integrity of the currently received packet data until the transmission of the packet data to be transmitted is completed.
Based on the above embodiment, the first execution module 100 may include:
the judging unit is used for judging whether the packet data to be transmitted has an interrupt record;
the first execution unit is used for reading a second packet number and a second interrupt mark corresponding to the interrupt record if the packet data to be transmitted has the interrupt record, and receiving the packet data to be transmitted with the second packet number as a starting point;
the second execution unit is used for receiving the packet data to be transmitted if the packet data to be transmitted does not have the interrupt record;
the checking unit is used for checking the check bits of the currently received packet data; the check bit is generated according to the packet number and the data content of the packet data to be transmitted.
Based on any of the above embodiments, the file breakpoint resuming device may further include:
the verification module is used for verifying the data content integrity of the packet data to be transmitted;
the determining module is used for determining that the transmission of the packet data to be transmitted is finished if the verification is successful;
the output module is used for outputting the information of the packet data transmission interruption to be transmitted;
and the generating module is used for generating the information of the packet data transmission interruption to be transmitted according to the first packet number and the first interruption mark.
It should be noted that, the modules and units in the file breakpoint resuming device may be changed in sequence without affecting logic.
With the file breakpoint resuming device provided in the embodiment of the present invention, the first execution module 100 is configured to receive packet data to be transmitted, transmit the packet data according to a packet number sequence of the packet data to be transmitted, and check a packet number sequence and data content integrity of currently received packet data, where the packet data to be transmitted is data that is obtained by performing packet processing on an industrial configuration file and labeling in sequence. The interrupt update module 200 is configured to, if the verification fails, update the interrupt record by using a packet number of the currently received packet data as a first packet number and using the first packet number and the first interrupt flag. The sub-packet continuous transmission module 300 is configured to perform continuous transmission according to the first interruption record when the packet data to be transmitted is retransmitted. The second execution module 400 is configured to, if the verification is successful, continue to perform the steps of transmitting according to the packet number sequence of the packet data to be transmitted, and verifying the packet number sequence and the data content integrity of the currently received packet data until the transmission of the packet data to be transmitted is completed. The embodiment of the invention carries out sub-packet processing on the industrial configuration file, labels are carried out on each packet of data to obtain the packet data to be transmitted, and the sequence of the packet number of each packet and the integrity of the data are verified, so that the sequence of the packet data to be transmitted can be ensured, and the verification efficiency is improved. If the verification fails, the current packet number and the interrupt mark are stored so as to accurately position the interrupt position when the transmission is to be restarted, and the problem of low transmission efficiency caused by restarting data transmission if the transmission is interrupted in the prior art is solved. By judging whether the interruption record exists or not and outputting the information of the interruption of the transmission of the packet data to be transmitted, the accurate reception of the packet data to be transmitted is ensured, and the efficiency of file breakpoint continuous transmission is improved.
In the following, the file breakpoint resume device provided in the embodiment of the present invention is introduced, and the file breakpoint resume device described below and the file breakpoint resume method described above may be referred to in correspondence with each other.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a file breakpoint resuming device according to an embodiment of the present invention, where the file breakpoint resuming device includes:
a transmission section 10 for performing transmission of packet data to be transmitted; the data of the data to be transmitted are data which are subjected to sub-packet processing and labeled according to the sequence for the industrial configuration file;
a memory 20 for storing a computer program;
the processor 30 is configured to execute a computer program to implement the file breakpoint resuming method described above.
The transmission unit 10, the memory 20, the processor 30 and the communication interface 31 all communicate with each other via a communication bus 32.
In the embodiment of the present invention, the memory 20 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, and in the embodiment of the present application, the memory 20 may store a program for implementing the following functions:
receiving packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and checking the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
if the verification fails, taking the packet number of the currently received packet data as a first packet number, and updating an interrupt record through the first packet number and a first interrupt mark;
when the packet data to be transmitted is retransmitted, continuing transmission according to the interrupt record;
if the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed.
In one possible implementation, the memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created during use.
In addition, memory 20 may include both read-only memory and random-access memory, and provides instructions and data to the processor. The portion of memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or subsets thereof, or expanded sets thereof, wherein the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for performing various basic tasks and for handling hardware-based tasks.
The processor 30 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic device, and the processor 30 may be a microprocessor or any conventional processor. Processor 30 may call a program stored in memory 20.
The communication interface 31 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 5 does not constitute a limitation to the file breakpoint resuming device in the embodiment of the present application, and in practical applications, the file breakpoint resuming device may include more or less components than those shown in fig. 5, or some components may be combined.
In the following, the readable storage medium provided by the embodiment of the present invention is introduced, and the readable storage medium described below and the file breakpoint resuming method described above may be referred to correspondingly.
The invention further provides a readable storage medium, which stores a computer program, and the computer program realizes the steps of the file breakpoint resuming method when being executed by a processor.
The readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Finally, it should also be noted that, herein, relationships such as first and second, etc., are intended only to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The method, the apparatus, the device and the computer-readable storage medium for file breakpoint continuous transmission provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A file breakpoint resuming method is characterized by comprising the following steps:
receiving packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and checking the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
if the verification fails, taking the packet number of the currently received packet data as a first packet number, and updating an interrupt record through the first packet number and a first interrupt mark;
when the packet data to be transmitted is retransmitted, continuing transmission according to the interrupt record;
if the verification is successful, the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data are continuously executed until the transmission of the packet data to be transmitted is completed.
2. The method according to claim 1, wherein the receiving the packet data to be transmitted comprises:
judging whether the packet data to be transmitted has an interrupt record;
if so, reading a first packet number and a first interrupt mark corresponding to the interrupt record, and receiving the packet data to be transmitted with the first packet number as a starting point;
if not, receiving the packet data to be transmitted.
3. The file breakpoint resuming method according to claim 1, further comprising, after the packet data transmission to be transmitted is completed:
verifying the data content integrity of the packet data to be transmitted;
and if the verification is successful, determining that the transmission of the packet data to be transmitted is finished.
4. The method according to claims 1 to 3, wherein the checking the packet number sequence and data content integrity of the currently received packet data comprises:
checking the check bit of the currently received packet data; the check bit is generated according to the packet number and the data content of the packet data to be transmitted.
5. The method according to claim 1, wherein after the determining if the checking fails, using the packet number of the currently received packet data as a first packet number and updating an interrupt record through the first packet number and a first interrupt flag, the method further comprises:
and outputting the information of the interruption of the packet data transmission to be transmitted.
6. The file breakpoint resuming method according to claim 5, before the outputting the information that the packet data transmission to be transmitted is interrupted, further comprising:
and generating the information of the packet data transmission interruption to be transmitted according to the first packet number and the first interruption mark.
7. A file breakpoint resume device is characterized by comprising:
the first execution module is used for receiving the packet data to be transmitted, transmitting the packet data according to the packet number sequence of the packet data to be transmitted, and verifying the packet number sequence and the data content integrity of the currently received packet data; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled in sequence for the industrial configuration file;
an interruption updating module, configured to, if the checking fails, take a packet number of the currently received packet data as a first packet number, and update an interruption record through the first packet number and a first interruption flag;
the sub-packet continuous transmission module is used for carrying out continuous transmission according to the first interrupt record when the packet data to be transmitted is retransmitted;
and the second execution module is used for continuously executing the steps of transmitting according to the packet number sequence of the packet data to be transmitted and verifying the packet number sequence and the data content integrity of the currently received packet data until the transmission of the packet data to be transmitted is finished if the verification is successful.
8. The apparatus according to claim 7, wherein the first execution module includes:
the judging unit is used for judging whether the packet data to be transmitted has an interrupt record;
the first execution unit is used for reading a second packet number and a second interrupt mark corresponding to the interrupt record if the packet data to be transmitted has the interrupt record, and receiving the packet data to be transmitted with the second packet number as a starting point;
and the second execution unit is used for receiving the packet data to be transmitted if the packet data to be transmitted does not have the interrupt record.
9. A file breakpoint resume device, comprising:
a transmission section for performing transmission of packet data to be transmitted; the data of the package to be transmitted is data which is subjected to sub-package processing and labeled according to the sequence of the industrial configuration file;
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the file breakpoint resuming method according to any one of claims 1 to 6.
10. A readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the file breakpoint resume method according to any one of claims 1 to 6.
CN202211233445.5A 2022-10-10 2022-10-10 File breakpoint continuous transmission method, device, equipment and readable storage medium Pending CN115604251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211233445.5A CN115604251A (en) 2022-10-10 2022-10-10 File breakpoint continuous transmission method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211233445.5A CN115604251A (en) 2022-10-10 2022-10-10 File breakpoint continuous transmission method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115604251A true CN115604251A (en) 2023-01-13

Family

ID=84847206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211233445.5A Pending CN115604251A (en) 2022-10-10 2022-10-10 File breakpoint continuous transmission method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115604251A (en)

Similar Documents

Publication Publication Date Title
CN105262627B (en) Firmware upgrading method, device and system
WO2022116088A1 (en) Firmware data processing method and apparatus
CN110784348A (en) Firmware upgrading method and device, electronic equipment and storage medium
CN109450912B (en) Data transmission method, device and equipment
CN111930406A (en) Vehicle-mounted terminal micro control unit software upgrading method, electronic equipment and storage medium
CN111787098B (en) Earphone upgrading method and device, earphone and storage medium
CN111478751B (en) Data breakpoint continuous transmission method and device and terminal equipment
CN111555841A (en) Communication data checking method, device, equipment and medium
EP3065323B1 (en) Transmission method and device based on management data input/output multi-source agreements
CN114788199A (en) Data verification method and device
CN113407212A (en) Remote upgrading method and device, terminal equipment and storage medium
CN115604251A (en) File breakpoint continuous transmission method, device, equipment and readable storage medium
CN108306865B (en) Modbus packet-sticking processing method and device based on Netty framework
CN116466986A (en) Equipment software upgrading method and device of energy storage system, communication module and medium
CN110798518A (en) Data transmission method and device, terminal equipment and storage medium
US20220376741A1 (en) Data transmission methods, electronic tag and electronic device
CN103457786A (en) Sensor access detection method, device and system
CN111538371A (en) Real-time clock device, working method thereof and USB (universal serial bus) equipment
CN106713453B (en) Application information monitoring method and device
CN110492979B (en) Incremental data transmission method and device, slave and storage medium
CN117908932A (en) Intelligent sensor upgrading method and device, intelligent sensor and storage medium
CN115633044B (en) Message processing method and device, electronic equipment and storage medium
CN111371799B (en) Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller
CN113821248B (en) Service method of vehicle-end software, vehicle-end software and related equipment thereof
CN117714553A (en) Data transmission method, device, equipment and medium

Legal Events

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