Data transmission control method and device, equipment and storage medium

CN122951745APending Publication Date: 2026-10-20GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510459287.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种数据传输控制方法、装置、设备及存储介质,旨在解决现有技术控制数据传输的准确性和效率较低的技术问题

Benefits of technology

[0041]本申请提出的一个或多个技术方案,至少具有以下技术效果:通过在接收发送端发送的网络流数据时,从所述网络流数据中读取目标头信息,其中,所述目标头信息包括长度信息、魔数信息以及信息内容;对所述魔数信息进行哈希计算,得到当前魔数哈希值;在所述当前魔数哈希值与预设哈希值一致且所述长度信息位于预设范围时,计算所述信息内容的循环冗余校验值;在所述循环冗余校验值与预设数值不一致时,根据数据重传请求控制与所述发送端之间的数据传输。通过上述方式,解析网络流数据包括的多维度信息,然后对目标头信息中的长度信息、魔数信息进行严格校验,达到从源头保证数据传输的准确性的目的,并通过校验值比较的方式对信息内容进行校验,可以及时发现数据在传输过程中的损坏情况,并在校验失败时,请求发送端重新发送,从而能够有效提高控制数据传输的准确性和效率,适用各种复杂的网络环境。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005356537600000011
    Figure HDA0005356537600000011
  • Figure HDA0005356537600000021
    Figure HDA0005356537600000021
  • Figure HDA0005356537600000022
    Figure HDA0005356537600000022
Patent Text Reader

Abstract

This application discloses a data transmission control method, apparatus, device, and storage medium, relating to the field of data processing technology. The method includes: reading target header information from network stream data; performing hash calculation on magic number information; calculating a cyclic redundancy check (CRC) value for the information content when the current magic number hash value matches a preset hash value and the length information is within a preset range; and controlling data transmission between the sender and the receiver based on a data retransmission request when the CRC value does not match a preset value. By parsing network stream data and verifying the length and magic number information in the target header, the accuracy of data transmission is ensured from the source. Furthermore, by comparing check values, the information content is verified, promptly detecting data corruption during transmission. In the event of verification failure, a retransmission request is sent to the receiver, thereby effectively improving the accuracy and efficiency of data transmission control and making it suitable for various complex network environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to data transmission control methods, apparatus, devices and storage media. Background Technology

[0002] Various protocols, such as Transmission Control Protocol (TCP) and serial port protocols, are used in streaming data transmission. However, network environments are often complex and affected by multiple factors, such as signal interference, network congestion, and hardware failures, making data transmission prone to errors. Currently, a common method for controlling data transmission is to set up a checkpoint based on the data volume. However, this checkpoint only performs verification upon completion of data reception, and the verification mechanism used is relatively simple. Obviously, verification upon completion of data reception can result in invalid transmissions, wasting a significant amount of time, and leading to the reading of incorrect data due to header information interference. Therefore, the accuracy and efficiency of the above method for controlling data transmission are relatively low.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a data transmission control method, apparatus, device, and storage medium, which aims to solve the technical problem of low accuracy and efficiency in controlling data transmission in the prior art.

[0005] To achieve the above objectives, this application proposes a data transmission control method, the method comprising:

[0006] When receiving network stream data sent by the sending end, target header information is read from the network stream data, wherein the target header information includes length information, magic number information, and information content;

[0007] The magic number information is hashed to obtain the current magic number hash value;

[0008] When the current magic number hash value is consistent with the preset hash value and the length information is within the preset range, calculate the cyclic redundancy check value of the information content;

[0009] When the cyclic redundancy check value is inconsistent with the preset value, the data transmission between the sender and the data retransmission terminal is controlled according to the data retransmission request.

[0010] In one embodiment, the step of performing a hash calculation on the magic number information to obtain the current magic number hash value includes:

[0011] Determine the target hash algorithm used by the sending end to perform hash calculations on key information;

[0012] Obtain the configuration parameters of the target hash algorithm;

[0013] Based on the target hash algorithm, the magic number information is hashed according to the configuration parameters to obtain the current magic number hash value.

[0014] In one embodiment, after the step of hashing the magic number information to obtain the current magic number hash value, the method further includes:

[0015] When the current magic number hash value is inconsistent with the preset hash value and / or the length information is not within the preset range, the network connection with the sending end is disconnected, and a current error message is generated;

[0016] The current error information is tagged with a type based on the first tag, and the tagged current error information is then stored in the database.

