Data transmission method and device, electronic equipment, storage medium and program product

By segmenting and packaging the data between urban rail transit equipment, using the information of TCP serial number value, preset period and sending packet value, the existing Modbus-TCP protocol is solved, and the problem that the existing Modbus-TCP protocol is difficult to meet the large amount of real-time data transmission is achieved. Efficient and secure data transmission.

CN119449733APending Publication Date: 2025-02-14CRSC URBAN RAIL TRANSIT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411324978.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing Modbus-TCP protocol is difficult to meet the needs of transmission of large amounts of real-time data between urban rail transit equipment.

Method used

By determining whether the amount of data to be sent is greater than the transmission limit, if it is greater, the data is divided to form multiple data packets, each data packet includes the TCP serial number value, the preset period and the transmission packet value, based on these information The data receiver sends the data packet.

Benefits of technology

This method can meet the transmission needs of large amounts of real-time data and improve the efficiency and security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449733A_ABST
    Figure CN119449733A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of communication, and the method comprises the steps: judging whether the data size of to-be-sent data is greater than a transmission limit or not; if it is determined that the data volume is greater than the transmission limit, performing data segmentation on the to-be-sent data to obtain a plurality of data packets; each data packet comprises a TCP serial number value, a preset period and a sending packet numerical value corresponding to the TCP serial number value; and sending the plurality of data packets to the data receiver based on the TCP serial number value, the preset period and the sending packet numerical value. Through the above mode, when the data volume of the to-be-sent data is greater than the transmission limit, the to-be-sent data is subjected to data segmentation to obtain the plurality of data packets, and the plurality of data packets are sent to the data receiver based on the TCP serial number value, the preset period and the sending packet value of each data packet, so that the transmission demand of a large amount of real-time data can be satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, device, electronic equipment, storage medium and program product. Background Art

[0002] Data security communication between urban rail transit equipment is of great significance to ensuring the passenger safety of urban rail transit.

[0003] Frequent data transmission is required between different urban rail transit equipment, such as platform doors, Automatic Train Supervision (ATS), station environment and equipment monitoring system (BAS) and other urban rail transit equipment, and the security of data transmission is extremely high. At present, most of the data transmission between different urban rail transit equipment adopts Modbus-TCP protocol.

[0004] With the continuous updating of urban rail transit equipment, the amount of data transmission between different devices has gradually increased. However, the existing Modbus-TCP protocol allows a limited amount of data transmission, so it is difficult to meet the transmission needs of large amounts of real-time data. Summary of the invention

[0005] The present invention provides a data transmission method, device, electronic device, storage medium and program product, which are used to solve the defect that the existing technology is difficult to meet the transmission demand of a large amount of real-time data.

[0006] The present invention provides a data transmission method, which is applied to a data sender, and the method comprises: judging whether the data volume of data to be sent is greater than a transmission limit; if it is determined that the data volume is greater than the transmission limit, segmenting the data to be sent to obtain a plurality of data packets; each data packet comprises a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value; and sending a plurality of data packets to a data receiver based on the TCP sequence number value, the preset period and the sending packet value.

[0007] According to a data transmission method provided by the present invention, data to be sent is segmented to obtain multiple data packets, including: data to be sent is segmented to obtain multiple first data packets; each first data packet has a different TCP sequence number value; each first data packet is segmented separately to obtain multiple data packets corresponding to each first data packet; multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and the sending packet values ​​of the multiple data packets corresponding to the same first data packet are different.

[0008] According to a data transmission method provided by the present invention, multiple data packets are sent to a data receiver based on a TCP sequence number value, a preset period and a sending packet value, including: determining the sending order of each data packet based on the TCP sequence number value and the sending packet value; based on the sending order, sending multiple data packets to the data receiver in sequence according to the preset period; wherein multiple data packets with the same TCP sequence number value are sent within a preset period.

[0009] According to a data transmission method provided by the present invention, each data packet adopts an improved Modbus-TCP protocol, the improved Modbus-TCP protocol is obtained based on the original Modbus-TCP protocol after improvement, and the original Modbus-TCP protocol includes a transaction identifier and a protocol identifier; before judging whether the amount of data to be sent is greater than the transmission limit, it also includes: changing the transaction identifier in the original Modbus-TCP protocol to a TCP sequence number; changing the protocol identifier in the original Modbus-TCP protocol to a preset period and the number of packets to be sent, to obtain the improved Modbus-TCP protocol.

