Data transmission method and device
By analyzing the transmission information of service data and matching the transmission lines and policies in the preset configuration file, selecting the optimal transmission line for data transmission, solving the problem that the transmission strategy cannot be flexibly adjusted in the existing technology and improving the efficiency of data transmission and stability.
Patent Information
- Application Number
- CN202411523746.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
When facing a dynamically changing network environment, existing remote control technologies cannot flexibly adjust transmission lines and policies based on actual network status and service data types, resulting in low efficiency in network resource use and may even cause network congestion or data transmission delay.
By receiving service data and analyzing its transmission information, including the identifier of the service data type and transmission bandwidth requirements, this information is used to match multiple transmission lines and transmission policies in the preset transmission configuration file, and based on the transmission bandwidth requirements and transmission policies. Select the optimal target transmission line among multiple transmission lines for data transmission.
It improves the efficiency and stability of data transmission, can flexibly adapt to data transmission needs in different business scenarios, and avoids abnormalities caused by line blockage or data transmission delay.
Smart Images

Figure CN119402417A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a data transmission method and device. Background Art
[0002] With the development of industrial automation and intelligence, remote control technology (hereinafter referred to as "remote control") is increasingly used in ports and mines. The working environment in these fields usually has high risks, such as mechanical failure, material falling and even explosion accidents, which will bring safety threats to on-site operators. In order to solve these problems, improve work efficiency, adapt to harsh conditions, reduce costs, and promote automation and intelligence, remote control technology has become an indispensable choice.
[0003] In existing remote control technologies, data transmission usually relies on pre-configured network paths and transmission strategies. This is because remote control systems are designed with stability and predictability in mind. In the early stages of deployment, technicians will plan transmission lines and configure transmission strategies based on expected workloads and network topology to ensure that data can be transmitted efficiently and reliably under normal circumstances. This approach assumes that the network environment is relatively stable, and in most cases, this static configuration can meet daily remote control needs. The system will select the best pre-evaluated paths for data transmission, which are usually selected based on historical data and expected loads. For example, for video streaming, the system may give priority to lines with larger bandwidth and lower latency; while for text or control instructions, it may use lines with smaller bandwidth but more reliable. Once these paths and strategies are set, they are usually fixed during operation unless manually intervened. This design approach simplifies system management and maintenance, while also reducing the complexity and potential risks of real-time adjustments.
[0004] However, this static configuration method is powerless in the face of dynamically changing network environments. When network conditions change, such as when certain lines become congested or unstable, the system cannot automatically adjust the transmission path or reallocate bandwidth resources. In addition, different types of business data have different requirements for transmission bandwidth, and static configuration makes it difficult to respond quickly to these requirements. As a result, when network conditions change or different types of data need to be transmitted, existing technologies find it difficult to flexibly adjust transmission strategies, resulting in inefficient use of network resources and may even cause network congestion or data transmission delays, i.e., data transmission anomalies. Therefore, how to select the appropriate transmission line based on the actual network status and business data type to ensure that data can be delivered stably and accurately throughout the transmission process has become an urgent problem to be solved. Summary of the invention
[0005] In view of the above problems, the main purpose of the present invention is to provide a data transmission method and device, so that it can solve the shortcomings of static configuration in existing remote control technology when facing a dynamically changing network environment, that is, the technical problem of being unable to select a suitable transmission line according to the actual network status and business data type.
[0006] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0007] A first aspect of the present invention provides a data transmission method, the method comprising:
[0008] Receive business data and parse transmission information of the business data, where the transmission information includes an identifier for distinguishing business data types and a transmission bandwidth requirement for transmitting the business data;
[0009] Matching multiple transmission lines and transmission strategies of business data in a preset transmission configuration file using the identifier;
[0010] Based on the transmission bandwidth requirement and the transmission strategy, a target transmission line is selected from multiple transmission lines to transmit the service data using the target transmission line.
[0011] A second aspect of the present invention provides a data transmission device, the device comprising:
[0012] A receiving unit, used to receive the service data and parse the transmission information of the service data, the transmission information including an identifier for distinguishing the type of service data and a transmission bandwidth requirement for transmitting the service data;
[0013] A matching unit, used to match multiple transmission lines and transmission strategies of the service data in a preset transmission configuration file using the identifier in the receiving unit;
[0014] The selection unit is used to select a target transmission line from multiple transmission lines based on the transmission bandwidth requirement of the receiving unit and the transmission strategy of the matching unit, so as to transmit service data using the target transmission line.
[0015] The third aspect of the present invention provides an electronic device, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute a data transmission method.
[0016] A fourth aspect of the present invention provides a readable storage medium, which is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a data transmission method.
[0017] By means of the above technical scheme, the present invention proposes a data transmission method, which is specially designed for remote control in the fields of ports, mines, etc. The core of the method is to select the most suitable transmission line according to the characteristics of the business data and the bandwidth requirements to improve the efficiency and stability of data transmission. Specifically, when the business data is received, the transmission information related to the data is received at the same time. This information contains the identifier of the business data type and the transmission bandwidth requirement. First, the type of business data is determined according to the identifier, and then according to the preset transmission configuration file, multiple potential transmission lines that can transmit this type of data are screened out. However, it should be clear that although these transmission lines can transmit this type of business data, they may not all meet the specific bandwidth requirements. Therefore, it is necessary to further combine the transmission bandwidth to screen the transmission lines that meet the requirements. In addition, different business data types often have different transmission strategies, which are intended to ensure that each type of data can be efficiently and stably transmitted according to its characteristics, and always keep the data on the target transmission line to be transmitted to the center side. Based on the above considerations, an optimal target transmission line will be selected from multiple potential transmission lines according to the transmission bandwidth requirements and transmission strategies. This selection process not only takes into account the physical characteristics of the transmission line, but also fully considers the data transmission requirements and strategies to ensure that the data can be transmitted on the target transmission line in the most suitable way for this type. Ultimately, by comprehensively considering the applicability of the transmission line and the transmission strategy, it can ensure that the business data is transmitted normally throughout the entire process, avoiding anomalies caused by line congestion or data transmission delays. This approach not only improves the efficiency and stability of data transmission, but also can flexibly adapt to the data transmission needs in different business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0019] Figure 1 A schematic diagram of a data transmission method according to an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a flow chart of a video data transmission method proposed in an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a flow chart of a method for switching between primary and standby transmission lines proposed in an embodiment of the present invention;
[0022] Figure 4 A flow chart of a PLC data transmission method proposed in an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of the structure of a data transmission device proposed in an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of the structure of a video data transmission device proposed in an embodiment of the present invention;
[0025] Figure 7 A schematic diagram of the structure of a PLC data transmission device proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0028] The technical solution of the present invention is derived from the in-depth analysis of the problems existing in the prior art and the demand for technical improvement. Specifically, in the existing remote control technology, data transmission relies on pre-configured network paths and transmission strategies. In the early stage of system deployment, technicians plan transmission lines and configuration strategies based on expected workloads and network topology. The system will select the best path for data transmission based on historical data and expected loads. For example, it will give priority to lines with large bandwidth and low latency for video streams, and select lines with small bandwidth but reliable for text or control instructions. However, this static configuration has obvious defects.
[0029] On the one hand, once the path and strategy are set, they are basically fixed during operation unless manually intervened. When network conditions change dynamically, such as when some lines are crowded or unstable, the system cannot automatically adjust the transmission path or reallocate bandwidth resources. On the other hand, different types of business data have different transmission bandwidth requirements, and static configurations are difficult to respond to these requirements quickly. This makes it difficult for existing technologies to flexibly adjust transmission strategies when network conditions change or when transmitting different types of data, resulting in inefficient use of network resources and even causing data transmission anomalies such as network congestion or data transmission delays.
[0030] In view of the limitation of the static configuration method in the prior art that it is unable to flexibly adjust the transmission lines and strategies according to the actual network status and business data type in the face of a dynamically changing network environment, the inventor proposed an innovative data transmission method. This method receives business data and parses its transmission information, including the identifier of the business data type and the transmission bandwidth requirement, and then uses this information to match multiple transmission lines and transmission strategies in a preset transmission configuration file, and finally selects the optimal target transmission line from multiple transmission lines for data transmission based on the transmission bandwidth requirement and transmission strategy. This technical concept not only improves the efficiency and stability of data transmission, but also can flexibly adapt to the data transmission requirements in different business scenarios, effectively solving the shortcomings of the prior art.
[0031] Specifically, a data transmission method provided in an embodiment of the present invention is applicable to central devices in a remote control system. These central devices are usually deployed on the remote side (or stand-alone side) and are responsible for processing and forwarding various information from the site. In addition to common remote switches, the method is also applicable to other types of remote measurement and control terminals, such as industrial switches, PoE switches, remote intelligent video monitoring boxes, and KVM switches.
[0032] It should be noted that in remote control operations, in addition to the central device on the single machine side, a central device is also deployed on the center side. The data transmission method provided in the embodiment of the present invention is mainly suitable for data to be received by the central device on the single machine side and transmitted to the central device on the center side, and its execution subject is the central device on the single machine side.
[0033] In this embodiment, taking a switch as an example, it is described in detail how the central control device on the stand-alone side processes the received data and performs appropriate transmission operations on various types of information in remote control operations. The purpose of this process is to ensure that data can be transmitted to the control center on the central side stably and efficiently, avoiding abnormal conditions caused by network congestion or transmission delays. The specific execution steps are as follows: Figure 1 As shown, including:
[0034] Step 101: Receive business data and parse transmission information of the business data, where the transmission information includes an identifier for distinguishing the type of business data and a transmission bandwidth requirement for transmitting the business data.
[0035] Business data is a broad concept that can include only one data type or multiple different data types. Whether it is a single data type or a mixed data type, it will be collectively referred to as "business data" below. This inclusive definition allows business data to flexibly adapt to various business scenarios and data requirements.
[0036] When the switch receives data from various devices on the remote side, it will also receive transmission information related to the business data. This information is attached to the business data or transmitted together with the business data. The transmission information contains an identifier for distinguishing the type of business data. This identifier is a specific code or mark used to identify the specific type of business data, such as video data, PLC (programmable controller or programmable logic controller) data, etc. At the same time, the transmission information also includes the bandwidth requirements for transmitting business data, that is, the network bandwidth required for this type of data during transmission.
[0037] In addition to the identification that meets the transmission bandwidth requirements, the transmission information may also contain other key information related to data transmission, including but not limited to: data priority, which is used to indicate the importance or urgency of business data, so that high-priority data can be transmitted first when resources are limited; data integrity verification information, such as checksums or hash values, which are used to verify the integrity of data after sending the data to the center side (data receiving end) to ensure that the data has not been tampered with or damaged during transmission; source address and destination address, which are used to indicate the sender and receiver of the data to ensure that the data can be accurately transmitted from the source to the destination; transmission protocol, which is used to specify the protocol standard followed by data transmission to ensure that the sender and receiver can transmit and parse data according to the same rules; security encryption information, such as encryption algorithms and keys, which are used to encrypt business data to protect the confidentiality and security of data; data format, which is used to describe the encoding format or data structure of business data so that the receiver can correctly parse and process the data; other additional information, depending on the needs of specific application scenarios, may also include other additional information related to data transmission, such as timestamps, sequence numbers, etc.
[0038] By parsing this information, the switch can identify the type of business data and select a suitable transmission line and strategy according to its bandwidth requirements, that is, enter step 102 to ensure that the data can be efficiently and stably transmitted to the center side.
[0039] Step 102: Use the identifier to match multiple transmission lines and transmission strategies of the service data in the preset transmission configuration file.
[0040] In the data transmission method, step 102 is a key step in connecting the received service data with its applicable transmission line and strategy. After the service data is received and its transmission information is parsed, the switch further processes it according to the identifier contained in the information for distinguishing the service data type.
[0041] The core of this step is the "preset transmission configuration file". This is a database or configuration file that has been set up, which records in detail the transmission lines and strategies corresponding to different types of business data. It should be clear that not all transmission lines can transmit a specific type of business data. By using identifiers, suitable lines that can transmit this type of business data can be screened out from the transmission lines. Transmission lines may include multiple different physical or logical paths, and transmission strategies cover the rules and parameters that data should follow when transmitted on these lines. Specifically, the transmission strategy contains the line logic that keeps different types of business data transmitted normally to the center side throughout the entire data transmission process. This line logic needs to be designed according to the characteristics of different data types. For example, PLC data has low requirements for transmission bandwidth, but requires high reliability and low latency. In order to meet the PLC data transmission requirements, redundant parallel transmission can be used, that is, PLC data can be copied into multiple copies and transmitted through multiple transmission lines. In this way, the transmission line that transmits the data first and arrives at the center side most completely will be selected to transmit the PLC data. In addition to PLC data, remote control operations often require the transmission of a large amount of video control monitoring information. Taking the automated terminal tire crane port crane as an example, the number of cameras installed on a tire crane reaches 20. Such a large number of video streams requires extremely high network bandwidth. In order to meet the video data transmission requirements, the main and standby transmission line switching method can be used for transmission. That is, if the current video data transmission line is not in good condition, it will be switched to the standby transmission line in time to transmit the current video data to ensure that it can be transmitted to the center side normally. It can be seen that the line logic is determined according to the data type and data transmission characteristics. In addition, the transmission line between the remote side and the central side can be a transmission line using the same network or a line of a different network. For example, when the status is not good during video data transmission, it can be switched to a backup transmission line using another network. No specific limitation is made here.
[0042] In the embodiment of the present invention, in addition to the above-mentioned case where the business data matches one transmission strategy (i.e., there is only one data type in the business data, corresponding to only one transmission strategy), there is also the possibility that the business data matches multiple transmission strategies. This situation usually occurs when the system is designed to be relatively flexible and complex to meet the needs of different business scenarios and data characteristics. The following is a specific example and instructions on how to operate in this case:
[0043] Consider a data transmission system that supports multiple types of business data, including real-time data streams, periodic reports, and emergency alerts. Each type of business data has its own specific transmission requirements:
[0044] (1) Real-time data streaming: High-bandwidth and low-latency transmission lines are required to ensure smooth video playback.
[0045] (2) Periodic reporting: The real-time requirement is not high, but the transmission must be completed within a specified time period.
[0046] (3) Emergency alerts: These require the highest priority transmission and must be delivered as quickly as possible regardless of the current network status.
[0047] Now, suppose there is a new business data, which is a composite data packet containing real-time video and emergency alert information. This data packet requires both high bandwidth and low latency to transmit video content, and the highest priority transmission to ensure timely delivery of the alert information.
[0048] In this case, the system needs a mechanism to determine how to select a transmission strategy for this composite packet. Here are some of the steps required:
[0049] Step 1: Analyze the data packet content.
[0050] First, the system needs to parse the data packets and identify the different types of business data (such as video and alarms) contained in them.
[0051] Step 2: Match the transmission strategy.
[0052] For each type of business data, the system will search for matching transmission strategies in the preset transmission configuration files. In this embodiment, the system will find the transmission strategies corresponding to the real-time video stream and the emergency alarm.
[0053] Step 3: Determine priorities.
[0054] When there are multiple matching transmission strategies, the system needs to determine their priorities according to the importance and real-time requirements of the business data. In this embodiment, the transmission strategy of the emergency alarm should be given the highest priority because the timely delivery of the alarm information is more important than the smooth playback of the video content.
[0055] Step 4: Resolve conflicts.
[0056] If there are conflicts between multiple transmission strategies (for example, they require the use of the same transmission line or resources), the system needs a mechanism to resolve these conflicts. Possible solutions include:
[0057] Resource allocation: Allocate transmission resources according to priority to ensure that high-priority policies are met first.
[0058] Policy Adjustment: Fine-tune the transmission policy to reduce resource conflicts. For example, the bandwidth requirement of video streaming can be reduced to free up more resources for emergency alerts.
[0059] Line switching: If possible, select different transmission lines for different types of business data to avoid resource conflicts.
[0060] Execute transmission: Finally, the system selects the most appropriate transmission line and transmission strategy to transmit the data packet based on the determined priorities and resolved conflicts.
[0061] In summary, when business data matches multiple transmission strategies, the system needs a flexible and intelligent mechanism to determine priority and resolve conflicts. This usually involves in-depth analysis of data packet content, matching of transmission strategies, determination of priorities, and application of conflict resolution strategies. Through these steps, the system can ensure that different types of business data are properly transmitted and processed to meet their specific transmission requirements.
[0062] In general, when executing step 102, the switch first reads the identifier in the business data, and then searches for an entry that matches the identifier in the preset transmission configuration file. After finding a match, the switch extracts multiple transmission lines that can be used for the business data and the corresponding transmission strategies. The importance of this process is that it ensures that different types of business data can be assigned to the most appropriate transmission lines and strategies according to their characteristics and needs. This not only improves the efficiency and stability of data transmission, but also helps to optimize the use of network resources and avoid problems such as line congestion and data transmission delays. It can be seen that step 102 lays a solid foundation for entering step 103 to determine the transmission line for the final transmission of business data, thereby achieving efficient and stable data transmission.
[0063] Step 103: Based on the transmission bandwidth requirement and the transmission strategy, a target transmission line is selected from multiple transmission lines to transmit service data using the target transmission line.
[0064] In step 103, the switch needs to select an optimal transmission line from multiple transmission lines based on the transmission bandwidth requirement and the transmission strategy, which can be understood as the target transmission line, to use the target transmission line to transmit business data. It should be noted that since different data types correspond to different transmission strategies, the number of target transmission lines is also different. For video data, there is only one target transmission data, and for PLC data, there can be multiple target transmission data.
[0065] Specifically, the switch will first screen multiple potential transmission lines based on the transmission bandwidth requirements of the business data. Although these transmission lines can transmit this type of business data, they may not all meet the specific bandwidth requirements. Therefore, the switch will determine which transmission lines are available transmission lines that meet the transmission requirements by comparing the transmission bandwidth requirements and the remaining transmission bandwidth of each transmission line.
[0066] Next, the switch also needs to consider the transmission strategy. Different business data types often have different transmission strategies, which are designed to ensure that each type of data can be transmitted efficiently and stably according to its characteristics. For example, for video data, the switch may give priority to transmission lines that can provide stable bandwidth and low latency to ensure the smoothness and real-time nature of the video stream; while for PLC data (device status data generated when the PLC control system is running), it may pay more attention to data reliability and redundancy, so it may choose multiple transmission lines for simultaneous transmission to improve the data's fault tolerance.
[0067] Based on the above considerations, the switch will comprehensively evaluate the performance indicators of each available transmission line, such as bandwidth, delay, reliability, and the specific requirements of the transmission strategy, to select the optimal target transmission line. This selection process not only takes into account the physical characteristics of the transmission line, but also fully considers the transmission requirements and strategies of the data to ensure that the data can be transmitted on the target transmission line in the most suitable way for this type.
[0068] Finally, the switch will determine and select the optimal target transmission line, and then use the line to transmit the business data to the center side. During the transmission process, the switch will also continuously monitor the status of the transmission line and the quality of data transmission to ensure the stability and reliability of data transmission. If an abnormality is found in the transmission line or the data transmission quality decreases, the switch will promptly take countermeasures such as switching the transmission line to ensure the continuity and integrity of data transmission.
[0069] Based on the above Figure 1As can be seen from the implementation method, the present invention proposes a data transmission method and device. Designed for remote control in the fields of ports, mines, etc., the core of the method is to select the most suitable transmission line according to the characteristics of the business data and the bandwidth requirements to improve the efficiency and stability of data transmission. Specifically, when the business data is received, the transmission information related to the data will be received at the same time. This information contains the identifier of the business data type and the transmission bandwidth requirement. First, the type of business data is determined according to the identifier, and then according to the preset transmission configuration file, multiple potential transmission lines that can transmit this type of data are screened out. However, it should be clear that although these transmission lines can transmit this type of business data, they may not all meet the specific bandwidth requirements. Therefore, it is necessary to further combine the transmission bandwidth to screen the transmission lines that meet the requirements. In addition, different business data types often have different transmission strategies, which are intended to ensure that each type of data can be transmitted efficiently and stably according to its characteristics, and always keep the data on the target transmission line to be transmitted to the center side. Based on the above considerations, an optimal target transmission line will be selected from multiple potential transmission lines according to the transmission bandwidth requirements and transmission strategies. This selection process not only takes into account the physical characteristics of the transmission line, but also fully considers the data transmission requirements and strategies to ensure that the data can be transmitted on the target transmission line in the most suitable way for this type. Ultimately, by comprehensively considering the applicability of the transmission line and the transmission strategy, it can ensure that the business data is transmitted normally throughout the entire process, avoiding anomalies caused by line congestion or data transmission delays. This approach not only improves the efficiency and stability of data transmission, but also can flexibly adapt to the data transmission needs in different business scenarios.
[0070] Furthermore, in the above embodiment, a method for selecting and utilizing a specific transmission line for data transmission based on the service data type and transmission requirements has been outlined. The core of this method is to allocate and optimize the data transmission path according to the different characteristics of the service data (such as data type, size, real-time requirements, etc.) and the available transmission resources (such as transmission lines, bandwidth, etc.). Now, based on the above discussion, how to further refine and implement this method when the service data type is video data will be specifically described, such as Figure 2 As shown, the detailed steps of the video data transmission method are as follows:
[0071] Step 201: Obtain the remaining transmission bandwidth of each transmission line.
[0072] In this step, the available resources of each transmission line in the current network environment are evaluated. The remaining transmission bandwidth is an important basis for selecting a transmission line, because it directly determines whether the transmission requirements of specific business data, namely video data, can be met.
[0073] The switch can obtain the remaining bandwidth information of each line by querying the network management database, sending detection packets or using existing network monitoring tools.
[0074] Specifically, query the network management database: If there is a network management database (such as an SNMP agent) in the network environment, the switch can directly query the database to obtain the remaining bandwidth information of each line. This method is usually more accurate, but it depends on the availability and accuracy of the network management system.
[0075] Sending probe packets: The switch can send specific types of probe packets (such as ICMO Echo requests or custom bandwidth test packets) to each line and measure the round-trip time, packet loss rate and other parameters of these packets, thereby indirectly inferring the remaining bandwidth of the line. This method does not need to rely on an external database, but may be affected by factors such as network delay and jitter.
[0076] Utilize existing network monitoring tools: If network monitoring tools (such as NetFlow, sFlow, etc.) have been deployed in the network environment, the switch can use the real-time traffic data provided by these tools to calculate the remaining bandwidth of each line. This method can provide real-time loan information, but may require additional configuration and computing resources.
[0077] However, in some special cases, such as line failures and inaccurate bandwidth information, the switch may be unable to obtain the remaining transmission bandwidth of each line. Taking line failures and inaccurate bandwidth information as examples, the following processing methods are provided:
[0078] Line failure: If a line fails (such as physical connection disconnection, equipment failure, etc.), the switch may not be able to directly obtain the remaining bandwidth information of the line. In this case, the switch should mark the line as unavailable and exclude it in the subsequent selection process.
[0079] Inaccurate bandwidth information: Due to the complexity of the network environment, sometimes the switch may not be able to obtain accurate bandwidth information (such as outdated data in the database, detection packets blocked by the firewall, etc.). In this case, the switch can adopt a conservative strategy, such as assuming that the remaining bandwidth of all lines is low, thereby selecting a relatively more reliable line for transmission. Alternatively, the switch can try to use multiple methods to obtain bandwidth information and combine these results to make a decision.
[0080] In summary, step 201 not only involves the basic operation of obtaining the remaining transmission bandwidth of each transmission line, but also needs to consider the processing of special cases to ensure that the selected transmission line can meet the transmission requirements of the video data and improve the reliability and stability of the transmission.
[0081] Step 202: Compare the transmission bandwidth requirement and the remaining transmission bandwidth to determine an available transmission line that satisfies the transmission of video data.
[0082] In this step, the switch compares the bandwidth requirements of the video data (which may include parameters such as maximum bandwidth, average bandwidth, and burst bandwidth) with the remaining bandwidth of each line to determine which lines are available. That is, by comparing the transmission bandwidth requirements of the video data with the remaining bandwidth of each line, the switch selects the lines that can meet the transmission requirements, i.e., the available transmission lines.
[0083] Specifically, we first analyze the transmission bandwidth requirements for transmitting current business data in detail:
[0084] Maximum bandwidth: The maximum bandwidth that video data may require during transmission, which usually depends on the quality and resolution of the video.
[0085] Average bandwidth: The average bandwidth required for video data during long-term transmission, which helps evaluate the long-term carrying capacity of the line.
[0086] Burst bandwidth: The short-term high bandwidth demand that may occur during the transmission of video data, such as when scenes switch or the complexity of the picture increases.
[0087] Bandwidth variation range: The fluctuation range of video data bandwidth requirements, which helps evaluate the line's ability to adapt to bandwidth changes.
[0088] When comparing and screening bandwidth, the bandwidth requirements of video data are compared with the remaining bandwidth of each line one by one to ensure that each line can meet at least one bandwidth requirement (maximum, average, burst, etc.). In addition to comparing one by one, you can also consider factors such as line bandwidth stability, latency, and jitter to select the best line. Based on the comparison results, prioritize the lines that meet the requirements so that the best line can be selected in the subsequent steps.
[0089] When screening available transmission lines, you need to pay attention to and properly handle the following special cases to ensure that the selected line can meet the transmission requirements of video data. The following is a reorganization of these special cases and their solutions:
[0090] (1) Bandwidth requirements exceed all lines:
[0091] Solution: If the bandwidth demand of video data exceeds the remaining bandwidth of all lines, the switch should issue a warning and suggest adjusting the encoding parameters of the video data or finding other transmission methods.
[0092] (2) Large differences in bandwidth between lines:
[0093] Solution: If the remaining bandwidth of each line varies greatly, the switch should give priority to lines with sufficient bandwidth to ensure stable transmission of video data.
[0094] (3) Bandwidth requirements are close to line limits:
[0095] Solution: When the bandwidth demand is close to the remaining bandwidth limit of a certain line, the line should be selected carefully and its possible bandwidth changes in the future should be considered. The reliability and stability of transmission can be improved by adding backup lines or adopting load balancing strategies.
[0096] (4) Line failure or instability:
[0097] Solution: During the screening process, if a line is found to be faulty or unstable, it should be immediately excluded from the candidate list and other stable lines should be considered for transmission.
[0098] In summary, step 202 involves not only simple bandwidth comparison and screening, but also requires detailed analysis of the bandwidth requirements of the video data and accurate evaluation of the remaining bandwidth. At the same time, special cases need to be considered to ensure that the selected line can meet the transmission requirements of the video data.
[0099] Step 203: If there are multiple available transmission lines, the one with the smallest transmission load is selected as the main transmission line, and the others are backup transmission lines.
[0100] In this step, the switch will select the line with the smallest load as the main line according to the current transmission load of each line (such as the number of data packets, transmission rate, etc.). The backup line is the other available lines except the main line. The role of the main transmission line is clarified here, that is, as the main channel for carrying video data transmission, once the main transmission line is selected, the switch will transmit the video data through the line, and even after switching to the backup transmission line, once it is found that the main transmission line is restored to a state that meets the video data transmission requirements, the main transmission line will continue to transmit video data after switching. In other words, among multiple available lines, selecting the line with the smallest transmission load as the main line can optimize the utilization of network resources and reduce transmission delays or data loss caused by excessive transmission load. At the same time, setting up a backup line can improve the reliability of transmission.
[0101] Specifically, if it is found that there are multiple available transmission lines that can be used to transmit the current business data, the switch identifies the line with the smallest load by monitoring the current transmission load of each line (for example, the number of data packets, transmission rate, etc.). Selecting the line with the smallest load as the main transmission line can ensure that the line has sufficient remaining bandwidth to carry the transmission of video data, thereby avoiding performance degradation caused by insufficient bandwidth. Of course, if there are requirements for key performance indicators such as delay, jitter and packet loss rate when transmitting the current video data, the best main transmission line can be selected based on the comprehensive performance of all available transmission lines to meet the requirements of stable and high-quality transmission of video data.
[0102] Once the primary transmission line is designated as the main channel for carrying video data transmission, the remaining available transmission lines are set as backup transmission lines. It should be noted that if the current primary transmission line is in poor condition and needs to be switched to the backup transmission line to transmit video data, before preparing to switch from the primary transmission line to the backup transmission line, multiple key links need to be considered comprehensively to ensure smooth switching and system stability. First, be sure to confirm the availability of the backup transmission line, including fully testing and verifying its configuration and performance to ensure that it can meet or exceed the transmission requirements of the primary transmission line. Next, shut down or suspend the primary transmission line to avoid potential conflicts or data interference. If there is a need for data synchronization between the primary and backup transmission lines, synchronization must be completed and data integrity must be verified before switching. At the same time, all systems or devices that rely on the transmission line must be notified to ensure that they can recognize and adapt to the new transmission line, which may involve updating routing tables or configuration parameters. After switching, keep monitoring the primary transmission line continuously, and immediately monitor and test the backup transmission line to check its working status and transmission quality, including network performance parameters such as latency, jitter, and packet loss rate. If any problems or failures are encountered, troubleshooting and recovery work should be carried out immediately, and network equipment, line connections, and configuration parameters should be checked. In addition, all steps and results of the switching process should be recorded, and detailed operation documents should be written for future reference. Finally, ensure that the relevant operators are familiar with the switching process and precautions, and provide necessary training and guidance to improve their skills and knowledge level. Through these meticulous preparations, the smooth switching of the backup channel can be ensured, and the stability and reliability of the transmission system can be maintained.
[0103] Step 204: monitor the status of the main transmission line, and switch to the backup transmission line when the main transmission line does not meet the transmission requirements of the video data.
[0104] In this step, the switch may continuously monitor the status of the main line (such as bandwidth utilization, packet loss rate, delay, etc.) and set a certain threshold to determine whether line switching is required. Once the status of the main line is lower than the threshold, the switch will trigger the switching mechanism to switch the transmission of video data to the backup line. That is, this step is to ensure the continuous and stable transmission of video data. When there is a problem with the main line (such as insufficient bandwidth, network failure, etc.), the switch can quickly switch to the backup line to avoid transmission interruption.
[0105] Specifically, the switch uses a built-in monitoring mechanism to continuously monitor the key performance indicators of the main transmission line, including but not limited to bandwidth utilization, packet loss rate, latency, failure to receive detection messages, and jitter. These indicators can fully reflect the current status of the line, thereby helping the switch determine whether to start the switching mechanism.
[0106] In order to ensure the timeliness and accuracy of switching, switches usually set reasonable thresholds for these performance indicators. These thresholds are set according to the specific needs of video data transmission, aiming to ensure transmission quality while taking into account the effective use of network resources. Once one or more performance indicators of the main transmission line are lower than the set threshold, the switch will immediately identify the potential problem and prepare to start the switching mechanism.
[0107] Before switching, the switch will also perform a series of checks and preparations. First, it will confirm the availability of the backup transmission line and ensure that the backup line has been fully tested and verified to meet the requirements of video data transmission. Second, the switch will check the data synchronization status between the primary and backup lines to ensure that no data loss or corruption occurs during the switching process. Finally, the switch will notify all systems or devices that rely on the transmission line to ensure that they can recognize and adapt to the new transmission line.
[0108] Once the switching conditions are met, the switch will quickly perform the switching operation. It will switch the transmission of video data from the main transmission line to the backup transmission line, while ensuring that the switching process is smooth and seamless. During the switching process, the switch will keep monitoring the two lines to ensure smooth switching and stable transmission quality.
[0109] After the switch is completed, the switch will continue to monitor the backup transmission line to ensure that it can work normally and meet the transmission requirements. At the same time, it will continue to monitor the status of the main transmission line so that it can switch back to the main line in time after the main line is restored, thereby optimizing the utilization of network resources.
[0110] In addition, the switch will also record all steps and results of the switching process, including the switching time, reason, performance indicators of the backup line, etc. This information is of great reference value for subsequent troubleshooting, performance analysis and network optimization.
[0111] In summary, step 204 is a key step to ensure continuous and stable transmission of video data. By continuously monitoring the status of the main transmission line, setting reasonable thresholds, performing detailed inspections and preparations, and quickly performing switching operations, the switch can effectively respond to network failures and performance degradation, thereby ensuring the transmission quality of video data and the stability of the system.
[0112] Further, step 204 describes in detail the process of switching to the backup transmission line when the primary transmission line cannot meet the video data transmission requirements. However, the logic and details behind this switching mechanism are far more than that. In order to deeply understand this mechanism, the embodiment of the present invention takes the case of "no detection message received" as an example to show the execution process of switching the primary and backup transmission lines. The following is a detailed description of the specific execution process:
[0113] Step 301: monitor whether a preset number of detection messages can be continuously received through the main transmission line in each cycle.
[0114] In a complex network environment, the transmission stability of video data is crucial. To ensure this, the core task of step 301 is to comprehensively monitor the stability of the main transmission line, which is achieved by judging whether the switch can continuously receive a preset number of detection messages in each cycle. The detection message sending cycle can be set, such as 3.3ms, 10ms, 100ms, 1s, etc. These detection messages are not only used to detect the connectivity of the line, but also reflect key performance indicators such as the line transmission speed and packet loss rate.
[0115] Specifically, this monitoring process is not a simple one-time check, but is carried out continuously to ensure that the main transmission line can meet the transmission requirements of video data at any time. In the embodiment of the present invention, the switch on the stand-alone side is used as the monitoring subject, and the implementation method and logical flow of this monitoring mechanism are explained in detail.
[0116] 1. How to implement the monitoring mechanism.
[0117] In the process of monitoring the stability of the main transmission line, the switch, as a key node of data transmission, undertakes the important task of sending detection messages and receiving their responses. To achieve this goal, the switch will send a certain number of detection messages to the main transmission line in each preset time period. These detection messages are not only used to detect the connectivity of the line, but also indirectly reflect the performance indicators of the line such as transmission speed and packet loss rate.
[0118] Specifically, the probe message sent by the switch can contain a specific sequence number or timestamp so that when a response is received, the corresponding probe message can be accurately identified and matched. At the same time, the switch will also set a reasonable timeout period to wait for the response to the probe message. If a preset number of response messages are received within the specified time, and the sequence numbers or timestamps of these messages match the sent probe messages, then it can be considered that the main transmission line is currently in good working condition.
[0119] 2. Logical flow of the monitoring mechanism.
[0120] Initialize monitoring parameters: The switch will first set reasonable key parameters such as monitoring cycle, number of detection messages, timeout time, etc. according to actual needs.
[0121] Sending detection messages: In each preset monitoring period, the switch will send detection messages to the primary transmission line according to the set number.
[0122] Receive and process response messages: After sending a probe message, the switch will wait for its response. If a preset number of response messages are received within a specified time, and the sequence numbers or timestamps of these messages match the sent probe message, the switch will assume that the main transmission line is currently in good working condition and can support normal transmission of video data.
[0123] Determine line status: If the switch finds that it cannot continuously receive the preset number of probe message responses in each cycle, or the received response messages have obvious sequence number or timestamp mismatches, then it can be determined that there may be a problem with the main transmission line, such as network congestion, equipment failure, or line interruption.
[0124] Triggering the switching mechanism: Once it is determined that there is a problem with the main transmission line, the switch will immediately trigger the subsequent switching mechanism to transfer the transmission task from the main transmission line that may have problems to the backup transmission line to ensure continuous and stable transmission of video data.
[0125] Continuous monitoring and switching back to the main line: After switching to the backup transmission line, the switch will continue to monitor the status of the main transmission line. If the main line is restored and meets the transmission requirements, the switch will switch back to the main line at the appropriate time to optimize the utilization of network resources.
[0126] In summary, by sending detection messages and receiving responses in each preset period, the switch can continuously monitor the stability of the main transmission line. This monitoring mechanism can not only effectively evaluate the current status of the line, but also trigger the switching mechanism in time when problems are found, ensuring continuous and stable transmission of video data.
[0127] In addition, another detection method can be adopted in the embodiment of the present invention, where the switch on the stand-alone side is still used as the monitoring subject, but the central device (such as the switch) on the center side is used as the sender, and detection messages are sent to the stand-alone side regularly. It should be particularly noted that the central device only sends detection messages and does not perform detection and link failure judgment. The switch on the stand-alone side is the receiver, responsible for detecting these detection messages, and judging the state of the main transmission line according to the receiving situation. If the switch on the stand-alone side can continuously and stably receive the detection message from the center side, then it can be considered that the main transmission line is currently in a good working state. On the contrary, if the switch on the stand-alone side does not receive a sufficient number of detection messages within a preset time, or the received detection message is abnormal (such as sequence number mismatch, check error, etc.), then it can be judged that there may be a problem with the main transmission line, and corresponding measures (such as switching to a backup transmission line) need to be taken to ensure continuous and stable transmission of data.
[0128] In general, by monitoring the reception of detection messages, when there is a problem with the reception, the switch will immediately trigger the subsequent switching mechanism to transfer the transmission task from the main transmission line that may have problems to the backup transmission line to ensure the continuous and stable transmission of video data. At the same time, the switch will continue to monitor the status of the main transmission line so that when it recovers and meets the transmission requirements, it can switch back to the main transmission line in time to optimize the utilization of network resources.
[0129] In summary, the comprehensive monitoring of the stability of the main transmission line in step 301 is an important prerequisite for ensuring continuous and stable transmission of video data, and is also the basis for the subsequent switching mechanism, namely step 302, to be effectively implemented.
[0130] Step 302: Switch to the backup transmission line to transmit video data, and keep monitoring the line status of the main transmission line.
[0131] When it is found in step 301 that the main transmission line cannot continuously receive the preset number of detection messages in each cycle, it indicates that there may be a problem with the main transmission line and it cannot meet the current video data transmission requirements. At this time, this step will be entered to ensure the continuity and stability of the video data.
[0132] In this step, the specific process of switching to the backup transmission line so that the backup transmission line transmits the video data as the target transmission line includes:
[0133] Step 1: Stop sending new video data through the main transmission line.
[0134] In the data transmission maintenance process, when potential problems or failures are detected on the main transmission line, it is crucial to take timely response measures. The following is an analysis of this step:
[0135] First, the switch stops sending new video data to the active transmission line to immediately stop the risk of further data loss or damage that may be caused by line problems. This measure not only helps to protect the integrity of the data packets currently being transmitted, but also ensures that there is no possibility of increased transmission interruption by continuing to send new data before switching to the backup transmission line.
[0136] Secondly, suspending the sending of new data is to make full preparations for the subsequent switching to the backup transmission line. During the switching process, the switch needs to ensure the continuity and stability of data transmission, and suspending the sending of new data can reduce the data transmission burden during the switching process, allowing the switch to transition to the backup transmission line more smoothly.
[0137] At the same time, pausing the sending of new data also helps optimize system resources and performance. Before switching to the backup transmission line, the switch can release some resources to handle the current data transmission task and prepare to re-establish the data transmission flow on the backup transmission line. This not only improves the utilization efficiency of resources, but also ensures the performance of the switch after the switch.
[0138] It is worth noting that after suspending the sending of new data, it is necessary to ensure that the data on the main transmission line that has not been received by the center side can be properly cached. These cached data can be retransmitted or continued to be transmitted according to the system strategy after switching to the backup transmission line to ensure the continuity and integrity of the data.
[0139] Finally, before or after suspending the sending of new data, all relevant receiving ends or the central side need to be notified to avoid confusion or data loss at the receiving end due to sudden data interruption. This notification can include information about the backup transmission line so that the receiving end can adjust the receiving strategy in time to ensure that data is received from the backup transmission line.
[0140] Taking the example of suspending the sending of new data, a message containing the backup transmission line information is generated and sent to the center side, that is, entering step 2.
[0141] Step 2: Generate a message containing backup transmission line information and send it to the center side.
[0142] After stopping sending new data to the primary transmission line in step 1, the switch generates a message containing information about the backup transmission line and sends it to the central side. This step ensures that the central side can be informed of the problem of the primary transmission line in a timely manner and is ready to receive data from the backup transmission line. At the same time, this also provides the necessary configuration information for subsequent switching and data transmission.
[0143] The message content needs to be designed to include enough information to ensure that the center side can accurately understand the problem with the primary transmission line and the configuration of the backup transmission line. Specifically, the message should contain the following key information: The identifier of the backup transmission line, which is used to uniquely identify the backup transmission line so that the center side can accurately identify and configure it. The configuration parameters of the backup transmission line, including key parameters such as IP address, port number, and transmission protocol. This information is crucial for the center side to establish a connection with the backup transmission line. Switching instructions and status information clearly instruct the center side to perform the switching operation and provide status information of the current primary transmission line so that the center side understands the severity and urgency of the problem. Other relevant information, such as the switching timestamp, switching reason, and expected recovery time, etc., can help the center side better understand the background and progress of the switch.
[0144] After the message is generated, it needs to be sent to the central side. In order to ensure the reliable transmission of the message, a reliable communication protocol such as TCP / IP is usually adopted, in which one or more fields can be defined in the data packet of the communication protocol to specifically store the information of the backup transmission line. This information can include the IP address, port number, transmission protocol type, etc. of the backup line. At the same time, it is necessary to wait for confirmation feedback from the central side to ensure that the message has been successfully received and understood. This confirmation feedback is crucial for subsequent data transmission and switching operations.
[0145] The timing of message generation and sending is also a key factor to consider. After pausing the sending of new data in step 1, the message should be generated and sent as soon as possible so that the central side can understand the situation and respond in time. At the same time, it is also necessary to ensure that the central side is ready to receive data from the backup transmission line before switching to the backup transmission line.
[0146] In order to ensure that the message is not tampered with or lost, encryption and verification techniques can be used. Encryption can ensure the confidentiality and integrity of the message during transmission, while verification can ensure that the message can be correctly parsed and verified at the receiving end.
[0147] In summary, step 2, "generating a message containing backup transmission line information and sending it to the central side", plays a crucial role in the entire switching process. It not only ensures that the central side can promptly learn about the problems of the main transmission line and be ready to receive data from the backup transmission line, but also provides the necessary configuration information for subsequent switching and data transmission. Through the designed message content, reliable communication protocol, timely transmission and confirmation, appropriate transmission timing, and safe technical means, it is possible to switch to the backup transmission line more smoothly and ensure the continuity and stability of data transmission.
[0148] Step 3: After receiving the confirmation feedback from the center side, the video data is transmitted on the backup transmission line.
[0149] In step 2, the switch has generated and sent a message containing the backup transmission line information to the central side. This step is to let the central side understand the problem of the main transmission line and be ready to receive data from the backup transmission line. The confirmation feedback from the central side is an important response in this process. It indicates that the central side has successfully received the message and understood the configuration information of the backup transmission line, and is ready to receive data. The following is a detailed analysis of this step, especially including the cache processing. Network configuration, serial number identification and other key elements.
[0150] (1) Buffering video data frames that have been transmitted through the main transmission line but not received by the center side.
[0151] Before switching to the backup transmission line, it is necessary to cache the video data frames that have been transmitted through the main transmission line but have not yet been received by the central side. This is to ensure that no data is lost during the switching process and to ensure data continuity and integrity.
[0152] The buffer mechanism may be a temporary storage area for storing these data frames to be confirmed until the central side confirms receipt or timeout processing occurs.
[0153] A video data frame is the basic unit of video data. It is defined as a single static image in a video, or an image at a specific moment in a video stream. A dynamic video is formed by combining temporally continuous frame sequences. Video data frames have the characteristics of static (each frame is a static image and does not contain dynamic information, but will produce dynamic effects when played continuously), continuity (video frames are continuous in time, which ensures smooth video playback), and data volume (each video frame consists of multiple pixels, each pixel contains color information (such as RGB values), so the data volume of the original video frame is large. For the convenience of storage and transmission, video frames are usually compressed.)
[0154] (2) When it is confirmed that the target transmission line for transmitting the video data is switched to the backup transmission line, the backup transmission line is configured to adapt to the video data transmission.
[0155] After confirming that the target transmission line for transmitting video data has been switched to the backup transmission line, it is necessary to perform necessary network configuration on the backup transmission line, including setting parameters such as IP address, port number, and transmission protocol to ensure that the backup transmission line can correctly receive and transmit video data.
[0156] The network configuration process should be as fast and accurate as possible to reduce data loss and delay during the switching process.
[0157] (3) The cached video data frames and the newly received video data frames are marked with serial numbers and transmitted through the standby transmission line. The serial number marks are used to indicate the sending order of each data frame.
[0158] In order to ensure the order and integrity of the video data frames during transmission, the cached video data frames and the newly received video data frames need to be identified with sequence numbers. The sequence number is a unique identifier that indicates the order in which each data frame is sent.
[0159] The sequence number identifier can be an increasing number or a timestamp, which should be transmitted with each data frame so that the central side can reassemble and play the video data in the correct order.
[0160] After the network configuration and sequence number identification are completed, the video data can be transmitted through the backup transmission line. This includes buffered data frames and newly received data frames.
[0161] During the transmission process, the transmission status should be monitored to ensure that the data can be transmitted to the center side correctly and continuously.
[0162] When all buffered data frames have been successfully transmitted to the central side, and the central side has confirmed receipt of all data frames, the switching process can be considered to be completed.
[0163] At this point, the switch completely releases the buffer resources and continues to transmit new video data through the backup transmission line.
[0164] In summary, step 3, "transmitting video data on the backup transmission line after receiving confirmation feedback from the center side", is a complex and critical process. It involves multiple links such as cache processing, network configuration, serial number identification and transmission. By designing and implementing these links, it can be ensured that after switching to the backup transmission line, the video data can be continuously and completely transmitted to the center side.
[0165] Step 4: monitor the line status of the main transmission line. When the line status of the main transmission line meets the transmission requirements, switch back to the main transmission line to transmit video data.
[0166] In communication and data transmission systems, in order to improve the reliability and stability of the system, a backup transmission line is usually used in conjunction with the main transmission line. When the main transmission line fails or cannot meet the transmission requirements, it will automatically switch to the backup transmission line to ensure the continuity of data transmission. When the main transmission line returns to normal, it will switch back to the main transmission line again. The following is a detailed analysis of step four:
[0167] The methods for monitoring the line status of the main transmission line include: Hardware monitoring: using special hardware equipment, such as network traffic monitors, line quality analyzers, etc., to monitor the main transmission line in real time. Software monitoring: collecting and analyzing line status data through monitoring software installed on network equipment, such as SNMP (Simple Network Management Protocol) agents, network performance monitoring tools, etc. Regular testing: regularly sending test data packets to the main transmission line and detecting the returned data packets to evaluate performance indicators such as line connectivity, bandwidth, delay and packet loss rate.
[0168] The monitoring contents include: connectivity, that is, ensuring that the line is connected and can transmit data normally. Bandwidth, that is, monitoring the available bandwidth of the line to ensure that the bandwidth requirements of video data transmission are met. Latency, that is, measuring the transmission time of the data packet from the sender to the receiver to ensure that the delay is within an acceptable range. Packet loss rate, that is, counting the proportion of data packets lost during the transmission process to ensure that the packet loss rate is below the threshold.
[0169] According to the specific requirements of video data transmission, a threshold is set for each transmission requirement parameter (such as bandwidth, delay, packet loss rate, etc.). When the monitored line status parameter is lower than (or higher than, depending on the nature of the parameter) the threshold, the line is considered to meet the transmission requirements.
[0170] When it is monitored that the line status of the main transmission line meets the transmission requirements, the line status is evaluated whether it continues to meet the transmission requirements within the preset protection period starting from the current moment. Here, the main purpose of setting the preset protection period is to provide an additional observation period when the main transmission line has just been restored or meets the transmission requirements to ensure that the line status is stable and continuous. This helps to avoid false switching due to short-term, intermittent performance improvements, and also avoids the ping-pong effect, that is, frequent switching between the main and backup networks due to network instability, thereby ensuring the continuity and quality of data transmission. The length of the protection period should be determined based on the specific application scenario, system requirements, and historical data. Usually, this length will be long enough to cover possible short-term performance fluctuations, but not too long to avoid delaying necessary switching operations. The trigger condition of the protection period is usually that the line status of the main transmission line is monitored to meet the transmission requirements. This includes key performance indicators such as bandwidth, latency, and packet loss rate reaching or exceeding preset thresholds.
[0171] During the protection period, the main transmission line should continue to be monitored in real time. This includes collecting line status data, analyzing performance indicators, and triggering alarm mechanisms (if necessary). The collected line status data is then subjected to performance analysis to evaluate the continuity of the line status. This includes comparing performance indicators at different time points, detecting possible performance fluctuations or downward trends, etc. Based on the results of the performance analysis, a decision should be made whether to continue waiting or immediately switch back to the main transmission line. If the line status remains stable during the protection period and meets the transmission requirements, it can be considered that the line has been restored and can be used safely. Once the decision is made to switch back to the main transmission line, the corresponding switching operation should be performed. This includes updating the configuration of network equipment, adjusting the routing table, and notifying the center side to receive video data from the main transmission line.
[0172] In summary, in step 4, by setting the preset protection period and evaluating the continuity of the line status, it is possible to ensure safe switching back to the primary transmission line after the primary transmission line recovers stability, reduce the risk of false switching, and thus ensure the continuity and quality of data transmission.
[0173] Furthermore, in the above embodiment, the transmission process when the service data type is video data has been outlined and specifically described. Then, in the embodiment of the present invention, a transmission process of PLC control data is also provided. Figure 4 As shown, the detailed steps for the PLC data transmission method are as follows:
[0174] Step 401: Obtain the remaining transmission bandwidth of each transmission line.
[0175] For the specific process, please refer to step 201.
[0176] Step 402: Compare the transmission bandwidth requirement and the remaining transmission bandwidth to determine the available transmission lines and the number of available transmission lines that are sufficient for transmitting PLC data.
[0177] The specific process refers to step 202. It should be noted that the transmission method for PLC data in the embodiment of the present invention is parallel redundancy, that is, multiple available transmission lines will be used as the target transmission line to transmit the same PLC data. Therefore, in this step, it is necessary to determine the number of available transmission lines so as to copy the PLC data according to the number.
[0178] Step 403: If there are multiple available transmission lines, the PLC data is copied in equal amounts according to the number of available transmission lines to generate copies of the PLC data.
[0179] In this step, the PLC data is replicated in equal amounts according to the number of available transmission lines. This means that if there are N available transmission lines, then N copies of the PLC data need to be generated. The purpose of generating copies of the PLC data is to ensure that each transmission line can transmit the same data. This is usually done to improve the reliability and redundancy of data transmission to prevent data loss or transmission interruption when a line fails. It should be noted that when replicating PLC data, the integrity and consistency of the data need to be ensured to avoid unnecessary network load due to data replication.
[0180] Once the copies of the PLC data are generated, the copies can be distributed to different transmission lines for transmission, which involves specific operations such as data packaging, routing and sending, that is, proceeding to step 404.
[0181] In summary, step 403 is a PLC data processing operation performed to improve the reliability and redundancy of data transmission when multiple transmission lines are available. It involves multiple links such as data replication, distribution and subsequent transmission, and needs to comprehensively consider multiple factors such as data integrity, consistency, transmission efficiency and bandwidth utilization.
[0182] Step 404: Allocate the PLC data and the replica to all available transmission lines simultaneously, so that each available transmission line is a target transmission line to carry the transmission of the PLC data or the replica of the PLC data.
[0183] In this step, all available transmission lines are regarded as target transmission lines, which means that each line is responsible for transmitting a part of the PLC data or its copy. In the embodiment of the present invention, the same data and the copy are simultaneously allocated to all available transmission lines and transmitted to the center side.
[0184] By distributing PLC data and its copies to all available transmission lines, parallel transmission of data is achieved. This can significantly improve the throughput and reliability of data transmission, because even if a line fails, other lines can still continue to transmit data.
[0185] The above steps 401-404 introduce the situation where each line transmits a complete copy of the data when the data is not segmented. Next, a situation where the data is segmented into multiple parts for parallel transmission is introduced. This situation is suitable for processing large amounts of data or for improving transmission efficiency. Specifically, the original data is segmented into multiple smaller data blocks or parts. This process can be performed based on the structure, size and transmission requirements of the data. The purpose of data segmentation is to split large data sets into smaller blocks that are easier to manage and transmit, thereby optimizing the transmission process.
[0186] Here is a specific example of data being split into multiple parts and transmitted in parallel:
[0187] Suppose a large scientific research institution is conducting a study on climate change, which requires collecting and analyzing meteorological data from all over the world. Due to the huge amount of data, the scientific research institution decides to adopt a parallel transmission strategy to speed up data transmission.
[0188] Data segmentation: First, the meteorological data is segmented into multiple smaller data blocks. These data blocks may include observation data from different time periods, data from different locations, or different types of observation data (such as temperature, humidity, wind speed, etc.).
[0189] Transmission line allocation: Scientific research institutions have multiple high-speed transmission lines connected to different data centers. In order to ensure the efficiency and reliability of data transmission, they allocate these data blocks to different transmission lines for parallel transmission.
[0190] Parallel transmission process: During the transmission process, each data block is transmitted independently on the corresponding transmission line. Since multiple lines work at the same time, the transmission of the entire data set can be completed in a shorter time.
[0191] Through parallel transmission, scientific research institutions can significantly speed up the transmission of meteorological data. This helps them acquire and analyze data faster, so that scientific decisions can be made faster. Because the data is divided into multiple parts for transmission, even if a transmission line fails or performance degrades, other lines can still continue to transmit data. This increases the reliability of data transmission and reduces the risk of data loss.
[0192] In summary, data is divided into multiple parts for parallel transmission, which is an effective data transmission strategy. In this example, it helps scientific research institutions speed up the transmission of meteorological data and improve the efficiency and quality of research.
[0193] In order to determine whether the central side has received the PLC data transmitted by the switch on the stand-alone side, a timeout threshold judgment mechanism needs to be set. Specifically, it is determined whether the confirmation information issued by the central side can be obtained within the timeout threshold. The timeout threshold is the maximum waiting time allowed for the transmission of PLC data or copies. The confirmation information is the feedback issued by the central side after receiving the PLC data or copies through any available transmission line; if the feedback can be received, it means that the PLC data and copies have been successfully transmitted and received by the central side, and the process continues or ends (according to the specific business logic); if the feedback cannot be received, after the confirmation information is not received after continuous retries exceeding the preset number of times, an early warning message is issued. This can be achieved through logging, sending emails, triggering alarm systems, etc., depending on the system design and business requirements.
[0194] After step 404, the switch will decide whether to retry or issue an early warning message based on whether the confirmation message is received. This process ensures the reliability and timeliness of data transmission and provides countermeasures when problems occur.
[0195] In the above steps 401-404, PLC data parallel redundant transmission achieves resource optimization, transmission reliability improvement, efficiency acceleration and fault warning through dynamic bandwidth allocation, multi-line copy transmission, data segmentation parallel processing and timeout confirmation mechanism, while ensuring data integrity and system scalability.
[0196] Further, based on the same inventive concept, as a Figure 1 To implement the method embodiment, the present invention also provides a data transmission device. The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can implement all the contents of the aforementioned method embodiment. Figure 5 As shown, the device includes: a receiving unit 51, a matching unit 52, and a selecting unit 53.
[0197] The receiving unit 51 is used to receive the service data and parse the transmission information of the service data, where the transmission information includes an identifier for distinguishing the type of service data and a transmission bandwidth requirement for transmitting the service data;
[0198] A matching unit 52, configured to match multiple transmission lines and transmission strategies of the service data in a preset transmission configuration file using the identifier in the receiving unit 51;
[0199] The selection unit 53 is used to select a target transmission line from the multiple transmission lines based on the transmission bandwidth requirement of the receiving unit 51 and the transmission strategy of the matching unit 52, so as to transmit the service data using the target transmission line.
[0200] Furthermore, the embodiment of the present invention also provides a material distribution coordination device for Figure 1-3 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 6 As shown, the device includes: a receiving unit 51, a matching unit 52 and a selecting unit 53.
[0201] like Figure 6 As shown, in an optional implementation manner, when the service data is video data, the selection unit 53 includes:
[0202] A first acquisition module 531 is used to acquire the remaining transmission bandwidth of each transmission line;
[0203] A first comparison module 532 is used to compare the transmission bandwidth requirement and the remaining transmission bandwidth obtained in the first acquisition module 531 to determine an available transmission line that satisfies the transmission of video data;
[0204] A selection module 533 is configured to select, if there are multiple available transmission lines determined in the first comparison module 532, one with the smallest transmission load as a primary transmission line, and the others as backup transmission lines, wherein the primary transmission line is a target transmission line to carry the transmission of video data;
[0205] The monitoring module 534 is used to monitor the status of the main transmission line selected in the selection module 533. When the main transmission line does not meet the transmission requirements of the video data, it switches to the backup transmission line so that the backup transmission line transmits the video data as the target transmission line.
[0206] Furthermore, the monitoring module 534 includes:
[0207] The monitoring submodule 5341 is used to monitor whether a preset number of detection messages can be continuously received through the main transmission line in each cycle;
[0208] The switching submodule 5342 is used to switch to the backup transmission line to transmit the video data if the monitoring result of the monitoring submodule 5342 is unable, and keep monitoring the line status of the main transmission line.
[0209] Among them, when the switching submodule 5342 switches the backup transmission line to transmit video data, it is specifically used to: suspend sending new video data through the main transmission line; generate a message containing backup transmission line information and send it to the central side to notify the central side to receive video data from the backup transmission line; after receiving confirmation feedback from the central side, transmit the video data on the backup transmission line; monitor the line status of the main transmission line, and when the line status of the main transmission line meets the transmission requirements, switch back to the main transmission line to transmit the video data.
[0210] After receiving confirmation feedback from the central side, the video data is transmitted on the backup transmission line, including: caching the video data frames that have been transmitted through the main transmission line but not received by the central side; when it is confirmed that the target transmission line for transmitting the video data is switched to the backup transmission line, the network of the backup transmission line is configured to adapt to the video data transmission; the cached video data frames and the newly received video data frames are serially identified and transmitted through the backup transmission line, and the serial number identification is used to indicate the sending order of each data frame.
[0211] The line status of the main transmission line is monitored, and when the line status of the main transmission line meets the transmission requirements, switching back to the main transmission line to transmit video data includes: when it is monitored that the line status of the main transmission line meets the transmission requirements, evaluating whether the line status continues to meet the transmission requirements within a preset protection period starting from the current moment; if so, switching back to the main transmission line to transmit video data after the preset protection period ends, and notifying the center side to receive video data from the main transmission line.
[0212] Furthermore, the embodiment of the present invention also provides a material distribution coordination device for Figure 1 , 4 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 7 As shown, the device includes: a receiving unit 51, a matching unit 52 and a selecting unit 53.
[0213] like Figure 7 As shown, in an optional implementation manner, when the service data is video data, the selection unit 53 includes:
[0214] The second acquisition module 535 is used to acquire the remaining transmission bandwidth of each transmission line;
[0215] A second comparison module 536 is used to compare the transmission bandwidth requirement and the remaining transmission bandwidth obtained in the second acquisition module 535, and determine the available transmission lines and the number of available transmission lines that meet the requirements for transmitting PLC data;
[0216] a copy module 537, configured to copy the PLC data in equal amounts according to the number of available transmission lines to generate a copy of the PLC data if there are multiple available transmission lines determined in the second comparison module 536;
[0217] The allocation module 538 is used to allocate the PLC data and the copies in the replication module 537 to all available transmission lines at the same time, so that each available transmission line is a target transmission line to carry the transmission of the PLC data or the copies of the PLC data.
[0218] Furthermore, an embodiment of the present invention also provides an electronic device, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the data transmission method.
[0219] Furthermore, an embodiment of the present invention also provides a readable storage medium, which is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the data transmission method.
[0220] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: The method comprises: receiving service data, and parsing transmission information of the service data, wherein the transmission information includes an identifier for distinguishing types of service data and a transmission bandwidth requirement for transmitting the service data; Using the identifier to match multiple transmission lines and transmission strategies of the service data in a preset transmission configuration file; Based on the transmission bandwidth requirement and the transmission strategy, a target transmission line is selected from the plurality of transmission lines, so as to transmit the service data using the target transmission line.
2. The method according to claim 1, characterized in that If the identifier indicates that the type of the service data is video data, based on the transmission bandwidth requirement and the transmission strategy, selecting a target transmission line from the plurality of transmission lines to transmit the service data using the target transmission line includes: Obtaining the remaining transmission bandwidth of each of the transmission lines; Comparing the transmission bandwidth requirement with the remaining transmission bandwidth, and determining an available transmission line that satisfies the transmission of the video data; If there are multiple available transmission lines, the one with the smallest transmission load is selected as the main transmission line, and the others are backup transmission lines, wherein the main transmission line is the target transmission line to carry the transmission of video data; The state of the main transmission line is monitored, and when the main transmission line does not meet the transmission requirements of the video data, the backup transmission line is switched to make the backup transmission line the target transmission line to transmit the video data.
3. The method according to claim 2, characterized in that Monitoring the state of the main transmission line, and when the main transmission line does not meet the transmission requirements of the video data, switching to the backup transmission line so that the backup transmission line is used as the target transmission line to transmit the video data, includes: Monitoring whether a preset number of detection messages can be continuously received through the main transmission line in each cycle; If not, switch to the backup transmission line to transmit the video data, and keep monitoring the line status of the main transmission line.
4. The method according to claim 3, characterized in that Switching to the backup transmission line to transmit the video data and keeping monitoring the line status of the main transmission line includes: suspending sending new video data through the primary transmission line; generating a message including the backup transmission line information and sending it to the central side to notify the central side to receive the video data from the backup transmission line; After receiving the confirmation feedback from the center side, transmitting the video data on the backup transmission line; The line state of the main transmission line is monitored, and when the line state of the main transmission line meets the transmission requirement, the main transmission line is switched back to transmit the video data.
5. The method according to claim 4, characterized in that After receiving the confirmation feedback from the center side, transmitting the video data on the backup transmission line includes: Buffering video data frames that have been transmitted through the main transmission line but not received by the center side; When it is confirmed that the target transmission line for transmitting the video data is switched to the backup transmission line, performing network configuration on the backup transmission line to adapt to the transmission of the video data; The cached video data frames and newly received video data frames are marked with serial numbers and transmitted through the standby transmission line, wherein the serial number marks are used to indicate the transmission order of each data frame.
6. The method according to claim 4, characterized in that Monitoring the line state of the main transmission line, and when the line state of the main transmission line meets the transmission requirement, switching back to the main transmission line to transmit the video data, includes: When it is monitored that the line state of the main transmission line meets the transmission requirement, within a preset protection period starting from the current moment, evaluating whether the line state continues to meet the transmission requirement; If so, after the preset protection period ends, the main transmission line is switched back to transmit the video data, and the center is notified to receive the video data from the main transmission line.
7. The method according to claim 1, characterized in that If the identifier indicates that the type of the service data is PLC data, the PLC data is device status data generated when the PLC control system is running, based on the transmission bandwidth requirement and the transmission strategy, a target transmission line is selected from the plurality of transmission lines to transmit the service data using the target transmission line, including: Obtaining the remaining transmission bandwidth of each of the transmission lines; Compare the transmission bandwidth requirement and the remaining transmission bandwidth to determine available transmission lines and the number of available transmission lines that are sufficient for transmitting the PLC data; If there are multiple available transmission lines, copying the PLC data in equal amounts according to the number of available transmission lines to generate copies of the PLC data; The PLC data and the replica are simultaneously distributed to all the available transmission lines, so that each of the available transmission lines is the target transmission line to carry the transmission of the PLC data or the replica of the PLC data.
8. A data transmission device, characterized in that: The device comprises: A receiving unit, configured to receive service data and parse transmission information of the service data, wherein the transmission information includes an identifier for distinguishing types of service data and a transmission bandwidth requirement for transmitting the service data; A matching unit, configured to match the plurality of transmission lines and transmission strategies of the service data in a preset transmission configuration file using the identifier in the receiving unit; The selection unit is used to select a target transmission line from the plurality of transmission lines based on the transmission bandwidth requirement of the receiving unit and the transmission strategy of the matching unit, so as to transmit the service data using the target transmission line.
9. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the data transmission method described in any one of claims 1-7.
10. A readable storage medium, characterized in that: The storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the data transmission method according to any one of claims 1 to 7.