[0017] Re-establish the network connection with the sending end.

[0018] In one embodiment, the step of controlling data transmission with the sending end according to a data retransmission request when the cyclic redundancy check value is inconsistent with a preset value includes:

[0019] When the cyclic redundancy check value is inconsistent with the preset value, a data retransmission request is generated;

[0020] Send the data retransmission request to the sending end;

[0021] Receive the erroneous data packet sent by the sending end according to the data retransmission request, and control the data transmission between the sending end according to the erroneous data packet.

[0022] In one embodiment, after the step of controlling data transmission between the sender and the data retransmission request, the method further includes:

[0023] Obtain the identification information of the target header information;

[0024] The next header information is read from the network stream data according to the identification information, wherein the next header information includes the next length information, the next magic number information, and the next information content;

[0025] The next magic number information is hashed to obtain the next magic number hash value;

[0026] When the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the step of generating a data retransmission request is repeated.

[0027] In one embodiment, after repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with a preset hash value, the next length information is within a preset range, and the cyclic redundancy check value of the next information content is inconsistent with a preset value, the method further includes:

[0028] Count the current number of times when the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range;

[0029] When the current number of attempts exceeds a preset number, the network connection with the sending end is disconnected, and a target error message is generated;

[0030] The target error information is tagged with a type based on the second tag, and the tagged target error information is then stored in the database.

[0031] In one embodiment, after repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with a preset hash value, the next length information is within a preset range, and the cyclic redundancy check value of the next information content is inconsistent with a preset value, the method further includes:

[0032] Count the number of times the cyclic redundancy check value is inconsistent with the preset value;

[0033] If the target number of times exceeds the preset number of times, the step of disconnecting the network connection with the sending end continues.

[0034] Furthermore, to achieve the above objectives, this application also proposes a data transmission control device, which includes:

[0035] The reading module is used to read target header information from the network stream data when receiving network stream data sent by the sending end. The target header information includes length information, magic number information, and information content.

[0036] The calculation module is used to perform hash calculation on the magic number information to obtain the current magic number hash value;

[0037] The calculation module is also used to calculate the cyclic redundancy check value of the information content when the current magic number hash value is consistent with the preset hash value and the length information is within the preset range;

[0038] The control module is used to control the data transmission between the sender and the data retransmission terminal according to the data retransmission request when the cyclic redundancy check value is inconsistent with the preset value.

[0039] In addition, to achieve the above objectives, this application also proposes a data transmission control device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data transmission control method as described above.

[0040] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the data transmission control method described above.

[0041] One or more technical solutions proposed in this application have at least the following technical effects: When receiving network stream data sent by a sending end, target header information is read from the network stream data, wherein the target header information includes length information, magic number information, and information content; the magic number information is hashed to obtain a current magic number hash value; when the current magic number hash value is consistent with a preset hash value and the length information is within a preset range, a cyclic redundancy check (CRC) value for the information content is calculated; when the CRC value is inconsistent with a preset value, data transmission between the sending end and the receiving end is controlled according to a data retransmission request. Through the above method, the multi-dimensional information included in the network stream data is parsed, and then the length information and magic number information in the target header information are strictly verified, achieving the goal of ensuring the accuracy of data transmission from the source. Furthermore, by verifying the information content through check value comparison, data corruption during transmission can be detected in a timely manner, and when verification fails, a request is made to the sending end to retransmit, thereby effectively improving the accuracy and efficiency of data transmission control and making it suitable for various complex network environments. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating an embodiment of the data transmission control method of this application.

[0045] Figure 2 This is a flowchart illustrating Embodiment 2 of the data transmission control method of this application;

[0046] Figure 3 This is a schematic diagram of the module structure of the data transmission control device according to an embodiment of this application;

[0047] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the data transmission control method in the embodiments of this application.

[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0049] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or receiving end capable of performing the above functions. The following description uses a receiving end as an example to illustrate this embodiment and the subsequent embodiments.

[0050] Based on this, embodiments of this application provide a data transmission control method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data transmission control method of this application.

[0051] In this embodiment, the data transmission control method includes steps S10 to S40:

[0052] Step S10: When receiving network stream data sent by the sending end, read the target header information from the network stream data, wherein the target header information includes length information, magic number information, and information content.

[0053] It should be noted that network stream data refers to network data transmitted in a streaming manner between the sending end and the receiving end, while target header information refers to fixed-length header information read from the network stream data. The target header information, including length information, magic number information, and information content, can be obtained through parsing. The length information can be represented as dataLength, the magic number information can be represented as magicNum, and the information content can be represented as data.