[0010] The present invention also provides a data transmission method, which is applied to a data receiver, and the method includes: receiving multiple data packets sent by a data sender; each data packet includes a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value; based on the TCP sequence number value and the preset period of each data packet, performing continuity checks on the multiple data packets; if the multiple data packets pass the continuity check, generating received data based on the sending packet value of each data packet.

[0011] According to a data transmission method provided by the present invention, if multiple data packets pass the continuity check, then based on the sent packet value of each data packet, the received data is generated, including: if multiple data packets pass the continuity check, then based on the sent packet value of each data packet, a sorting result is obtained; based on the sorting result, each data packet is spliced ​​in turn to obtain the received data.

[0012] The present invention also provides a data transmission device, including: a judgment module, used to judge whether the data amount of the data to be sent is greater than the transmission limit; a segmentation module, used to segment the data to be sent if it is determined that the data amount is greater than the transmission limit, to obtain multiple data packets; each data packet contains a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value; a sending module, used to send multiple data packets to a data receiver based on the TCP sequence number value, the preset period and the sending packet value.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned data transmission methods when executing the computer program.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the data transmission methods described above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned data transmission methods.

[0016] The data transmission method, device, electronic device, storage medium and program product provided by the present invention determine whether the data volume of the data to be sent is greater than the transmission limit; if it is determined that the data volume is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets; each data packet contains a TCP sequence number value, a preset period and a send packet value corresponding to the TCP sequence number; based on the TCP sequence number value, the preset period and the send packet value, multiple data packets are sent to the data receiver. Through the above method, when the data volume of the data to be sent is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets, and based on the TCP sequence number value, the preset period and the send packet value of each data packet, multiple data packets are sent to the data receiver, which can meet the transmission needs of a large amount of real-time data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is one of the flow charts of the data transmission method provided by the present invention.

[0019] Figure 2 It is a comparative schematic diagram of the Modbus-TCP protocol provided by the present invention.

[0020] Figure 3 This is the second flow chart of the data transmission method provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the data transmission device provided by the present invention.

[0022] Figure 5It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] It should be noted that, in the description of the present invention, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0025] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0026] See also Figure 1 , Figure 1 It is one of the flow charts of the data transmission method provided by the present invention. In this embodiment, the data transmission method is applied to the data sender, and the data sender is the urban rail transit equipment that needs to send data. The data transmission method includes steps S110 to S130, and each step is as follows: S110: Determine whether the amount of data to be sent is greater than the transmission limit.

[0027] Specifically, the data sender and the data receiver use an improved Modbus-TCP protocol for data transmission.

[0028] In this embodiment, the amount of data transmission allowed at a time by the improved Modbus-TCP protocol and the original Modbus-TCP protocol (i.e., the traditional Modbus-TCP protocol) is limited, that is, the amount of data that can be carried by a single data packet using the Modbus-TCP protocol or the improved Modbus-TCP protocol is limited. Therefore, before the data sender sends data, it is necessary to determine whether the amount of data to be sent is greater than the transmission limit, and the transmission limit is the amount of data that can be carried by a single data packet using the improved Modbus-TCP protocol.

[0029] S120: If it is determined that the data volume is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets.

[0030] Each data packet includes a TCP sequence number value, a preset period, and a sending packet value corresponding to the TCP sequence number value.

[0031] Specifically, if it is determined that the data volume is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets.

[0032] Among them, each data packet adopts the improved Modbus-TCP protocol, and the improved Modbus-TCP protocol is obtained by improving the original Modbus-TCP protocol.

[0033] See also Figure 2 , Figure 2 It is a comparative schematic diagram of the Modbus-TCP protocol provided by the present invention.

[0034] like Figure 2 As shown in the figure, the data frame of the original Modbus-TCP protocol consists of an MBAP (Modbus Application Protocol) header, which contains a transaction identifier and a protocol identifier. The transaction identifier occupies 2 bytes in the MBAP header and is used to identify the uniqueness of the transaction. The transaction identifiers of the message frames of the master and slave stations must be consistent during each communication process. The protocol identifier occupies 2 bytes in the MBAP header, with a fixed value of 0x0000, which is used to indicate that the protocol used is the Modbus-TCP protocol. The MBAP header also includes length information, which occupies 2 bytes and indicates the length of the PDU (Protocoldata unit) after the MBAP header. The MBAP header also includes a unit identifier, which occupies 1 byte in the MBAP header and is used to identify the address (Slave ID) of the target slave station.

