BMS-oriented remote dual-protocol collaborative upgrade service method and system
Through network prediction and dynamic protocol selection, combined with end-to-end and dual verification mechanisms, the transmission efficiency and reliability problems in BMS remote upgrades are solved, and efficient and reliable program upgrades are achieved.
Patent Information
- Application Number
- CN202510804866.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-08-15
AI Technical Summary
In the existing BMS remote upgrade solutions, the transmission efficiency is low and the protocol compatibility is poor, resulting in insufficient reliability, making it difficult to take into account both upgrade efficiency and reliability.
By reading the network monitoring index sequence, analyzing transmission security, dynamically selecting UFN and UFC protocols for data transmission, and adopting end-to-end accumulation and verification mechanisms and MCRC and SSUM dual verification mechanisms to achieve efficient transmission and verification of different data segments.
Improves the efficiency and reliability of BMS program upgrades, improves transmission rate, success rate and protocol compatibility, and reduces rollback time.
Smart Images

Figure CN120499295A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management system data processing, and in particular to a remote dual-protocol collaborative upgrade service method and system for a BMS. Background Art
[0002] With the development of intelligent new energy vehicles, the BMS software iteration cycle has been significantly shortened. Traditional offline flashing methods not only require the vehicle to be returned to the factory for operation, which is costly, but also face a growing demand for remote OTA upgrades. However, existing technologies have many shortcomings. Traditional protocols have low transmission rates, resulting in long upgrade times for large-capacity programs. Wireless upgrades are prone to data loss due to network fluctuations and lack dynamic verification and fault tolerance mechanisms. Relying on a single protocol makes it difficult to adapt to BMS hardware from different manufacturers. The full rollback recovery mechanism after a failed upgrade is time-consuming and may cause system downtime, making it difficult to balance upgrade efficiency and reliability.
[0003] The existing BMS remote upgrade solution has technical problems such as low transmission efficiency and poor protocol compatibility, resulting in insufficient reliability. Summary of the Invention
[0004] The present application provides a remote dual-protocol collaborative upgrade service method and system for BMS, which is used to solve the technical problems of low transmission efficiency and poor protocol compatibility leading to insufficient reliability in existing BMS remote upgrade solutions.
[0005] In view of the above problems, the present application provides a remote dual-protocol collaborative upgrade service method and system for BMS.
[0006] In a first aspect of the present application, a remote dual-protocol collaborative upgrade service method for a BMS is provided, the method comprising: The system reads the network monitoring indicator sequence of the current vehicle, performs network prediction within a preset time window, and outputs the predicted network status; performs transmission security analysis based on the predicted network status, and outputs a predicted transmission safety factor; if the predicted transmission safety factor is greater than the transmission safety indicator updated by the BMS program, performs dual-protocol adaptability analysis based on the predicted CAN bus status and the predicted network status, and determines the adapted transmission protocol; and performs data transmission and verification of the difference data segments based on a preset verification mechanism and the adapted transmission protocol.
[0007] The second aspect of the present application provides a remote dual-protocol collaborative upgrade service system for BMS, the system comprising: The network status prediction module is used to read the network monitoring indicator sequence of the current vehicle, perform network prediction within a preset time window, and output the predicted network status; the transmission safety factor prediction module is used to perform transmission safety analysis based on the predicted network status and output the predicted transmission safety factor; the dual-protocol adaptability analysis module is used to perform dual-protocol adaptability analysis based on the predicted CAN bus status and the predicted network status if the predicted transmission safety factor is greater than the transmission safety indicator updated by the BMS program, and determine the adapted transmission protocol; the data transmission module is used to perform data transmission and verification of the difference data segment based on the preset verification mechanism and the adapted transmission protocol.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages: The system reads the current vehicle's network monitoring indicator sequence and outputs a predicted network status. It then performs a transmission safety analysis based on this predicted network status and outputs a predicted transmission safety factor. If this predicted transmission safety factor exceeds the transmission safety factor for the BMS program update, it performs a dual-protocol compatibility analysis to determine the appropriate transmission protocol. Based on a pre-set verification mechanism and the adapted transmission protocol, it performs data transmission and verification of discrepant data segments. This achieves the technical effect of dynamically adapting the transmission protocol based on network quality, improving the efficiency and reliability of BMS program updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A flow chart of a remote dual-protocol collaborative upgrade service method for BMS provided in an embodiment of the present application; Figure 2 Schematic diagram of the structure of the remote dual-protocol collaborative upgrade service system for BMS provided in an embodiment of the present application.
[0011] Description of the accompanying drawings: network status prediction module 10, transmission safety factor prediction module 20, dual-protocol adaptability analysis module 30, data transmission module 40. DETAILED DESCRIPTION
[0012] This application provides a remote dual-protocol collaborative upgrade service method and system for BMS, which is used to solve the technical problems of low transmission efficiency and poor protocol compatibility in existing BMS remote upgrade solutions resulting in insufficient reliability.
[0013] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of this application.
[0014] Example 1, as Figure 1 As shown, this application provides a remote dual-protocol collaborative upgrade service method for BMS, the method comprising: Step S100: Read the network monitoring indicator sequence of the current vehicle, perform network prediction within a preset time window, and output the predicted network status.
[0015] Specifically, network monitoring parameters are first configured, including signal strength, bandwidth, latency, and packet loss rate. Based on these parameters, fixed-point monitoring acquires network monitoring metrics at P consecutive time points (where P is an integer greater than 5 and is determined by the duration of a preset time window), thereby generating a network monitoring metric sequence. Next, a sample network monitoring metric sequence set is collected based on network monitoring records for vehicles of the same model. Network monitoring metrics at P consecutive time points within a subsequent historical time window are obtained as a sample predicted network monitoring metric sequence, forming a sample predicted network monitoring metric sequence set. Then, using these sample and predicted network monitoring metric sequence sets, a long short-term memory (LSTM) network is trained until convergence, generating a network status prediction plug-in. Finally, this network status prediction plug-in is used to perform network prediction within a preset time window based on the network monitoring metric sequence, outputting a predicted network monitoring metric sequence, i.e., the predicted network status.
[0016] Step S200: Perform transmission security analysis based on the predicted network status and output a predicted transmission safety factor.
[0017] Specifically, the mean of multiple monitoring parameters in the predicted network monitoring indicator sequence (such as signal strength, bandwidth, latency, and packet loss rate) is calculated and normalized to obtain the mean of multiple standard monitoring indicators to eliminate the influence of different parameter dimensions. Secondly, the volatility of each monitoring parameter is calculated to obtain the fluctuation coefficient of each parameter (i.e., the ratio of the indicator standard deviation to the indicator mean). This is then weighted to obtain the overall parameter fluctuation coefficient, which reflects the stability of the network status. Finally, the initial transmission safety factor is determined based on the mean evaluation of multiple standard monitoring indicators. This initial transmission safety factor is then adjusted based on the overall parameter fluctuation coefficient. A larger fluctuation coefficient indicates lower transmission safety. The final output is a predicted transmission safety factor that comprehensively considers the network mean status and the degree of fluctuation.
[0018] Step S300: If the predicted transmission safety factor is greater than the transmission safety index of the BMS program update, a dual-protocol adaptability analysis is performed based on the predicted CAN bus state and the predicted network state to determine an adapted transmission protocol.
[0019] Specifically, if the predicted transmission safety factor exceeds the transmission safety index for the battery management system (BMS) program update, a dual-protocol adaptability analysis is performed based on the predicted controller area network (CAN) bus state and the predicted network state to determine the appropriate transmission protocol. The specific process is as follows: First, a long short-term memory network is used to predict the CAN bus load of the CAN bus-based local upgrade protocol (UFC protocol) within a preset time window, which is set as the predicted CAN bus state. Next, a adaptability evaluation function is constructed, where the adaptability is determined based on a weighted assessment of data transmission rate, transmission stability, and transmission security. Historical transmission behavior statistics are then generated using the predicted CAN bus state as a constraint, outputting the first transmission state mean. Simultaneously, historical transmission behavior statistics are generated using the predicted network state as a constraint, outputting the second transmission state mean. Finally, the adaptability evaluation function is used to evaluate the first and second transmission state mean values to determine the first and second fitnesses. The transmission protocol with the greater fitness is selected as the appropriate transmission protocol. Among them, the network-based remote upgrade protocol (UFN protocol) is suitable for high-speed data transmission in a good network environment, while the UFC protocol is suitable for stable transmission in a local CAN bus environment. Dynamic switching is achieved through dual-protocol adaptation to ensure upgrade efficiency and reliability.
[0020] Step S400: performing data transmission and verification of the difference data segments according to a preset verification mechanism and the adapted transmission protocol.
[0021] Specifically, according to the preset verification mechanism and the adapted transmission protocol, data transmission and verification of the difference data segments are performed. The specific process is as follows: if the adapted transmission protocol is a network-based remote upgrade protocol (UFN protocol), an end-to-end cumulative sum verification mechanism is adopted. Through the transmission control protocol (TCP) connection, the device requests program data from the server. The server sends program data according to the data length requested by the device. Each packet of data is checked and calculated. After receiving the data, the device verifies the data index and checksum to ensure the accuracy of data transmission; if the adapted transmission protocol is a local upgrade protocol (UFC protocol) based on the controller area network (CAN) bus, a dual verification mechanism of master-side cyclic redundancy check (MCRC) and slave-side cumulative sum check (SSUM) is adopted. The master device (MASTER) sends the program data in packets, and the slave device (SLAVE) sends the received data back as is for comparison. At the same time, the master device sends a program information verification package, and the slave device responds to the program information and verifies it. If the verification fails, it is re-sent to ensure reliable data transmission. The entire process is based on incremental recovery technology, and the program is upgraded according to the differential data image and the full baseline version. The controller area network (CAN) interface, universal asynchronous receiver and transmitter (UART) interface and transmission control protocol (TCP) interface are uniformly encapsulated through the protocol adaptation layer to achieve efficient transmission and accurate verification of differential data segments.
[0022] In one possible implementation, step S100 further includes: Step S110: configuring network monitoring parameters, wherein the network monitoring parameters include signal strength, bandwidth, delay and packet loss rate.
[0023] Step S120: Based on the network monitoring parameters, fixed-point monitoring is performed to obtain network monitoring indicators at P consecutive time points, and a network monitoring indicator sequence is obtained, where P is an integer greater than 5 and is set according to the duration of the preset time window.
[0024] Step S130: Perform network prediction within a preset time window according to the network monitoring indicator sequence, and output the predicted network status.
[0025] Specifically, configure network monitoring parameters, including signal strength (which indicates the strength of the network signal), bandwidth (which reflects the network's data transmission capacity per unit time), latency (the time it takes for data to travel from sender to receiver), and packet loss rate (the percentage of packets lost during data transmission). These parameters are key indicators for evaluating network status. Configuring them lays the foundation for subsequent fixed-point network status monitoring and obtaining a sequence of network monitoring indicators. This allows for more accurate analysis and prediction of network status, providing a reliable basis for network environment monitoring, including protocol adaptation and data transmission during remote BMS upgrades.
[0026] Based on the configured network monitoring parameters (including signal strength, bandwidth, latency, and packet loss rate), fixed-point monitoring continuously collects network monitoring indicators at P consecutive time points (where P is an integer greater than 5 and the specific value is determined by the duration of the preset time window. For example, if the preset time window is 30 minutes, P can be set to 6, indicating that data is collected every 5 minutes). This sequence of network monitoring indicators is formed. This sequence fully records the corresponding data such as signal strength, bandwidth, latency, and packet loss rate at each time point. This provides time-series sample data support for subsequent network status prediction using long short-term memory networks, ensuring that the prediction results accurately reflect the network change trends within the preset time window.
[0027] Network monitoring records of vehicles of the same model are collected to form a sample network monitoring indicator sequence set, and the network monitoring indicators of P consecutive time points in the subsequent historical time window of these samples are obtained to form a sample prediction network monitoring indicator sequence set; then, the long short-term memory network (LSTM) is trained using the above sample data, and through iterative optimization until the model converges, a network status prediction plug-in is obtained; finally, the currently obtained network monitoring indicator sequence is input into the plug-in. Based on the memory characteristics and prediction ability of LSTM for time series data, the changing trends of indicators such as network signal strength, bandwidth, latency and packet loss rate are analyzed, and the predicted network monitoring indicator sequence within the preset time window is output. This is used as the predicted network status to provide a data basis for subsequent transmission security analysis and dual-protocol adaptation.
[0028] In one possible implementation, step S130 further includes: Step S131: Based on the network monitoring records of vehicles of the same model, a sample network monitoring indicator sequence set is collected, and the network monitoring indicators at P consecutive time points in the subsequent historical time window are obtained as a sample predicted network monitoring indicator sequence to obtain a sample predicted network monitoring indicator sequence set.
[0029] Step S132: using the sample network monitoring indicator sequence set and the sample prediction network monitoring indicator sequence set, training the long short-term memory network until convergence, and obtaining a network status prediction plug-in.
[0030] Step S133: using the network status prediction plug-in to perform network prediction according to the network monitoring indicator sequence, and outputting a predicted network monitoring indicator sequence as a predicted network status.
[0031] Specifically, based on the network monitoring records of vehicles of the same model, a set of sample network monitoring indicator sequences is collected. Specifically, network monitoring parameters such as signal strength, bandwidth, latency, and packet loss rate of the same vehicle model under different operating conditions are collected to form multiple sets of network monitoring indicator sequences at P consecutive time points. At the same time, for each set of sample network monitoring indicator sequences, the network monitoring indicators of P consecutive time points within the subsequent historical time window are obtained to form the corresponding sample prediction network monitoring indicator sequence, which is then integrated to form a set of sample prediction network monitoring indicator sequences. These sequence sets cover the changing characteristics of network indicators in the time dimension, providing sample data with temporal correlation for the subsequent training of the long short-term memory network, ensuring that the model can learn the dynamic changes in network status.
[0032] A long short-term memory (LSTM) network is trained to convergence using a sample set of network monitoring indicator sequences and a sample set of predicted network monitoring indicator sequences, resulting in a network status prediction plug-in. The specific process involves feeding the sample set of network monitoring indicator sequences as input data and the sample set of predicted network monitoring indicator sequences as target output data into the LSTM network. Through its unique memory cell structure, the LSTM network automatically learns the time series dependencies and variations of network monitoring indicators (such as signal strength, bandwidth, latency, and packet loss rate). During training, the network's weights and bias parameters are continuously adjusted, and the error between the model's predictions and the sample predicted network monitoring indicator sequences is calculated. The model parameters are then optimized using a backpropagation algorithm until the error between the model's predicted output and the target output reaches a preset threshold or stops decreasing significantly, marking model convergence. The resulting network status prediction plug-in accurately predicts network status within a preset time window based on the input network monitoring indicator sequences.
[0033] Using a trained and converged network status prediction plug-in, network prediction is performed on a sequence of network monitoring indicators and the predicted network status is output. The specific process is as follows: the currently acquired sequence of network monitoring indicators (including parameters such as signal strength, bandwidth, latency, and packet loss rate) for P consecutive time points is input into the network status prediction plug-in. Leveraging the memory and analysis capabilities of long short-term memory (LSTM) networks for time series data, the plug-in automatically extracts the temporal variation characteristics and trends of network indicators. Through calculation and deduction, it generates a sequence of predicted network monitoring indicators within a preset time window. This sequence includes predicted values for signal strength, bandwidth, latency, and packet loss rate at each time point. This sequence serves as the predicted network status, providing data support for subsequent transmission security analysis and dynamic adaptation of the dual protocols (UFN and UFC), ensuring real-time adjustment of upgrade strategies based on network quality.
[0034] In one possible implementation, step S200 further includes: Step S210: performing mean calculation and normalization processing on a plurality of monitoring parameters according to the predicted network monitoring indicator sequence to obtain a plurality of standard monitoring indicator means.
[0035] Step S220: Calculate the parameter volatility of multiple monitoring parameters according to the predicted network monitoring indicator sequence, output multiple parameter fluctuation coefficients, and calculate and obtain the overall parameter fluctuation coefficient, where the fluctuation coefficient is the ratio of the indicator standard deviation to the indicator mean.
[0036] Step S230: Determine an initial transmission safety factor based on the mean evaluation of the multiple standard monitoring indicators, adjust the initial transmission safety factor based on the overall parameter fluctuation coefficient, and output a predicted transmission safety factor.
[0037] Specifically, for monitoring parameters such as signal strength, bandwidth, latency, and packet loss rate in the predicted network monitoring indicator sequence, the mean of each parameter within a preset time window is calculated to reflect the overall performance of that parameter. Because the dimensions of each parameter vary (for example, signal strength may be measured in dBm, bandwidth in bits per second, latency in milliseconds, and packet loss rate in percentage), to eliminate the impact of these dimensional differences on subsequent analysis, the mean values of each parameter are normalized and mapped to [0, 1] or another uniform interval. This makes the different parameters comparable, ultimately resulting in the mean values of multiple standard monitoring indicators, providing a standardized data foundation for initial transmission safety factor assessment in transmission security analysis.
[0038] For parameters such as signal strength, bandwidth, latency, and packet loss rate in the predicted network monitoring indicator series, the standard deviation of each parameter within a preset time window is calculated to measure the degree of dispersion of the parameter in the time series. The standard deviation of each parameter is divided by its mean to obtain the fluctuation coefficient of each parameter (such as the signal strength fluctuation coefficient and the bandwidth fluctuation coefficient), which reflects the degree of fluctuation of each individual parameter. Based on this, a weighted calculation is performed on the fluctuation coefficients of multiple parameters according to the weight of each monitoring parameter's impact on network transmission security (for example, packet loss rate has a higher weight on transmission security than bandwidth). Ultimately, an overall parameter fluctuation coefficient is obtained that comprehensively reflects the overall stability of the network, providing a quantitative basis for subsequent adjustments to the initial transmission security factor.
[0039] The normalized mean values of standard monitoring indicators, such as signal strength, bandwidth, latency, and packet loss rate, are substituted into a pre-set linear weighted model. The mean signal strength and bandwidth values are calculated with positive weights (e.g., 0.3 for signal strength and 0.25 for bandwidth), while the mean latency and packet loss rate values are calculated with negative weights (-0.25 for latency and -0.2 for packet loss rate). This yields an initial transmission safety factor. Next, the overall parameter fluctuation coefficient is calculated (the weighted sum of the fluctuation coefficients of each parameter, e.g., 0.2 for signal strength, 0.2 for bandwidth, 0.3 for latency, and 0.3 for packet loss rate). When the overall parameter fluctuation coefficient exceeds a threshold, the predicted transmission safety factor is adjusted according to the formula: Predicted Transmission Safety Factor = Initial Transmission Safety Factor × (1 - Fluctuation Attenuation Factor × Overall Parameter Fluctuation Factor), where the fluctuation attenuation factor is set to 0.5. The final output is the adjusted predicted transmission safety factor, providing a quantitative basis for dual-protocol adaptation.
[0040] In one possible implementation, step S300 further includes: Step S310: configuring a data transmission dual protocol, wherein the data transmission dual protocol includes a UFN protocol and a UFC protocol.
[0041] Step S320: If the predicted transmission safety factor is less than or equal to the transmission safety index of the BMS program update, data transmission and verification of the difference data segment are performed according to the preset verification mechanism and the UFC protocol.
[0042] Specifically, dual data transmission protocols are configured: a network-based remote upgrade protocol (UFN protocol) and a controller area network (CAN) bus-based local upgrade protocol (UFC protocol). The UFN protocol boasts fast transmission speeds, making it suitable for large-scale equipment deployment and highly flexible, enabling automatic upgrades to improve efficiency. However, this protocol requires high network stability, carries upgrade risks, and exhibits relatively low security. The UFC protocol, on the other hand, offers the advantages of high stability, lacks reliance on an external network, and offers enhanced security. The two complement each other, providing a flexible and reliable option for BMS program upgrades in various network environments.
[0043] If the predicted transmission safety factor is less than or equal to the transmission safety index for the BMS program update, indicating an unstable network environment or a high transmission risk, the UFC protocol (a local upgrade protocol based on the CAN bus) is used in conjunction with a pre-set verification mechanism to perform transmission and verification of the difference data segment. The specific process is as follows: the master device (MASTER) first sends 64 bytes of program information (with IDs 0x19AA5540 to 0x19AA5547) via the CAN bus in eight packets, followed by a verification packet (ID 0x19AA5548) containing the master-side cyclic redundancy check (MCRC) and the master-side cumulative sum check (MSUM). The slave device (SLAVE) performs the MODBUS CRC algorithm check (SCSRC) and the slave-side cumulative sum check (SSUM) on the received program information, and responds with a message with ID 0x19AA5549 to verify the verification results. If the verification fails, the program information is resent. After the verification is passed, the master device sends the program data in a message with ID 0x18A80000 plus a serial number. The slave device sends the data back as is (with the same ID) for comparison. After the master device sends the completion message (ID 0x19AA5551), the slave device independently verifies and passes the message feedback with ID 0x19AA5552 (RUL=0 indicates complete, RUL=1 means re-send). The MCRC and SSUM dual verification mechanism ensures reliable data transmission in the local CAN bus environment, avoiding data loss caused by network fluctuations.
[0044] In one possible implementation, step S300 further includes: Step S330: using the long short-term memory network, predicting and obtaining the CAN bus load of the UFC protocol within the preset time window, and setting it as the predicted CAN bus state.
[0045] Step S340: constructing a fitness evaluation function, wherein the fitness is determined based on a weighted evaluation of data transmission rate, transmission stability, and transmission security.
[0046] Step S350: performing historical transmission behavior statistics based on the predicted CAN bus state as a constraint, and outputting a first transmission state mean.
[0047] Step S360: performing historical transmission behavior statistics based on the predicted network state as a constraint, and outputting a second transmission state mean.
[0048] Step S370: using the fitness evaluation function, determining the first fitness and the second fitness according to the first transmission state mean and the second transmission state mean, and selecting the transmission protocol with the larger fitness as the adapted transmission protocol.
[0049] Specifically, we first collect historical CAN bus load data and the corresponding time series features, and construct an LSTM network model consisting of an input layer, a hidden layer, and an output layer. The historical load data and time series are used as input, and the model is trained to learn the dynamic changes of the CAN bus load. When the model converges, the current relevant data is input, and the model can output the CAN bus load prediction value within the preset time window. This prediction value is defined as the predicted CAN bus state, which provides a prediction basis for the CAN bus load for the subsequent dual-protocol adaptability analysis.
[0050] When constructing the fitness evaluation function, data transmission rate, transmission stability, and transmission security are used as core evaluation dimensions. A weighted evaluation is achieved by assigning scientifically appropriate weights to each dimension. The specific implementation method is as follows: First, the specific quantification methods for the three dimensions of data transmission rate (unit: Mbps), transmission stability (quantified by metrics such as packet loss rate and delay jitter), and transmission security (measured by metrics such as verification pass rate) are clarified. Then, weights are assigned to each dimension based on the actual requirements of the BMS upgrade scenario. For example, a weight of 0.4 is set for data transmission rate, 0.3 for transmission stability, and 0.3 for transmission security. Finally, a weighted summation method is used to construct the function, such as fitness = 0.4 × (data transmission rate / standard rate) + 0.3 × (1 - transmission stability index) + 0.3 × transmission security index. The standard rate can be set to 10 Mbps (the theoretical maximum rate of the UFN protocol). The transmission stability index is the normalized value of the packet loss rate, and the transmission security index is the normalized value of the verification pass rate. This quantitatively evaluates the fitness of the UFN and UFC protocols.
[0051] The CAN bus load (i.e., the predicted CAN bus state) of the UFC protocol within a preset time window, predicted by the long short-term memory network, is used as a screening criterion. All transmission records under similar or identical conditions to the predicted CAN bus state are retrieved from the historical transmission behavior database. For example, historical data with a CAN bus load within ±10% of the predicted value is selected. Then, metrics such as data transmission rate, transmission stability (such as bit error rate and packet loss rate), and transmission security (such as the number of successful verifications and data integrity) are extracted from this filtered historical data. The average of each metric is calculated to obtain the first transmission state mean. This mean represents the historical transmission performance of the UFC protocol under the predicted CAN bus state, providing a quantitative reference based on historical data for subsequent dual-protocol compatibility analysis.
[0052] Using the predicted network state (including predictive metrics such as signal strength, bandwidth, latency, and packet loss rate) within a preset time window obtained by the network state prediction plug-in as a filtering criterion, the system retrieves all historical transmission records matching or close to the predicted network state from the historical transmission behavior database. For example, historical data with signal strength within ±5%, bandwidth within ±10%, latency within ±15%, and packet loss rate within ±5% of the predicted value is selected. Metrics such as data transmission rate, transmission stability (such as latency fluctuations and packet loss rate variations during transmission), and transmission security (such as verification pass rate and data error rate) are then extracted from this filtered historical data. The average of each metric is calculated to obtain the second transmission state mean. This mean reflects the historical transmission performance of the UFN protocol under the predicted network state and provides a key quantitative basis for evaluating the adaptability of the UFN protocol using the fitness evaluation function.
[0053] Using the established fitness evaluation function, the mean value of the first transmission state (corresponding to the historical transmission performance of the UFC protocol under the predicted CAN bus state) and the mean value of the second transmission state (corresponding to the historical transmission performance of the UFN protocol under the predicted network state) are substituted into the function for calculation. The fitness evaluation function uses a weighted evaluation model for data transmission rate, transmission stability, and transmission security (for example, weights of 0.4, 0.3, and 0.3, respectively). The first fitness is calculated for the UFC protocol, and the second fitness is calculated for the UFN protocol. By comparing the two values, the transmission protocol with the greater fitness is selected as the adaptive transmission protocol under the current prediction conditions. This ensures that the optimal protocol is dynamically selected to execute the differential data segment transmission and verification of the BMS program, while balancing transmission efficiency, stability, and security, achieving intelligent collaborative adaptation of the two protocols.
[0054] In one possible implementation, step S400 further includes: Step S410: configuring a first verification mechanism for the UFN protocol, wherein the first verification mechanism is an end-to-end cumulative sum verification mechanism.
[0055] Step S420: configuring a second verification mechanism for the UFC protocol, wherein the second verification mechanism is a dual verification mechanism of MCRC verification and SSUM verification.
[0056] Specifically, an end-to-end cumulative sum verification mechanism is configured for the UFN protocol as the first verification mechanism. When the UFN protocol performs data transmission, the sender will add each byte of the data to be transmitted in sequence to calculate a cumulative sum value, which will be attached to the end of the data packet and sent to the receiver. After the receiver receives the complete data packet, it will re-perform the byte accumulation operation on the data portion, generate a new cumulative sum, and compare it with the cumulative sum sent by the sender. If the two values are consistent, it indicates that the data has not been damaged during transmission and the verification passes; if they are inconsistent, it is determined that an error has occurred during the data transmission process, and the retransmission mechanism is triggered to ensure the integrity of the UFN protocol data transmission in a remote network environment. With its simple and efficient characteristics, this mechanism is suitable for scenarios where the UFN protocol has high requirements for transmission efficiency.
[0057] The UFC protocol uses a dual checksum mechanism, combining MCRC and SSUM, as a secondary checksum. When transmitting data using the UFC protocol, the master first applies the MODBUS CRC algorithm to the transmitted program information or data segment to generate the MCRC (Master Cyclic Redundancy Check) value. It also calculates the cumulative sum of the data to obtain the MSUM value. These two checksums are appended to the data and sent to the slave. Upon receiving the data, the slave performs the MODBUS CRC algorithm on the data to obtain the CRC value and the cumulative sum of the data to obtain the SSUM value. The CRC value is then compared with the received MCRC value, and the SSUM value with the received MSUM value. Only when both checksums match can the data transmission be confirmed as correct. If either checksum fails, the data transmission is deemed incorrect, triggering the master's retransmission mechanism. This dual checksum mechanism significantly improves the reliability of UFC protocol data transmission in a CAN bus environment, ensuring data integrity and accuracy during the upgrade process.
[0058] In one possible implementation, step S400 further includes: Step S430: The BMS program is updated based on the incremental recovery technology, and the program is upgraded according to the differential data image and the full baseline version.
[0059] Specifically, the program update of BMS adopts the incremental recovery technology. First, the current program version and the target version are compared through the diff algorithm to generate a differential data image containing only the code difference part, while retaining the full baseline version. During the upgrade, the incremental merge algorithm is used to verify and merge the differential data image and the full baseline version block by block. The verification method uses hash verification (such as MD5) to ensure the integrity of the differential data. During the merging process, the address mapping algorithm is used to accurately write the differential data to the corresponding storage area. If an abnormality occurs during the upgrade process, the incremental rollback mechanism is immediately triggered, and the reverse merge algorithm of the differential data image and the full baseline version is used to quickly restore the program. During the rollback process, the checkpoint mark is used to ensure the traceability of each step of the operation, thereby achieving efficient and reliable program upgrades and recovery, and greatly reducing the amount of data transmission and rollback time.
[0060] In one possible implementation, step S400 further includes: Step S440: Building a protocol adaptation layer, wherein the protocol adaptation layer is used for unified encapsulation of multiple interfaces, and the interfaces include at least a CAN interface, a UART interface, and a TCP interface.
[0061] Specifically, a protocol adaptation layer is built to unify the CAN, UART, and TCP interfaces. This protocol adaptation layer shields the hardware characteristics and communication protocol differences between different interfaces through an abstract interface layer, providing a unified API for upper-layer applications, freeing them from concern about the underlying interface types. For example, when the UFN protocol transmits data over a TCP interface, the protocol adaptation layer encapsulates TCP socket communication into a unified data send and receive interface. When the UFC protocol uses a CAN interface, the protocol adaptation layer encapsulates the CAN bus frame structure and arbitration mechanism into standardized operations. This approach improves the transmission rate from the current optimal solution of 1.2Mbps to 10Mbps (a 733% increase), increases the upgrade success rate from 92% to 99.97% (an 8.6% increase), increases the number of compatible protocols from one to two (a 100% increase), and reduces the rollback time from 60 seconds to 8 seconds (an 86.7% increase), comprehensively optimizing the efficiency and reliability of BMS remote upgrades.
[0062] By building a protocol adaptation layer and uniformly encapsulating the CAN, UART, and TCP interfaces, the improved technical effects are shown in Table 1: Table 1 Technical Effects
[0063] Example 2, based on the same inventive concept as the remote dual-protocol collaborative upgrade service method for BMS in the previous embodiment, Figure 2As shown, this application provides a remote dual-protocol collaborative upgrade service system for BMS. The system and method embodiments in the embodiments of this application are based on the same inventive concept. The system includes: The network status prediction module 10 is used to read the network monitoring indicator sequence of the current vehicle, perform network prediction within a preset time window, and output the predicted network status.
[0064] The transmission safety factor prediction module 20 is used to perform transmission safety analysis based on the predicted network status and output a predicted transmission safety factor.
[0065] The dual-protocol adaptability analysis module 30 is configured to perform a dual-protocol adaptability analysis based on the predicted CAN bus state and the predicted network state to determine an adapted transmission protocol if the predicted transmission safety factor is greater than the transmission safety index of the BMS program update.
[0066] The data transmission module 40 is used to perform data transmission and verification of the difference data segments according to a preset verification mechanism and the adapted transmission protocol.
[0067] Furthermore, the system is also used to implement the following functions: Configure network monitoring parameters, wherein the network monitoring parameters include signal strength, bandwidth, delay and packet loss rate; based on the network monitoring parameters, perform fixed-point monitoring to obtain network monitoring indicators at P consecutive time points, and obtain a network monitoring indicator sequence, wherein P is an integer greater than 5 and is set according to the duration of the preset time window; perform network prediction within the preset time window based on the network monitoring indicator sequence, and output the predicted network status.
[0068] Furthermore, the system is also used to implement the following functions: Based on the network monitoring records of vehicles of the same model, a sample network monitoring indicator sequence set is collected, and the network monitoring indicators at P consecutive time points in a subsequent historical time window are obtained as a sample prediction network monitoring indicator sequence, thereby obtaining a sample prediction network monitoring indicator sequence set; using the sample network monitoring indicator sequence set and the sample prediction network monitoring indicator sequence set, a long short-term memory network is trained until convergence to obtain a network state prediction plug-in; using the network state prediction plug-in, network prediction is performed according to the network monitoring indicator sequence, and a predicted network monitoring indicator sequence is output as a predicted network state.
[0069] Furthermore, the system is also used to implement the following functions: According to the predicted network monitoring indicator sequence, multiple monitoring parameters are respectively calculated and normalized to obtain the means of multiple standard monitoring indicators; according to the predicted network monitoring indicator sequence, parameter volatility is calculated for multiple monitoring parameters, multiple parameter fluctuation coefficients are output, and the overall parameter fluctuation coefficient is calculated to obtain the overall parameter fluctuation coefficient, wherein the fluctuation coefficient is the ratio of the indicator standard deviation to the indicator mean; the initial transmission safety factor is determined based on the evaluation of the mean values of the multiple standard monitoring indicators, the initial transmission safety factor is adjusted according to the overall parameter fluctuation coefficient, and the predicted transmission safety factor is output.
[0070] Furthermore, the system is also used to implement the following functions: A dual data transmission protocol is configured, wherein the dual data transmission protocol includes the UFN protocol and the UFC protocol; if the predicted transmission safety factor is less than or equal to the transmission safety index of the BMS program update, data transmission and verification of the difference data segment are performed according to a preset verification mechanism and the UFC protocol.
[0071] Furthermore, the system is also used to implement the following functions: The method comprises the following steps: using a long short-term memory network to predict and obtain the CAN bus load of the UFC protocol within the preset time window, and setting it as the predicted CAN bus state; constructing a fitness evaluation function, wherein the fitness is determined based on a weighted evaluation of data transmission rate, transmission stability, and transmission security; performing historical transmission behavior statistics with the predicted CAN bus state as a constraint, and outputting a first transmission state mean; performing historical transmission behavior statistics with the predicted network state as a constraint, and outputting a second transmission state mean; using the fitness evaluation function, determining a first fitness and a second fitness based on the first transmission state mean and the second transmission state mean, and selecting a transmission protocol with a larger fitness as the adapted transmission protocol.
[0072] Furthermore, the system is also used to implement the following functions: A first verification mechanism is configured for the UFN protocol, wherein the first verification mechanism is an end-to-end cumulative sum verification mechanism; a second verification mechanism is configured for the UFC protocol, wherein the second verification mechanism is a dual verification mechanism of MCRC verification and SSUM verification.
[0073] Furthermore, the system is also used to implement the following functions: BMS program updates are based on incremental recovery technology, and program upgrades are performed based on differential data images and the full baseline version.
[0074] Furthermore, the system is also used to implement the following functions: Build a protocol adaptation layer, wherein the protocol adaptation layer is used for unified encapsulation of multiple interfaces, and the interfaces include at least a CAN interface, a UART interface and a TCP interface.
[0075] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0076] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
[0077] This specification and drawings are merely illustrative of the present application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of this application. Thus, this application is intended to include such modifications and variations as fall within the scope of this application and its equivalents.
Claims
1. A remote dual-protocol collaborative upgrade service method for BMS, characterized in that: include: Read the network monitoring indicator sequence of the current vehicle, perform network prediction within the preset time window, and output the predicted network status; Performing a transmission security analysis based on the predicted network status and outputting a predicted transmission security factor; If the predicted transmission safety factor is greater than the transmission safety index of the BMS program update, a dual-protocol adaptability analysis is performed based on the predicted CAN bus state and the predicted network state to determine the adapted transmission protocol; According to the preset verification mechanism and the adapted transmission protocol, data transmission and verification of the difference data segments are performed.
2. The remote dual-protocol collaborative upgrade service method for BMS according to claim 1 is characterized in that: Read the network monitoring indicator sequence of the current vehicle, perform network prediction within the preset time window, and output the predicted network status, including: Configuring network monitoring parameters, wherein the network monitoring parameters include signal strength, bandwidth, delay, and packet loss rate; Based on the network monitoring parameters, fixed-point monitoring obtains network monitoring indicators at P consecutive time points to obtain a network monitoring indicator sequence, where P is an integer greater than 5 and is set according to the duration of the preset time window; Perform network prediction within a preset time window based on the network monitoring indicator sequence and output the predicted network status.
3. The remote dual-protocol collaborative upgrade service method for BMS according to claim 2 is characterized in that: Performing network prediction within a preset time window based on the network monitoring indicator sequence and outputting a predicted network status includes: Based on the network monitoring records of vehicles of the same model, a sample network monitoring indicator sequence set is collected, and the network monitoring indicators at P consecutive time points in the subsequent historical time window are obtained as a sample predicted network monitoring indicator sequence to obtain a sample predicted network monitoring indicator sequence set; Using the sample network monitoring indicator sequence set and the sample prediction network monitoring indicator sequence set, training the long short-term memory network until convergence to obtain a network state prediction plug-in; The network status prediction plug-in is used to perform network prediction based on the network monitoring indicator sequence, and a predicted network monitoring indicator sequence is output as a predicted network status.
4. The remote dual-protocol collaborative upgrade service method for BMS according to claim 3 is characterized in that: Performing a transmission security analysis based on the predicted network state and outputting a predicted transmission security factor includes: According to the predicted network monitoring indicator sequence, multiple monitoring parameters are respectively averaged and normalized to obtain the average values of multiple standard monitoring indicators; According to the predicted network monitoring indicator sequence, parameter volatility calculation is performed on multiple monitoring parameters respectively, multiple parameter fluctuation coefficients are output, and the overall parameter fluctuation coefficient is calculated and obtained, wherein the fluctuation coefficient is the ratio of the indicator standard deviation to the indicator mean; An initial transmission safety factor is determined based on the mean evaluation of the multiple standard monitoring indicators, the initial transmission safety factor is adjusted based on the overall parameter fluctuation coefficient, and a predicted transmission safety factor is output.
5. The remote dual-protocol collaborative upgrade service method for BMS according to claim 1 is characterized in that: The method also includes: Configuring a dual data transmission protocol, wherein the dual data transmission protocol includes a UFN protocol and a UFC protocol; If the predicted transmission safety factor is less than or equal to the transmission safety index of the BMS program update, data transmission and verification of the difference data segment are performed according to the preset verification mechanism and the UFC protocol.
6. The remote dual-protocol collaborative upgrade service method for BMS according to claim 5 is characterized in that: Performing dual-protocol adaptability analysis based on the predicted CAN bus state and the predicted network state to determine an adapted transmission protocol includes: Using a long short-term memory network, predicting and obtaining the CAN bus load of the UFC protocol within the preset time window, which is set as predicting the CAN bus state; Constructing a fitness evaluation function, wherein the fitness is determined based on a weighted evaluation of data transmission rate, transmission stability, and transmission security; Perform historical transmission behavior statistics based on the predicted CAN bus state as a constraint, and output a first transmission state mean; Perform historical transmission behavior statistics based on the predicted network state as a constraint, and output a second transmission state mean; The fitness evaluation function is used to evaluate and determine the first fitness and the second fitness according to the first transmission state mean and the second transmission state mean, and the transmission protocol with the larger fitness is selected as the adapted transmission protocol.
7. The remote dual-protocol collaborative upgrade service method for BMS according to claim 1 is characterized in that: Configure the preset verification mechanism, including: Configuring a first verification mechanism for the UFN protocol, wherein the first verification mechanism is an end-to-end cumulative sum verification mechanism; A second verification mechanism is configured for the UFC protocol, wherein the second verification mechanism is a dual verification mechanism of MCRC verification and SSUM verification.
8. The remote dual-protocol collaborative upgrade service method for BMS according to claim 1 is characterized in that: BMS program updates are based on incremental recovery technology, and program upgrades are performed based on differential data images and the full baseline version.
9. The remote dual-protocol collaborative upgrade service method for BMS according to claim 1 is characterized in that: Build a protocol adaptation layer, wherein the protocol adaptation layer is used for unified encapsulation of multiple interfaces, and the interfaces include at least a CAN interface, a UART interface and a TCP interface.
10. The remote dual-protocol collaborative upgrade service system for BMS is characterized by: The system is used to implement the remote dual-protocol collaborative upgrade service method for BMS according to any one of claims 1 to 9, and the system includes: The network status prediction module is used to read the network monitoring indicator sequence of the current vehicle, perform network prediction within a preset time window, and output the predicted network status; a transmission safety factor prediction module, configured to perform transmission safety analysis based on the predicted network state and output a predicted transmission safety factor; A dual-protocol adaptability analysis module is configured to perform a dual-protocol adaptability analysis based on the predicted CAN bus state and the predicted network state to determine an adapted transmission protocol if the predicted transmission safety factor is greater than the transmission safety index of the BMS program update; The data transmission module is used to perform data transmission and verification of the difference data segments according to a preset verification mechanism and the adapted transmission protocol.
Citation Information
Patent Citations
Signal I / O control device based on multiple protocols and data transmission method thereof
CN119363853A
Cited By
Verification device and verification method for background mechanism cyclic redundancy check algorithm
CN121072424A