[0054] Step S20: Perform a hash calculation on the magic number information to obtain the current magic number hash value.

[0055] It is understandable that the current magic number hash value refers to the hash value of the magic number information. This current magic number hash value can be calculated by the target hash algorithm used by the sending end to perform hash calculation on the key information. This has uniqueness and randomness, can distinguish different data packets, and has high security and is not easy to be forged.

[0056] Further, after step S20, the method further comprises: when the current magic number hash value is inconsistent with the preset hash value and / or the length information is not within the preset range, disconnecting the network connection with the transmitting end, and generating current error information; performing type marking on the current error information based on a first tag, and storing the marked current error information into a database; re-establishing the network connection with the transmitting end.

[0057] It should be understood that when any of the conditions that the current magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range is satisfied, it indicates that the verification of the target header information fails. At this time, the network connection with the transmitting end is immediately disconnected to avoid invalid transmission, save a large amount of time and network resources, and significantly reduce transmission delay and improve the overall transmission efficiency when the network is busy. The first tag refers to a tag that marks the error type as a target header information error. After the current error information is generated, the current error information is type-marked based on the first tag, and the marked current error information is recorded by means of database storage. At the same time, a reconnection process is started, that is, the network connection with the transmitting end is re-established.

[0058] Step S30: when the current magic number hash value is consistent with the preset hash value and the length information is within the preset range, calculate a cyclic redundancy check value of the information content.

[0059] It should be understood that the preset hash value refers to a hash value calculated by the transmitting end using the same target hash algorithm. After the current magic number hash value is obtained, it is necessary to determine whether the current magic number hash value is consistent with the preset hash value and whether the length information is within the preset range. If both are true, it indicates that the verification of the target header information is successful, and at this time, the cyclic redundancy check value of the information content is further calculated. For example, the preset range may be expressed as [minLength, maxLength]. If minLength < dataLength < maxLength, it indicates that the length information is within the preset range. If dataLength < minLength or dataLength > maxLength, it indicates that the length information is not within the preset range, that is, it is determined that the length information is erroneous.

[0060] Step S40: when the cyclic redundancy check value is inconsistent with a preset value, control data transmission with the transmitting end according to a data retransmission request.

[0061] It's understandable that the preset value refers to the cyclic redundancy check value used to verify the information content. This preset value can be represented as expectedCRC, and the cyclic redundancy check value of the information content can be represented as calculatedCRC. If calculatedCRC != expectedCRC, it indicates that the CRC check has failed. In this case, the receiving end will send a data retransmission request to the sending end and control the data transmission between them based on the retransmission request. Conversely, if calculatedCRC == expectedCRC, it indicates that the CRC check has succeeded, and data reception is complete. In other words, through the above CRC check, data corruption during transmission can be detected in a timely manner, and when the CRC check fails, the sending end is requested to retransmit the erroneous data packet, ensuring that the data received by the receiving end is consistent with the data sent by the sending end, thereby effectively improving the accuracy of transmitted data.

[0062] Further, step S40 includes: generating a data retransmission request when the cyclic redundancy check value is inconsistent with a preset value; sending the data retransmission request to the sending end; receiving the erroneous data packet sent by the sending end according to the data retransmission request, and controlling the data transmission between the sending end and the sending end according to the erroneous data packet.

[0063] It should be understood that a data retransmission request indicates a request for the sender to transmit only erroneous data packets. For the receiver, after generating a data retransmission request, it sends the data retransmission request to the sender. At this time, the sender will determine the erroneous data packets based on the data retransmission request and only retransmit the erroneous data packets to the receiver, rather than the entire data sequence, thereby avoiding the situation of duplicate data transmission.

[0064] Furthermore, after the step of controlling the data transmission between the sender and the data retransmission request, the method further includes: obtaining the identification information of the target header information; reading the next header information from the network stream data according to the identification information, wherein the next header information includes the next length information, the next magic number information, and the next information content; performing a hash calculation on the next magic number information to obtain the next magic number hash value; and repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with a preset hash value, the next length information is within a preset range, and the cyclic redundancy check value of the next information content is inconsistent with a preset value.

