Ship-shore low-speed bandwidth data synchronization method and device, electronic equipment and medium
By dynamically adjusting the sending strategy and window specifications in ship-shore data synchronization, the speed bottleneck and low synchronization success rate of traditional technologies in low-bandwidth environments of satellites are solved, and efficient and reliable data synchronization is achieved.
Patent Information
- Application Number
- CN202411587443.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-08
AI Technical Summary
During the process of strait data synchronization, traditional technical solutions based on TCP protocol show speed bottlenecks, impaired user experience and low synchronization success rate in low satellite bandwidth environments.
A method of data synchronization for low-speed bandwidth of ships and shores is proposed. The data to be transmitted is selected through the transmission window of preset specifications, the network status is evaluated based on the target time node, the data is sent dynamically in batches, and the transmission probability and window specifications are adjusted according to the comprehensive network status score.
It improves the data transmission speed, reduces the probability of data congestion, ensures reliable data transmission in a weak network environment, and achieves efficient data synchronization.
Smart Images

Figure CN119629186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a ship-shore low-speed bandwidth data synchronization method, device, electronic equipment and medium. Background Art
[0002] In the current field of ship operation and data management, data synchronization from ship to shore plays a vital role. The traditional implementation of this process mainly relies on TCP (Transmission Control Protocol) as its communication basis, which is similar to the strategy of data synchronization between two points on land. By establishing a stable TCP communication channel between the ship and the shore, real-time or quasi-real-time transmission and synchronization of data can be achieved. However, in the specific application scenario of ship-shore data synchronization, traditional technical solutions based on the TCP protocol have gradually shown many shortcomings, especially when using satellites as the transmission medium. These problems are particularly prominent.
[0003] First, the speed bottleneck has become a key factor restricting the efficiency of ship-shore data synchronization. Since the bandwidth resources of satellite communications are relatively limited, even if the efficient TCP protocol is used for data encapsulation and transmission, it cannot completely make up for the inherent defect of low satellite bandwidth, resulting in data synchronization speed far lower than expected, making it difficult to meet the high requirements of ship operations for data transmission timeliness.
[0004] Secondly, the loss of user experience is also an issue that cannot be ignored. On the ship side, technicians and passengers rely on limited satellite bandwidth for network connection, and the large amount of bandwidth occupied by data synchronization tasks will inevitably lead to fierce competition for bandwidth resources. This competition will not only affect the efficiency of data synchronization, but may also cause a significant decrease in network access speed for crew members and passengers, resulting in a poor user experience.
[0005] Finally, the low synchronization success rate further exacerbates the dilemma of ship-shore data synchronization. Although the TCP protocol can theoretically provide a relatively reliable data transmission guarantee, in the actual environment of low satellite bandwidth, packet loss, delays and even interruptions in the data transmission process are frequent, resulting in data synchronization tasks often facing the risk of incomplete transmission or ultimate failure. This not only increases the complexity of data processing, but also poses a potential threat to the safety and efficiency of ship operations. Summary of the invention
[0006] The present invention aims to solve the problem of the limitations of the related technology at least to a certain extent. To this end, the present invention proposes a ship-shore low-speed bandwidth data synchronization method, device, electronic device and medium, which realizes data synchronization efficiently through dynamic adaptation.
[0007] On the one hand, an embodiment of the present invention provides a ship-shore low-speed bandwidth data synchronization method, comprising:
[0008] Select the data at the front of the queue of data to be transmitted as the transmission data through a sending window of preset specifications;
[0009] The network status is obtained based on the interaction information between the sender and the receiver within the target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate;
[0010] Dynamically sending the transmission data from the sending end to the receiving end in batches based on a preset sending probability;
[0011] Perform weighted calculation on all parameters of the network status to obtain a comprehensive network status score;
[0012] When the comprehensive network status score is less than or equal to the first threshold, the sending probability is randomly lowered and the preset specification of the sending window is reduced; otherwise, the determination is made based on the second threshold;
[0013] When the comprehensive network status score is less than or equal to the second threshold, the preset specification of the sending window is randomly adjusted; otherwise, the sending probability is randomly increased and the preset specification of the sending window is increased;
[0014] Move the sending window back on the queue of data to be transmitted, take the next time node of the target time node as the target time node, and return to execute the step of evaluating the network status based on the interaction information between the sender and the receiver within the target time range before the target time node until all data in the queue of data to be transmitted are synchronized.
[0015] Optionally, the reply packet is obtained based on a probe packet response transmitted from the sender to the receiver, and the confirmation information is obtained based on a historical transmission data response transmitted from the sender to the receiver; and the network status is obtained based on the interaction information between the sender and the receiver within a target time range before the target time node, including the following steps:
[0016] Determine the network delay based on the round-trip time of the detection packet and its corresponding reply packet; obtain the average network delay based on all network delays determined within the target time range;
[0017] The network bandwidth is based on the sum of the data size of the information transmitted within the target time range;
[0018] The number of packets sent is determined based on the transmission information, and the number of packets received is determined based on the feedback information; the packet loss rate is determined based on the number of packets sent and the number of packets received.
[0019] Optionally, the transmission data includes a plurality of data packets, and the confirmation information includes a transmission status of each data packet in the transmission data, and the transmission status includes received and not received; the method further includes the following steps:
[0020] When the transmission status of the data packet in two consecutive confirmation messages is not received, and the first number of detection packets are responded to normally after the confirmation message to obtain a reply packet, the transmission status of the corresponding data packet is determined as packet loss;
[0021] The data packets whose transmission status is packet loss are added to the front of the queue of data to be transmitted.
[0022] Optionally, the transmission data includes a plurality of data packets; dynamically sending the transmission data in batches from the transmitting end to the receiving end based on a preset transmission probability comprises the following steps:
[0023] Performing grouping processing on the data packets of the transmission data to obtain a plurality of data packets; the data packets include at most a second number of data packets;
[0024] Performing forward error correction coding on each data packet in turn to obtain coded data;
[0025] When the sending probability is greater than the probability threshold, the coded data is sent according to the window seat of the sending window; otherwise,
[0026] A random value within a preset range is obtained. When the random value is less than the sending probability, the encoded data is sent according to the window seat of the sending window; otherwise, the encoded data is added to the front of the queue of data to be transmitted.
[0027] Optionally, performing a weighted operation on all parameters of the network status to obtain a comprehensive network status score includes the following steps:
[0028] Based on the preset weight parameters, all parameters of the network status are weighted and calculated in combination with the logarithmic function to obtain a comprehensive network status score;
[0029] The expression of comprehensive network status score is:
[0030] BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate;
[0031] Wherein, BNSI represents the comprehensive network status score; w1, w2 and w3 represent weight parameters; log represents the logarithmic function with natural exponential as the base; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; CurrLostRate represents the packet loss rate.
[0032] Optionally, the method further comprises the following steps:
[0033] Update the comprehensive network status score by superimposing random perturbations;
[0034] The expression of the updated comprehensive network status score is:
[0035] RNSI=BNSI+α*N(0,σ 2 );
[0036] Where RNSI represents the updated comprehensive network status score; BNSI represents the comprehensive network status score before the update; α represents the preset disturbance parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
[0037] Optionally, randomly adjusting the preset specification of the sending window includes the following steps:
[0038] The adjustment specification is determined based on the ratio of the comprehensive network status score to a preset random value; wherein the preset random value represents a normal distribution with an expected value of 0 and a standard deviation of 1;
[0039] The preset specification of the sending window is updated based on the sum of the adjustment specification and the preset specification.
[0040] On the other hand, an embodiment of the present invention provides a ship-shore low-speed bandwidth data synchronization device, comprising:
[0041] The first module is used to select the data at the front of the queue of data to be transmitted as the transmission data through a sending window of preset specifications;
[0042] The second module is used to evaluate the network status based on the interaction information between the sender and the receiver within the target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate;
[0043] The third module is used to dynamically send the transmission data from the sending end to the receiving end in batches based on a preset sending probability;
[0044] The fourth module is used to perform weighted calculation on all parameters of the network status to obtain a comprehensive network status score;
[0045] The fifth module is used to randomly lower the sending probability and reduce the preset specification of the sending window when the comprehensive network status score is less than or equal to the first threshold; otherwise, make a determination based on the second threshold;
[0046] The sixth module is used for randomly adjusting the preset specification of the sending window when the comprehensive network status score is less than or equal to the second threshold; otherwise, randomly increasing the sending probability and increasing the preset specification of the sending window;
[0047] The seventh module is used to move the sending window backward on the queue of data to be transmitted, take the next time node of the target time node as the target time node, and return to execute the second module until all data in the queue of data to be transmitted are synchronized.
[0048] Optionally, the transmission data includes a plurality of data packets, the confirmation information includes a transmission status of each data packet in the transmission data, and the transmission status includes received and not received; the device further includes:
[0049] An eighth module is used for determining the transmission status of the corresponding data packet as packet loss when the transmission status of the data packet in two consecutive confirmation messages is not received, and a first number of detection packets are responded to normally after the confirmation message to obtain a reply packet;
[0050] The ninth module is used to add the data packet whose transmission status is packet loss to the front of the queue of data to be transmitted.
[0051] Optionally, the device further comprises:
[0052] The tenth module is used to update the comprehensive network status score by superimposing random disturbances;
[0053] The expression of the updated comprehensive network status score is:
[0054] RNSI=BNSI+α*N(0,σ 2 );
[0055] Where RNSI represents the updated comprehensive network status score; BNSI represents the comprehensive network status score before the update; α represents the preset disturbance parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
[0056] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned ship-shore low-speed bandwidth data synchronization method.
[0057] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned ship-shore low-speed bandwidth data synchronization method.
[0058] The embodiment of the present invention selects the data in front of the queue of data to be transmitted as the transmission data through a sending window of preset specifications; evaluates the network status based on the interactive information between the sending end and the receiving end within the target time range before the target time node; the interactive information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate; based on the preset sending probability, the transmission data is dynamically sent from the sending end to the receiving end in batches; all parameters of the network status are weighted to obtain a comprehensive network status score; when the comprehensive network status score is If the network status score is less than or equal to the first threshold, the sending probability is randomly lowered and the preset specifications of the sending window are reduced; otherwise, the judgment is made based on the second threshold; when the comprehensive network status score is less than or equal to the second threshold, the preset specifications of the sending window are randomly adjusted; otherwise, the sending probability is randomly increased and the preset specifications of the sending window are increased; the sending window is moved back on the queue of data to be transmitted, and the next time node of the target time node is used as the target time node, and the step of evaluating the network status based on the interactive information between the sender and the receiver within the target time range before the target time node is returned, until all data in the queue of data to be transmitted is synchronized. The present invention proposes a real-time evaluation method for network bandwidth, adaptively adjusts the data transmission strategy, and improves the transmission speed. The present invention can realize refined control of traffic and avoid congestion, and ensure reliable data transmission in a weak network environment. The present invention can efficiently realize data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0060] Figure 1 A schematic diagram of an implementation environment for ship-shore low-speed bandwidth data synchronization provided by an embodiment of the present invention;
[0061] Figure 2 A schematic flow chart of a method for synchronizing ship-shore low-speed bandwidth data provided by an embodiment of the present invention;
[0062] Figure 3 A schematic diagram of a ship-to-shore communication process provided by an embodiment of the present invention;
[0063] Figure 4 A schematic diagram of a process for evaluating network status according to an embodiment of the present invention;
[0064] Figure 5 A schematic diagram of an extended process of ship-to-shore low-speed bandwidth data synchronization provided by an embodiment of the present invention;
[0065] Figure 6 A schematic diagram of the principle of a data sending window provided by an embodiment of the present invention;
[0066] Figure 7 A schematic diagram of an expanded flow chart of sending probability transmission data provided by an embodiment of the present invention;
[0067] Figure 8 A schematic diagram of the overall process principle of a ship-to-shore low-speed bandwidth data synchronization method provided by an embodiment of the present invention;
[0068] Fig. 9 A schematic diagram of the structure of a ship-to-shore low-speed bandwidth data synchronization device provided by an embodiment of the present invention;
[0069] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0071] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0072] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.
[0073] It is understandable that the ship-shore low-speed bandwidth data synchronization method provided in the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, etc., but is not limited to this.
[0074] To facilitate the understanding of the technical solution of the present invention, the specific terms of the technical features that may appear in the embodiments of the present invention are first explained:
[0075] VSAT satellite communication (Very Small Aperture Terminal): Since VSAT is derived from the traditional satellite communication system, it is also called a small satellite data station or a personal earth station. The "small" here refers to the small antenna aperture of the small station equipment in the VSAT system, which is usually 0.3m to 1.4m. The equipment has a compact structure, is solid, intelligent, cheap, easy to install, has low requirements on the use environment, is not restricted by the ground network, and has flexible networking.
[0076] A drilling vessel is a vessel dedicated to drilling submarine geological structures, mainly used for marine geological exploration. With the in-depth implementation of the national marine strategy, my country's drilling vessels are increasingly appearing in international oceans such as the Pacific Ocean. At this time, the only means of communication between the ship and the shore base is satellite. The communication process is as follows: Figure 3 .
[0077] TCP Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. TCP is designed to adapt to a layered protocol hierarchy that supports multi-network applications. Pairs of processes in host computers connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services. TCP assumes that it can obtain simple, possibly unreliable datagram services from lower-level protocols. In principle, TCP should be able to operate on a variety of communication systems from hard-wired connections to packet switching or circuit switching networks.
[0078] The UDP transmission control protocol (User Datagram Protocol) is based on a connectionless, unreliable datagram transmission mechanism, and only provides source port, destination port, data length, checksum and encapsulation to achieve fast and concise end-to-end communication. It does not guarantee the orderly arrival of data, reliable transmission or flow control, and is suitable for application scenarios that are sensitive to delay, can tolerate packet loss, and have self-correction capabilities, such as real-time audio and video streaming, online games, network broadcasting, DNS queries, etc.
[0079] Forward Error Correction (FEC) is a technology used to improve data reliability and security during data transmission. The principle is to encode the data at the sending end and increase the error detection and correction capabilities of the receiving end by adding redundant information. Even if errors occur during transmission, the receiving end can use this redundant information to restore the original data. FEC technology does not require the sender to notify the receiver to resend the lost data packets, so it has the advantages of low latency and high real-time performance in the data transmission system. FEC is particularly suitable for communication scenarios where the feedback channel is unreliable or has high latency and is not suitable for frequent retransmissions, such as satellite communications, live video transmission, VoIP calls, etc. It sacrifices a certain amount of bandwidth efficiency in exchange for the reliability of data transmission, and is one of the important means to improve the quality of data transmission.
[0080] ACK (Acknowledgment): A confirmation message, which is a positive feedback. After receiving the data, the receiver replies to the sender to inform him that the sender has successfully received and correctly processed the data. This feedback mechanism is crucial to ensure the reliability and integrity of data transmission.
[0081] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.
[0082] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0083] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0084] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.
[0085] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a ship-shore low-speed bandwidth data synchronization method. The following is explained using the example of the ship-shore low-speed bandwidth data synchronization method applied to the server 101. It can be understood that the ship-shore low-speed bandwidth data synchronization method can also be applied to the terminal 102.
[0086] Reference Figure 2 , Figure 2 A flowchart of a ship-shore low-speed bandwidth data synchronization method applied to a server provided in an embodiment of the present invention, wherein the execution subject of the ship-shore low-speed bandwidth data synchronization method can be any of the aforementioned computer devices (including a server or a terminal). Figure 2 , the method comprises the following steps:
[0087] S100, selecting data at the front of the queue of data to be transmitted as transmission data through a sending window of preset specifications;
[0088] For example, in some specific implementations, the sending window is WindowSize, and the initial value can be customized, usually based on a rough value given by the network bandwidth. At present, the bandwidth of ship-to-shore satellite communication is about 20Mbps, that is, a bandwidth of 2.5MBps. Considering the proportion of various communications in the entire ship, the bandwidth that can be used for ship-to-shore data synchronization usually does not exceed 100KB. And the present invention uses UDP protocol transmission, each data packet is about 1K, so here the sending window is WindowSize set to 20, that is, 20KB. This value is usually relatively small to avoid congestion under unknown network conditions.
[0089] S200, obtaining a network status based on the interaction information between the sending end and the receiving end within a target time range before the target time node;
[0090] Among them, the interactive information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate;
[0091] It should be noted that the reply packet is obtained based on the probe packet response transmitted from the sender to the receiver, and the confirmation information is obtained based on the historical transmission data response transmitted from the sender to the receiver; in some embodiments, such as Figure 4 As shown, step S200 may include the following steps: S201, determining the network delay according to the round-trip time of the detection packet and its corresponding reply packet; obtaining the average network delay according to all network delays determined within the target time range; S202, taking the sum of the data sizes of the transmitted information within the target time range as the network bandwidth; S203, determining the number of packets sent based on the transmission information, and determining the number of packets received based on the feedback information; determining the packet loss rate based on the number of packets sent and the number of packets received.
[0092] For example, in some specific implementations, the network status can be monitored in real time and the current available bandwidth can be calculated by sending a detection data packet and analyzing the ACK feedback of the sent data. The packets involved in the calculation are mainly the following:
[0093] Case 1: Send a network detection packet to actively detect the network status. This test packet includes SeqID, the number of historical packets sent, etc., and the reply packet includes SeqID, the number of historical packets received, etc. The network delay can be calculated through round trips, the network bandwidth can be calculated based on the packet size, and the packet loss rate can be calculated based on the number of packets sent and received. Usually, a network detection packet is sent every ProbInterval (which can be customized, the default is 10ms, and the maximum timeout is 50ms).
[0094] Case 2: Send data packets normally and transmit data. This is normal data transmission. The data packet is the data to be transmitted. After receiving the data, the receiver will reply with ACK information. ACK mainly includes information such as the received data packet. By combining the sending and replying ACK packets with the round trip, the network delay can be calculated. The network bandwidth can be calculated based on the data packet size. The packet loss rate can be calculated based on the number of sent and received packets.
[0095] Generally speaking, the network detection packets of Case 1 are relatively small and have a high frequency, while the packets of Case 2 are usually relatively large and their frequency varies with the network bandwidth. Multiple network bandwidth values can be calculated through a series of packets, which feedback the past network status. The present invention uses the bandwidth calculated by the most recent RecentTime (customizable, usually 50ms) packet to represent the bandwidth evaluation for a period of time in the future.
[0096] The calculation method is to count the sum of the sizes of packets sent within the RecentTime time, and the sum of the corresponding network delays, and then use the calculated bandwidth value as the current network bandwidth CurrNetBand. By counting the average network delay of Case1 network detection packets, it is used as the current average network delay CurrRTT. The reason why the Case2 data packet RTT is not counted here is that the network detection packet is replied as soon as it is received, and there is almost no processing time. The frequency of detection packets is higher, but there is processing time for data packets, so the RTT of data packets is ignored here. Finally, the network sending and receiving packets of Case1 and Case2 are counted, and then the packet loss rate CurrLostRate within the RecentTime time is calculated.
[0097] In some embodiments, the transmission data includes multiple data packets, and the confirmation information includes the transmission status of each data packet in the transmission data, and the transmission status includes received and not received; Figure 5 As shown, the method may further include the following steps: T100, when the transmission status of a data packet in two consecutive confirmation messages is not received, and a first number of detection packets respond normally to obtain a reply packet after the confirmation message, the transmission status of the corresponding data packet is determined to be packet loss; T200, the data packet with a transmission status of packet loss is added to the front of the data queue to be transmitted.
[0098] For example, in some specific implementations, the ACK of the data packet reply can be checked to confirm which data packets have been received and which have not been received. There are two situations for the unreceived packets: either they are still being transmitted on the network, or they are actually lost. This article counts the network detection packets after each packet is sent. If more than LeastRecvNum (customizable, default is 1) network detection packets are normally received, then it is determined that the data packet is lost and is ready to be retransmitted. Reference Figure 6 , count the data blocks (data packets) suspected of being lost within the sending window, and then resend them, and send the resent data packets to the queue of data to be sent.
[0099] S300, dynamically sending the transmission data from the transmitting end to the receiving end in batches based on a preset transmission probability;
[0100] It should be noted that the transmission data includes multiple data packets; in some embodiments, such as Figure 7As shown, step S300 may include the following steps: S301, grouping the data packets of the transmission data to obtain multiple data packets; the data packets include at most a second number of data packets; S302, forward error correction encoding is performed on each data packet in turn to obtain encoded data; S303, when the sending probability is greater than the probability threshold, the encoded data is sent according to the window seat of the sending window; otherwise, S304, obtaining a random value in a preset range, and when the random value is less than the sending probability, the encoded data is sent according to the window seat of the sending window; otherwise, the encoded data is added to the front of the data queue to be transmitted.
[0101] Exemplarily, in some specific implementations, the data queue to be sent stores data packets ready to be sent, including data packets sent for the first time and data packets to be resent. The present invention uses a convolutional coding method to perform forward error correction. Convolutional coding encodes data in a sliding window manner, which can effectively correct random error distribution and is commonly used in wireless communications such as GSM and 3G networks, as well as some satellite communication systems. Forward error correction coding (FEC) is a technology used to control errors during data transmission. It detects and corrects errors in transmission by adding redundant information, thereby improving the reliability of data transmission and reducing the bit error rate.
[0102] Generally speaking, every N (this can be configured, recommended to be between 4 and 6, the default is 4) packets are convolutionally encoded, and the encoded data becomes N+1 packets. Here, N should not be too small, otherwise the amount of data sent will be large. N should not be too large either, because the ship-to-shore bandwidth is small and packet loss is likely to occur. If N is too large, the retransmission bandwidth will increase. If there are less than N packets to be sent, the ProbInterval time will be waited first. If the ProbInterval time has passed and there is a sending window, it will be directly encoded and sent.
[0103] According to the current sending window, based on the current sending probability SendRate, use UDP to send the encoded data at an appropriate time. If SendRate≥1, send according to the window seat; otherwise, directly select whether to send by random, calculate a random value R from 0 to 1, if SendRate≥1, send according to the window seat, otherwise wait for the next round of training to send. If there is no sending seat in the window, suspend data sending until there is a sending window. The encoded data is in a state of being sent at any time, and can be sent when there is a sending seat.
[0104] S400, performing weighted calculation on all parameters of the network status to obtain a comprehensive network status score;
[0105] It should be noted that, in some embodiments, step S400 may include the following steps: based on a preset weight parameter, all parameters of the network status are weighted in combination with a logarithmic function to obtain a comprehensive network status score; wherein the expression of the comprehensive network status score is:
[0106] BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate;
[0107] Wherein, BNSI represents the comprehensive network status score; w1, w2 and w3 represent weight parameters; log represents the logarithmic function with natural exponential as the base; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; CurrLostRate represents the packet loss rate.
[0108] In some embodiments, the method may further include the following steps: updating the comprehensive network status score by superimposing random disturbances; wherein the expression of the updated comprehensive network status score is:
[0109] RNSI=BNSI+α*N(0,σ 2 );
[0110] Where RNSI represents the updated comprehensive network status score; BNSI represents the comprehensive network status score before the update; α represents the preset disturbance parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
[0111] Exemplarily, in some specific implementations, based on the three variables of the current network bandwidth CurrNetBand, the current average network delay CurrRTT and the current packet loss rate CurrLostRate, the present invention designs a formula to evaluate the current comprehensive network status score, which comprehensively considers the three key indicators of bandwidth, delay and packet loss rate. Each indicator has a different degree of influence on network quality, so a suitable weight is assigned to each indicator in the design formula. Referring to the following formula, BNSI represents the basic network status index. The larger the BNSI, the better the network status, and the smaller the BNSI, the worse the network status.
[0112] BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate
[0113] Where log represents a logarithmic function based on the natural exponential. The larger the CurrNetBand, the larger the BNSI; the smaller the CurrRTT, the larger the BNSI; the smaller the CurrLostRate, the larger the BNSI. w1, w2, and w3 are weight factors, and they satisfy 1=w1+w2+w3. Generally speaking, The settings can be customized according to the network conditions.
[0114] Considering that the network fluctuates in real time, the present invention simulates the natural fluctuation of the network state by superimposing a random disturbance. Considering that network fluctuations may be positive network improvements or negative network deterioration, Gaussian distribution is used for random disturbance. Referring to the following formula, RNSI represents the current network status index. The larger the RNSI, the better the network status, and the smaller the RNSI, the worse the network status.
[0115] RNSI=BNSI+α*N(0,σ 2 )
[0116] Generally speaking, α=1, σ=1, that is, N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1.
[0117] S500, when the comprehensive network status score is less than or equal to the first threshold, the sending probability is randomly lowered and the preset specification of the sending window is reduced, and step S700 is executed; otherwise, a determination is made based on the second threshold, and then step S600 is executed;
[0118] For example, in some specific implementations, the window extension condition is determined based on RNSI. Generally speaking, if RNSI ≤ β1, the extension condition 1 is met, and β1 can be customized, usually 0. When RNSI ≤ 0, it means that the network delay RTT or packet loss rate is serious, resulting in a small RNSI. At this time, the window should be reduced.
[0119] To reduce the sending frequency, you need to adjust the probability of reducing SendRate. The adjustment formula is as follows:
[0120] SendRate=max(0,SendRate-Random(0,abs(RNSI)))
[0121] Where abs represents the absolute value, and Random(0,abs(RNSI)) represents a random number of [0,abs(RNSI)]. Reducing the SendRate also reduces the frequency of data transmission.
[0122] Reduce the sending frequency, that is, reduce the sending window, and adjust the formula as follows:
[0123]
[0124] That is, the window is reduced by half each time. Since the current network is very poor, here we directly choose to reduce it by half to lower the data sending frequency, thereby alleviating network congestion.
[0125] S600. When the comprehensive network condition score is less than or equal to the second threshold, randomly adjust the preset specification of the sending window; otherwise, randomly increase the sending probability and perform an increasing adjustment on the preset specification of the sending window.
[0126] It should be noted that in some embodiments, randomly adjusting the preset specification of the sending window may include the following steps: determining the adjustment specification based on the ratio of the comprehensive network condition score to the preset random value; wherein, the preset random value represents a normal distribution with an expected value of 0 and a standard deviation of 1; updating the preset specification of the sending window based on the sum of the adjustment specification and the preset specification.
[0127] Exemplarily, in some specific embodiments, the window expansion condition is determined based on RNSI. Generally speaking, if RNSI ≤ β2, that is, the expansion condition 2 is satisfied. β2 can be defined by oneself, and usually takes 0.5. When 0 < RNSI ≤ 0.5, it indicates that the network condition is gradually improving, and the window is randomly adjusted to balance the transmission efficiency and stability.
[0128] Here, explain how to obtain the values of β1 and β2 according to the current network state between the ship and the shore:
[0129] Case1: In the normal network situation, the network bandwidth is about 80 KBps, the RTT is about 100 ms, and the packet loss rate is about 0.2. Substituting these values into the formula to calculate BNSI is -0.14.
[0130] Case2: In the normal network situation, the network bandwidth is about 100 KBps, the RTT is about 50 ms, and the packet loss rate is about 0.05. Substituting these values into the formula to calculate BNSI is 0.21.
[0131] Case3: In the very good network situation, the network bandwidth is about 200 KBps, the RTT is about 30 ms, and the packet loss rate is about 0.01. Substituting these values into the formula to calculate BNSI is 0.61.
[0132] Combining Case1, Case2, and Case3, β1 usually takes 0, and β2 usually takes 0.5. Less than 0 indicates that the network is extremely poor, less than 0.5 indicates that the network is relatively average, and in other cases, it indicates that the network is good.
[0133] Among them, when randomly adjusting the sending window, it may increase the sending window or decrease the sending window. The formula is as follows:
[0134]
[0135] Where N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1, and the value can be positive or negative. If N(0,1) is a positive number, the larger the RNSI, the larger the window to be added, and the smaller the RNSI, the smaller the window to be added. If N(0,1) is a negative number, the larger the RNSI, the larger the window to be reduced, and the smaller the RNSI, the smaller the window to be reduced. Whether increasing or decreasing, the maximum number of intervals cannot exceed Interval, which can be configured, generally 1 to 5, and the default is 3.
[0136] To increase the sending frequency, you need to adjust the probability SendRate. The adjustment formula is as follows:
[0137] SendRate=max(1,SendRate+Random(0,RNSI))
[0138] Random(0,RNSI) represents a random number of [0,RNSI]. The larger the RNSI, the larger the adjustment probability range, and the maximum does not exceed 1.0.
[0139] Expand the sending window and maximize the transmission of data by taking advantage of short periods of high bandwidth. The formula is as follows:
[0140] WindowSize=WindowSize*(1+Random(0,RNSI))
[0141] Random(0,RNSI) represents a random number of [0,RNSI]. The larger the RNSI, the larger the probability range of adjustment.
[0142] S700, move the sending window back on the queue of data to be transmitted, take the next time node of the target time node as the target time node, and return to execute the step of evaluating the network status based on the interaction information between the sender and the receiver within the target time range before the target time node until all data in the queue of data to be transmitted are synchronized.
[0143] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0144] First of all, it should be noted that the current data synchronization from the ship end to the shore end is mainly based on the TCP protocol, which is consistent with the idea of data synchronization between two points on land, that is, a TCP communication channel is established between the two points, and then the synchronization data is sent.
[0145] In the context of ship-shore data synchronization, the existing technology based on the TCP protocol has the following shortcomings:
[0146] 1) Slow speed: Currently, data from ship to shore is mainly transmitted via satellite. The satellite bandwidth is relatively low, resulting in slow data synchronization.
[0147] 2) Poor experience: Considering the low satellite bandwidth and the fact that data synchronization and onboard technicians need to be connected to the Internet, there will be bandwidth competition, resulting in a poor Internet experience for users.
[0148] 3) Low synchronization success rate: Currently, data synchronization is mainly based on TCP transmission. The integrity of data transmission is theoretically guaranteed, but considering the low bandwidth of satellites, data transmission often fails halfway through.
[0149] In view of this, the present invention proposes a synchronization method for ship-shore data under weak network conditions, referring to Figure 8 , the specific steps are as follows:
[0150] Step 1: Initialize the sending window. The sending window is WindowSize, and the initial value can be customized, usually based on a rough value given by the network bandwidth. At present, the bandwidth of ship-to-shore satellite communications is about 20Mbps, that is, a bandwidth of 2.5MBps. Taking into account the proportion of various communications on the entire ship, the bandwidth that can be used for ship-to-shore data synchronization usually does not exceed 100KB. And the present invention uses UDP protocol transmission, and each data packet is about 1K, so the sending window is WindowSize set to 20, that is, 20KB. This value is usually relatively small to avoid congestion under unknown network conditions. Go to step 2.
[0151] Step 2: Evaluate the current network bandwidth. By sending detection data packets and analyzing the ACK feedback of the sent data, the network status is monitored in real time and the current available bandwidth is calculated. The packets involved in the calculation are mainly the following:
[0152] Case 1: Send a network detection packet to actively detect the network status. This test packet includes SeqID, the number of historical packets sent, etc., and the reply packet includes SeqID, the number of historical packets received, etc. The network delay can be calculated through round trips, the network bandwidth can be calculated based on the packet size, and the packet loss rate can be calculated based on the number of packets sent and received. Usually, a network detection packet is sent every ProbInterval (which can be customized, the default is 10ms, and the maximum timeout is 50ms).
[0153] Case 2: Send data packets normally and transmit data. This is normal data transmission. The data packet is the data to be transmitted. After receiving the data, the receiver will reply with ACK information. ACK mainly includes information such as the received data packet. By combining the sending and replying ACK packets with the round trip, the network delay can be calculated. The network bandwidth can be calculated based on the data packet size. The packet loss rate can be calculated based on the number of sent and received packets.
[0154] Generally speaking, the network detection packets of Case 1 are relatively small and have a high frequency, while the packets of Case 2 are usually relatively large and their frequency varies with the network bandwidth. Multiple network bandwidth values can be calculated through a series of packets, which feedback the past network status. The present invention uses the bandwidth calculated by the most recent RecentTime (customizable, usually 50ms) packet to represent the bandwidth evaluation for a period of time in the future.
[0155] The calculation method is to count the sum of the sizes of packets sent within the RecentTime time, and the sum of the corresponding network delays, and then use the calculated bandwidth value as the current network bandwidth CurrNetBand. By counting the average network delay of Case1 network detection packets, it is used as the current average network delay CurrRTT. The reason why the Case2 data packet RTT is not counted here is that the network detection packet is replied as soon as it is received, and there is almost no processing time. The frequency of detection packets is higher, but there is processing time for data packets, so the RTT of data packets is ignored here. Finally, count the network sending and receiving packets of Case1 and Case2, and then calculate the packet loss rate CurrLostRate within the RecentTime time. Go to step 3.
[0156] Step 3: Check whether the data needs to be resent. Check the ACK of the data packet reply to confirm which data packets have been received and which have not been received. There are two situations for the packets that have not been received, either they are still being transmitted on the network, or they are actually lost. This article counts the network detection packets after each packet is sent. If more than LeastRecvNum (customizable, default is 1) network detection packets are normally received, then it is determined that the data packet is lost and is ready to be retransmitted.
[0157] If there is packet loss, go to step 4 to retransmit the data, otherwise go to step 5.
[0158] Step 4: Resend the data that was not received. Figure 6 , count the data blocks suspected of packet loss within the sending window, then resend them, send the resent data packets to the queue of data to be sent, and go to step 5.
[0159] Step 5: Data is forward error corrected. The data queue to be sent stores the data packets to be sent, including the data packets sent for the first time and the data packets to be resent. The present invention uses a convolutional coding method to perform forward error correction. Convolutional coding encodes data in a sliding window manner, which can effectively correct random error distribution and is commonly used in wireless communications such as GSM and 3G networks, as well as some satellite communication systems. Forward error correction coding (FEC) is a technology used to control errors during data transmission. It detects and corrects errors in transmission by adding redundant information, thereby improving the reliability of data transmission and reducing the bit error rate.
[0160] Generally speaking, every N (this can be configured, recommended to be between 4 and 6, the default is 4) packets are convolutionally encoded, and the encoded data becomes N+1 packets. Here, N should not be too small, otherwise the amount of data sent will be large. N should not be too large either, because the ship-to-shore bandwidth is small and packet loss is likely to occur. If N is too large, the retransmission bandwidth will increase. If there are less than N packets to be sent, the ProbInterval time will be waited first. If the ProbInterval time has passed and there is a sending window, it will be directly encoded and sent.
[0161] For example, assuming that ProbInterval is 10ms, the data packets held in the waiting data queue are A1, A2, A3, A4, A5, A6, etc. In the order of data time, the four packets A3, A4, A5, and A6 are convolutionally encoded. For A1 and A2, since there are less than 4 data packets, they will wait for 10ms. If it exceeds 10ms and there is a sending window, the two packets A1 and A2 are convolutionally encoded. Go to step 6.
[0162] Step 6: Try to send new data. Figure 6 , according to the current sending window and the current sending probability SendRate, use UDP to send the encoded data at an appropriate time.
[0163] If SendRate≥1, send according to the window seat; otherwise, directly select whether to send by random, calculate the random value R from 0 to 1, if R≤SendRate, send according to the window seat, otherwise wait for the next round to send. If there is no sending seat in the window, suspend data sending until there is a sending window. The encoded data is in a state of sending at any time, and can be sent when there is a sending seat.
[0164] Steps 2 to 15 are executed in a loop, and each cycle is about 1ms to 10ms (this can be customized, usually 1ms). If there are sending seats, they will be sent in batches dynamically according to the sending probability. If it is not sent this time due to probability, there is still a chance in the next cycle. Go to step 7.
[0165] Step 7: Window expansion condition 1 is met. Based on the three variables of the current network bandwidth CurrNetBand, the current average network delay CurrRTT and the current packet loss rate CurrLostRate, the present invention designs a formula to evaluate the current comprehensive network status score. This formula comprehensively considers the three key indicators of bandwidth, delay and packet loss rate. Each indicator has a different degree of influence on network quality, so a suitable weight is assigned to each indicator in the design formula. Referring to the following formula, BNSI represents the basic network status index. The larger the BNSI, the better the network status, and the smaller the BNSI, the worse the network status.
[0166] BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate
[0167] Where log represents a logarithmic function based on the natural exponential. The larger the CurrNetBand, the larger the BNSI; the smaller the CurrRTT, the larger the BNSI; the smaller the CurrLostRate, the larger the BNSI. w1, w2, and w3 are weight factors, and they satisfy 1=w1+w2+w3. Generally speaking, The settings can be customized according to the network conditions.
[0168] Considering that the network fluctuates in real time, the present invention simulates the natural fluctuation of the network state by superimposing a random disturbance. Considering that network fluctuations may be positive network improvements or negative network deterioration, Gaussian distribution is used for random disturbance. Referring to the following formula, RNSI represents the current network status index. The larger the RNSI, the better the network status, and the smaller the RNSI, the worse the network status.
[0169] RNSI=BNSI+α*N(0,σ 2 )
[0170] Generally speaking, α=1, σ=1, that is, N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1.
[0171] The window expansion condition is determined based on RNSI. Generally speaking, if RNSI ≤ β1, the expansion condition 1 is satisfied. β1 can be custom-defined, usually taking 0. When RNSI ≤ 0, it indicates that network latency RTT or packet loss rate is relatively serious, resulting in too small RNSI. At this time, the window should be reduced.
[0172] Generally speaking, if RNSI ≤ β1, go to step 8; otherwise, go to step 10.
[0173] Step 8: Randomly decrease the sending probability. This indicates that the network condition is poor, meaning that network latency RTT is extremely high or the packet loss rate is relatively serious. At this time, the sending frequency needs to be reduced, and the probability SendRate needs to be adjusted. The adjustment formula is as follows:
[0174] SendRate = max(0, SendRate - Random(0, abs(RNSI)))
[0175] Where abs represents taking the absolute value, and Random(0, abs(RNSI)) represents a random number in the range [0, abs(RNSI)]. Reducing SendRate also reduces the data sending frequency. Go to step 9.
[0176] Step 9: Exponentially reduce the window. This indicates that the network condition is poor, meaning that network latency RTT is extremely high or the packet loss rate is relatively serious. At this time, the sending frequency needs to be reduced, that is, the sending window needs to be reduced. The adjustment formula is as follows:
[0177]
[0178] That is, the window is reduced by half each time. Because the current network is very poor, here we directly choose to reduce it by half to lower the data sending frequency, thereby alleviating network congestion. Go to step 15.
[0179] Step 10: Meet the window expansion condition 2. The window expansion condition is determined based on RNSI. Generally speaking, if RNSI ≤ β2, the expansion condition 2 is satisfied. β2 can be custom-defined, usually taking 0.5. When 0 < RNSI ≤ 0.5, it indicates that the network condition is gradually improving, and the window is randomly adjusted to balance transmission efficiency and stability.
[0180] Here, an explanation is given on how to determine the values of β1 and β2 according to the current network state between the ship and the shore:
[0181] Case 1: In the normal network situation, the network bandwidth is about 80 KBps, RTT is about 100 ms, and the packet loss rate is about 0.2. Substituting these values into the formula to calculate BNSI is -0.14;
[0182] Case 2: In normal network conditions, the network bandwidth is about 100KBps, the RTT is about 50ms, and the packet loss rate is about 0.05. Substituting the formula into the BNSI calculation result is 0.21;
[0183] Case 3: In very good network conditions, the network bandwidth is about 200KBps, the RTT is about 30ms, and the packet loss rate is about 0.01. The BNSI calculated by the formula is 0.61.
[0184] Combining Case 1, Case 2, and Case 3, β1 is usually 0, and β2 is usually 0.5. A value less than 0 indicates that the network is particularly poor, and a value less than 0.5 indicates that the network is average. In other cases, the network is good.
[0185] In general, if RNSI≤β2, go to step 11, otherwise go to step 13.
[0186] Step 11: The sending probability remains unchanged. This indicates that the network condition is gradually improving. At this time, the sending probability SendRate remains unchanged, and we go to step 12.
[0187] Step 12: Random window adjustment. This indicates that the network condition is gradually improving. At this time, the sending window is adjusted dynamically, which may increase or decrease the sending window. The formula is as follows:
[0188]
[0189] Where N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1, and the value can be positive or negative. If N(0,1) is a positive number, the larger the RNSI, the larger the window to be added, and the smaller the RNSI, the smaller the window to be added. If N(0,1) is a negative number, the larger the RNSI, the larger the window to be reduced, and the smaller the RNSI, the smaller the window to be reduced. Whether increasing or decreasing, the maximum number of intervals cannot exceed Interval, which can be configured, generally 1 to 5, and the default is 3.
[0190] Go to step 15.
[0191] Step 13: Increase the probability of sending. This indicates that the network condition is very good, indicating that the network bandwidth is high, the RTT delay is low, and the packet loss rate is small. At this time, the sending frequency needs to be increased and the probability SendRate needs to be adjusted. The adjustment formula is as follows:
[0192] SendRate=max(1,SendRate+Random(0,RNSI))
[0193] Random(0,RNSI) represents a random number of [0,RNSI]. The larger the RNSI, the larger the probability range of adjustment, and the maximum value does not exceed 1.0. Go to step 14.
[0194] Step 14: Dynamic window growth. This indicates that the network condition is very good and the sending window needs to be expanded quickly to maximize data transmission during the short high bandwidth period. The formula is as follows:
[0195] WindowSize=WindowSize*(1+Random(0,RNSI))
[0196] Random(0,RNSI) represents a random number of [0,RNSI]. The larger the RNSI, the larger the probability range of adjustment. Go to step 15.
[0197] Step 15: All data is sent. After the dynamic adjustment of the above steps, it is determined whether all data has been sent. If the data has been sent, the whole process ends. Otherwise, go to step 2 and continue sending.
[0198] In summary, compared with the prior art, the present invention has at least the following beneficial effects:
[0199] 1) Improve data transmission speed. A real-time network bandwidth evaluation method is proposed to adaptively adjust the data transmission strategy and improve the transmission speed.
[0200] 2) Reduce the probability of data congestion. A probability-based dynamic adjustment method for the sending window is proposed to fine-tune the flow control and avoid congestion.
[0201] 3) Support reliable data transmission. Support forward error correction of ship-shore data to ensure reliable data transmission in a weak network environment.
[0202] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides a ship-shore low-speed bandwidth data synchronization device 900, which may include:
[0203] The first module 901 is used to select the data at the front of the queue of data to be transmitted as transmission data through a sending window of a preset specification;
[0204] The second module 902 is used to evaluate the network status based on the interaction information between the sender and the receiver within the target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate;
[0205] The third module 903 is used to dynamically send the transmission data from the transmitting end to the receiving end in batches based on the preset transmission probability;
[0206] The fourth module 904 is used to perform weighted calculation on all parameters of the network status to obtain a comprehensive network status score;
[0207] The fifth module 905 is used to randomly lower the sending probability and reduce the preset specification of the sending window when the comprehensive network status score is less than or equal to the first threshold; otherwise, make a determination based on the second threshold;
[0208] The sixth module 906 is used to randomly adjust the preset specification of the sending window when the comprehensive network status score is less than or equal to the second threshold; otherwise, randomly increase the sending probability and increase the preset specification of the sending window;
[0209] The seventh module 907 is used to move the sending window backward on the queue of data to be transmitted, take the next time node of the target time node as the target time node, and return to execute the second module until all data in the queue of data to be transmitted are synchronized.
[0210] In some embodiments, the transmission data includes a plurality of data packets, the confirmation information includes a transmission status of each data packet in the transmission data, and the transmission status includes received and not received; the apparatus further includes:
[0211] An eighth module is used for determining the transmission status of the corresponding data packet as packet loss when the transmission status of the data packet in two consecutive confirmation messages is not received, and a first number of detection packets are responded to normally after the confirmation message to obtain a reply packet;
[0212] The ninth module is used to add the data packet whose transmission status is packet loss to the front of the queue of data to be transmitted.
[0213] In some embodiments, the apparatus may further include:
[0214] The tenth module is used to update the comprehensive network status score by superimposing random disturbances;
[0215] The expression of the updated comprehensive network status score is:
[0216] RNSI=BNSI+α*N(0,σ 2 );
[0217] Where RNSI represents the updated comprehensive network status score; BNSI represents the comprehensive network status score before the update; α represents the preset disturbance parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
[0218] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0219] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned hydrate stability region bottom boundary prediction method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0220] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0221] like Fig.10 As shown, Fig.10 The hardware structure of an electronic device 1000 of another embodiment is illustrated. The electronic device 1000 includes:
[0222] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0223] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;
[0224] Input / output interface 1003, used to implement information input and output;
[0225] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0226] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0227] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0228] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0230] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0231] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a 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, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0232] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0233] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0234] 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 invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.
[0235] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0236] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0237] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented by the present invention. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.
[0238] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of various functional modules in the device disclosed in the present invention, the actual implementation of the module will be understood within the conventional skills of engineers. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0239] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0240] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.
[0241] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0242] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0243] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0244] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0245] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A ship-shore low-speed bandwidth data synchronization method, characterized in that: The following steps are involved: Select the data at the front of the queue of data to be transmitted as the transmission data through a sending window of preset specifications; The network status is obtained based on the interaction information between the sender and the receiver within the target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate; Dynamically sending the transmission data from the sending end to the receiving end in batches based on a preset sending probability; Performing weighted calculation on all parameters of the network status to obtain a comprehensive network status score; When the comprehensive network status score is less than or equal to a first threshold, randomly lowering the sending probability and reducing the preset specification of the sending window; Otherwise, making a determination based on a second threshold; When the comprehensive network status score is less than or equal to the second threshold, randomly adjusting the preset specification of the sending window; otherwise, randomly increasing the sending probability and increasing the preset specification of the sending window; The sending window is moved back on the data queue to be transmitted, and the next time node of the target time node is used as the target time node. The step of evaluating the network status based on the interaction information between the sending end and the receiving end within the target time range before the target time node is returned to execute until all data in the data queue to be transmitted is synchronized.
2. A ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The reply packet is obtained based on the detection packet response transmitted by the sending end to the receiving end, and the confirmation information is obtained based on the historical transmission data response transmitted by the sending end to the receiving end; The network status is obtained by evaluating the interaction information between the sending end and the receiving end within the target time range before the target time node, comprising the following steps: Determine the network delay according to the round-trip time of the detection packet and its corresponding reply packet; obtain the average network delay according to all the network delays determined within the target time range; Based on the sum of the data sizes of the transmission information within the target time range as the network bandwidth; The number of packets sent is determined based on the transmission information, and the number of packets received is determined based on the feedback information; and the packet loss rate is determined according to the number of packets sent and the number of packets received.
3. A ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The transmission data includes a plurality of data packets, the confirmation information includes the transmission status of each data packet in the transmission data, and the transmission status includes received and not received; the method further includes the following steps: When the transmission status of the data packet in the confirmation information twice in a row is both "not received", and a first number of the detection packets respond normally to obtain the reply packets after the confirmation information, the transmission status of the corresponding data packet is determined as packet loss; The data packet whose transmission status is the packet loss is added to the front of the queue of data to be transmitted.
4. A ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The transmission data includes a plurality of data packets; and the step of dynamically sending the transmission data in batches from the transmitting end to the receiving end based on a preset transmission probability includes the following steps: Performing grouping processing on the data packets of the transmission data to obtain a plurality of data packets; the data packets include at most a second number of the data packets; Performing forward error correction coding on each of the data packets in turn to obtain coded data; When the sending probability is greater than the probability threshold, the coded data is sent according to the window seat of the sending window; otherwise, A random value in a preset range is obtained, and when the random value is less than the sending probability, the coded data is sent according to the window seat of the sending window; otherwise, the coded data is added to the front of the queue of data to be transmitted.
5. A ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The step of performing weighted calculation on all parameters of the network status to obtain a comprehensive network status score comprises the following steps: Based on the preset weight parameters, all parameters of the network status are weighted in combination with a logarithmic function to obtain a comprehensive network status score; The expression of the comprehensive network status score is: BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate; Wherein, BNSI represents the comprehensive network status score; w1, w2 and w3 represent weight parameters; log represents the logarithmic function with natural exponential as the base; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; CurrLostRate represents the packet loss rate.
6. A ship-shore low-speed bandwidth data synchronization method according to claim 1 or 5, characterized in that: The method further comprises the following steps: Updating the comprehensive network status score by superimposing random disturbances; The updated comprehensive network status score is expressed as follows: RNSI=BNSI+α*Ν(0,σ 2 ); Where RNSI represents the updated comprehensive network status score; BNSI represents the comprehensive network status score before the update; α represents the preset disturbance parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
7. A ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The randomly adjusting the preset specification of the sending window comprises the following steps: Determine the adjustment specification based on the ratio of the comprehensive network status score to a preset random value; wherein the preset random value represents a normal distribution with an expected value of 0 and a standard deviation of 1; The preset specification of the sending window is updated based on the sum of the adjustment specification and the preset specification.
8. A ship-shore low-speed bandwidth data synchronization device, characterized in that: include: The first module is used to select the data at the front of the queue of data to be transmitted as the transmission data through a sending window of preset specifications; The second module is used to evaluate the network status based on the interaction information between the sender and the receiver within the target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data within the target time range and regularly sent detection packets; the feedback information includes reply packets and confirmation information; the network status includes network bandwidth, average network delay and packet loss rate; A third module is used to dynamically send the transmission data from the sending end to the receiving end in batches based on a preset sending probability; The fourth module is used to perform weighted calculation on all parameters of the network status to obtain a comprehensive network status score; A fifth module, configured to randomly lower the sending probability and reduce the preset specification of the sending window when the comprehensive network status score is less than or equal to a first threshold; Otherwise, making a determination based on a second threshold; A sixth module is configured to randomly adjust the preset specification of the sending window when the comprehensive network status score is less than or equal to the second threshold; otherwise, randomly increase the sending probability and increase the preset specification of the sending window; The seventh module is used to move the sending window back on the data queue to be transmitted, take the next time node of the target time node as the target time node, and return to execute the second module until all data in the data queue to be transmitted are synchronized.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Data transmission method and device based on time-sensitive network, equipment and medium
CN117812011A
Online examination system and method capable of automatically adjusting network state
CN118368227A
Data transmission method, user equipment and network device
WO2017181992A1
Method for transmitting internet of things data, internet of things terminal, and computer readable storage medium
WO2018196504A1