[0035] In order to meet the safe transmission of large amounts of real-time data while not affecting the existing structure of the original Modbus-TCP protocol as much as possible and to ensure the safe communication of railway signal data, it is necessary to improve the original Modbus-TCP protocol.

[0036] Specifically, the transaction identifier in the original Modbus-TCP protocol is changed to a TCP sequence number (used to store the TCP sequence number value of a data packet), and the protocol identifier in the original Modbus-TCP protocol is changed to a preset period (used to store a preset sending period of a data packet) and a number of sent packets (used to store a sending packet value corresponding to the TCP sequence number value of a data packet), thereby obtaining an improved Modbus-TCP protocol.

[0037] Depend on Figure 2 It can be seen that the difference between the improved Modbus-TCP protocol and the original Modbus-TCP protocol is that the bytes used to store transaction identifiers in the original Modbus-TCP protocol will be used to store TCP sequence number values ​​after improvement; the bytes used to store protocol identifiers in the original Modbus-TCP protocol will be used to store preset periods and sent packet values ​​after improvement.

[0038] The two bytes originally occupied by the protocol identifier in the original Modbus-TCP protocol will be used to store the preset period and the sending packet value respectively.

[0039] Optionally, the preset period is stored in the high byte and the sent packet value is stored in the low byte.

[0040] Optionally, the preset period is stored in the low byte and the sent packet value is stored in the high byte.

[0041] It should be noted that different urban rail transit equipment manufacturers may have different implementations of the Modbus-TCP protocol, which may lead to compatibility issues. However, most urban rail transit equipment will not verify the transaction identifier and protocol identifier. Therefore, in this embodiment, the transaction identifier and protocol identifier of the existing Modbus-TCP protocol are improved to achieve byte reuse, thereby achieving compatibility between new and old equipment without significantly changing the existing structure of the Modbus-TCP protocol and reducing the cost of transformation.

[0042] At the same time, the original Modbus-TCP protocol lacks an encryption mechanism, that is, the original Modbus-TCP protocol itself does not provide a data encryption solution, which makes the data packets using the Modbus-TCP protocol vulnerable to man-in-the-middle attacks and data eavesdropping. In addition, since the original Modbus-TCP protocol does not have a built-in authentication mechanism, it is also easy for the data packets using the Modbus-TCP protocol to be accessed by unauthorized devices or personnel, causing security risks. The MBAP header of the improved Modbus-TCP protocol is different from the original Modbus-TCP protocol. It no longer uses the transaction identifier and protocol identifier defined by the original Modbus-TCP protocol, but uses a custom TCP sequence number, a preset period, and the number of packets sent corresponding to the TCP sequence number, which can increase the complexity of the Modbus-TCP protocol header and thus improve security.

[0043] S130: Send multiple data packets to a data receiver based on the TCP sequence number value, the preset period and the number of packets to be sent.

[0044] The data transmission method provided by the present invention determines whether the data volume of the data to be sent is greater than the transmission limit; if it is determined that the data volume is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets; each data packet contains a TCP sequence number value, a preset period, and a send packet value corresponding to the TCP sequence number; based on the TCP sequence number value, the preset period, and the send packet value, multiple data packets are sent to the data receiver. Through the above method, when the data volume of the data to be sent is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets, and based on the TCP sequence number value, the preset period, and the send packet value of each data packet, multiple data packets are sent to the data receiver, which can meet the transmission needs of a large amount of real-time data.

[0045] In some embodiments, data to be sent is segmented to obtain multiple data packets, including: data to be sent is segmented to obtain multiple first data packets; each first data packet has a different TCP sequence number value; each first data packet is segmented separately to obtain multiple data packets corresponding to each first data packet; multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and the sending packet values ​​of the multiple data packets corresponding to the same first data packet are different.

[0046] It is understandable that since the amount of data that can be carried by a single data packet using the improved Modbus-TCP protocol is limited, in order to meet the transmission needs of large amounts of real-time data, the data to be sent can be segmented, and multiple data to be sent can be divided into multiple data packets, and the data to be sent can be transmitted together through multiple data packets.