[0065] Understandably, to facilitate the reading of the next header information from network stream data, it is necessary to obtain the identification information of the target header information, i.e., to quickly locate the next header information and continue the transmission process, ensuring the continuity of data transmission and further improving data transmission efficiency. The next header information includes the next length information, the next magic number information, and the next information content. After calculating the next magic number hash value, the hash value, length information, and cyclic redundancy check (CRC) value are also judged. Specifically, it is judged whether the next magic number hash value is consistent with the preset hash value, whether the next length information is within the preset range, and whether the CRC value of the next information content is consistent with the preset value. If the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the CRC value of the next information content is inconsistent with the preset value, it indicates that the next header information verification is successful and the CRC check fails. In this case, the sender will still be requested to retransmit the erroneous data packet to avoid the situation of duplicate data transmission.

[0066] Furthermore, after repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the method further includes: counting the current number of times the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range; when the current number is greater than the preset number, disconnecting the network connection with the sending end and generating target error information; marking the target error information based on the second tag and storing the marked target error information in the database.

[0067] It should be understood that the current count refers to the number of times the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range. After multiple verifications using a multi-dimensional and rigorous verification mechanism, the current count of times the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range is counted. When the current count is greater than the preset count, it indicates that multiple header information verifications have failed, and the network connection with the sending end is disconnected. The second tag refers to the tag that marks the error type as multiple errors and disconnection. After generating the target error information, the target error information is tagged based on the first tag, and the tagged target error information is recorded in the database.

[0068] Furthermore, after repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the method further includes: counting the target number of times the cyclic redundancy check value is inconsistent with the preset value; and continuing to execute the step of disconnecting the network connection with the sending end when the target number is greater than the preset number.

[0069] It is understood that the target count refers to the number of times the cyclic redundancy check (CRC) value is inconsistent with the preset value. When the target count exceeds the preset count, it indicates that multiple CRC checks have failed. In this case, the network connection with the sending end will be disconnected, a target error message will be generated, and a type marking will be performed. The preset count can be 2 times, or it can be adaptively adjusted according to actual needs. Therefore, by utilizing the above error handling mechanism, whether the disconnection and reconnection are caused by multiple header information verification failures or multiple CRC check failures, it can ensure that unstable connections are promptly severed and reliable connections are re-established when serious errors occur, thus guaranteeing the stability of data transmission. Moreover, this embodiment can effectively handle transmission errors and ensure the reliability of data transmission even in various complex network environments.

[0070] This embodiment reads target header information from the network stream data sent by the receiving end. The target header information includes length information, magic number information, and information content. A hash calculation is performed on the magic number information to obtain a current magic number hash value. When the current magic number hash value matches a preset hash value and the length information is within a preset range, a cyclic redundancy check (CRC) value for the information content is calculated. When the CRC value does not match a preset value, data transmission between the receiving end and the sending end is controlled according to a data retransmission request. By parsing the multi-dimensional information included in the network stream data and then rigorously verifying the length and magic number information in the target header information, the accuracy of data transmission is guaranteed from the source. Furthermore, by verifying the information content through checksum comparison, data corruption during transmission can be detected promptly. If verification fails, a retransmission request is made to the sending end, thereby effectively improving the accuracy and efficiency of data transmission control and making it suitable for various complex network environments.

[0071] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes steps S201 to S203:

[0072] Step S201: Determine the target hash algorithm used by the sending end to perform hash calculation on the key information.

[0073] It should be noted that the target hash algorithm refers to the hash algorithm used by the sending end to perform hash calculations on the key information. In order to effectively improve the accuracy of verifying the target header information, the hash algorithm used to calculate the magic number information in this embodiment is the same as the hash algorithm used by the sending end to perform hash calculations on the key information, i.e., the target hash algorithm, which can be the MD5 hash algorithm. The key information of the sending end includes, but is not limited to, the packet number, timestamp, source IP address, and destination IP address.

[0074] Step S202: Obtain the configuration parameters of the target hash algorithm.

[0075] It is understandable that configuration parameters refer to the parameters configured when using the target hash algorithm, including but not limited to function type, iteration parameters, etc.

[0076] Step S203: Based on the target hash algorithm, perform hash calculation on the magic number information according to the configuration parameters to obtain the current magic number hash value.

[0077] It should be understood that the current magic number hash value refers to the hash value of the magic number information. After obtaining the magic number information, the magic number information is hashed according to the target hash algorithm and the configuration parameters to obtain the current magic number hash value.

