Dual-network communication transmission method and apparatus, device, and storage medium
Patent Information
- Application Number
- CN202611283434.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]本发明的主要目的在于提供了一种双网通信传输方法、装置、设备及存储介质,旨在解决现有双网通信方案,因数据传输任务固定分配且仅在网络完全中断时才调整传输方式,而导致无法及时应对通信质量波动、数据传输可靠性不高的问题
本发明实施例在双网通信场景中,通过实时采集第一网络和第二网络的通信质量参数并分别确定第一通信质量等级和第二通信质量等级,使得通信质量的波动能够被及时感知,而无需等待网络完全中断才做出反应。当任一网络的通信质量等级低于预设等级阈值时,第一设备根据两个网络的通信质量等级,自适应地确定第一目标数据和第二目标数据各自的目标传输方式,从而在通信质量发生波动时能够及时调整数据传输方式,克服了现有技术中因数据传输任务固定分配且仅在网络完全中断时才调整而导致无法及时应对通信质量波动的技术缺陷,有效提高了双网通信的数据传输可靠性。
Smart Images

Figure CN122802446A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy storage technology, and in particular to a dual-network communication transmission method, apparatus, equipment, and storage medium. Background Technology
[0002] Currently, in energy storage BMS (Battery Management System), the central control device communicates with multiple master control devices via dual networks, namely CAN bus and Ethernet. Fixed data transmission tasks are pre-assigned to CAN bus and Ethernet. CAN bus is used to transmit data with high real-time requirements, while Ethernet is used to transmit large amounts of data.
[0003] Although the above scheme can achieve data classification and transmission by pre-assigning different types of data transmission tasks to different transmission networks, the data transmission tasks of each transmission network are fixed and the transmission mode is only adjusted when the network is completely interrupted. Therefore, when communication quality fluctuates, it cannot respond in time, resulting in low reliability of data transmission. Summary of the Invention
[0004] The main objective of this invention is to provide a dual-network communication transmission method, apparatus, device, and storage medium, which aims to solve the problems of existing dual-network communication schemes, which suffer from the inability to respond promptly to fluctuations in communication quality and low reliability of data transmission because the data transmission tasks are fixedly allocated and the transmission mode is only adjusted when the network is completely interrupted.
[0005] In a first aspect, embodiments of the present invention provide a dual-network communication transmission method, the method being applied to a first device, the first device communicating with at least one second device via a first network and a second network, the method comprising: Based on the communication quality parameters of the first network and the second network, a first communication quality level of the first network and a second communication quality level of the second network are determined respectively; wherein, the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. If at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data are determined based on the first communication quality level and the second communication quality level; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission method and the second target transmission method are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The first target data and the second target data are transmitted through the first target transmission method and the second target transmission method, respectively.
[0006] In a second aspect, embodiments of the present invention provide a dual-network communication transmission device, the device being applied to a first device, the first device communicating with at least one second device via a first network and a second network, the device comprising: The first determining module is used to determine a first communication quality level of the first network and a second communication quality level of the second network based on the communication quality parameters of the first network and the second network, respectively; wherein the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. The second determining module is configured to, when at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, determine, based on the first communication quality level and the second communication quality level, a first target transmission mode corresponding to the first target data and a second target transmission mode corresponding to the second target data; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission mode and the second target transmission mode are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The transmission module is used to transmit the first target data and the second target data respectively through the first target transmission method and the second target transmission method.
[0007] Thirdly, embodiments of the present invention provide an electronic device, including: a processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method described in the first aspect above.
[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.
[0009] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0010] The at least one technical solution provided by the embodiments of the present invention can achieve the following technical effects: In a dual-network communication scenario, this invention collects communication quality parameters of the first and second networks in real time and determines the first and second communication quality levels, respectively. This allows fluctuations in communication quality to be detected promptly without waiting for a complete network outage. When the communication quality level of either network falls below a preset threshold, the first device adaptively determines the target transmission methods for the first and second target data based on the communication quality levels of both networks. This enables timely adjustment of the data transmission method when communication quality fluctuates, overcoming the technical shortcomings of existing technologies where data transmission tasks are fixedly allocated and adjustments are only made when the network is completely interrupted, thus failing to respond promptly to communication quality fluctuations. This effectively improves the reliability of data transmission in dual-network communication. Attached Figure Description
[0011] Figure 1 This is one of the flowcharts illustrating the dual-network communication transmission method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the network topology of the dual-network communication transmission method provided in an embodiment of the present invention; Figure 3 A schematic diagram of the RJ45 connector pin definition for the dual-network communication transmission method provided in this embodiment of the invention; Figure 4 This is a second schematic flowchart of the dual-network communication transmission method provided in an embodiment of the present invention; Figure 5 A schematic diagram of the module composition of the dual-network communication transmission device 500 provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0013] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0014] Please see Figure 1 , Figure 1 This is one of the flowcharts illustrating a dual-network communication transmission method provided in an embodiment of the present invention. The method is applied to a first device, which communicates with at least one second device through a first network and a second network, such as... Figure 1 As shown, the method includes the following steps: Step 102: Determine the first communication quality level of the first network and the second communication quality level of the second network based on the communication quality parameters of the first network and the second network, respectively; wherein, the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network.
[0015] Step 104: If at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, determine the first target transmission method corresponding to the first target data and the second target transmission method corresponding to the second target data according to the first communication quality level and the second communication quality level; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission method and the second target transmission method are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network.
[0016] Step 106: Transmit the first target data and the second target data respectively through the first target transmission method and the second target transmission method.
[0017] In this embodiment of the invention, the first device can determine a first communication quality level for the first network and a second communication quality level for the second network based on the communication quality parameters of the first network and the second network, respectively. The real-time performance of the first network can be higher than that of the second network. The bandwidth of the second network can be higher than that of the first network. The first and second networks are independent at the communication protocol level, each possessing its own independent protocol stack and communication mechanism. At the physical level, the first and second networks can use independent physical transmission media or share the same physical transmission medium. For example, different pins of the same RJ45 connector can carry signals from the first and second networks respectively, but these two signals are electrically isolated from each other. That is, the independence of the first and second networks at the protocol level is not affected by the sharing of the physical medium.
[0018] In one example, taking an energy storage BMS scenario, the first device can be a BAU (Battery Array Management Unit), which is the central control unit of the energy storage BMS, and the second device can be a BCU (Battery Cluster Unit), which is the main control unit of the energy storage BMS. The BAU, as the central controller of the entire battery array in the energy storage BMS, can manage multiple BCUs, each managing one battery cluster. The BAU and each BCU can establish a dual-network communication connection through a first network and a second network. The first network can be a CAN bus, and the second network can be an Ethernet network. The CAN bus has higher real-time performance than Ethernet, making it suitable for transmitting data with strict response time requirements; Ethernet has higher bandwidth than the CAN bus, making it suitable for transmitting larger amounts of data.
[0019] For example, see Figure 2 This illustrates a network topology diagram of a first device and a second device. Figure 2 As shown, the first device has an ETH1 interface. Each second device, such as second device 1, second device 2 to second device n, has a first network interface JR1 and a second network interface JR2, respectively. Multiple second devices can be connected in a cascaded manner. The first device connects to the JR1 interface of the first second device via its ETH1 interface. The JR2 interface of the first second device connects to the JR1 interface of the next second device, and so on, forming a cascaded topology. Each interface (ETH1, JR1, JR2) uses an RJ45 connector to simultaneously carry both first and second network signals at the physical layer.
[0020] For pin definitions of the RJ45 connector, please refer to, for example, [link to documentation]. Figure 3 And Table 1. Among them, Figure 3This example provides a schematic diagram of the pin definitions for an RJ45 connector. Table 1 shows the pin definitions for the RJ45 connector. Table 1
[0021] like Figure 3 As shown in Table 1, the RJ45 connector is an 8-pin connector. The pin definitions for each interface are as follows: Pin 1 is ETH_TX+, Pin 2 is ETH_TX-, Pin 3 is ETH_RX+, Pin 4 is CAN1_H, Pin 5 is CAN1_L, Pin 6 is ETH_RX-, Pin 7 is empty, and Pin 8 is empty. From this pin definition, it can be seen that the same RJ45 connector can simultaneously carry both a first network signal and a second network signal: Pins 1, 2, 3, and 6 can be used for first network communication, and pins 4 and 5 can be used for second network communication. The two signals are electrically isolated from each other, and the independence of the first and second networks at the protocol level is not affected by the sharing of the physical medium. Through the above pin definitions, a first device can physically connect to multiple second devices, and a single physical cable can simultaneously provide communication channels for both the first and second networks.
[0022] The CAN bus signal lines in the JR1 and JR2 interfaces on the BCU side are connected to the same MCU and the same CAN transceiver inside the BCU. That is, CANH / CANL in JR1 and JR2 are actually two wiring ports led out in parallel from the same CAN bus node.
[0023] In one example, the first device can communicate with each of the second devices via the aforementioned physical connection, transmitting two types of data during the communication: first target data and second target data. The first target data can be data used for system operation, safety protection, and decision control, requiring high real-time performance. Specifically, it can include fault alarms, control commands, protection signals, and cluster-level summary data. This cluster-level summary data can include battery cluster data such as cluster SOC (State of Charge), cluster SOH (State of Health), cluster voltage, cluster current, and insulation resistance, as well as the highest temperature and corresponding number, lowest temperature and corresponding number, highest voltage and corresponding number, and lowest voltage and corresponding number for each cluster cell. The second target data can be detailed data of the battery system, with a larger data volume, specifically including the voltage, temperature, cell SOC, and cell SOH of each individual cell. Since the cluster-level summary data already contains key data for decision-making, such as cluster voltage, cluster current, battery voltage, and temperature extremes, the loss of the second target data will not affect system decision-making. In order to fully utilize the advantages of the high real-time performance of the first network and the high bandwidth of the second network, under the default state, that is, when both the first and second communication quality levels are not lower than the preset level threshold, the first target data can be transmitted through the first network and the second target data can be transmitted through the second network.
[0024] In one example, based on the default channel allocation mentioned above, the first device and the second device can interact with each other through the following three mechanisms: issuing control commands, data querying, and anomaly alarms.
[0025] The control command issuance mechanism can be used by the first device to actively write control parameters or execute action commands to the second device, such as powering on the system or disconnecting relays. The first device can generate control command data, including opcodes and operation parameters, based on EMS (Energy Management System) scheduling instructions or internal protection logic. This data is then encapsulated into downlink command frames according to a predetermined protocol format and sent to the second device via unicast or broadcast through the first or second network. The second device receives and parses the command frames, writes the data to the corresponding control register, and executes the corresponding hardware action. Control commands are considered primary target data and are transmitted via the first network by default.
[0026] A data query mechanism is used for the first device to obtain the battery operating parameters or status information collected by the second device on demand, which adopts a question-and-answer mode, that is, the first device sends a query frame, and the second device replies with a response frame. The first device constructs a query instruction frame according to the data object to be queried (including cluster-level summary data and detailed data), wherein the cluster-level summary data belongs to first target data, which is queried through the first network by default, while the detailed data belongs to second target data, which is queried through the second network by default. After receiving the query frame, the second device reads corresponding data from the local data register mapping table, encapsulates it into a response frame and replies, and the first device parses the response frame to obtain the queried parameters.
[0027] An abnormal alarm mechanism is used for the second device to actively push alarm information to the first device without waiting for the query instruction from the first device when an emergency fault is detected, which has high real-time performance and is not limited by the conventional reporting cycle. The second device collects local battery cluster status parameters in real time and performs fault diagnosis. When any parameter exceeds a preset safety threshold (such as overvoltage, overtemperature, overcurrent, insulation fault, etc.), an alarm event is triggered, the fault code and fault value are read from the local alarm register, an alarm reporting frame is actively constructed and broadcast and sent with the highest priority. After receiving the alarm information, the first device updates the local alarm record table and executes a linkage protection action according to a preset protection strategy. The alarm information belongs to first target data, which is transmitted through the first network by default.
[0028] In the above three interaction mechanisms, the second device maintains a unified data register mapping table internally, which includes at least three types of address intervals: a status register area, which is a read-only area storing cluster-level summary data and detailed data and refreshed by the second device at a fixed period; a control register area, which is a read-write area storing control instructions and setting parameters issued by the first device; an alarm and fault register area, which is a read-only area storing fault codes, fault values and alarm flag bits and updated by the second device in real time during fault detection. Through the register address mapping mechanism, the first device does not need to pay attention to the specific storage mode of internal data of the second device, and can complete data acquisition and control issuing only through standard read-write operations.
[0029] In the above data interaction process, the first device can continuously collect communication quality parameters of the first network and the second network to determine respective communication quality levels of the first network and the second network.
[0030] In one example, using CAN bus and Ethernet as the first and second networks, respectively, communication quality parameters for the CAN bus can include load rate, error frame rate, response latency, and number of offline nodes. The load rate can be obtained by reading the CAN controller register to reflect the current data transmission load of the CAN bus; the error frame rate can be obtained by reading the CAN error counter to reflect the proportion of frames with errors in CAN bus communication; the response latency can be obtained by timestamp measurement, i.e., the time interval from when the BAU sends a CAN frame to when it receives the corresponding reply; the number of offline nodes can be obtained through heartbeat timeout detection. When a BCU fails to reply with a heartbeat signal within a preset heartbeat cycle, it can be determined that the BCU is offline.
[0031] For Ethernet, communication quality parameters can include packet loss rate, response latency, and network connectivity status. Packet loss rate can be obtained using the heartbeat sequence number method or Ping detection, which calculates the proportion of lost packets based on the difference between the sequence number of the sent data packet and the sequence number of the received acknowledgment. Response latency can be measured using Ping RTT (Round Trip Time). Network connectivity status can be obtained through LINK status monitoring to determine whether the Ethernet physical link is in LINK UP or LINK DOWN state.
[0032] In one example, after obtaining the aforementioned communication quality parameters, the first device can determine the first communication quality level of the first network and the second communication quality level of the second network. Specifically, for the first network, each communication quality parameter of the first network can be matched with at least two preset parameter threshold intervals corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to all communication quality parameters of the first network is determined as the first communication quality level. For the second network, each communication quality parameter of the second network can be matched with at least two preset parameter threshold intervals corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to all the communication quality parameters of the second network is determined as the second communication quality level. That is, both the first and second communication quality levels depend on the worst-performing communication quality parameter in the corresponding network. If the parameter level of any one communication quality parameter deteriorates, the entire corresponding network is considered to have deteriorated.
[0033] In one example, the communication quality levels mentioned above, from highest to lowest, can be categorized as Good, Attention, and Critical. The Good level corresponds to a level not lower than a preset threshold, the Attention level corresponds to the first quality level, and the Critical level corresponds to the second quality level. The preset threshold indicates a communication quality better than the first quality level, and the first quality level indicates a communication quality better than the second quality level.
[0034] For example, taking CAN bus and Ethernet as the first and second networks, the specific level classification method can be as follows: For each communication quality parameter of the CAN bus, at least two preset parameter threshold ranges are set. Specifically, for load rate: less than 50% corresponds to a good level; 50% to 70% corresponds to a warning level; and greater than 70% corresponds to a severe level. For error frame rate: less than 1% corresponds to a good level; 1% to 3% corresponds to a warning level; and greater than 3% corresponds to a severe level. For response latency: less than 5ms corresponds to a good level; 5ms to 15ms corresponds to a warning level; and greater than 15ms corresponds to a severe level. For the number of offline nodes: only good and severe levels can be set, without setting a warning level, and specifically, 0 corresponds to a good level, and greater than 0 corresponds to a severe level. After obtaining the parameter levels for each of the above four parameters, the worst parameter level can be taken as the first communication quality level of the CAN bus. For example, if the CAN load rate is 45% (good), the error frame rate is 0.5% (good), the response latency is 6ms (caution), and the number of offline nodes is 0 (good), then the worst of the four parameter levels is the caution level, and the first communication quality level of the CAN bus is the caution level.
[0035] For each Ethernet communication quality parameter, at least two preset parameter threshold ranges can be set. Specifically, for packet loss rate: less than 0.5% corresponds to a good level; 0.5% to 2% corresponds to a warning level; and greater than 2% corresponds to a severe level. For response latency: less than 10ms corresponds to a good level; 10ms to 30ms corresponds to a warning level; and greater than 30ms corresponds to a severe level. For network connectivity status: since connectivity status is a binary parameter, LINK UP corresponds to a good level, and LINK DOWN corresponds to a severe level, meaning connectivity status does not generate a warning level. The worst parameter level among two or three parameter levels can be taken as the second communication quality level for Ethernet.
[0036] Through the above method, the first network obtains a first communication quality level, and the second network obtains a second communication quality level. The first communication quality level comprehensively reflects the current communication health status of the first network, and the second communication quality level comprehensively reflects the current communication health status of the second network, providing a decision-making basis for subsequent adaptive data offloading strategies.
[0037] In this embodiment of the invention, when at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, the first device determines a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data based on the first and second communication quality levels. The first target data and the second target data are respectively the data transmitted by the first network and the second network when their communication quality levels are not lower than the preset level threshold. The first target transmission method and the second target transmission method are each one of the following: transmission via the first network and the second network, transmission via the first network, and transmission via the second network. Then, the first device transmits the first target data and the second target data using the first target transmission method and the second target transmission method, respectively.
[0038] Among the three transmission methods mentioned above, "transmitting through the first network and the second network" means that the target data is transmitted simultaneously through two physical channels, namely dual-network redundant transmission; "transmitting through the first network" means that the target data is transmitted only through the first network; and "transmitting through the second network" means that the target data is transmitted only through the second network.
[0039] In one example, using CAN bus and Ethernet as the first and second networks, the dual-network redundant transmission method is explained in detail.
[0040] The first transmission method involves transmission through both a first network and a second network, i.e., dual-network redundant transmission. Specifically, the first device can simultaneously send the same data query command to the same second device through both physical channels of the first and second networks. The two channels operate independently and in parallel, without any sequential order or master-slave dependency. The second device can receive the query command through both the first and second networks respectively, and independently encapsulate the requested data into a response frame and reply to the first device through its original receiving channel (i.e., if received through the first network, it replies through the first network; if received through the second network, it replies through the second network). The first device can monitor the response data on both channels separately and independently write the data obtained from either channel into its corresponding local data storage area for upper-layer applications to access as needed. This dual-network redundant transmission method ensures the reachability of the target data even if the quality of either network degrades, thanks to the other network.
[0041] The second transmission method involves transmission through the first network, meaning the target data is transmitted only through the first network. The third transmission method involves transmission through the second network, meaning the target data is transmitted only through the second network.
[0042] The following section provides a detailed explanation of the process for determining the first target transmission method corresponding to the first target data, using a specific example of the first target data.
[0043] In one example, a preset level threshold can correspond to a good level (level 3), a first quality level can correspond to a noticeable level (level 2), and a second quality level can correspond to a severe level (level 1). The preset level threshold represents a communication quality better than the first quality level, and the first quality level represents a communication quality better than the second quality level. By default, the first target data (i.e., critical data) is transmitted via the first network (i.e., the CAN bus).
[0044] When the first communication quality level is the highest (i.e., the attention level) and the second communication quality level is not lower than the first quality level (i.e., the second communication quality level is the attention level or the good level), the first device determines the first target transmission method to be transmitted through both the first and second networks, i.e., dual-network redundant transmission. For example, when the CAN bus communication quality level is at the attention level, it indicates that the CAN bus has experienced slight degradation, such as a load rate entering the 50% to 70% range, an error frame rate entering the 1% to 3% range, or a response latency entering the 5ms to 15ms range. In this case, the first target data is transmitted simultaneously through both the CAN bus and Ethernet to ensure that the first target data is not lost even with a slight decrease in CAN bus quality.
[0045] When the first communication quality level is the first quality level (i.e., the attention level) and the second communication quality level is the second quality level (i.e., the severity level), the first device determines the first target transmission method to be transmitted through the first network, meaning the first target data is still transmitted via the CAN bus. In this scenario, although the CAN bus has experienced slight degradation, the Ethernet is in a severely degraded state and is unsuitable for undertaking the task of transmitting the first target data; therefore, the first target data continues to be transmitted via the CAN bus.
[0046] When the first communication quality level is the second quality level (i.e., severe level), and the second communication quality level is not lower than the first quality level (i.e., the second communication quality level is attentive level or good level), the first device determines the first target transmission method to be transmitted via the second network. For example, when the communication quality level of the CAN bus further drops to the severe level, it indicates that the CAN bus has suffered severe degradation, such as a load rate exceeding 70%, an error frame rate exceeding 3%, a response latency exceeding 15ms, or the presence of offline nodes. At this time, the CAN bus is no longer suitable for continuing to undertake the transmission task of the first target data, and the first device switches all the first target data to Ethernet transmission.
[0047] When both the first and second communication quality levels are at the second quality level (i.e., severe level), the first device determines the first target transmission method based on the cause of both networks being at the severe level. Specifically, the causes of both networks being at the severe level include both disconnection and non-disconnection. If the cause is a disconnection, such as a loose RJ45 connector or a broken cable, since the first and second network signals share the same RJ45 connector and the same physical cable, the disconnection will cause both networks to be interrupted simultaneously. In this case, the first device determines the first target transmission method to be transmission through the first network, meaning the first target data is kept transmitted via the CAN bus without performing any additional switching operations. If the cause is not a disconnection, meaning both networks are at the severe level due to deterioration of communication quality parameters (such as excessive load rate, excessive packet loss rate, etc.) rather than a physical disconnection, then the first device determines the first target transmission method to be transmission through both the first and second networks, i.e., redundant transmission across both networks, to ensure that the first target data can still be reached to the greatest extent possible even when both networks deteriorate simultaneously.
[0048] After explaining the process of determining the first target data's corresponding first target transmission mode, the process of determining the second target data's corresponding second target transmission mode will be explained. It should be noted that the splitting and processing of the first and second target data are independent and do not affect each other. When the first network and the second network are at different communication quality levels, the first device can simultaneously execute different transmission modes for the first and second target data. For example, when the first target data triggers dual-network redundant transmission and the second target data triggers degraded operation, the first device can execute both transmission modes simultaneously without conflict.
[0049] The following section provides a detailed explanation of the process for determining the transmission method of the second target data, using a specific example of the second target data.
[0050] By default, the second target data (i.e., detailed data) is transmitted through the second network (i.e., Ethernet). When the second communication quality level is lower than a preset threshold (i.e., the Ethernet communication quality level drops to the attention level or the critical level), the first device determines the second target transmission method corresponding to the second target data based on the first communication quality level and the second communication quality level.
[0051] In one example, similarly, a preset level threshold can correspond to a good level (level 3), a first quality level can correspond to a noticeable level (level 2), and a second quality level can correspond to a severe level (level 1). The preset level threshold represents a communication quality better than the first quality level, and the first quality level represents a communication quality better than the second quality level.
[0052] When the second communication quality level is the first quality level (i.e., the attention level), and the first communication quality level is not lower than the second quality level (i.e., the first communication quality level is any one of the good level, the attention level, or the serious level), the first device determines the second target transmission method to be transmitted through the second network and reduces the data transmission frequency of the second target data transmitted through the second network.
[0053] Specifically, when the Ethernet communication quality level is at the "Attention" level, it indicates a slight degradation in Ethernet performance, such as a packet loss rate between 0.5% and 2%, or a response latency between 10ms and 30ms. In this case, the second target data is still transmitted via Ethernet, but the first device reduces the amount of data transmitted over Ethernet, i.e., it operates in a degraded manner. Degraded operation does not switch the second target data to the CAN bus, because Ethernet is still available, and switching to the CAN bus would increase the load on the CAN bus.
[0054] When the second communication quality level is the second quality level (i.e., the severe level) and the first communication quality level is not lower than the preset level threshold (i.e., the CAN bus is at the good level), the first device determines the second target transmission method to be transmitted through the first network, or transmitted through the second network and reduces the data transmission frequency of the second target data transmitted through the second network, depending on whether the total number of the second devices is greater than the preset number threshold.
[0055] Specifically, when the Ethernet communication quality level further degrades to a severe level, it indicates that the Ethernet has severely deteriorated, such as a packet loss rate exceeding 2%, a response latency exceeding 30ms, or a network connection status changing to LINK DOWN. At this point, whether the second target data can be switched to CAN bus transmission depends on two conditions: first, whether the total number of currently online second devices does not exceed a preset threshold, such as 12; and second, whether the CAN bus communication quality level is not lower than a preset threshold (i.e., CAN is at a good level). Setting these two conditions protects the CAN bus load rate: the CAN bus bandwidth is limited. If the number of online second devices is too large or the CAN bus itself is degraded, switching all second target data to the CAN bus will cause a sharp increase in the CAN load rate, potentially triggering new communication quality problems. Therefore, only when the CAN is at a good level and the total number of online second devices does not exceed a preset threshold, such as 12, can the second target data be switched from Ethernet to the CAN bus; that is, the second target transmission method is determined to be transmission through the first network. If the total number of online second devices exceeds a preset threshold, the second target data will not switch to the CAN bus, but will continue to be transmitted via Ethernet, and the data transmission frequency of the second target data transmitted through the second network will be reduced, i.e., degraded operation will be performed.
[0056] When the second communication quality level is the second quality level (i.e., the severity level) and the first communication quality level is the first quality level (i.e., the attention level), the first device determines the second target transmission method to be transmitted through the second network and reduces the data transmission frequency of the second target data transmitted through the second network.
[0057] In this scenario, the CAN bus is at a warning level, meaning it has already experienced slight degradation and is not suitable for switching the second target data to the CAN bus, as this would further burden it. Therefore, the second target data is not switched to the CAN bus and continues to be transmitted via Ethernet in a degraded mode.
[0058] When both the first and second communication quality levels are at the second quality level (i.e., severe level), meaning both networks are in a severely degraded state, the first device determines the second target transmission mode based on the cause of both networks being at the second quality level. The causes of both networks being at the second quality level include both disconnection and non-disconnection issues.
[0059] If the cause is a disconnection, such as a loose RJ45 connector or a broken cable, considering that the first and second network signals share the same RJ45 connector and the same physical cable, the disconnection will cause both the first and second networks to be interrupted simultaneously. In this case, the second target data continues to be transmitted through the second network; that is, the second target transmission method is determined to be transmitted through the second network, and no additional switching operation is performed.
[0060] If the cause is not a disconnection, meaning both networks are at the second quality level due to deterioration of communication quality parameters (such as excessive load or excessive packet loss) rather than a physical disconnection, then the first device will determine the second target data transmission method to be transmitted through the second network and reduce the data transmission frequency of the second target data transmitted through the second network. That is, the second target data will be transmitted via Ethernet in a degraded mode.
[0061] In one example, under the scenario described above where both networks are at the second quality level due to no disconnection, after transmitting the second target data via the second target transmission method, the first device continuously monitors the second network and performs the following follow-up processing based on the monitoring results: If the second network is continuously monitored and the monitoring results indicate that the second communication quality level is still the second quality level (i.e., severe level), it indicates that the Ethernet communication quality continues to deteriorate and has not improved. The first device stops transmitting the second target data through the second network and only maintains the transmission of the first target data on the first network.
[0062] If the second network is continuously monitored and the monitoring results determine that the second communication quality level has been restored to the first quality level (i.e., the attention level), the first device continues to transmit the second target data through the second network and reduces the data transmission frequency of the second target data transmitted through the second network, i.e., maintains the degraded operation state.
[0063] If the second network is continuously monitored and the monitoring results determine that the second communication quality level has recovered to the preset threshold (i.e., good level), the first device transmits the second target data through the second network at a query cycle. This query cycle is the query interval used by the second network when the communication quality level is not lower than the preset threshold, i.e., the query interval when the network has recovered to its default normal state.
[0064] In one example, in the scenarios described above, the specific implementation of reducing the data transmission frequency of the second target data transmitted through the second network (i.e., degraded operation) can be as follows: the data query interval of the second network is extended from the first period to the second period, wherein the second period is longer than the first period. The first period is the query interval used when the second communication quality level is not lower than a preset level threshold (i.e., Ethernet is at a good level).
[0065] For example, under normal conditions where Ethernet communication quality is at a good level, the first device can use a first period T1 as the polling interval to query the second target data. That is, every T1 time interval, the first device initiates a query request for the second target data to each of the second devices. When the Ethernet communication quality level drops to the attention level or the critical level, the first device can extend the polling interval from T1 to the second period T2 (T2 > T1). For example, T1 is 100ms, and T2 is 500ms. By extending the polling interval, the number of query commands per unit time on the second network channel decreases, reducing the communication load and thus matching the degraded communication quality. Since the second target data (such as unit voltage, temperature, SOC, SOH) belongs to operation and maintenance analysis data, the real-time requirements are relatively low, so extending the query interval will not affect the safe operation of the system.
[0066] Based on the above scenarios, the traffic splitting decision relationship between the first network and the second network under different combinations of communication quality levels can be summarized as follows: when the first communication quality level is not lower than the preset level threshold (i.e., CAN quality is good) and the second communication quality level is not lower than the preset level threshold (i.e., Ethernet quality is good), the first target transmission method is to transmit through the first network (i.e., the critical data channel is CAN), and the second target transmission method is to transmit through the second network (i.e., the detailed data channel is Ethernet). This is the default optimal strategy.
[0067] When the first communication quality level is Level 1 (i.e., CAN quality is at the Attention level) and the second communication quality level is not lower than the first quality level (i.e., Ethernet quality is at the Good or Attention level), the first target transmission method is transmission through both the first and second networks (i.e., critical data uses dual-network redundancy), and the second target transmission method is transmission through the second network (i.e., detailed data is transmitted via Ethernet). If the second communication quality level is Level 1 (i.e., Ethernet quality is at the Attention level), the second target transmission method further includes reducing the data transmission frequency of the second target data transmitted through the second network (i.e., detailed data is degraded via Ethernet).
[0068] When the first communication quality level is not lower than the preset level threshold (i.e., the CAN quality is good) and the second communication quality level is the first quality level (i.e., the Ethernet quality is at the attention level), the first target transmission method is to transmit through the first network (i.e., key data is transmitted through CAN), and the second target transmission method is to transmit through the second network and reduce the data transmission frequency (i.e., detailed data is degraded and operated through Ethernet).
[0069] When both the first and second communication quality levels are at the first quality level (i.e., CAN quality is at the attention level and Ethernet quality is at the attention level), the first target transmission method is to transmit through the first and second networks (i.e., critical data uses dual-network redundancy), and the second target transmission method is to transmit through the second network and reduce the data transmission frequency (i.e., detailed data is degraded through Ethernet).
[0070] When the first communication quality level is the second quality level (i.e., CAN quality is critical) and the second communication quality level is not lower than the first quality level (i.e., Ethernet quality is good or attenuation), the first target transmission method is transmission through the second network (i.e., critical data is switched to Ethernet). The second target transmission method is as follows: if the second communication quality level is not lower than a preset threshold (i.e., Ethernet quality is good), then normal transmission is performed through the second network; if the second communication quality level is the first quality level (i.e., Ethernet quality is attenuation), then transmission is performed through the second network with reduced data transmission frequency (i.e., degraded operation).
[0071] When the second communication quality level is the second quality level (i.e., Ethernet quality is critical) and the first communication quality level is not lower than the preset level threshold (i.e., CAN quality is good), the first target transmission method is transmission through the first network (i.e., critical data is transmitted via CAN). The second target transmission method is as follows: if the total number of second devices is not greater than the preset number threshold (e.g., 12), then transmission is through the first network (i.e., detailed data is switched to CAN); if the total number of second devices is greater than the preset number threshold, then transmission is through the second network and the data transmission frequency is reduced (i.e., detailed data is degraded and operated via Ethernet).
[0072] When the second communication quality level is the second quality level (i.e., Ethernet quality is critical) and the first communication quality level is the first quality level (i.e., CAN quality is caution level), the first target transmission method is transmission via the first network (i.e., critical data is transmitted via CAN). The second target transmission method is transmission via the second network with reduced data transmission frequency (i.e., detailed data is degraded and transmitted via Ethernet).
[0073] When both the first and second communication quality levels are at the second quality level (i.e., CAN quality is at the critical level and Ethernet quality is at the critical level), the cause of degradation can be further identified. If the cause is a disconnection (such as a loose RJ45 connector or a broken cable), the first target transmission method is transmission through the first network (i.e., critical data is transmitted via CAN), and the second target transmission method is transmission through the second network (i.e., detailed data is transmitted via Ethernet), without performing any additional switching operations. If the cause is not a disconnection (i.e., due to deterioration of communication quality parameters), the first target transmission method is transmission through both the first and second networks (i.e., critical data uses dual-network redundancy), and the second target transmission method is transmission through the second network with reduced data transmission frequency (i.e., detailed data is degraded and transmitted via Ethernet). For the second target data after the downgrade operation, the first device continuously monitors the second network: if the second communication quality level is still the second quality level (i.e., severe level) and no improvement is seen, the transmission of the second target data through the second network is stopped; if the second communication quality level recovers to the first quality level (i.e., attention level), the downgrade operation continues; if the second communication quality level recovers to the preset level threshold (i.e., good level), normal transmission is restored.
[0074] It should be noted that the conditions for stopping the transmission of the second target data (i.e., detailed data) are: the first communication quality level is lower than the preset level threshold (i.e., CAN is not at the preset level, and the first target data needs to be transmitted through dual-network redundancy), and the second communication quality level is the second quality level (i.e., the severity level), and the reason is not a disconnection. In all other scenarios outside of this specific scenario, the second target data only needs to be degraded through the second network, and there is no need to stop the transmission.
[0075] In one example, see Figure 4 , Figure 4 This is a schematic diagram of the traffic splitting decision process provided in an embodiment of the present invention. Taking CAN bus and Ethernet as the first and second networks as examples, the overall process of traffic splitting decision is shown: First, the BMS powers on and completes initialization, and the BAU enters the bus quality monitoring phase for the CAN bus and Ethernet. The BAU continuously collects data on the CAN bus load rate, error frame rate, response latency, and number of offline nodes, as well as the Ethernet packet loss rate, response latency, and network connection status. It then matches the four CAN bus parameters against their respective preset threshold ranges, taking the worst parameter level as the CAN communication quality level (i.e., the first communication quality level). Similarly, it matches the three Ethernet parameters against their respective preset threshold ranges, taking the worst parameter level as the Ethernet communication quality level (i.e., the second communication quality level). In practical implementation, the minimum value between the CAN and Ethernet communication quality levels can be used to obtain the overall quality level, simplifying the branch decision logic.
[0076] After obtaining the CAN communication quality level and Ethernet communication quality level, first determine whether the overall quality level is level 3 (i.e., good). If so, it indicates that both networks are in good condition, and the BAU executes the default traffic splitting strategy: critical data is transmitted via the CAN bus, and detailed data is transmitted via Ethernet. The process then returns to the quality monitoring stage for continued periodic evaluation.
[0077] If the overall quality level is not Level 3, determine if it is Level 2 (i.e., Attention Level). If so, it indicates that at least one network is at the Attention Level and there is no Critical Level in either network. Further determine the specific sub-scenario: If the CAN quality is at the Attention Level and the Ethernet quality is at the Good Level: Critical data uses dual-network redundancy, and detailed data is transmitted via Ethernet; If the CAN quality is at the Good Level and the Ethernet quality is at the Attention Level: Critical data is transmitted via CAN, and detailed data is degraded via Ethernet; If the CAN quality is at the Attention Level and the Ethernet quality is at the Attention Level: Critical data uses dual-network redundancy, and detailed data is degraded via Ethernet. After each sub-scenario is completed, the process returns to the quality monitoring stage.
[0078] If the overall quality level is Level 1 (i.e., severe), it indicates that at least one network has suffered severe degradation, requiring further assessment of the specific sub-scenario. If the CAN quality is severe and the Ethernet quality is good or attentive level: all critical data is transmitted via Ethernet; for detailed data, if the Ethernet quality is attentive level, it operates in a degraded manner via Ethernet; if the Ethernet quality is good level, it is transmitted normally via Ethernet. If the Ethernet quality is severe and the CAN quality is good level: critical data is transmitted via CAN; for detailed data, it is determined whether the number of online clusters is no greater than 12. If so, detailed data is switched to CAN transmission; otherwise, detailed data operates in a degraded manner via Ethernet. If the Ethernet quality is severe and the CAN quality is attentive level: critical data is transmitted via CAN, and detailed data operates in a degraded manner via Ethernet. If the CAN quality is severe and the Ethernet quality is severe: further assessment is needed to determine if the issue is caused by a disconnection. If it is caused by a disconnection, critical data is transmitted via CAN, and detailed data is transmitted via Ethernet; if it is not caused by a disconnection, critical data uses dual-network redundancy, and detailed data operates in a degraded manner via Ethernet. For severe degradation of both networks not caused by disconnection, the BAU continuously monitors Ethernet quality after degrading operation: if the Ethernet quality remains at a severe level, detailed data transmission is stopped; if the Ethernet quality recovers to a warning level, degrading operation continues; if the Ethernet quality recovers to a good level, normal transmission is restored. After each sub-scenario is completed, the process returns to the quality monitoring phase.
[0079] Throughout the process, quality monitoring is continuously cyclical. After each quality level assessment and traffic allocation strategy adjustment, the BAU continues to collect communication quality parameters for the next cycle and reassess the quality level. When the quality level changes, the BAU adjusts the traffic allocation strategy accordingly; when the quality level remains unchanged, the BAU maintains the current traffic allocation strategy.
[0080] In one example, to avoid frequent switching of traffic splitting strategies due to instantaneous fluctuations in communication quality parameters, a smooth switching mechanism can be introduced when performing the aforementioned traffic splitting strategy adjustments. Specifically, when the overall quality level or the communication quality level of any network changes, the BAU does not immediately trigger the corresponding traffic splitting strategy adjustment. Instead, it continuously monitors whether the changed communication quality level remains stable over multiple consecutive monitoring periods. If the communication quality level remains stable over multiple consecutive monitoring periods, the change in communication quality level is confirmed as valid, and the corresponding traffic splitting strategy adjustment is executed. If the level rebounds to the original communication quality level within the monitoring period, the current traffic splitting strategy remains unchanged. This continuous monitoring and dynamic adjustment mechanism enables the BAU to perceive changes in the communication quality of the CAN bus and Ethernet in real time and respond in the early stages of quality fluctuations, rather than waiting until the network is completely interrupted before taking action.
[0081] In this embodiment of the invention, a first device communicates with at least one second device via a first network and a second network. The first network has higher real-time performance than the second network, and the second network has higher bandwidth than the first network. The first device determines a first communication quality level for the first network and a second communication quality level for the second network based on the communication quality parameters of the first and second networks, respectively. If at least one of the first and second communication quality levels is less than a preset threshold, the first device determines a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data, based on the first and second communication quality levels, respectively. The first target data and the second target data are data transmitted by the first network and the second network when their communication quality levels are not lower than the preset threshold, respectively. The first target transmission method and the second target transmission method are each one of the following: transmission via the first network and the second network, transmission via the first network, and transmission via the second network. Then, the first device transmits the first target data and the second target data using the first target transmission method and the second target transmission method, respectively.
[0082] In a dual-network communication scenario, this invention collects communication quality parameters of the first and second networks in real time and determines the first and second communication quality levels, respectively. This allows fluctuations in communication quality to be detected promptly without waiting for a complete network outage. When the communication quality level of either network falls below a preset threshold, the first device adaptively determines the target transmission methods for the first and second target data based on the communication quality levels of both networks. This enables timely adjustment of the data transmission method when communication quality fluctuates, overcoming the technical shortcomings of existing technologies where data transmission tasks are fixedly allocated and adjustments are only made when the network is completely interrupted, thus failing to respond promptly to communication quality fluctuations. This effectively improves the reliability of data transmission in dual-network communication.
[0083] Figure 5 The dual-network communication transmission device 500 shown can achieve Figure 1 The method described in the embodiment achieves the same technical effect, and can be specifically referred to in the above description. Figure 1 The description of the dual-network communication transmission method in the illustrated embodiment will not be repeated here. The dual-network communication transmission device 500 is applied to a first device, which communicates with at least one second device through a first network and a second network. The dual-network communication transmission device 500 includes: The first determining module 501 is used to determine a first communication quality level of the first network and a second communication quality level of the second network based on the communication quality parameters of the first network and the second network, respectively; wherein the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. The second determining module 502 is configured to, when at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, determine, based on the first communication quality level and the second communication quality level, a first target transmission mode corresponding to the first target data and a second target transmission mode corresponding to the second target data; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission mode and the second target transmission mode are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The transmission module 503 is used to transmit the first target data and the second target data respectively through the first target transmission method and the second target transmission method.
[0084] Optionally, the first determining module 501 is used to: For the first network, each communication quality parameter of the first network is matched with at least two preset parameter threshold ranges corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to the communication quality parameters of the first network is determined as the first communication quality level. For the second network, each communication quality parameter of the second network is matched with at least two preset parameter threshold ranges corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to the communication quality parameters of the second network is determined as the second communication quality level.
[0085] Optionally, the second determining module 502 is used for at least one of the following: When the first communication quality level is the first quality level and the second communication quality level is not lower than the first quality level, the first target transmission method is determined to be transmission through the first network and the second network; When the first communication quality level is the first quality level and the second communication quality level is the second quality level, the first target transmission method is determined to be transmission through the first network. When the first communication quality level is the second quality level and the second communication quality level is not lower than the first quality level, the first target transmission method is determined to be transmission through the second network. When both the first communication quality level and the second communication quality level are at the second quality level, the first target transmission method is determined to be transmission through the first network, or transmission through both the first network and the second network, based on the reasons that cause the first communication quality level and the second communication quality level to be at the second quality level; the reasons include disconnection and non-disconnection. The first quality level is higher than the second quality level, but lower than the preset quality level threshold.
[0086] Optionally, the second determining module 502 is used for at least one of the following: When the second communication quality level is the first quality level and the first communication quality level is not lower than the second quality level, the second target transmission method is determined to be transmission through the second network, and the data transmission frequency of the second target data transmitted through the second network is reduced. When the second communication quality level is the second quality level and the first communication quality level is not lower than the preset level threshold, the second target transmission method is determined to be transmitted through the first network or transmitted through the second network, depending on whether the total number of the second devices is greater than the preset number threshold, and the data transmission frequency of the second target data transmitted through the second network is reduced. When the second communication quality level is the second quality level and the first communication quality level is the first quality level, the second target transmission method is determined to be transmission through the second network, and the data transmission frequency of the second target data transmitted through the second network is reduced. When both the first communication quality level and the second communication quality level are at the second quality level, the second target transmission method is determined to be transmission through the second network, or transmission through the second network, based on the reasons that cause the first communication quality level and the second communication quality level to be at the second quality level, and the data transmission frequency of the second target data transmitted through the second network is reduced; the reasons include disconnection and non-disconnection. The first quality level is higher than the second quality level, and the first quality level is lower than the preset quality level threshold. Optionally, the device further includes one of the following ( Figure 5 (not shown in the image) The first monitoring and processing module 504 is used to stop transmitting the second target data through the second network after transmitting the second target data through the second target transmission method, when the first communication quality level and the second communication quality level are both at the second quality level, and the reason for the first communication quality level and the second communication quality level being at the second quality level is not a disconnection, and after continuously monitoring the second network and determining from the monitoring results that the second communication quality level is still at the second quality level. The second monitoring and processing module 505 is used to reduce the data transmission frequency of the second target data transmitted through the second network when both the first communication quality level and the second communication quality level are at the second quality level, and the reason for the first communication quality level and the second communication quality level being at the second quality level is not a disconnection. After transmitting the second target data through the second target transmission method, the module continuously monitors the second network and determines that the second communication quality level has recovered to the first quality level based on the monitoring results. The third monitoring and processing module 506 is configured to, when both the first communication quality level and the second communication quality level are at the second quality level, and the cause of the first communication quality level and the second communication quality level being at the second quality level is not a disconnection, after transmitting the second target data through the second target transmission method, continuously monitor the second network, and determine, based on the monitoring results, that the second communication quality level has recovered to the preset level threshold, transmit the second target data through the second network at a query cycle; wherein, the query cycle is the query interval adopted by the second network when the communication quality level is not lower than the preset level threshold.
[0087] Optionally, the second determining module 502 or the second monitoring and processing module 505 is used for: The data query interval of the second network is extended from the first period to the second period, wherein the second period is longer than the first period; the first period is the query interval used when the second communication quality level is not lower than the preset level threshold.
[0088] In this embodiment of the invention, a first device communicates with at least one second device via a first network and a second network. The first network has higher real-time performance than the second network, and the second network has higher bandwidth than the first network. The first device determines a first communication quality level for the first network and a second communication quality level for the second network based on the communication quality parameters of the first and second networks, respectively. If at least one of the first and second communication quality levels is less than a preset threshold, the first device determines a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data, based on the first and second communication quality levels, respectively. The first target data and the second target data are data transmitted by the first network and the second network when their communication quality levels are not lower than the preset threshold, respectively. The first target transmission method and the second target transmission method are each one of the following: transmission via the first network and the second network, transmission via the first network, and transmission via the second network. Then, the first device transmits the first target data and the second target data using the first target transmission method and the second target transmission method, respectively.
[0089] In a dual-network communication scenario, this invention collects communication quality parameters of the first and second networks in real time and determines the first and second communication quality levels, respectively. This allows fluctuations in communication quality to be detected promptly without waiting for a complete network outage. When the communication quality level of either network falls below a preset threshold, the first device adaptively determines the target transmission methods for the first and second target data based on the communication quality levels of both networks. This enables timely adjustment of the data transmission method when communication quality fluctuates, overcoming the technical shortcomings of existing technologies where data transmission tasks are fixedly allocated and adjustments are only made when the network is completely interrupted, thus failing to respond promptly to communication quality fluctuations. This effectively improves the reliability of data transmission in dual-network communication.
[0090] Figure 6 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Please refer to it. Figure 6 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0091] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0092] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0093] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a dual-network communication transmission device at the logical level. The first device containing the processor communicates with at least one second device through a first network and a second network. The processor executes the program stored in the memory and specifically performs the following operations: Based on the communication quality parameters of the first network and the second network, a first communication quality level of the first network and a second communication quality level of the second network are determined respectively; wherein, the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. If at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data are determined based on the first communication quality level and the second communication quality level; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission method and the second target transmission method are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The first target data and the second target data are transmitted through the first target transmission method and the second target transmission method, respectively.
[0094] The above is as described in the present invention. Figure 1The command scheduling method disclosed in the embodiments described above can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in one or more embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in one or more embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0095] The electronic device can also perform Figure 1 The dual-network communication transmission method described herein will not be elaborated further here.
[0096] This invention also provides a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figure 1 The method of the illustrated embodiment will not be described in detail here.
[0097] This invention also provides a computer program product stored in a storage medium and executed by at least one processor to implement... Figure 1 The method of the illustrated embodiment will not be described in detail here.
[0098] Of course, in addition to the software implementation, the electronic device of the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0099] In summary, the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of the present invention should be included within the scope of protection of one or more embodiments of the present invention.
[0100] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0101] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined in this embodiment of the invention, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0102] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A dual-network communication transmission method, characterized in that, The method is applied to a first device, which communicates with at least one second device via a first network and a second network, the method comprising: Based on the communication quality parameters of the first network and the second network, a first communication quality level of the first network and a second communication quality level of the second network are determined respectively; wherein, the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. If at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, a first target transmission method corresponding to the first target data and a second target transmission method corresponding to the second target data are determined based on the first communication quality level and the second communication quality level; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission method and the second target transmission method are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The first target data and the second target data are transmitted through the first target transmission method and the second target transmission method, respectively.
2. The method according to claim 1, characterized in that, Based on the communication quality parameters of the first network and the second network respectively, determine the first communication quality level of the first network and the second communication quality level of the second network, including: For the first network, each communication quality parameter of the first network is matched with at least two preset parameter threshold ranges corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to the communication quality parameters of the first network is determined as the first communication quality level. For the second network, each communication quality parameter of the second network is matched with at least two preset parameter threshold ranges corresponding to each communication quality parameter to obtain the parameter level corresponding to each communication quality parameter, and the lowest level among all the parameter levels corresponding to the communication quality parameters of the second network is determined as the second communication quality level.
3. The method according to claim 1, characterized in that, Based on the first communication quality level and the second communication quality level, the first target transmission method corresponding to the first target data is determined, including one of the following: When the first communication quality level is the first quality level and the second communication quality level is not lower than the first quality level, the first target transmission method is determined to be transmission through the first network and the second network; When the first communication quality level is the first quality level and the second communication quality level is the second quality level, the first target transmission method is determined to be transmission through the first network; When the first communication quality level is the second quality level and the second communication quality level is not lower than the first quality level, the first target transmission method is determined to be transmission through the second network; When both the first communication quality level and the second communication quality level are at the second quality level, the first target transmission method is determined to be transmission through the first network, or transmission through both the first network and the second network, based on the reasons that cause the first communication quality level and the second communication quality level to be at the second quality level; the reasons include disconnection and non-disconnection. The first quality level is higher than the second quality level, but lower than the preset quality level threshold.
4. The method according to claim 1, characterized in that, Based on the first communication quality level and the second communication quality level, the second target transmission method corresponding to the second target data is determined, including one of the following: When the second communication quality level is the first quality level and the first communication quality level is not lower than the second quality level, the second target transmission method is determined to be transmission through the second network, and the data transmission frequency of the second target data transmitted through the second network is reduced. When the second communication quality level is the second quality level and the first communication quality level is not lower than the preset level threshold, the second target transmission method is determined to be transmitted through the first network or transmitted through the second network, depending on whether the total number of the second devices is greater than the preset number threshold, and the data transmission frequency of the second target data transmitted through the second network is reduced. When the second communication quality level is the second quality level and the first communication quality level is the first quality level, the second target transmission method is determined to be transmission through the second network, and the data transmission frequency of the second target data transmitted through the second network is reduced. When both the first communication quality level and the second communication quality level are at the second quality level, the second target transmission method is determined to be transmission through the second network, or transmission through the second network, based on the reasons that cause the first communication quality level and the second communication quality level to be at the second quality level, and the data transmission frequency of the second target data transmitted through the second network is reduced; the reasons include disconnection and non-disconnection. The first quality level is higher than the second quality level, and the first quality level is lower than the preset quality level threshold.
5. The method according to claim 4, characterized in that, When both the first communication quality level and the second communication quality level are at the second quality level, and the reason for the first communication quality level and the second communication quality level being at the second quality level is not a disconnection, after transmitting the second target data through the second target transmission method, the method further includes one of the following: If the second network is continuously monitored and the monitoring results determine that the second communication quality level is still the second quality level, the transmission of the second target data through the second network shall be stopped. If the second network is continuously monitored and the second communication quality level is determined to be restored to the first quality level based on the monitoring results, the data transmission frequency of the second target data transmitted through the second network shall be reduced. If the second network is continuously monitored and the second communication quality level is determined to be restored to the preset level threshold based on the monitoring results, the second target data is transmitted through the second network at a query period; wherein, the query period is the query interval adopted by the second network when the communication quality level is not lower than the preset level threshold.
6. The method according to claim 4 or 5, characterized in that, Reducing the data transmission frequency of the second target data transmitted through the second network includes: The data query interval of the second network is extended from the first period to the second period, wherein the second period is longer than the first period; the first period is the query interval used when the second communication quality level is not lower than the preset level threshold.
7. A dual-network communication transmission device, characterized in that, The device is applied to a first device, which communicates with at least one second device via a first network and a second network, the device comprising: The first determining module is used to determine a first communication quality level of the first network and a second communication quality level of the second network based on the communication quality parameters of the first network and the second network, respectively; wherein the real-time performance of the first network is higher than that of the second network; and the bandwidth of the second network is higher than that of the first network. The second determining module is configured to, when at least one of the first communication quality level and the second communication quality level is less than a preset level threshold, determine, based on the first communication quality level and the second communication quality level, a first target transmission mode corresponding to the first target data and a second target transmission mode corresponding to the second target data; wherein, the first target data and the second target data are respectively the data transmitted by the first network and the second network when the communication quality level is not lower than the preset level threshold; the first target transmission mode and the second target transmission mode are respectively one of the following: transmission through the first network and the second network, transmission through the first network, and transmission through the second network; The transmission module is used to transmit the first target data and the second target data respectively through the first target transmission method and the second target transmission method.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store computer-executable instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.