[0047] Specifically, the data to be sent is segmented to obtain a plurality of first data packets, each of which has a different TCP sequence number value.

[0048] Furthermore, each first data packet is divided respectively to obtain multiple data packets corresponding to each first data packet.

[0049] In this embodiment, the TCP sequence number value and the sending packet value can be used to determine the sending order of data packets. Multiple data packets corresponding to the same first data packet have the same TCP sequence number value. Multiple data packets with the same TCP sequence number value should be sent within the same preset period; multiple data packets with the same TCP sequence number value have different sending packet values. Within the same preset period, multiple data packets with the same TCP sequence number value can be sent in sequence according to the size of the sending packet value.

[0050] Optionally, the TCP sequence number value may start from 0. After sending multiple data packets with the same TCP sequence number value in the current preset period, the TCP sequence number value will increase by 1 in the next preset period, that is, the TCP sequence number value will be updated as the preset period is updated.

[0051] It should be noted that since the Modbus-TCP protocol is still designed based on the TCP / IP protocol stack, the existing design based on the TCP / IP protocol stack is inevitably affected by network delays and jitters, which in turn affects the performance of real-time communication between devices.

[0052] Based on this, in order to avoid packet loss in the output process that may be caused by network delays and jitter, this embodiment adds records of TCP sequence number values ​​and preset periods in the improved Modbus-TCP protocol, so that the data receiver can determine whether packet loss occurs based on the continuity of the TCP sequence number values ​​of all data packets, thereby verifying the integrity of the data. At the same time, the data receiver can effectively perceive network fluctuations and thus adopt the real-time nature of the data as needed.

[0053] In addition, the order in which data packets are sent is determined by the TCP sequence number value and the packet value, which can effectively coordinate the effectiveness and accuracy of large data transmission.

[0054] In some embodiments, multiple data packets are sent to a data receiver based on a TCP sequence number value, a preset period, and a packet sending value, including: determining a sending order for each data packet based on the TCP sequence number value and the packet sending value; sending multiple data packets to the data receiver in sequence according to a preset period based on the sending order; wherein multiple data packets with the same TCP sequence number value are sent within a preset period.

[0055] Specifically, multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and multiple data packets with the same TCP sequence number value should be sent within the same preset period. Multiple data packets with the same TCP sequence number value have different sent packet values. Within the same preset period, multiple data packets with the same TCP sequence number value can be sent in sequence according to the size of the sent packet values. According to the above principle, the sending order of each data packet can be determined based on the TCP sequence number value and the sent packet value.

[0056] Furthermore, based on the sending order, multiple data packets are sent to the data receiver in sequence according to a preset period.

[0057] Optionally, the preset period ranges from 1 to 255 seconds, and the value of the number of packets sent is also 1 to 255.

[0058] The data transmission method provided by the present invention determines the sending order of data packets through TCP sequence number values ​​and sending packet values, and can effectively coordinate the effectiveness and accuracy of large data transmission.

[0059] In some embodiments, each data packet adopts an improved Modbus-TCP protocol, which is obtained by improving the original Modbus-TCP protocol. The original Modbus-TCP protocol includes a transaction identifier and a protocol identifier; before determining whether the amount of data to be sent is greater than the transmission limit, it also includes: changing the transaction identifier in the original Modbus-TCP protocol to a TCP sequence number; changing the protocol identifier in the original Modbus-TCP protocol to a preset period and the number of packets to be sent, to obtain an improved Modbus-TCP protocol.

[0060] The present invention also provides a data transmission method. Figure 3 , Figure 3 This is the second flow chart of the data transmission method provided by the present invention. In this embodiment, the data transmission method is applied to the data receiver, and the data receiver is the urban rail transit equipment that needs to receive data. The data transmission method includes steps S310 to S330, and each step is as follows: S310: Receive multiple data packets sent by a data sender.

[0061] Each data packet includes a TCP sequence number value, a preset period, and a sending packet value corresponding to the TCP sequence number value.

[0062] Among them, each data packet adopts the improved Modbus-TCP protocol, and the improved Modbus-TCP protocol is obtained by improving the original Modbus-TCP protocol.