[0078] This embodiment determines the target hash algorithm used by the sending end to perform hash calculations on key information; obtains the configuration parameters of the target hash algorithm; and performs hash calculations on the magic number information based on the target hash algorithm and the configuration parameters to obtain the current magic number hash value. By determining the target hash algorithm used by the sending end to perform hash calculations on key information, obtaining the configuration parameters of the target hash algorithm, and configuring it accordingly, hash calculations on the magic number information based on the target hash algorithm can effectively improve the accuracy of calculating the current magic number hash value, thereby improving the accuracy of verifying the target header information.

[0079] This application also provides a data transmission control device, please refer to... Figure 3 The data transmission control device includes:

[0080] The reading module 10 is used to read target header information from the network stream data when receiving network stream data sent by the sending end. The target header information includes length information, magic number information, and information content.

[0081] The calculation module 20 is used to perform hash calculation on the magic number information to obtain the current magic number hash value.

[0082] The calculation module 20 is further configured to calculate the cyclic redundancy check value of the information content when the current magic number hash value is consistent with the preset hash value and the length information is within the preset range.

[0083] The control module 30 is used to control the data transmission with the sending end according to the data retransmission request when the cyclic redundancy check value is inconsistent with the preset value.

[0084] This embodiment reads target header information from the network stream data sent by the receiving end. The target header information includes length information, magic number information, and information content. A hash calculation is performed on the magic number information to obtain a current magic number hash value. When the current magic number hash value matches a preset hash value and the length information is within a preset range, a cyclic redundancy check (CRC) value for the information content is calculated. When the CRC value does not match a preset value, data transmission between the receiving end and the sending end is controlled according to a data retransmission request. By parsing the multi-dimensional information included in the network stream data and then rigorously verifying the length and magic number information in the target header information, the accuracy of data transmission is guaranteed from the source. Furthermore, by verifying the information content through checksum comparison, data corruption during transmission can be detected promptly. If verification fails, a retransmission request is made to the sending end, thereby effectively improving the accuracy and efficiency of data transmission control and making it suitable for various complex network environments.

[0085] The data transmission control device provided in this application, employing the data transmission control method in the above embodiments, can solve the technical problem of low accuracy and efficiency in controlling data transmission in the prior art. Compared with the prior art, the beneficial effects of the data transmission control device provided in this application are the same as those of the data transmission control method provided in the above embodiments, and other technical features in the data transmission control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0086] In one embodiment, the calculation module 20 is further configured to determine the target hash algorithm used by the sending end to perform hash calculation on the key information; obtain the configuration parameters of the target hash algorithm; and perform hash calculation on the magic number information based on the target hash algorithm and the configuration parameters to obtain the current magic number hash value.

[0087] In one embodiment, the calculation module 20 is further configured to determine the target hash algorithm used by the sending end to perform hash calculation on the key information; obtain the configuration parameters of the target hash algorithm; and perform hash calculation on the magic number information based on the target hash algorithm and the configuration parameters to obtain the current magic number hash value.

[0088] In one embodiment, the control module 30 is further configured to generate a data retransmission request when the cyclic redundancy check value is inconsistent with a preset value; send the data retransmission request to the sending end; receive the erroneous data packet sent by the sending end according to the data retransmission request; and control the data transmission between the control module and the sending end according to the erroneous data packet.

[0089] In one embodiment, the control module 30 is further configured to acquire the identification information of the target header information; read the next header information from the network stream data according to the identification information, wherein the next header information includes the next length information, the next magic number information, and the next information content; perform a hash calculation on the next magic number information to obtain the next magic number hash value; and repeatedly execute the step of generating a data retransmission request when the next magic number hash value is consistent with a preset hash value, the next length information is within a preset range, and the cyclic redundancy check value of the next information content is inconsistent with a preset value.

[0090] In one embodiment, the control module 30 is further configured to count the current number of times when the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range; when the current number is greater than the preset number, disconnect the network connection with the sending end and generate target error information; mark the target error information according to the second tag and store the marked target error information in the database.

[0091] In one embodiment, the control module 30 is further configured to count the target number of times the cyclic redundancy check value is inconsistent with a preset value; when the target number is greater than the preset number, the step of disconnecting the network connection with the sending end is continued.

[0092] This application provides a data transmission control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data transmission control method in the first embodiment described above.

