Message data transmission method, device, equipment, storage medium and product
By receiving the encapsulated message data from the source node, using the cyclic redundancy check code and the target routing algorithm to determine the path, and splitting the transmission unit according to the network status and data queue status, it solves the problem of low message data transmission efficiency in the existing technology. problem, achieving efficient and stable data transmission.
Patent Information
- Application Number
- CN202410788802.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-19
AI Technical Summary
In the existing technology, message data transmission efficiency is low, which can easily cause network congestion, and the splitting of transmission units is not considered, resulting in poor transmission efficiency.
By receiving the encapsulated message data transmitted by the source node, the next hop path is determined using the cyclic redundancy check code and the target routing algorithm, the network status and data transmission queue status are obtained, the transmission unit is calculated, and the message data is processed based on this information. Transmission, including splitting transmission units to avoid network congestion.
It improves the transmission efficiency of message data, avoids network congestion, and detects abnormal transmission situations in time, ensuring the accuracy and efficiency of data transmission.
Smart Images

Figure CN118368034B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to message data transmission methods, devices, equipment, storage media and products. Background Art
[0002] The communication devices in the network topology cannot do without the transmission of message data. At present, the common method for message data transmission is that the source node directly sends the message data to be transmitted, which easily causes network congestion and the message data cannot be transmitted in time. To solve the above defects, communication engineers will set up monitoring units at each node to regularly monitor the actual transmission status of each node. When the message data of a large transmission unit cannot be transmitted, the transmission is directly stopped without considering the situation of splitting the transmission unit, resulting in low efficiency in transmitting message data.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present application is to provide a message data transmission method, device, equipment, storage medium and product, aiming to solve the technical problem of low efficiency of message data transmission in the prior art.
[0005] To achieve the above object, the present application proposes a message data transmission method, the method comprising:
[0006] Receiving current encapsulated message data transmitted by a source node, wherein the current encapsulated message data contains a destination address and a current cyclic redundancy check code;
[0007] When the current encapsulated message data passes the verification according to the current cyclic redundancy check code, determining the current next hop path according to the destination address and the current network topology structure based on the target routing algorithm;
[0008] Get the network status and data transmission queue status of the current next-hop path;
[0009] The current transmission unit of the currently encapsulated message data is calculated, and the message data is transmitted according to the network state, the data transmission queue state and the current transmission unit.
[0010] In one embodiment, when the current encapsulated message data is verified according to the current cyclic redundancy check code, the step of determining the current next hop path according to the destination address and the current network topology based on the target routing algorithm includes:
[0011] Parsing the current encapsulated message data to obtain actual message data and a current cyclic redundancy check code;
[0012] The actual message data is calculated by a target redundancy algorithm to obtain an actual cyclic redundancy check code;
[0013] Verifying the current encapsulated message data according to the actual cyclic redundancy check code and the current cyclic redundancy check code;
[0014] When the verification is passed, obtaining the position coordinates of each node in the current network topology structure;
[0015] Calculate the distances between adjacent nodes respectively according to the position coordinates;
[0016] Determine the location coordinates of the target node and the location coordinates of the source node according to the location coordinates of each node and the destination address;
[0017] Based on the target routing algorithm, path backtracking is performed according to the distance between the adjacent nodes, the position coordinates of the target node and the position coordinates of the source node to obtain the current next-hop path.
[0018] In one embodiment, the step of calculating the actual message data using a target redundancy algorithm to obtain an actual cyclic redundancy check code includes:
[0019] Performing binary processing on the actual message data to obtain a current message binary bit string;
[0020] When the current message binary bit string does not meet the preset bit string requirement, the current message binary bit string is padded to obtain a target message binary bit string;
[0021] Performing an XOR operation on the target message binary bit string, and obtaining the highest bit of the target message binary bit string after the XOR operation;
[0022] When the highest bit is a preset value, dividing the target generating polynomial by the target message binary bit string according to the target redundancy algorithm;
[0023] The actual cyclic redundancy check code is determined based on the current calculation result.
[0024] In one embodiment, the step of calculating the current transmission unit of the current encapsulated message data includes:
[0025] Parsing the current encapsulated message data to obtain message header data, message body data and message tail data, wherein the destination address is set in the message header and the current cyclic redundancy check code is set in the message tail;
[0026] Respectively counting and storing the number and size of bytes of the message packet header data, the message packet body data, and the message packet tail data;
[0027] Acquire data transmission characteristic information of each node in the current network topology;
[0028] Determining a transmission unit calculation strategy according to the data transmission characteristic information;
[0029] The current transmission unit of the current encapsulated message data is calculated according to the number and size of the bytes based on the transmission unit calculation strategy.
[0030] In one embodiment, the step of transmitting the message data according to the network state, the data transmission queue state and the current transmission unit includes:
[0031] Determine the target transmission unit of the current next path;
[0032] When the current transmission unit is larger than the target transmission unit, splitting the current transmission unit according to the target transmission unit and the number and size of bytes to obtain split transmission units;
[0033] Obtaining a splitting order of each split transmission unit;
[0034] The message data is transmitted based on the splitting order according to the network status, the data transmission queue status and each split transmission unit.
[0035] In one embodiment, the step of transmitting the message data based on the splitting order according to the network state, the data transmission queue state and each split transmission unit includes:
[0036] Determine the current performance of transmitting the message data on the current next-hop path according to the network status and the data transmission queue status;
[0037] When the current performance does not meet the preset performance requirement, obtaining the importance of the message data corresponding to each split transmission unit;
[0038] Adjusting the splitting order according to the importance;
[0039] Determine a maximum transmission unit that the current next-hop path can bear according to the current performance;
[0040] Determine an actual transmission unit according to the maximum transmission unit and each split transmission unit after the splitting order is adjusted, and transmit the message data according to the actual transmission unit;
[0041] Determine the unit to be transmitted according to each split transmission unit after the splitting order is adjusted and the actual transmission unit;
[0042] The unit to be transmitted is stored in a target buffer until the network status and the data transmission queue status are optimized and the transmission of the message data is continued.
[0043] In addition, to achieve the above purpose, the present application also proposes a message data transmission device, the message data transmission device comprising:
[0044] A receiving module, used for receiving the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains the destination address and the current cyclic redundancy check code;
[0045] A determination module, configured to determine a current next hop path according to the destination address and the current network topology structure based on a target routing algorithm when the current encapsulated message data passes the verification according to the current cyclic redundancy check code;
[0046] An acquisition module is used to obtain the network status and data transmission queue status of the current next-hop path;
[0047] The transmission module is used to calculate the current transmission unit of the currently encapsulated message data, and transmit the message data according to the network status, the data transmission queue status and the current transmission unit.
[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a message data transmission device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the message data transmission method described above.
[0049] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the message data transmission method described above are implemented.
[0050] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the message data transmission method described above are implemented.
[0051] One or more technical solutions proposed in the present application have at least the following technical effects: by receiving the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains the destination address and the current cyclic redundancy check code; when the current encapsulated message data is verified and passed according to the current cyclic redundancy check code, determining the current next-hop path based on the target routing algorithm according to the destination address and the current network topology structure; obtaining the network status and data transmission queue status of the current next-hop path; calculating the current transmission unit of the current encapsulated message data, and transmitting the message data according to the network status, the data transmission queue status and the current transmission unit; through the above-mentioned method, the current cyclic redundancy check code is encapsulated into the actual message data for transmission, which is convenient for verifying the consistency of the message data. After obtaining the network status and the data transmission queue status, the message data is transmitted in combination with the current transmission unit, thereby effectively improving the efficiency of transmitting message data, avoiding network congestion, and timely discovering abnormal transmission situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] Figure 1 A flowchart of the first embodiment of the message data transmission method of the present application is provided;
[0055] Figure 2 A flowchart diagram of the second embodiment of the message data transmission method of the present application;
[0056] Figure 3 A brief flowchart of the message data transmission method provided in Example 2 of the present application;
[0057] Figure 4 This is a schematic diagram of the module structure of the message data transmission device according to an embodiment of the present application;
[0058] Figure 5 A schematic diagram of the device structure of the hardware operating environment involved in the message data transmission method in the embodiment of the present application.
[0059] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0060] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a control node, etc. The following takes the control node as an example to illustrate this embodiment and the following embodiments.
[0061] Based on this, the present application embodiment provides a message data transmission method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the message data transmission method of the present application.
[0062] In this embodiment, the message data transmission method includes steps S10 to S40:
[0063] Step S10, receiving current encapsulated message data transmitted by a source node, wherein the current encapsulated message data contains a destination address and a current cyclic redundancy check code.
[0064] It should be noted that the source node refers to the starting node that starts sending encapsulated message data, and can also be called the first node in the current network topology. The current encapsulated message data refers to the message data that needs to be transmitted from the source node to the target node. The current encapsulated message data contains the destination address and the current cyclic redundancy check code. In addition, it also contains necessary control information, such as the protocol header, wherein the destination address represents the transmission end point of the message data, and the current cyclic redundancy check code is used to verify the consistency of the message data to avoid message data transmission errors caused by noise. The current cyclic redundancy check code can be CRC-64.
[0065] Step S20, when the current encapsulated message data is verified according to the current cyclic redundancy check code, determining the current next hop path according to the destination address and the current network topology based on the target routing algorithm.
[0066] It should be understood that after obtaining the current cyclic redundancy check code, the current encapsulated message data is verified using the current cyclic redundancy check code. If the verification passes, it indicates that the current encapsulated message data is not affected by factors such as noise. At this time, the target routing algorithm can determine the current next-hop path based on the destination address and the current network topology.
[0067] It can be understood that the current next-hop path refers to the path that the current encapsulated message data takes when it is transmitted from the source node to the target node, the current network topology structure refers to the topology structure composed of nodes corresponding to each communication device, and the target routing algorithm refers to the algorithm for determining the best path from the source node to the target node. The target routing algorithm can be the Bellman-Ford algorithm. In this embodiment, the target routing algorithm is used to determine the current next-hop path.
[0068] Step S30, obtaining the network status and data transmission queue status of the current next-hop path.
[0069] It can be understood that the network status refers to the status of the network of the current next-hop path at the current moment. For message data transmission, the better the network status, the higher the efficiency of transmitting message data through the current next-hop path. The data transmission queue status refers to the status of the queue for transmitting data through the current next-hop path at the current moment. For this queue, the first-in-first-out principle is adopted to avoid transmission abnormalities due to competition for message data.
[0070] Step S40, calculating the current transmission unit of the currently encapsulated message data, and transmitting the message data according to the network state, the data transmission queue state and the current transmission unit.
[0071] It should be understood that the current transmission unit represents the capacity of the current encapsulated message data, that is, the larger the current transmission unit, the more network resources are required. In addition, when the current transmission unit is larger than the target transmission unit of the current next path, the transmission will be impossible, causing network congestion. Therefore, when transmitting message data, this embodiment will consider multi-dimensional factors such as network status, data transmission queue status, and current transmission unit to ensure the efficiency and accuracy of transmitting message data and avoid network congestion.
[0072] Furthermore, the step of calculating the current transmission unit of the currently encapsulated message data includes: parsing the currently encapsulated message data to obtain message header data, message body data and message tail data, wherein the destination address is set in the message header and the current cyclic redundancy check code is set in the message tail; separately storing the number and size of bytes of the message header data, the message body data and the message tail data; obtaining the data transmission characteristic information of each node in the current network topology; determining the transmission unit calculation strategy according to the data transmission characteristic information; and calculating the current transmission unit of the currently encapsulated message data according to the number and size of bytes based on the transmission unit calculation strategy.
[0073] It can be understood that the current encapsulated message data includes three parts, namely, message header data, message body data and message tail data. In order to effectively improve the data parsing efficiency, this embodiment sets the destination address in the message header, and the current cyclic redundancy check code is set in the message tail. The message header data, message body data and message tail data are all stored in byte units in the form of bytes. The transmission unit calculation strategies used by different nodes are different. Therefore, it is necessary to determine the transmission unit calculation strategy based on the data transmission characteristic information of each node in the current network topology, and then use the transmission unit calculation strategy to calculate the current transmission unit of the current encapsulated message data according to the number and size of bytes to maximize network efficiency and reduce errors.
[0074] Furthermore, the step of transmitting message data according to the network status, the data transmission queue status and the current transmission unit includes: determining the target transmission unit of the current next path; when the current transmission unit is larger than the target transmission unit, splitting the current transmission unit according to the target transmission unit, the number and size of bytes to obtain each split transmission unit; obtaining the splitting order of each split transmission unit; and transmitting the message data according to the network status, the data transmission queue status and the each split transmission unit based on the splitting order.
[0075] It should be understood that the target transmission unit refers to the maximum transmission unit that the current next-hop path can carry. The target transmission unit can also be calculated using the transmission unit calculation strategy. After determining the target transmission unit of the current next-hop path, determine whether the current transmission unit is larger than the target transmission unit. If so, it indicates that the current next-hop path cannot transmit the current encapsulated message data. To solve the above problem, this embodiment adopts a splitting method to transmit message data. In addition, in order to ensure the rationality of the splitting, the current transmission unit is split from dimensions such as the target transmission unit, the number and size of bytes, and the splitting order at this time can also further characterize the order of each split transmission unit, and then the message data corresponding to each split transmission unit is transmitted in combination with the network status and the data transmission queue status.
[0076] Furthermore, the step of transmitting message data based on the splitting order according to the network status, the data transmission queue status and the each split transmission unit includes: determining the current performance of transmitting message data on the current next-hop path according to the network status and the data transmission queue status; when the current performance does not meet the preset performance requirements, obtaining the importance of the message data corresponding to the each split transmission unit; adjusting the splitting order according to the importance; determining the maximum transmission unit that the current next-hop path can withstand according to the current performance; determining the actual transmission unit according to the maximum transmission unit and the each split transmission unit after the splitting order is adjusted, and transmitting the message data according to the actual transmission unit; determining the unit to be transmitted according to the each split transmission unit after the splitting order is adjusted and the actual transmission unit; storing the unit to be transmitted in the target buffer until the transmission of the message data is continued after the network status and the data transmission queue status are optimized.
[0077] It can be understood that the current performance refers to the performance of the current next-hop path in transmitting message data at the current moment. The current performance can be determined based on the network status and the data transmission queue status, that is, when the network status and the data transmission queue status are both optimal, the current performance is also optimal. When determining the current performance of the current next-hop path in transmitting message data, it is judged whether the current performance meets the preset performance requirements. If so, it indicates that the current next-hop path cannot transmit the message data corresponding to all the split transmission units. At this time, it is necessary to use the importance of the message data corresponding to each split transmission unit and the maximum transmission unit that the current next-hop path can withstand to determine the actual transmission unit, wherein the actual transmission unit refers to the most important message data that can be transmitted within the maximum transmission unit that the current next-hop path can withstand.
[0078] It should be understood that after determining the target transmission unit, it is necessary to encapsulate the destination address and the new next-hop path into the message data corresponding to the actual transmission unit to obtain the target encapsulated message data, and then transmit the target encapsulated message data through the current next-hop path. In addition, the unit to be transmitted refers to the transmission unit other than the target transmission unit in each split transmission unit. In order to avoid the impact of network congestion on the current network topology, it is necessary to store the unit to be transmitted in the target buffer and wait for the message data corresponding to the target transmission unit to be transmitted. After the network status and the data transmission queue status are optimized, the message data corresponding to the unit to be transmitted is transmitted using the released or optimized network resources until all the message data are transmitted to the target node.
[0079] This embodiment receives the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains a destination address and a current cyclic redundancy check code; when the current encapsulated message data is verified and passed according to the current cyclic redundancy check code, the current next-hop path is determined based on the target routing algorithm according to the destination address and the current network topology structure; the network status and data transmission queue status of the current next-hop path are obtained; the current transmission unit of the current encapsulated message data is calculated, and the message data is transmitted according to the network status, the data transmission queue status and the current transmission unit; through the above-mentioned method, the current cyclic redundancy check code is encapsulated into the actual message data for transmission, which is convenient for verifying the consistency of the message data. After obtaining the network status and the data transmission queue status, the message data is transmitted in combination with the current transmission unit, thereby effectively improving the efficiency of transmitting message data, avoiding network congestion, and timely discovering abnormal transmission situations.
[0080] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S20 includes steps S201 to S207:
[0081] Step S201, parsing the current encapsulated message data to obtain actual message data and a current cyclic redundancy check code.
[0082] It should be noted that the actual message data refers to the message data that needs to be transmitted from the source node to the target node. The currently encapsulated message data received can be in the form of a data packet. Therefore, in order to obtain the data encapsulated in the currently encapsulated message data, the currently encapsulated message data needs to be parsed to obtain the actual message data and the current cyclic redundancy check code set in the end of the message packet.
[0083] Step S202, calculating the actual message data by using a target redundancy algorithm to obtain an actual cyclic redundancy check code.
[0084] It can be understood that the target redundancy algorithm refers to an algorithm used to calculate a cyclic redundancy check code. The target redundancy algorithm can be a bit-by-bit feedback shift modulo-2 algorithm. Compared with the prior art, the bit-by-bit feedback shift modulo-2 algorithm combines the core ideas of multiple redundancy algorithms, for example, data bits are input bit by bit, XOR operations, etc., thereby effectively improving the efficiency and accuracy of calculating the actual cyclic redundancy check code.
[0085] Furthermore, the step of calculating the actual message data through a target redundancy algorithm to obtain an actual cyclic redundancy check code includes: performing binary processing on the actual message data to obtain a current message binary bit string; when the current message binary bit string does not meet the preset bit string requirements, padding the current message binary bit string to obtain a target message binary bit string; performing an XOR operation on the target message binary bit string, and obtaining the highest bit of the target message binary bit string after the XOR operation; when the highest bit is a preset value, dividing the target generating polynomial by the target message binary bit string according to the target redundancy algorithm; and determining the actual cyclic redundancy check code based on the current calculation result.
[0086] It should be understood that since the data format used by the target redundancy algorithm to calculate the cyclic redundancy check code must be in binary format, after parsing the actual message data, it is necessary to perform binary conversion processing on the actual message data, and then fill the current message binary bit string with the target message binary bit string, wherein the number used for filling can be 0, and it is also necessary to shift the target generating polynomial left until it is aligned with the left part of the target message binary bit string, and perform an XOR operation on the target message binary bit string after alignment, and the above XOR operation can also be called a modulo-2 division operation, and the preset value can be 1. When it is determined that the highest bit of the target message binary bit string after the XOR operation is the preset value, it indicates that the highest bit has been processed, and then the target redundancy algorithm is used to divide the target generating polynomial and the target message binary bit string, that is, the target generating polynomial / target message binary bit string. At this time, the calculation result includes a quotient and a remainder, and the remainder is the actual cyclic redundancy check code.
[0087] Step S203: verify the current encapsulated message data according to the actual cyclic redundancy check code and the current cyclic redundancy check code.
[0088] It is understandable that after the actual cyclic redundancy check code is obtained, the actual cyclic redundancy check code is compared with the parsed current cyclic redundancy check code to implement verification of the current encapsulated message data.
[0089] Step S204: when the verification is passed, obtaining the position coordinates of each node in the current network topology structure.
[0090] It should be noted that when the actual cyclic redundancy check code is completely consistent with the parsed current cyclic redundancy check code, it indicates that the verification of the previously encapsulated message data has passed. At this time, the position coordinates of each node in the current network topology structure are obtained, where the position coordinates in the current network topology structure can be determined by the plane coordinate system established with the source node as the starting point.
[0091] Step S205: Calculate the distances between adjacent nodes according to the position coordinates.
[0092] It should be understood that after determining the location coordinates, the feasible path between adjacent nodes is determined in combination with the feasible data in the current network topology, and then the distance between adjacent nodes is further calculated based on the feasible path. It should be noted that in the embodiment, all distances calculated for invalid paths are invalid.
[0093] Step S206, determining the location coordinates of the target node and the location coordinates of the source node according to the location coordinates of each node and the destination address.
[0094] It can be understood that after determining the location coordinates of each node, the location coordinates of the source node are extracted from the location coordinates of each node, and after parsing the destination address, the name of the target node is determined according to the destination address, and then the location coordinates of each node are determined according to the name of the target node and the location coordinates of each node.
[0095] Step S207 , based on the target routing algorithm, path backtracking is performed according to the distance between the adjacent nodes, the location coordinates of the target node and the location coordinates of the source node to obtain the current next-hop path.
[0096] It should be understood that the current next path refers to the path with the shortest distance from the source node to the target node. After determining the location coordinates of the target node and the distance between adjacent nodes, the target routing algorithm is used to trace the path. During the path tracing process, the network status and data transmission queue status of each path are combined to determine the current next hop path with the shortest distance and the best performance.
[0097] In this embodiment, the actual message data and the current cyclic redundancy check code are obtained by parsing the current encapsulated message data; the actual cyclic redundancy check code is calculated by the target redundancy algorithm; the current encapsulated message data is verified according to the actual cyclic redundancy check code and the current cyclic redundancy check code; when the verification is passed, the position coordinates of each node in the current network topology are obtained; the distance between adjacent nodes is calculated according to the position coordinates; the position coordinates of the target node and the position coordinates of the source node are determined according to the position coordinates of each node and the destination address; the path is backtracked according to the distance between adjacent nodes, the position coordinates of the target node and the position coordinates of the source node based on the target routing algorithm to obtain the current next hop path; in the above manner, the actual cyclic redundancy check code is calculated by using the target redundancy algorithm, and then the actual cyclic redundancy check code is compared with the current cyclic redundancy check code to verify the consistency and integrity of the current encapsulated message data, and then the position coordinates of the target node and the position coordinates of the source node are determined respectively by using the position coordinates and the destination address of each node, and then the current next hop path is traced back by using the target routing algorithm by path backtracking, so as to effectively improve the accuracy of obtaining the current next hop path.
[0098] For example, in order to help understand the implementation process of the message data transmission method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flow chart of a message data transmission method is provided, specifically:
[0099] The current network topology is explained with ten nodes as an example, including a source node, a target node, and the rest are all intermediate nodes. At this time, the source node is set to A, the target node is set to H, and the intermediate nodes are set to B, C, D, E, F, G, I, and J. Then the current encapsulated message data is transmitted from the source node. At this time, the current encapsulated message data contains the destination address and the current cyclic redundancy check code. The actual cyclic redundancy check code is compared with the current cyclic redundancy check code. When the check passes, the coordinate system is used to determine the position coordinates of each node in the current network topology. For example, the position coordinates of the source node A are (0,0), and the position coordinates of the target node H are (x n ,y n ), and then use the target routing algorithm to trace the current next-hop path by path backtracking. For example, the current next-hop path is A→C→F→H, A→C→E→G→H, A→C→E→F→H, and then combine the network status and data transmission queue status of the current next-hop path to determine that the current next-hop path with the best performance is A→C→E→G→H, and then use the split current transmission unit to transmit the message data.
[0100] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the message data transmission method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0101] This application also provides a message data transmission device, please refer to Figure 4 , the message data transmission device comprises:
[0102] The receiving module 10 is used to receive the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains the destination address and the current cyclic redundancy check code.
[0103] The determination module 20 is used to determine the current next hop path according to the destination address and the current network topology structure based on the target routing algorithm when the current encapsulated message data is verified according to the current cyclic redundancy check code.
[0104] The acquisition module 30 is used to acquire the network status and data transmission queue status of the current next-hop path.
[0105] The transmission module 40 is used to calculate the current transmission unit of the currently encapsulated message data, and transmit the message data according to the network state, the data transmission queue state and the current transmission unit.
[0106] This embodiment receives the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains a destination address and a current cyclic redundancy check code; when the current encapsulated message data is verified and passed according to the current cyclic redundancy check code, the current next-hop path is determined based on the target routing algorithm according to the destination address and the current network topology structure; the network status and data transmission queue status of the current next-hop path are obtained; the current transmission unit of the current encapsulated message data is calculated, and the message data is transmitted according to the network status, the data transmission queue status and the current transmission unit; through the above-mentioned method, the current cyclic redundancy check code is encapsulated into the actual message data for transmission, which is convenient for verifying the consistency of the message data. After obtaining the network status and the data transmission queue status, the message data is transmitted in combination with the current transmission unit, thereby effectively improving the efficiency of transmitting message data, avoiding network congestion, and timely discovering abnormal transmission situations.
[0107] The message data transmission device provided by the present application adopts the message data transmission method in the above embodiment, which can solve the technical problem of low efficiency of message data transmission in the prior art. Compared with the prior art, the beneficial effects of the message data transmission device provided by the present application are the same as the beneficial effects of the message data transmission method provided by the above embodiment, and other technical features in the message data transmission device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0108] In one embodiment, the determination module 20 is also used to parse the current encapsulated message data to obtain actual message data and a current cyclic redundancy check code; calculate the actual message data through a target redundancy algorithm to obtain an actual cyclic redundancy check code; verify the current encapsulated message data according to the actual cyclic redundancy check code and the current cyclic redundancy check code; when the verification passes, obtain the position coordinates of each node in the current network topology structure; calculate the distance between adjacent nodes according to the position coordinates; determine the position coordinates of the target node and the position coordinates of the source node according to the position coordinates of each node and the destination address; based on the target routing algorithm, perform path backtracking according to the distance between adjacent nodes, the position coordinates of the target node, and the position coordinates of the source node to obtain the current next-hop path.
[0109] In one embodiment, the determination module 20 is also used to perform binary processing on the actual message data to obtain a current message binary bit string; when the current message binary bit string does not meet the preset bit string requirements, the current message binary bit string is supplemented to obtain a target message binary bit string; an XOR operation is performed on the target message binary bit string, and the highest bit of the target message binary bit string after the XOR operation is obtained; when the highest bit is a preset value, a target generating polynomial is divided by the target message binary bit string according to a target redundancy algorithm; and an actual cyclic redundancy check code is determined based on the current calculation result.
[0110] In one embodiment, the transmission module 40 is also used to parse the current encapsulated message data to obtain message header data, message body data and message tail data, wherein the destination address is set in the message header and the current cyclic redundancy check code is set in the message tail; respectively statistically store the number and size of bytes of the message header data, the message body data and the message tail data; obtain the data transmission characteristic information of each node in the current network topology; determine the transmission unit calculation strategy according to the data transmission characteristic information; and calculate the current transmission unit of the current encapsulated message data according to the number and size of the bytes based on the transmission unit calculation strategy.
[0111] In one embodiment, the transmission module 40 is also used to determine the target transmission unit of the current next path; when the current transmission unit is larger than the target transmission unit, the current transmission unit is split according to the target transmission unit, the number and size of bytes to obtain each split transmission unit; the splitting order of each split transmission unit is obtained; based on the splitting order, the message data is transmitted according to the network status, the data transmission queue status and the each split transmission unit.
[0112] In one embodiment, the transmission module 40 is also used to determine the current performance of transmitting message data on the current next-hop path according to the network status and the data transmission queue status; when the current performance does not meet the preset performance requirements, obtain the importance of the message data corresponding to each split transmission unit; adjust the splitting order according to the importance; determine the maximum transmission unit that the current next-hop path can withstand according to the current performance; determine the actual transmission unit according to the maximum transmission unit and each split transmission unit after adjusting the splitting order, and transmit the message data according to the actual transmission unit; determine the unit to be transmitted according to each split transmission unit after adjusting the splitting order and the actual transmission unit; store the unit to be transmitted in the target buffer until the transmission of the message data is continued after the network status and the data transmission queue status are optimized.
[0113] The present application provides a message data transmission 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 so that the at least one processor can execute the message data transmission method in the above-mentioned embodiment one.
[0114] Reference below Figure 5 , which shows a schematic diagram of the structure of a message data transmission device suitable for implementing the embodiment of the present application. The message data transmission device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The message data transmission device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0115] like Figure 5As shown, the message data transmission device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the message data transmission device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the message data transmission device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a message data transmission device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0116] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0117] The message data transmission device provided by the present application adopts the message data transmission method in the above embodiment, which can solve the technical problem of low efficiency of message data transmission in the prior art. Compared with the prior art, the beneficial effects of the message data transmission device provided by the present application are the same as the beneficial effects of the message data transmission method provided by the above embodiment, and other technical features in the message data transmission device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0118] It should be understood that the various parts disclosed in this application can be implemented by 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 one or more embodiments or examples in a suitable manner.
[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the message data transmission method in the above-mentioned embodiment.
[0121] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable ReadOnly Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0122] The computer-readable storage medium may be included in the message data transmission device; or may exist independently without being assembled into the message data transmission device.
[0123] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0126] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned message data transmission method, and can solve the technical problem of low efficiency in transmitting message data in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the message data transmission method provided in the above-mentioned embodiment, and will not be described in detail here.
[0127] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned message data transmission method when executed by a processor.
[0128] The computer program product provided by the present application can solve the technical problem of low efficiency of transmitting message data in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the message data transmission method provided by the above embodiment, which will not be repeated here.
[0129] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A message data transmission method, characterized in that: The method comprises: Receiving current encapsulated message data transmitted by a source node, wherein the current encapsulated message data contains a destination address and a current cyclic redundancy check code; When the current encapsulated message data passes the verification according to the current cyclic redundancy check code, determining the current next hop path according to the destination address and the current network topology structure based on the target routing algorithm; Get the network status and data transmission queue status of the current next-hop path; Calculate the current transmission unit of the currently encapsulated message data, and transmit the message data according to the network state, the data transmission queue state and the current transmission unit; The step of determining the current next hop path according to the destination address and the current network topology structure based on the target routing algorithm when the current encapsulated message data is verified according to the current cyclic redundancy check code comprises: Parsing the current encapsulated message data to obtain actual message data and a current cyclic redundancy check code; The actual message data is calculated by a target redundancy algorithm to obtain an actual cyclic redundancy check code; Verifying the current encapsulated message data according to the actual cyclic redundancy check code and the current cyclic redundancy check code; When the verification is passed, obtaining the position coordinates of each node in the current network topology structure; Calculate the distances between adjacent nodes respectively according to the position coordinates; Determine the location coordinates of the target node and the location coordinates of the source node according to the location coordinates of each node and the destination address; Based on the target routing algorithm, path backtracking is performed according to the distance between the adjacent nodes, the location coordinates of the target node and the location coordinates of the source node to obtain the current next-hop path; The step of calculating the current transmission unit of the current encapsulated message data includes: Parsing the current encapsulated message data to obtain message header data, message body data and message tail data, wherein the destination address is set in the message header and the current cyclic redundancy check code is set in the message tail; Respectively counting and storing the number and size of bytes of the message packet header data, the message packet body data, and the message packet tail data; Acquire data transmission characteristic information of each node in the current network topology; Determining a transmission unit calculation strategy according to the data transmission characteristic information; The current transmission unit of the current encapsulated message data is calculated according to the number and size of the bytes based on the transmission unit calculation strategy.
2. The method according to claim 1, characterized in that The step of calculating the actual message data by using a target redundancy algorithm to obtain an actual cyclic redundancy check code comprises: Performing binary processing on the actual message data to obtain a current message binary bit string; When the current message binary bit string does not meet the preset bit string requirement, the current message binary bit string is padded to obtain a target message binary bit string; Performing an XOR operation on the target message binary bit string, and obtaining the highest bit of the target message binary bit string after the XOR operation; When the highest bit is a preset value, dividing the target generating polynomial by the target message binary bit string according to the target redundancy algorithm; The actual cyclic redundancy check code is determined based on the current calculation result.
3. The method according to claim 1, characterized in that The step of transmitting the message data according to the network state, the data transmission queue state and the current transmission unit includes: Determine the target transmission unit of the current next path; When the current transmission unit is larger than the target transmission unit, splitting the current transmission unit according to the target transmission unit and the number and size of bytes to obtain split transmission units; Obtaining a splitting order of each split transmission unit; The message data is transmitted based on the splitting order according to the network status, the data transmission queue status and each split transmission unit.
4. The method according to claim 3, characterized in that The step of transmitting the message data based on the splitting order according to the network state, the data transmission queue state and each split transmission unit includes: Determine the current performance of transmitting the message data on the current next-hop path according to the network status and the data transmission queue status; When the current performance does not meet the preset performance requirement, obtaining the importance of the message data corresponding to each split transmission unit; Adjusting the splitting order according to the importance; Determine a maximum transmission unit that the current next-hop path can bear according to the current performance; Determine an actual transmission unit according to the maximum transmission unit and each split transmission unit after the splitting order is adjusted, and transmit the message data according to the actual transmission unit; Determine the unit to be transmitted according to each split transmission unit after the splitting order is adjusted and the actual transmission unit; The unit to be transmitted is stored in a target buffer until the network status and the data transmission queue status are optimized and the transmission of the message data is continued.
5. A message data transmission device, characterized in that: The device comprises: A receiving module, used for receiving the current encapsulated message data transmitted by the source node, wherein the current encapsulated message data contains the destination address and the current cyclic redundancy check code; A determination module, configured to determine a current next hop path according to the destination address and the current network topology structure based on a target routing algorithm when the current encapsulated message data passes the verification according to the current cyclic redundancy check code; An acquisition module is used to obtain the network status and data transmission queue status of the current next-hop path; A transmission module, used to calculate the current transmission unit of the currently encapsulated message data, and transmit the message data according to the network state, the data transmission queue state and the current transmission unit; The determination module is further used to parse the current encapsulated message data to obtain actual message data and a current cyclic redundancy check code; calculate the actual message data through a target redundancy algorithm to obtain an actual cyclic redundancy check code; verify the current encapsulated message data according to the actual cyclic redundancy check code and the current cyclic redundancy check code; when the verification passes, obtain the position coordinates of each node in the current network topology structure; calculate the distance between adjacent nodes according to the position coordinates; determine the position coordinates of the target node and the position coordinates of the source node according to the position coordinates of each node and the destination address; perform path backtracking based on the distance between adjacent nodes, the position coordinates of the target node and the position coordinates of the source node based on the target routing algorithm to obtain the current next-hop path; The transmission module is also used to parse the current encapsulated message data to obtain message header data, message body data and message tail data, wherein the destination address is set in the message header and the current cyclic redundancy check code is set in the message tail; respectively statistically store the number and size of bytes of the message header data, the message body data and the message tail data; obtain the data transmission characteristic information of each node in the current network topology; determine the transmission unit calculation strategy according to the data transmission characteristic information; and calculate the current transmission unit of the current encapsulated message data according to the number and size of the bytes based on the transmission unit calculation strategy.
6. A message data transmission device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the message data transmission method according to any one of claims 1 to 4.
7. 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, the steps of the message data transmission method according to any one of claims 1 to 4 are implemented.
8. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the message data transmission method according to any one of claims 1 to 4 are implemented.