[0063] Specifically, the transaction identifier in the original Modbus-TCP protocol is changed to a TCP sequence number (used to store the TCP sequence number value of a data packet), and the protocol identifier in the original Modbus-TCP protocol is changed to a preset period (used to store a preset sending period of a data packet) and a number of sent packets (used to store a sending packet value corresponding to the TCP sequence number value of a data packet), thereby obtaining an improved Modbus-TCP protocol.

[0064] In this embodiment, the TCP sequence number value and the sending packet value can be used to determine the sending order of data packets. Multiple data packets corresponding to the same first data packet have the same TCP sequence number value. Multiple data packets with the same TCP sequence number value should be sent by the data sender within the same preset period; multiple data packets with the same TCP sequence number value have different sending packet values. Within the same preset period, multiple data packets with the same TCP sequence number value can be sent by the data sender in sequence according to the size of the sending packet value.

[0065] Furthermore, the data receiver may sequentially receive multiple data packets sent by the data sender.

[0066] S320: Based on the TCP sequence number value of each data packet and a preset period, a continuity check is performed on the plurality of data packets.

[0067] Specifically, after receiving multiple data packets sent by the data sender, the data receiver can sort each data packet according to the size of the TCP sequence number value of each data packet received within each preset period, thereby performing a continuity check on the multiple data packets: if the TCP sequence number values ​​of the data packets received within any two adjacent preset periods are increasing, then the multiple data packets can pass the continuity check; if there are TCP sequence number values ​​of the data packets received within any two adjacent preset periods that are non-increasing, then the multiple data packets cannot pass the continuity check.

[0068] S330: If the plurality of data packets pass the continuity check, then the received data is generated based on the sent packet value of each data packet.

[0069] Specifically, if multiple data packets pass the continuity check, all data packets are sorted based on the TCP sequence number value and the sent packet value of each data packet to obtain a sorting result.

[0070] Optionally, first sort according to the size of the TCP sequence number value of each data packet, so that data packets with the same TCP sequence number value can be arranged together; further, for multiple data packets with the same TCP sequence number value, sort according to the size of the sending packet value of each data packet to obtain the final sorting result.

[0071] Furthermore, based on the sorting result, each data packet is spliced ​​in turn to obtain received data.

[0072] In some embodiments, if multiple data packets pass the continuity check, received data is generated based on the sent packet value of each data packet, including: if multiple data packets pass the continuity check, a sorting result is obtained based on the sent packet value of each data packet; based on the sorting result, each data packet is spliced ​​in turn to obtain received data.

[0073] The present invention also provides a data transmission device. Figure 4 , Figure 4 4 is a schematic diagram of the structure of the data transmission device provided by the present invention. In this embodiment, the data transmission device includes a determination module 410 , a segmentation module 420 and a sending module 430 .

[0074] The determination module 410 is used to determine whether the amount of data to be sent is greater than the transmission limit.

[0075] The segmentation module 420 is used to segment the data to be sent to obtain multiple data packets if it is determined that the data volume is greater than the transmission limit; each data packet includes a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value.

[0076] The sending module 430 is used to send multiple data packets to a data receiver based on the TCP sequence number value, the preset period and the sending packet value.

[0077] In some embodiments, the segmentation module 420 is used to segment the data to be sent to obtain multiple first data packets; the TCP sequence number value of each first data packet is different; each first data packet is segmented separately to obtain multiple data packets corresponding to each first data packet; multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and the sending packet values ​​of the multiple data packets corresponding to the same first data packet are different.

[0078] In some embodiments, the sending module 430 is used to determine the sending order of each data packet based on the TCP sequence number value and the sending packet value; based on the sending order, multiple data packets are sent to the data receiver in sequence according to a preset period; wherein multiple data packets with the same TCP sequence number value are sent within a preset period.

[0079] In some embodiments, each data packet uses an improved Modbus-TCP protocol, where the improved Modbus-TCP protocol is improved based on the original Modbus-TCP protocol, and the original Modbus-TCP protocol includes a transaction identifier and a protocol identifier.

[0080] The segmentation module 420 is used to change the transaction identifier in the original Modbus-TCP protocol into a TCP sequence number; and change the protocol identifier in the original Modbus-TCP protocol into a preset period and the number of packets to be sent, so as to obtain an improved Modbus-TCP protocol.