[0093] The following is for reference. Figure 4 The diagram illustrates a structural schematic of a data transmission control device suitable for implementing embodiments of this application. The data transmission control device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The data transmission control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0094] like Figure 4As shown, the data transmission control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the data transmission control device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the data transmission control device to communicate wirelessly or wiredly with other devices to exchange data. Although data transmission control devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0095] Specifically, according to the embodiments disclosed in this application, the process described above with reference to the flowcharts can be implemented as a computer software program. This computer program includes program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0096] The data transmission control device provided in this application, employing the data transmission control method in the above embodiments, can solve the technical problem of low accuracy and efficiency in controlling data transmission in the prior art. Compared with the prior art, the beneficial effects of the data transmission control device provided in this application are the same as those of the data transmission control method provided in the above embodiments, and other technical features in this data transmission control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0097] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0098] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0099] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the data transmission control method in the above embodiments.

[0100] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0101] The aforementioned computer-readable storage medium may be included in the data transmission control device; or it may exist independently and not be assembled into the data transmission control device.

[0102] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0104] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0105] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data transmission control method, which can solve the technical problem of low accuracy and efficiency in controlling data transmission in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the data transmission control method provided in the above embodiments, and will not be repeated here.

[0106] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A data transmission control method, characterized in that, The method includes: When receiving network stream data sent by the sending end, target header information is read from the network stream data, wherein the target header information includes length information, magic number information, and information content; The magic number information is hashed to obtain the current magic number hash value; When the current magic number hash value is consistent with the preset hash value and the length information is within the preset range, calculate the cyclic redundancy check value of the information content; When the cyclic redundancy check value is inconsistent with the preset value, the data transmission between the sender and the data retransmission terminal is controlled according to the data retransmission request.

2. The method as described in claim 1, characterized in that, The step of performing a hash calculation on the magic number information to obtain the current magic number hash value includes: Determine the target hash algorithm used by the sending end to perform hash calculations on key information; Obtain the configuration parameters of the target hash algorithm; Based on the target hash algorithm, the magic number information is hashed according to the configuration parameters to obtain the current magic number hash value.

3. The method as described in claim 1, characterized in that, After the step of hashing the magic number information to obtain the current magic number hash value, the method further includes: When the current magic number hash value is inconsistent with the preset hash value and / or the length information is not within the preset range, the network connection with the sending end is disconnected, and a current error message is generated; The current error information is tagged with a type based on the first tag, and the tagged current error information is then stored in the database. Re-establish the network connection with the sending end.

4. The method as described in claim 1, characterized in that, The step of controlling data transmission with the sending end according to a data retransmission request when the cyclic redundancy check value is inconsistent with the preset value includes: When the cyclic redundancy check value is inconsistent with the preset value, a data retransmission request is generated; Send the data retransmission request to the sending end; Receive the erroneous data packet sent by the sending end according to the data retransmission request, and control the data transmission between the sending end according to the erroneous data packet.

5. The method according to any one of claims 1 to 4, characterized in that, After the step of controlling data transmission between the sender and the data retransmission request, the method further includes: Obtain the identification information of the target header information; The next header information is read from the network stream data according to the identification information, wherein the next header information includes the next length information, the next magic number information, and the next information content; The next magic number information is hashed to obtain the next magic number hash value; When the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the step of generating a data retransmission request is repeated.

6. The method as described in claim 5, characterized in that, After repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the method further includes: Count the current number of times when the magic number hash value is inconsistent with the preset hash value and the length information is not within the preset range; When the current number of attempts exceeds a preset number, the network connection with the sending end is disconnected, and a target error message is generated; The target error information is tagged with a type based on the second tag, and the tagged target error information is then stored in the database.

7. The method as described in claim 5, characterized in that, After repeatedly executing the step of generating a data retransmission request when the next magic number hash value is consistent with the preset hash value, the next length information is within the preset range, and the cyclic redundancy check value of the next information content is inconsistent with the preset value, the method further includes: Count the number of times the cyclic redundancy check value is inconsistent with the preset value; If the target number of times exceeds the preset number of times, the step of disconnecting the network connection with the sending end continues.

8. A data transmission control device, characterized in that, The device includes: The reading module is used to read target header information from the network stream data when receiving network stream data sent by the sending end. The target header information includes length information, magic number information, and information content. The calculation module is used to perform hash calculation on the magic number information to obtain the current magic number hash value; The calculation module is also used to calculate the cyclic redundancy check value of the information content when the current magic number hash value is consistent with the preset hash value and the length information is within the preset range; The control module is used to control the data transmission between the sender and the data retransmission terminal according to the data retransmission request when the cyclic redundancy check value is inconsistent with the preset value.

9. A data transmission control device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data transmission control method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the data transmission control method as described in any one of claims 1 to 7.