Ship-shore low-speed bandwidth data synchronization method, device, electronic device and medium
By dynamically adjusting the sending window and probability, combined with network status assessment and forward error correction coding, the problem of bandwidth limitation in ship-shore data synchronization is solved, efficient and reliable data transmission is achieved, and the user experience and synchronization success rate are improved.
Patent Information
- Application Number
- CN202411587443.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In ship-shore data synchronization, the limited satellite communication bandwidth leads to slow data synchronization, poor user experience, and low synchronization success rate. Especially in the low-bandwidth satellite environment, data transmission is prone to packet loss, delay and interruption.
By dynamically adapting the sending window and sending probability, evaluating the network status in real time, selecting the data to be transmitted using preset specifications, and combining forward error correction coding and weighted operations, the data transmission strategy is adaptively adjusted to achieve data batch sending and retransmission.
It improves data transmission speed, optimizes bandwidth utilization, reduces network congestion, ensures reliable data transmission, and improves user experience and synchronization success rate.
Smart Images

Figure CN119629186B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a ship-to-shore low-speed bandwidth data synchronization method, device, electronic equipment and medium. Background Art
[0002] In the current field of ship operations and data management, ship-to-shore data synchronization plays a crucial role. Traditionally, this process relies on TCP (Transmission Control Protocol) as its communication foundation. Similar to data synchronization between two points on land, a stable TCP communication channel is established between the ship and shore to achieve real-time or near-real-time data transmission and synchronization. However, in the specific application scenario of ship-to-shore data synchronization, traditional technical solutions based on the TCP protocol have gradually revealed numerous shortcomings, especially when using satellite as the transmission medium.
[0003] First, speed bottlenecks have become a key factor restricting the efficiency of ship-shore data synchronization. Due to the relatively limited bandwidth resources of satellite communications, even the efficient TCP protocol for data encapsulation and transmission cannot fully compensate for the inherent limitations of satellite bandwidth. As a result, data synchronization speeds are far lower than expected, making it difficult to meet the stringent requirements of ship operations for data transmission timeliness.
[0004] Secondly, the impact on user experience is also a significant issue. Onboard, both technical personnel and passengers rely on limited satellite bandwidth for network connectivity. The significant bandwidth usage associated with data synchronization tasks inevitably leads to intense competition for bandwidth resources. This competition not only impacts data synchronization efficiency but can also significantly reduce network access speeds for crew and passengers, resulting in a poor user experience.
[0005] Finally, the low synchronization success rate further exacerbates the difficulties of ship-to-shore data synchronization. Although the TCP protocol theoretically provides relatively reliable data transmission, in the real-world environment of low satellite bandwidth, packet loss, delays, and even interruptions are common during data transmission, leading to the risk of incomplete transmission or even failure of data synchronization tasks. 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 at least partially address the limitations of related technologies. To this end, the present invention provides a method, device, electronic device, and medium for ship-shore low-speed bandwidth data synchronization, which achieves efficient data synchronization through dynamic adaptation.
[0007] In one aspect, an embodiment of the present invention provides a method for synchronizing ship-shore low-speed bandwidth data, 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 evaluated 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 probe 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 the preset sending probability;
[0011] Perform weighted calculations on all network status parameters 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 size of the sending window is reduced; otherwise, the judgment 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 size of the sending window is randomly adjusted; otherwise, the sending probability is randomly increased and the preset size of the sending window is increased;
[0014] Move the sending window backward on the queue of data to be transmitted, set the next time node of the target time node as the target time node, and return to 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 obtaining the network status based on interaction information between the sender and the receiver within a target time range before the target time node includes the following steps:
[0016] Determine the network delay based on the round-trip time of the probe 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 determined 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 received.
[0019] Optionally, the transmission data includes multiple data packets, and the confirmation information includes a transmission status of each data packet in the transmission data, where the transmission status includes received and not received; the method further includes the following steps:
[0020] When the transmission status of a data packet in two consecutive confirmation messages is not received, and a first number of probe packets are responded to normally after the confirmation message to obtain a reply packet, the transmission status of the corresponding data packet is determined to be 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; and 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:
[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] Get a random value in a preset range. When the random value is less than the sending probability, send the coded data according to the window seat of the sending window; otherwise, add the coded data 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 network status parameters are weighted and calculated using a logarithmic function to obtain a comprehensive network status score.
[0029] The expression for the comprehensive network status score is:
[0030] BNSI=w1*log(CurrNetBand+1)-w2*log(CurrRTT+1)-w3*CurrLostRate;
[0031] Where BNSI represents the comprehensive network status score; w1, w2, and w3 represent weight parameters; log represents the logarithmic function based on the natural exponential; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; and 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 updated comprehensive network status score expression 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 perturbation 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 specifications 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 specifications of the sending window are updated based on the adjustment specifications and the preset specifications.
[0040] In another aspect, 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 probe 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 transmitting end to the receiving end in batches based on a preset transmission probability;
[0044] The fourth module is used to perform weighted calculations on all network status parameters to obtain a comprehensive network status score;
[0045] A fifth module is configured to randomly lower the sending probability and reduce the preset size 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] A sixth module is configured to randomly adjust the preset size 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 size of the sending window;
[0047] The seventh module is used to move the sending window back on the queue of data to be transmitted, set 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 multiple data packets, and the confirmation information includes a transmission status of each data packet in the transmission data, where the transmission status includes received and not received; and the apparatus further includes:
[0049] An eighth module is configured to determine the transmission status of a corresponding data packet as lost when the transmission status of both data packets in two consecutive confirmation messages is not received, and a first number of probe 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 perturbations;
[0053] The updated comprehensive network status score expression 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 perturbation 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 storing a program executable by a processor. When the program 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 at the 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 and calculated 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, a 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 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 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 achieve refined control of traffic and avoid congestion, and ensure reliable data transmission in a weak network environment. The present invention can efficiently achieve 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 to the technical solution of the present invention.
[0060] Figure 1 A schematic diagram of an implementation environment for ship-to-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 the 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 expanded process for 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 in an embodiment of the present invention;
[0066] Figure 7 A schematic diagram of the expanded process of sending probabilistic 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] Figure 9 A schematic structural diagram of a ship-to-shore low-speed bandwidth data synchronization device provided by an embodiment of the present invention;
[0069] Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to 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 intended to limit the present invention.
[0071] It should be noted that although the system diagrams illustrate functional module divisions and the flowcharts illustrate a logical sequence, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the system or the sequence in the flowcharts. The terms "first / S100," "second / S200," and the like in the specification, claims, and drawings are used to distinguish similar objects and are not necessarily intended to describe a specific sequence or precedence.
[0072] References to "embodiments" in this disclosure mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the disclosure. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein 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 understanding of the technical solutions of the present invention, the following are the technical terms that may appear in the embodiments of the present invention:
[0075] VSAT satellite communication (Very Small Aperture Terminal): VSAT is also called a small satellite data station or personal earth station because it originates from the traditional satellite communication system. 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 is compact, solid, intelligent, inexpensive, easy to install, has low requirements for the operating environment, is not restricted by the ground network, and has flexible networking.
[0076] A drilling vessel is a vessel used for drilling underwater geological structures, mainly for marine geological exploration. The only means of communication between the ship and the shore base is satellite. The communication process is as follows: Figure 3 .
[0077] The TCP Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communications protocol. TCP is designed to fit into a layered protocol hierarchy that supports multiple network applications. Pairs of processes in host computers connected to different but interconnected computer communications networks rely on TCP for reliable communications services. TCP assumes that it can obtain simple, potentially unreliable datagram services from lower-level protocols. In principle, TCP should be able to operate on a variety of communications systems, from hardwired connections to packet-switched or circuit-switched networks.
[0078] The UDP Transmission Control Protocol (UDP) is based on a connectionless, unreliable datagram transmission mechanism. It only provides source and destination ports, data length, checksum, and encapsulation, enabling fast and concise end-to-end communication. It does not guarantee the orderly arrival of data, reliable transmission, or flow control. It is suitable for delay-sensitive, loss-tolerant, and self-correcting applications, such as real-time audio and video streaming, online gaming, webcasting, and DNS queries.
[0079] Forward Error Correction (FEC) is a technology used to improve data reliability and security during data transmission. It works by encoding data at the sending end and adding redundant information to enhance the error detection and correction capabilities of the receiving end. Even if errors occur during transmission, the receiving end can use this redundant information to recover the original data. FEC technology eliminates the need for the sender to notify the receiver to retransmit lost data packets, offering the advantages of low latency and high real-time performance in data transmission systems. FEC is particularly suitable for communication scenarios where frequent retransmissions are unsuitable due to unreliable feedback channels or high latency, such as satellite communications, live video transmission, and VoIP calls. It sacrifices bandwidth efficiency for data transmission reliability and is a key means of improving data transmission quality.
[0080] ACK (Acknowledgment): A type of confirmation message, a form of positive feedback. After receiving data, the receiver replies to the sender, indicating that the sender has successfully received and correctly processed the data. This feedback mechanism is crucial for ensuring 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 the network in a wireless or wired manner 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, server 101 can also be a node server in a 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, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be connected directly or indirectly via wired or wireless communication, which is not limited in this 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 an example of applying the ship-shore low-speed bandwidth data synchronization method 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 The flowchart of a ship-to-shore low-speed bandwidth data synchronization method applied to a server provided in an embodiment of the present invention is provided. The execution subject of the ship-to-shore low-speed bandwidth data synchronization method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:
[0087] S100, selecting data at the front of a queue of data to be transmitted as transmission data through a sending window of preset specifications;
[0088] For example, in some specific implementations, the send window is WindowSize, and its initial value can be customized, typically based on a rough estimate of network bandwidth. Currently, the ship-to-shore satellite communication bandwidth is approximately 20 Mbps, or 2.5 MBps. Considering the proportion of various communications on a ship, the bandwidth available for ship-to-shore data synchronization typically does not exceed 100 KB. Furthermore, the present invention uses the UDP protocol for transmission, with each data packet approximately 1 KB in size. Therefore, the send window, WindowSize, is set to 20, or 20 KB. This value is typically kept small to avoid congestion under unknown network conditions.
[0089] S200, obtaining a network status based on interaction information between the transmitting end and the receiving end within a target time range before the target time node;
[0090] Among them, interaction information includes transmission information and feedback information; transmission information includes historical transmission data within the target time range and regularly sent probe packets; feedback information includes reply packets and confirmation information; 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 sending end to the receiving end, and the confirmation information is obtained based on the historical transmission data response transmitted from the sending end to the receiving end; in some embodiments, such as Figure 4 As shown, step S200 may include the following steps: S201, determining the network delay based on the round-trip time of the detection packet and its corresponding reply packet; obtaining the network average delay based on all network delays determined within the target time range; S202, taking the sum of the data sizes of the information transmitted 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; and 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 probe data packets and analyzing ACK feedback of the sent data. The packets involved in the calculation mainly include the following:
[0093] Case 1: Send a network probe packet to proactively monitor network conditions. This test packet includes the SeqID and the number of packets sent. The reply packet also includes the SeqID and the number of packets received. Round trips can be used to calculate network latency, combined with packet size to calculate network bandwidth, and combined with the number of packets sent and received to calculate packet loss rate. A network probe packet is typically sent every ProbInterval (configurable, default 10ms, with a maximum timeout of 50ms).
[0094] Case 2: Normal data packet transmission. This is normal data transmission. The data packet is the data to be transmitted. After receiving the data, the receiver will reply with an ACK message. The ACK message mainly includes information such as the received data packet. The network latency can be calculated by combining the number of packets sent and received, the network bandwidth can be calculated by combining the packet size, and the packet loss rate can be calculated by combining the number of packets sent and received.
[0095] Generally speaking, network probe packets in Case 1 are relatively small and have a high frequency, while packets in Case 2 are usually larger and their frequency varies with network bandwidth. Multiple network bandwidth values can be calculated from a series of packets. These packets reflect past network status. This invention uses the bandwidth calculated from the most recent packet with a RecentTime (configurable, typically 50ms) to represent bandwidth assessment 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 period and the sum of the corresponding network delays. The calculated bandwidth value is then used as the current network bandwidth, CurrNetBand. The average network delay of Case 1 network probe packets is calculated as the current average network delay, CurrRTT. The RTT of Case 2 packets is not counted here because network probe packets are responded to immediately upon receipt, requiring almost no processing time. Furthermore, probe packets are sent more frequently, but data packets have processing time, so their RTT is ignored here. Finally, the network packets sent and received in Case 1 and Case 2 are counted, and the packet loss rate, CurrLostRate, within the RecentTime period 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 the data packet in two consecutive confirmation messages is not received, and there are a first number of probe packets that 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, it is possible to 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 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 (which can be customized and the 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. Figure 6 ,The data blocks (data packets) suspected of being lost are counted within the sending window, and then resent,the resent data packets are sent to the queue of data to be sent.
[0099] S300, dynamically sending transmission data in batches from the transmitting end to the receiving end 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 of each data packet in turn to obtain encoded data; S303, when the sending probability is greater than the probability threshold, sending the encoded data 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, sending the encoded data according to the window seat of the sending window; otherwise, adding the encoded data to the front of the data queue to be transmitted.
[0101] For example, in some specific implementations, the data queue to be sent stores data packets ready for transmission, including data packets sent for the first time and retransmitted data packets. The present invention uses a convolutional coding method to perform forward error correction. Convolutional coding encodes data using a sliding window method, effectively correcting random error distributions. It 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 during transmission by adding redundant information, thereby improving the reliability of data transmission and reducing the bit error rate.
[0102] Generally, convolutional encoding is performed on every N packets (this is configurable, recommended between 4 and 6, default is 4), resulting in N+1 packets. N should not be too small, as this will result in a large data transmission volume. It should also not be too large, as the ship-to-shore bandwidth is limited and packet loss is likely. A large N value will increase the retransmission bandwidth. If there are fewer than N packets to be sent, the system will wait for the ProbInterval time. If the ProbInterval time has passed and there is a send window, the packets will be encoded and sent directly.
[0103] Based on the current send window and the current send probability (SendRate), UDP is used to select an opportunity to send the encoded data. If SendRate ≥ 1, the data is sent based on the window slot. Otherwise, a random value R is calculated between 0 and 1. If SendRate ≥ 1, the data is sent based on the window slot. Otherwise, it waits for the next round of training to send. If there are no send slots in the window, data transmission is suspended until a send window is available. The encoded data is then ready to send and can be sent when a send slot is available.
[0104] S400, performing a weighted operation 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 preset weight parameters, a logarithmic function is combined with all parameters of the network status to perform a weighted operation 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] Where BNSI represents the comprehensive network status score; w1, w2, and w3 represent weight parameters; log represents the logarithmic function based on the natural exponential; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; and 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 perturbations; 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 perturbation parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
[0111] For example, in some specific implementations, based on the three variables of current network bandwidth CurrNetBand, current average network delay CurrRTT, and 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 impact on network quality, so an appropriate 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 networks fluctuate in real time, this invention simulates the natural fluctuations of network status by superimposing a random perturbation. Considering that network fluctuations can be positive for network improvement or negative for network deterioration, a Gaussian distribution is used for random perturbation. Referring to the following formula, RNSI represents the current network status index. A larger RNSI indicates a better network status, while a smaller RNSI indicates a worse 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 size 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 the RNSI. Generally speaking, if RNSI ≤ β1, then extension condition 1 is met. β1 can be customized, and is usually 0. When RNSI ≤ 0, it indicates that the network delay RTT or packet loss rate is relatively serious, resulting in a too small RNSI. In this case, the window should be reduced.
[0119] To reduce the sending frequency, you need to adjust the probability reduction 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 [0,abs(RNSI)]. Reducing the SendRate also reduces the frequency of data transmission.
[0122] Reduce the sending frequency, that is, narrow the sending window. The adjustment formula is 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 a growth 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 customarily set, 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, BNSI is calculated as -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, BNSI is calculated as 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, BNSI is calculated as 0.61.
[0132] Considering Case1, Case2 and Case3 comprehensively, β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 means that the network is good.
[0133] Among them, randomly adjusting the sending window may increase or decrease the sending window. The formula is as follows:
[0134]
[0135] N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1. It can be positive or negative. If N(0,1) is positive, the larger the RNSI, the larger the window size, while the smaller the RNSI, the smaller the window size. If N(0,1) is negative, the larger the RNSI, the larger the window size, while the smaller the RNSI, the smaller the window size. Whether increasing or decreasing, the maximum number of intervals cannot exceed Interval. This value is configurable, typically ranging from 1 to 5, with a default of 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 in the range [0,RNSI]. The larger the RNSI, the larger the probability range of adjustment, and the maximum does not exceed 1.0.
[0139] Expand the sending window and maximize data transmission 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 in the range [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 sending end and the receiving end 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 implemented 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 started.
[0145] In the context of ship-shore data synchronization, existing technologies based on the TCP protocol have 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 speed.
[0147] 2) Poor experience: Given the low satellite bandwidth and the fact that data synchronization and onboard technicians require an internet connection, bandwidth contention occurs, resulting in a poor user experience.
[0148] 3) Low synchronization success rate: Currently, data synchronization is mainly based on TCP transmission. Theoretically, the integrity of data transmission is guaranteed. However, considering the low bandwidth of satellites, data transmission often fails halfway.
[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. It is usually a rough value given based on the network bandwidth. The current ship-shore satellite communication bandwidth 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-shore data synchronization usually does not exceed 100KB. In addition, the present invention uses the UDP protocol for transmission, and each data packet is about 1K, so the sending window is set to WindowSize as 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 probe packets and analyzing the ACK feedback of 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 probe packet to proactively monitor network conditions. This test packet includes the SeqID and the number of packets sent. The reply packet also includes the SeqID and the number of packets received. Round trips can be used to calculate network latency, combined with packet size to calculate network bandwidth, and combined with the number of packets sent and received to calculate packet loss rate. A network probe packet is typically sent every ProbInterval (configurable, default 10ms, with a maximum timeout of 50ms).
[0153] Case 2: Normal data packet transmission. This is normal data transmission. The data packet is the data to be transmitted. After receiving the data, the receiver will reply with an ACK message. The ACK message mainly includes information such as the received data packet. The network latency can be calculated by combining the number of packets sent and received, the network bandwidth can be calculated by combining the packet size, and the packet loss rate can be calculated by combining the number of packets sent and received.
[0154] Generally speaking, network probe packets in Case 1 are relatively small and have a high frequency, while packets in Case 2 are usually larger and their frequency varies with network bandwidth. Multiple network bandwidth values can be calculated from a series of packets. These packets reflect past network status. This invention uses the bandwidth calculated from the most recent packet with a RecentTime (configurable, typically 50ms) to represent bandwidth assessment 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 period and the sum of the corresponding network delays. The calculated bandwidth value is then used as the current network bandwidth, CurrNetBand. The average network delay of Case 1 network probe packets is calculated as the current average network delay, CurrRTT. The RTT of Case 2 packets is not counted here because network probe packets are responded to immediately upon receipt, requiring almost no processing time. Furthermore, probe packets are sent more frequently, but data packets do have processing time, so their RTT is ignored here. Finally, the network packets sent and received within Case 1 and Case 2 are counted, and the packet loss rate, CurrLostRate, within the RecentTime period is calculated. Go to step 3.
[0156] Step 3: Check if the data needs to be resent. Check the ACKs sent in the data packet responses to determine which packets have been received and which have not. There are two possible scenarios for unreceived packets: they are either still in transit or they have been lost. This article counts the number of network probe packets sent after each packet is sent. If more than LeastRecvNum (configurable, default is 1) network probe packets receive a reply, the packet is considered lost and is ready for retransmission.
[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: The data is forward error corrected. The data queue to be sent stores data packets ready for transmission, including data packets sent for the first time and data packets to be retransmitted. The present invention uses a convolutional coding method to perform forward error correction. Convolutional coding encodes data in a sliding window manner and can effectively correct random error distributions. It 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, convolutional encoding is performed on every N packets (this is configurable, recommended between 4 and 6, default is 4), resulting in N+1 packets. N should not be too small, as this will result in a large data transmission volume. It should also not be too large, as the ship-to-shore bandwidth is limited and packet loss is likely. A large N value will increase the retransmission bandwidth. If there are fewer than N packets to be sent, the system will wait for the ProbInterval time. If the ProbInterval time has passed and there is a send window, the packets will be encoded and sent directly.
[0161] For example, assume the ProbInterval is 10ms, and the data packets held in the waiting-to-send queue are A1, A2, A3, A4, A5, and A6. Packets A3, A4, A5, and A6 are convolutionally encoded in chronological order. For packets A1 and A2, since there are fewer than four packets, a 10ms wait is applied. If the wait exceeds 10ms and there is a send window, packets A1 and A2 are convolutionally encoded. Then, proceed 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, data is sent based on the window slot. Otherwise, data is sent randomly, calculating a random value R between 0 and 1. If R ≤ SendRate, data is sent based on the window slot, otherwise it waits for the next round of training to send. If there are no sending slots in the window, data transmission is suspended until a sending window is available. The encoded data is then ready to be sent when a sending slot is available.
[0164] Steps 2 through 15 are executed in a loop, with each cycle lasting approximately 1ms to 10ms (this can be customized, but is typically 1ms). If there are slots available for sending, they are dynamically batched based on the probability of sending. If a slot is not sent due to probability, there may still be a chance to send it in the next cycle. Go to step 7.
[0165] Step 7: Window expansion condition 1 is met. Based on the three variables of current network bandwidth CurrNetBand, current average network delay CurrRTT and 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 impact 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 networks fluctuate in real time, this invention simulates the natural fluctuations of network status by superimposing a random perturbation. Considering that network fluctuations can be positive for network improvement or negative for network deterioration, a Gaussian distribution is used for random perturbation. Referring to the following formula, RNSI represents the current network status index. A larger RNSI indicates a better network status, while a smaller RNSI indicates a worse 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, then the expansion condition 1 is satisfied. β1 can be customized, and usually 0 is taken. When RNSI ≤ 0, it means that the 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 the 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 [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 the 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 is 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 reduce 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, then the expansion condition 2 is satisfied. β2 can be customized, and usually 0.5 is taken. When 0 < RNSI ≤ 0.5, it means that the network condition is gradually improving, and the window is randomly adjusted to balance the transmission efficiency and stability.
[0180] Here, an explanation is given on how to select 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, 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;
[0182] Case 2: Under normal network conditions, the network bandwidth is approximately 100 KBps, the RTT is approximately 50 ms, and the packet loss rate is approximately 0.05. Substituting this into the formula, the BNSI is 0.21.
[0183] Case 3: In very good network conditions, the network bandwidth is about 200 KBps, the RTT is about 30 ms, 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 a particularly poor network, and a value less than 0.5 indicates an average network. 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, so go to step 12.
[0187] Step 12: Random window adjustment. This indicates that the network condition is gradually improving. The sending window is adjusted dynamically, either increasing or decreasing it. The formula is as follows:
[0188]
[0189] N(0,1) represents a normal distribution with an expected value of 0 and a standard deviation of 1. It can be positive or negative. If N(0,1) is positive, the larger the RNSI, the larger the window size, while the smaller the RNSI, the smaller the window size. If N(0,1) is negative, the larger the RNSI, the larger the window size, while the smaller the RNSI, the smaller the window size. Whether increasing or decreasing, the maximum number of intervals cannot exceed Interval. This value is configurable, typically ranging from 1 to 5, with a default of 3.
[0190] Go to step 15.
[0191] Step 13: Increase the probability of sending. This indicates that the network condition is very good, indicating high network bandwidth, low RTT delay, and low packet loss rate. At this time, it is necessary to increase the sending frequency and adjust the probability SendRate. The adjustment formula is as follows:
[0192] SendRate=max(1,SendRate+Random(0,RNSI))
[0193] Random(0,RNSI) represents a random number in the range [0,RNSI]. The larger the RNSI, the larger the adjusted probability range, up to a maximum of 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 in the range [0,RNSI]. The larger the RNSI, the larger the probability range for adjustment. Go to step 15.
[0197] Step 15: All data is sent. After the dynamic adjustment of the above steps, it is now determined whether all data has been sent. If so, the entire 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 assessment 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-to-shore data to ensure reliable data transmission in weak network environments.
[0202] On the other hand, Figure 9 As shown, an embodiment of the present invention provides a ship-to-shore low-speed bandwidth data synchronization device 900, which may include:
[0203] The first module 901 is configured to select data at the front of a queue of data to be transmitted as transmission data through a sending window of a preset specification;
[0204] The second module 902 is configured to evaluate the network status based on the interaction information between the transmitting end and the receiving end 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 probe 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 configured to dynamically send the transmission data from the transmitting end to the receiving end in batches based on a preset transmission probability;
[0206] The fourth module 904 is configured to perform a weighted operation on all network status parameters to obtain a comprehensive network status score;
[0207] The fifth module 905 is configured to randomly lower the sending probability and reduce the preset size 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 configured to randomly adjust the preset size 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 size 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, set 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 configured to determine the transmission status of a corresponding data packet as lost when the transmission status of both data packets in two consecutive confirmation messages is not received, and a first number of probe 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 perturbations;
[0215] The updated comprehensive network status score expression 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 perturbation 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] In another aspect, an embodiment of the present invention further provides an electronic device comprising a memory and a processor. The memory stores a computer program, and the processor implements the above-described method for predicting the bottom boundary of the hydrate stability region when executing the computer program. The electronic device can be any smart terminal, including a tablet computer and an in-vehicle computer.
[0220] It can be understood that the contents of the above method embodiments are 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 Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is shown. The electronic device 1000 includes:
[0222] The processor 1001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by 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 solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called by the processor 1001 to execute 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] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0226] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and 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. The units described as separate components may or may not be physically separate, i.e., they may be located in one location or distributed across multiple network units. Some or all of these modules may be selected based on actual needs to achieve the objectives 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 embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[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 present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0234] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that 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 flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the 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 concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0236] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments 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, and includes a number of 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 embodiments of the present invention.
[0237] In some optional 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 in an exemplary manner 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. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0238] Furthermore, while the present invention has been described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed in the present invention, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art will be able to implement the present invention as set forth in the claims using ordinary skill without undue experimentation. It will also be 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 and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute 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, and other media that can store program code.
[0240] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution apparatus, device, or apparatus (e.g., a computer-based apparatus, a device including a processor, or other apparatus that can fetch instructions from and execute instructions on an instruction execution apparatus, device, or apparatus). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution apparatus, device, or apparatus.
[0241] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), 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 disc read-only memory (CDROM). In addition, the computer-readable medium may even be 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 processing in another suitable manner as necessary, and then stored in a computer memory.
[0242] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0243] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0244] While 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 invention, and that the scope of the 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 by evaluating the interaction information between the sending end and the receiving end 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 and regularly sent probe packets within the target time range; 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 transmitting end to the receiving end in batches based on a preset transmission probability; Performing a 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 size 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 size of the sending window; otherwise, randomly increasing the sending probability and increasing the preset size of the sending window; Move the sending window backward 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 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 until all data in the data queue to be transmitted are 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 probe 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 transmitting end and the receiving end within the target time range before the target time node, comprising the following steps: 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 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. The 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 is "not received" twice in a row, 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 to be packet loss; The data packet whose transmission status is 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 including at most a second number of the data packets; performing forward error correction coding on each of the data packets in sequence 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 within 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. The ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The step of performing a weighted operation on all parameters of the network status to obtain a comprehensive network status score comprises the following steps: Based on 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; Where BNSI represents the comprehensive network status score; w1, w2, and w3 represent weight parameters; log represents the logarithmic function based on the natural exponential; CurrNetBand represents the network bandwidth; CurrRTT represents the average network delay; and 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 perturbation parameter; N(0,σ 2 ) indicates a normal distribution with an expected value of 0 and a standard deviation of σ.
7. The ship-shore low-speed bandwidth data synchronization method according to claim 1, characterized in that: The randomly adjusting the preset size of the sending window comprises the following steps: Determining an adjustment specification based on a 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 size of the sending window is updated based on the sum of the adjusted size and the preset size.
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 configured to evaluate and obtain a network status based on interaction information between the transmitting end and the receiving end within a target time range before the target time node; the interaction information includes transmission information and feedback information; the transmission information includes historical transmission data and regularly transmitted probe packets within the target time range; the feedback information includes reply packets and confirmation information; and the network status includes network bandwidth, average network delay, and packet loss rate. A third module is configured to dynamically send the transmission data from the transmitting end to the receiving end in batches based on a preset transmission probability; A fourth module is configured to perform a weighted operation on all parameters of the network status to obtain a comprehensive network status score; A fifth module is configured to randomly lower the sending probability and reduce the preset size 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, configured to randomly adjust the preset size 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 size 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