[0081] The present invention also provides an electronic device, Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the data transmission method, which includes: determining whether the amount of data to be sent is greater than the transmission limit; if it is determined that the amount of data is greater than the transmission limit, dividing the data to be sent to obtain multiple data packets; each data packet includes a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value; based on the TCP sequence number value, the preset period and the sending packet value, sending multiple data packets to the data receiving party.

[0082] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0083] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data transmission method provided by the above methods, which includes: determining whether the data amount of the data to be sent is greater than the transmission limit; if it is determined that the data amount is greater than the transmission limit, dividing the data to be sent to obtain multiple data packets; each data packet contains a TCP sequence number value, a preset period and a sending packet value corresponding to the TCP sequence number value; based on the TCP sequence number value, the preset period and the sending packet value, sending multiple data packets to the data recipient.

[0084] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the data transmission method provided by the above-mentioned methods. The method includes: segmenting the data to be sent to obtain multiple first data packets; each first data packet has a different TCP sequence number value; segmenting each first data packet separately to obtain multiple data packets corresponding to each first data packet; multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and the sending packet values ​​of the multiple data packets corresponding to the same first data packet are different.

[0085] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data transmission method, characterized in that: Applied to a data sender, the method comprises: Determine whether the amount of data to be sent is greater than the transmission limit; If it is determined that the data volume is greater than the transmission limit, the data to be sent is segmented to obtain multiple data packets; each of the data packets includes a TCP sequence number value, a preset period, and a sending packet value corresponding to the TCP sequence number value; Based on the TCP sequence number value, the preset period and the sending packet value, a plurality of the data packets are sent to a data receiver.

2. The data transmission method according to claim 1, characterized in that: The step of segmenting the data to be sent to obtain a plurality of data packets includes: Segmenting the data to be sent to obtain a plurality of first data packets; each of the first data packets has a different TCP sequence number value; Each of the first data packets is divided respectively to obtain multiple data packets corresponding to each of the first data packets; the multiple data packets corresponding to the same first data packet have the same TCP sequence number value, and the multiple data packets corresponding to the same first data packet have different sending packet values.

3. The data transmission method according to claim 2, characterized in that: The sending of the plurality of data packets to a data receiver based on the TCP sequence number value, the preset period and the sending packet value comprises: Determine the sending order of each of the data packets based on the TCP sequence number value and the sending packet value; Based on the sending order, and according to the preset period, sequentially sending the plurality of data packets to the data receiving party; Wherein, a plurality of data packets having the same TCP sequence number value are sent within one preset period.

4. The data transmission method according to claim 1, characterized in that: Each of the data packets adopts an improved Modbus-TCP protocol, wherein the improved Modbus-TCP protocol is obtained by improving the original Modbus-TCP protocol, and the original Modbus-TCP protocol includes a transaction identifier and a protocol identifier; Before determining whether the amount of data to be sent is greater than the transmission limit, the method further includes: Changing the transaction identifier in the original Modbus-TCP protocol to a TCP sequence number; The protocol identifier in the original Modbus-TCP protocol is changed to a preset period and a number of sent packets to obtain the improved Modbus-TCP protocol.

5. A data transmission method, characterized in that: Applied to a data receiver, the method comprises: Receive multiple data packets sent by a data sender; each of the data packets includes a TCP sequence number value, a preset period, and a sending packet value corresponding to the TCP sequence number value; Based on the TCP sequence number value of each data packet and a preset period, performing continuity check on the plurality of data packets; If a plurality of the data packets pass the continuity check, receiving data is generated based on the sending packet value of each of the data packets.

6. The data transmission method according to claim 5, wherein if the plurality of data packets pass the continuity check, generating the received data based on the sent packet value of each data packet comprises: If a plurality of the data packets pass the continuity check, a sorting result is obtained based on the sent packet value of each of the data packets; Based on the sorting result, each of the data packets is spliced ​​in turn to obtain received data.

7. A data transmission device, characterized in that: include: A determination module, used to determine whether the amount of data to be sent is greater than a transmission limit; A segmentation module, for segmenting the data to be sent to obtain a plurality of data packets if it is determined that the data volume is greater than the transmission limit; each of the data packets includes a TCP sequence number value, a preset period, and a transmission packet value corresponding to the TCP sequence number value; The sending module is used to send a plurality of data packets to a data receiver based on the TCP sequence number value, the preset period and the sending packet value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data transmission method according to any one of claims 1 to 4 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 4 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 4 is implemented.