A data interaction method for display screen of special equipment with CAN communication
By calculating transmission priority using multi-dimensional indicators and automatically identifying baud rates, the problems of CAN bus data frame conflicts and device adaptation were solved, enabling stable and efficient data interaction for special equipment displays.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGSHA SONNEPOWER ELECTRONICS TECH
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing data interaction methods for special equipment displays with CAN communication are prone to data frame conflicts when multiple devices transmit data concurrently, leading to packet loss and delays in critical information. Furthermore, devices with different baud rates require manual adaptation, reducing data interaction efficiency.
By collecting the operating parameters and data frame attribute information of the CAN bus, multi-dimensional indicators are used to calculate the transmission priority, automatically identify the baud rate and dynamically adjust the parsing parameters, dynamically allocate the data buffer capacity, and process the data frames in priority order.
It achieves stable data transmission and timely display of key information, is compatible with devices of different baud rates, eliminates the need for manual parameter adjustment, and improves the stability and compatibility of data interaction.
Smart Images

Figure CN121657958B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control or regulation system technology, and discloses a data interaction method for a special equipment display screen with CAN communication. Background Technology
[0002] During the operation of special equipment, multiple CAN devices need to transmit data to the display screen via the CAN bus. This data covers critical information such as equipment operating status, fault alarms, and operation command feedback. Existing data interaction methods for special equipment displays with CAN communication have significant technical flaws, with the core issue being insufficient collaborative optimization during concurrent data transmission from multiple devices. When multiple devices send data frames simultaneously, data frame conflicts easily occur on the CAN bus, leading to packet loss, data integrity corruption, and affecting operators' accurate judgment of equipment status. More critically, existing methods can only process data in a fixed order, failing to prioritize data based on its importance. Critical data such as fault alarms may be blocked by ordinary data, resulting in delayed presentation of critical information and creating safety hazards. Furthermore, different CAN device models have different baud rates, requiring manual adjustment of display screen resolution parameters in existing methods. This adaptation process is cumbersome and error-prone, reducing data interaction efficiency. Conventional optimization methods, such as adding CAN nodes, can only distribute some data and cannot fundamentally solve the collaborative problems of data priority sorting, automatic baud rate compatibility, and dynamic bus load adaptation.
[0003] There is an urgent need for an interactive method that can integrate multi-dimensional optimization strategies to simultaneously improve data transmission stability, timeliness of key information, and device compatibility. Summary of the Invention
[0004] This invention provides a data interaction method for a special equipment display screen with CAN communication, including acquiring data frames sent by various devices on the CAN bus, and further including the following steps:
[0005] S1: Collect the operating parameters of the CAN bus, including bus load rate, data transmission rate, and bus idle time;
[0006] S2: Extract the attribute information of each data frame, including data type, data length, sending device identifier, and data generation time. Based on the attribute information and the operating parameters, calculate the transmission priority of each data frame through multi-dimensional indicators.
[0007] S3: Analyze the synchronization segment characteristics and bit period fluctuation data of each data frame, combine them with historical adaptation baud rate data, automatically identify the baud rate corresponding to the transmitting device, and dynamically adjust the data parsing parameters according to the identification results;
[0008] S4: Based on the bus load rate, data transmission rate and maximum display capacity of the display screen in the operating parameters, dynamically adjust the allocated capacity of the data buffer, transmit the data frames to the display screen according to the transmission priority, and control the display screen to process and display the data in the order of the transmission priority.
[0009] The transmission priority quantization value is calculated using a dynamic priority calculation formula, which is as follows: Where P is the transmission priority quantization value; E is the data urgency quantization value; W is the sending device weight quantization value; T is the data timeliness quantization value; L is the bus load rate quantization value; D is the data length quantization value; ε is the load change correction coefficient; and Tint is the time interval from the data generation time to the current time. The integral value of the bus load rate over the time interval;
[0010] After automatically identifying the baud rate corresponding to the transmitting device, the adjustment range of the data parsing parameters is calculated using the baud rate adaptation adjustment coefficient formula, which is:
[0011] Where K is the baud rate adaptation adjustment coefficient, S is the synchronization segment stability quantization value, σ is the average value of the bit period fluctuation data, B0 is the initial identification baud rate, Bavg is the average value of the historical adaptation baud rate, α is the deviation correction coefficient, N is the number of historical adaptations, Bprevn is the baud rate of the nth historical adaptation, Btruen is the actual verification baud rate after the nth adaptation, and P is the transmission priority quantization value.
[0012] More preferably, the multi-dimensional indicators include data urgency, transmitting device weight, data timeliness, and bus load impact coefficient. The data urgency is determined based on the data type. The transmitting device weight is pre-configured based on the functional importance of the transmitting device in the special equipment. The data timeliness is calculated based on the difference between the data generation time and the current time. The bus load impact coefficient is determined based on the bus load rate and the bus idle time.
[0013] In a further preferred embodiment, the calculation of the transmission priority adopts a multi-dimensional index quantification and integration method. The data urgency, sending device weight, data timeliness, and bus load impact coefficient are all converted into quantified values with the same value range through normalization processing. The quantified values after normalization processing are integrated through a preset logical relationship to obtain the transmission priority quantified value.
[0014] Further preferably, the synchronization segment feature includes the number of level transitions and the transition interval of the synchronization segment in the data frame, and the bit period fluctuation data is the variance of the transition interval. The step of parsing the synchronization segment feature and bit period fluctuation data of each data frame includes: statistically analyzing the synchronization segment feature and bit period fluctuation data of a consecutive preset number of data frames, calculating the average value of the synchronization segment feature and the average value of the bit period fluctuation data, and using the average value as the basic data for identifying the baud rate corresponding to the transmitting device.
[0015] More preferably, the dynamically adjusted data cache allocation capacity is calculated using a dynamic cache capacity allocation formula, which is:
[0016]
[0017] Where C is the currently allocated cache capacity in bytes; Cmax is the maximum cache capacity supported by the display in bytes; P is the transmission priority quantization value, dimensionless; K is the baud rate adaptation adjustment coefficient, dimensionless; V is the data transmission rate quantization value, in kilobytes per second; Tdisp is the display refresh cycle of the display in seconds; Cmin is the minimum cache guarantee capacity in bytes; L is the bus load rate quantization value, dimensionless; λ is the load attenuation coefficient, dimensionless, ranging from 0.3 to 0.8, used to adjust the degree of influence of bus load on the minimum cache guarantee.
[0018] Further preferably, the step of dynamically adjusting the allocated capacity of the data cache also includes: monitoring the occupancy rate of the data cache in real time; when the occupancy rate exceeds a preset occupancy threshold, sorting the data in the data cache based on the transmission priority quantization value, retaining the data whose transmission priority quantization value is higher than the preset priority threshold, and releasing the cache space occupied by the data whose transmission priority quantization value is lower than the preset priority threshold. The preset occupancy threshold and the preset priority threshold are both pre-configured based on the maximum cache capacity of the display screen and the operating requirements of the special equipment.
[0019] Further preferably, the step of controlling the display screen to process and display data according to transmission priority includes: preset an emergency priority threshold; when a data frame with a transmission priority quantization value higher than the emergency priority threshold is detected, pausing the data currently being processed with a transmission priority quantization value lower than the emergency priority threshold, prioritizing the processing and display of the data frames with a transmission priority quantization value higher than the emergency priority threshold, and resuming the processing and display of data with a transmission priority quantization value lower than the emergency priority threshold after the data frames with a transmission priority quantization value higher than the emergency priority threshold have been displayed; wherein the emergency priority threshold is determined based on the quantization value range of multi-dimensional indicators and the safety operation requirements of special equipment.
[0020] More preferably, the step of collecting the operating parameters of the CAN bus includes collecting the bus load rate, data transmission rate, and bus idle time according to a preset sampling period, performing moving average filtering on the collected bus load rate, data transmission rate, and bus idle time to remove abnormal fluctuation data. The window size of the moving average filtering is determined based on the preset sampling period and the average transmission period of the data frame. The preset sampling period is pre-configured based on the operating conditions of the special equipment and the real-time requirements of data interaction.
[0021] Technical effects:
[0022] The core inventive technology of this invention lies in the organic integration of multi-dimensional indicators for collaborative calculation of transmission priority, automatic baud rate identification and dynamic adjustment of parsing parameters, and coordinated optimization of data cache capacity, bus load, and priority. This technical solution effectively solves the core problems of CAN communication data transmission congestion, delayed presentation of critical data, and cumbersome adaptation to different baud rate devices in existing technologies. It ensures data transmission without packet loss, prioritizes the display of critical information, and is compatible with different baud rate devices without manual parameter adjustment. This significantly improves the stability, timeliness, and compatibility of data interaction on special equipment displays, meeting the safety operation requirements of special equipment. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the data interaction method for the display screen of special equipment with CAN communication as described in this application.
[0024] Figure 2 This is a connection block diagram of the transmission priority calculation module for data interaction of the special equipment display screen with CAN communication in this application;
[0025] Figure 3 This application presents a connection block diagram for the automatic baud rate identification and dynamic parameter adjustment module for data interaction of a special equipment display screen with CAN communication.
[0026] Figure 4 This application presents a connection block diagram for the data buffer capacity dynamic allocation module of the special equipment display screen with CAN communication for data interaction.
[0027] Figure 5 This application presents a block diagram showing the connection of a display control module for special equipment with CAN communication, which processes data interaction according to transmission priority. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0030] Traditional technical solutions have the following technical problems: when multiple devices transmit data concurrently on the CAN bus, data frame conflicts lead to packet loss, critical data cannot be processed first, causing delays, and devices with different baud rates need to be manually adapted, resulting in low efficiency. Existing solutions cannot solve these three types of problems in a coordinated manner.
[0031] Based on this, please refer to Figure 1 The embodiment provides a data interaction method for a special equipment display screen with CAN communication, including collecting data frames sent by each device on the CAN bus, and further including the following steps:
[0032] S1: Collect the operating parameters of the CAN bus, including bus load rate, data transmission rate, and bus idle time;
[0033] S2: Extract the attribute information of each data frame, including data type, data length, sending device identifier, and data generation time. Based on the attribute information and the operating parameters, calculate the transmission priority of each data frame using multi-dimensional indicators. The quantified transmission priority value is calculated using a dynamic priority calculation formula, which is:
[0034]
[0035] Where P is the transmission priority quantification value, dimensionless; E is the data urgency quantification value, dimensionless, ranging from 0 to 10, with larger values indicating higher data urgency; W is the sending device weight quantification value, dimensionless, ranging from 0 to 10, with larger values indicating higher device functional importance; T is the data timeliness quantification value, in seconds, and is the difference between the current time and the data generation time; L is the bus load rate quantification value, dimensionless, ranging from 0 to 1, with larger values indicating heavier bus load; D is the data length quantification value, in bytes; ε is the load change correction coefficient, dimensionless, ranging from 0.1 to 0.5, used to balance the impact of dynamic changes in bus load on priority calculation; Tint is the time interval from the data generation time to the current time, in seconds. The integral value of the bus load rate over the time interval is dimensionless and reflects the dynamic trend of bus load changes.
[0036] S3: Analyze the synchronization segment characteristics and bit period fluctuation data of each data frame, combine them with historical adaptation baud rate data, automatically identify the baud rate corresponding to the transmitting device, and dynamically adjust the data parsing parameters according to the identification results;
[0037] After automatically identifying the baud rate corresponding to the transmitting device, the adjustment range of the data parsing parameters is calculated using the baud rate adaptation adjustment coefficient formula, which is:
[0038]
[0039] Where K is the baud rate adaptation adjustment coefficient, which is dimensionless; S is the synchronization segment stability quantization value, which is dimensionless and ranges from 0 to 1. The larger the value, the more stable the synchronization segment characteristics. , σ is the maximum allowable bit period fluctuation value (preset to 20μs); σ is the average value of the bit period fluctuation data in microseconds (see the supplement above for specific calculation method); B0 is the initial identification baud rate in kilobits per second; Bavg is the average value of the historical adaptation baud rates in kilobits per second; α is the deviation correction coefficient, dimensionless, ranging from 0.05 to 0.2, used to correct the impact of historical adaptation deviation on the current adjustment; N is the number of historical adaptations, dimensionless (fixed at 5); Bprevn is the baud rate of the nth historical adaptation in kilobits per second; Btruen is the actual verification baud rate after the nth adaptation in kilobits per second (see the supplement above for specific acquisition method); P is the transmission priority quantization value, dimensionless.
[0040] S4: Based on the bus load rate, data transmission rate and maximum display capacity of the display screen in the operating parameters, dynamically adjust the allocated capacity of the data buffer, transmit the data frames to the display screen according to the transmission priority, and control the display screen to process and display the data in the order of the transmission priority.
[0041] The dynamically adjusted data cache allocation capacity is calculated using a dynamic cache capacity allocation formula, which is: Where C is the currently allocated cache capacity in bytes; Cmax is the maximum cache capacity supported by the display in bytes; P is the transmission priority quantization value, dimensionless; K is the baud rate adaptation adjustment coefficient, dimensionless; V is the data transmission rate quantization value, in kilobytes per second; Tdisp is the display refresh cycle of the display in seconds; Cmin is the minimum cache guarantee capacity in bytes; L is the bus load rate quantization value, dimensionless; λ is the load attenuation coefficient, dimensionless, ranging from 0.3 to 0.8, used to adjust the degree of influence of bus load on minimum cache guarantee.
[0042] The detailed implementation process of this technical solution is as follows: First, the application scenario is defined as a CAN bus data interaction system for a military armored vehicle. The CAN devices include an engine controller, a braking system monitoring module, a fault alarm module, a navigation module, etc., and the display screen is an industrial-grade touch screen with a resolution of 1920×1080. In terms of hardware, the CAN communication module uses a TJA1050 chip, supporting the CAN2.0B protocol. The processor is an STM32H743VIT6 with a main frequency of 480MHz. The data cache module uses 1MB of SRAM. The CAN bus monitoring unit is integrated into the CAN communication module. In terms of software, the operating system is FreeRTOS V10.4.6, the programming language is C, the data parsing program is developed based on the CAN protocol stack, and the priority calculation and baud rate identification algorithms are implemented through firmware.
[0043] In step S1, the specific implementation of acquiring the CAN bus operating parameters is as follows: The bus load rate, data transmission rate, and bus idle time are acquired at a preset sampling period of 10ms. The bus load rate is obtained by statistically analyzing the ratio of CAN bus occupancy time to total time per unit time. The data transmission rate is obtained by calculating the number of data bytes transmitted on the bus per unit time. The bus idle time is obtained by monitoring the continuous time during which no data is transmitted on the CAN bus. The acquired data is processed using a moving average filter with a filter window size set to 5 sampling periods (50ms). This processing removes abnormal data caused by instantaneous fluctuations, ensuring the stability of the operating parameters.
[0044] In step S2, when extracting the attribute information of each data frame, the data type is determined by parsing the identifier field of the data frame. For example, the identifier for fault alarm data is 0x001, and the identifier for running status data is 0x002. The sending device identifier is extracted through the extended field of the data frame. The data generation time is provided by the timestamp field embedded in the data frame by the sending device. The data length is determined through the DLC field of the data frame. The specific calculation method of the multi-dimensional indicators is as follows: the data urgency is assigned according to the data type: fault alarm data is assigned a value of 10, braking system data is assigned a value of 8, engine running data is assigned a value of 6, navigation data is assigned a value of 4, and normal status data is assigned a value of 2; the sending device weight is pre-configured: the fault alarm module has a weight of 10, the braking system monitoring module has a weight of 9, the engine controller has a weight of 8, the navigation module has a weight of 7, and other auxiliary devices have a weight of 5; the data timeliness is the difference between the current time and the data generation time. For example, if the data generation time is t0 and the current time is t1, then T = t1 - t0; the bus load impact coefficient is calculated by a formula, where L_idle is the bus idle time, L_total is the sampling period, and the value range is 0 to 1.
[0045] Step S2 is supplemented as follows: The specific implementation of multi-dimensional indicator normalization is to use a linear normalization algorithm to uniformly transform the original quantized values of each indicator to a value range of 0 to 1. The specific formula is as follows:
[0046] Data urgency normalization: , where E is the original quantization value (0 to 10) and E' is the normalized quantization value (0 to 1).
[0047] Sending device weight normalization: , where W is the original quantization value (0 to 10) and W' is the normalized quantization value (0 to 1).
[0048] Data timeliness normalization: , where T is the original time difference (0 to 10 seconds), and T' is the normalized quantized value (0 to 1). When T > 10 seconds, T' is fixed at 0.
[0049] Bus load impact factor normalization: , where L is the original calculated value (0 to 1), and L' is the normalized quantized value (0 to 1).
[0050] The calculation of transmission priority quantification value in step S2 is supplemented as follows: The value of the load change correction coefficient ε is determined based on the bus load fluctuation amplitude. The optimal value under different fluctuation scenarios is verified experimentally: when the bus load volatility (the change in load rate per unit time) ≤ 0.1, ε is 0.1; when 0.1 < volatility ≤ 0.3, ε is 0.3; when volatility > 0.3, ε is 0.5. Tint and the data timeliness quantification value T are the same parameter, i.e. Bus load rate integral term The discrete integral algorithm is used for calculation, and the formula is as follows: Where n is the number of sampling points, This is the quantized value of the bus load rate from the i-th sample. The sampling interval (i.e., the preset sampling period of 10ms) is used to reflect the cumulative change trend of bus load within the Tint time period.
[0051] In step S3, the specific implementation of the synchronization segment feature acquisition is as follows: At the hardware level, level changes are captured through the level detection pins of the CAN communication module (such as the CANH / CANL pins of TJA1050). At the software level, the processor timer is configured to rise-edge capture mode. When a level transition from dominant (low) to recessive (high) is detected, the timer is triggered to capture and record the current count value. The transition interval is the difference between the timer count values corresponding to two consecutive level transitions, which is then converted into actual time (unit: microseconds) based on the timer's main frequency (480MHz). The variance calculation of the bit-period fluctuation data uses a sample variance algorithm, and the formula is... Where m is the number of consecutively counted data frames. Let be the transition interval for the i-th data frame. The average and variance of m jump intervals are... The arithmetic square root of the value is the bit period fluctuation data σ. The preset number m for continuous statistics is determined based on the balance between electromagnetic interference intensity and recognition accuracy. When the electromagnetic interference intensity of the application scenario is ≤20dB, m is 8 frames; when 20dB < interference intensity ≤40dB, m is 10 frames; when the interference intensity >40dB, m is 12 frames. In this embodiment, m = 10 frames is the default.
[0052] In step S3, the initial recognition baud rate B0 is calculated by averaging the transition intervals, and the bit period... baud rate (Unit: kilobits per second). Historical adapted baud rate data is stored in a designated partition of the processor's Flash memory (address range: 0x08080000-0x0808FFFF). This partition supports ≥100,000 erase / write cycles to meet long-term update requirements. The historical data update mechanism is as follows: After each baud rate adaptation and successful verification, if the number of historical adaptations N<5, the current Bprevn (the identified baud rate before this adaptation) and Btruen (the actual baud rate after this verification) are directly appended and stored; if N≥5, the oldest historical record is overwritten according to the first-in-first-out principle, always retaining the most recent 5 adaptation data. The method for obtaining the actual verified baud rate Btruen is as follows: After adaptation, 20 data frames are received continuously. The success rate of parsing is determined by analyzing the CRC checksum of the data frames. If the success rate is ≥98%, the current adapted baud rate is used as the Btruen; if the success rate is <98%, the baud rate is adjusted and adaptation is repeated until the success rate reaches the target.
[0053] The formula for the baud rate adaptation adjustment coefficient in step S3 is supplemented as follows: The value of the deviation correction coefficient α is determined based on the standard deviation of the historical adaptation deviation, and the formula is as follows: ,in Historical adaptation bias ( The standard deviation of ) The maximum permissible standard deviation (preset to 5 kbps) is used, and the value of α is constrained to be between 0.05 and 0.2. When the historical adaptation deviation fluctuation is small ( ), α is set to 0.05; when the fluctuation is moderate (1kbps < ), α is taken as 0.1; when the fluctuation is large ( ), α is set to 0.2.
[0054] In step S4, the maximum cache capacity Cmax of the display screen is set to 512 KB. The determination basis of the minimum cache guarantee capacity Cmin is: it is calculated based on the minimum data frame length (8 bytes), the maximum number of concurrent low-priority devices (32) and the reserved redundant space (10%) in special equipment. The formula is , substituting the values for calculation gives bytes, and rounding up to 32 KB (considering the memory partition alignment requirements). The selection logic of the load attenuation coefficient λ is: it is determined based on the balance experiment of the bus load and cache utilization rate. When the bus load rate L ≤ 0.3, λ takes 0.8; when 0.3 < L ≤ 0.6, λ takes 0.5; when L > 0.6, λ takes 0.3. The application scenario explanation of the exponential function is: at high load (L close to 1), the function value decreases, reducing the minimum cache guarantee capacity and releasing more cache space for high-priority data; at low load (L close to 0), the function value is close to 1, retaining the complete minimum cache to ensure that low-priority data is not lost.
[0055] Supplement to the dynamic allocation formula of the cache capacity in step S4: when the bus load rate L = 0.8 and λ = 0.5, , at this time the minimum cache guarantee capacity is bytes, only retaining the cache space for core low-priority data; when L = 0.2 and λ = 0.8, , the minimum cache guarantee capacity is bytes, ensuring the normal caching of low-priority data.
[0056] In step S4, when dynamically adjusting the data cache capacity, first calculate the value of C through the dynamic allocation formula of the cache capacity, and then adjust the storage partition of the SRAM according to the value of C. Store high-priority data in the high-speed cache area and low-priority data in the ordinary cache area. When controlling the display of the display screen, send a display instruction through the SPI interface of the display screen. The data frame with a priority higher than the emergency threshold triggers a display screen interruption, pauses the current display task, preferentially loads and displays this data, and resumes the original display task through task scheduling after the display is completed.
[0057] The theoretical design basis of this technical solution is that the essence of data conflict during multi-device concurrency is the unreasonable allocation of bus resources. Through the priority calculation combining data importance and bus status, the optimal allocation of resources can be achieved; the baud rate recognition is based on the synchronization segment characteristics of the CAN data frame, using the relationship between the bit period and the reciprocal of the baud rate, and combining historical data for correction to ensure the recognition accuracy; the cache dynamic adjustment is based on the bus load and data priority, avoiding cache overflow or idleness and ensuring the data processing efficiency. This solution solves the core problems of the existing technology through the collaborative execution of four steps, and the technical effect is stable and reliable.
[0058] Traditional technical solutions have the following technical problems: transmission priority calculation relies on only a single indicator, which cannot fully reflect the importance of data and the bus status, resulting in unreasonable priority ranking and critical data may still be delayed.
[0059] Based on this, the multi-dimensional indicators include data urgency, sending device weight, data timeliness, and bus load impact coefficient. The data urgency is determined based on the data type. The sending device weight is pre-configured based on the functional importance of the sending device in special equipment. The data timeliness is calculated based on the difference between the data generation time and the current time. The bus load impact coefficient is determined based on the bus load rate and bus idle time.
[0060] The detailed implementation process of this technical solution is as follows: The data urgency is determined by classifying data types into fault alarm, safety control, operating status, and auxiliary function categories, corresponding to urgency quantification values of 10, 8, 6, and 2, respectively. This classification is based on the safety operation requirements of special equipment. Fault alarm and safety control data are directly related to equipment operation safety and are assigned the highest urgency. The configuration of the sending device weight is determined by the functional hierarchy of the equipment. Core control devices such as fault alarm modules and braking system monitoring modules have the highest weight, while auxiliary devices such as air conditioning controllers and lighting modules have the lowest weight. The configuration file is stored in the processor's non-volatile memory and supports updates via a host computer.
[0061] Data timeliness is calculated using a high-precision timer with a precision of 1μs. The data generation time is generated by the transmitting device's built-in timer and embedded in bytes 7 to 10 of the data frame. The receiving end extracts this field and compares it with its local timer to obtain the time difference T. The smaller T is, the newer the data and the better the timeliness. The formula for calculating the bus load impact coefficient is (1-L)×(T_idle / T_sample), where L is the bus load rate, T_idle is the bus idle time, and T_sample is the sampling period. This coefficient comprehensively reflects the idle degree of the bus. The larger the coefficient, the more resources can be allocated to the bus, and the higher the data transmission priority can be.
[0062] The theoretical design basis of this technical solution is that the rationality of transmission priority must take into account both the importance of the data itself and the bus transmission conditions. A single indicator cannot fully cover these two dimensions, while a combination of multiple indicators can achieve precise quantification of priority. Data urgency and the weight of the sending device reflect the inherent importance of the data, data timeliness reflects the time value of the data, and the bus load impact coefficient reflects the transmission conditions. The synergy of these four factors ensures that priority ranking meets both equipment safety requirements and adapts to dynamic changes in the bus. This solution overcomes the limitations of single-indicator ranking and achieves significant technical results.
[0063] Traditional technical solutions have the following technical problems: the quantitative values of multi-dimensional indicators have different ranges, and direct integration will lead to an imbalance in priority calculation, affecting the accuracy of sorting.
[0064] Based on this, the calculation of transmission priority adopts a multi-dimensional index quantification and integration method. The data urgency, sending device weight, data timeliness, and bus load impact coefficient are all converted into quantified values with the same value range through normalization processing. The quantified values after normalization processing are integrated through a preset logical relationship to obtain the transmission priority quantified value.
[0065] The detailed implementation process of this technical solution is as follows: The normalization process adopts the linear normalization method to convert the original quantitative values of each indicator to a range of 0 to 1.
[0066] The normalized quantified values are integrated using a dynamic priority calculation formula. During the integration process, the data importance factor (E'×W') (3 / 2) is calculated first to amplify the core impact of data urgency and device weight; then, it is multiplied by the data timeliness factor T' (-1) to highlight the impact of timeliness on priority; the denominator is the bus constraint factor, which includes the square root of the bus load rate, the 1 / 3 power of the data length, and the integral of the dynamic change of the bus load to balance the constraints of bus load and data length on transmission; finally, the degree of influence of dynamic changes is adjusted by the load change correction coefficient ε.
[0067] The theoretical basis of this technical solution is that differences in the dimensions and value ranges of multi-dimensional indicators can lead to weight imbalances during calculation. Normalization can eliminate these differences, bringing all indicators to the same order of magnitude. The design of the pre-defined logical relationships is based on the importance of each indicator; data importance is the core, timeliness is a key supplement, and bus constraints are the fundamental condition. The mathematical combination of these three factors enables the scientific quantification of priorities. This solution solves the imbalance problem in multi-indicator integration and ensures accurate priority calculation.
[0068] Traditional technical solutions have the following problems: baud rate identification relies solely on the characteristics of a single data frame, making it susceptible to interference that can lead to identification errors and affect the accuracy of data parsing.
[0069] Based on this, the synchronization segment features include the number of level transitions and the transition interval of the synchronization segment in the data frame, and the bit period fluctuation data is the variance of the transition interval. The steps of parsing the synchronization segment features and bit period fluctuation data of each data frame include: statistically analyzing the synchronization segment features and bit period fluctuation data of a consecutive preset number of data frames, calculating the average value of the synchronization segment features and the average value of the bit period fluctuation data, and using the average value as the basic data for identifying the baud rate corresponding to the transmitting device.
[0070] The detailed implementation process of this technical solution is as follows: The number of level transitions in the synchronization segment is counted through the level detection pin of the CAN communication module. When the level is detected to change from dominant to recessive, the counter is incremented by 1. The number of synchronization segment transitions for each data frame is fixed at 1. By counting the number of transitions of a preset number of consecutive data frames (the specific basis for determination is explained in the supplement above), if an abnormal number of transitions occurs, the data frame is removed to ensure the accuracy of feature extraction.
[0071] The transition interval is implemented using the processor's timer capture function. The timer is configured to rise-edge capture mode. When a level transition is detected, the timer value is recorded, and the time difference between two captures is calculated to obtain the transition interval. The transition intervals of a preset number of consecutive data frames are counted, and the average value is calculated. and variance ,variance It reflects the degree of fluctuation in the jump interval. The smaller the value, the more stable the synchronization segment characteristics.
[0072] When the number of transitions in a consecutive preset number of data frames is 1, and the variance is... When the value is less than the preset threshold (5μs), the average value is used. Calculate bit period This leads to the baud rate. If variance If the value exceeds the preset threshold, the number of statistical data frames is increased to 1.5 times the original preset number, and the average and variance are recalculated until the variance meets the requirements. Historical adapted baud rate data includes the past 5 Bprevn and Btruen values, stored in a specified sector of the Flash memory, and updated after each adaptation is completed.
[0073] The theoretical basis of this technical solution is that the synchronization segment characteristics of a single data frame are susceptible to electromagnetic interference, leading to fluctuations in the transition interval. Statistical averaging of multiple data frames can reduce the impact of interference, and variance calculation can assess feature stability; higher stability results in more reliable identification. The relationship between the bit period and the transition interval is based on the CAN protocol's synchronization segment definition. A synchronization segment consists of one dominant bit and one recessive bit, with a total length of two time quanta; therefore, the bit period is twice the transition interval. This solution solves the instability problem of single data frame identification and improves the accuracy of baud rate identification.
[0074] Traditional technical solutions have the following technical problems: transmission priority calculation does not take into account dynamic load changes and data length differences on the bus, which leads to priority sorting failure under high load and obstruction of critical data transmission.
[0075] Based on this, the transmission priority quantization value is calculated using a dynamic priority calculation formula, which is as follows:
[0076]
[0077] Where P is the transmission priority quantification value, dimensionless; E is the data urgency quantification value, dimensionless, ranging from 0 to 10, with larger values indicating higher data urgency; W is the sending device weight quantification value, dimensionless, ranging from 0 to 10, with larger values indicating higher device functional importance; T is the data timeliness quantification value, in seconds, and is the difference between the current time and the data generation time; L is the bus load rate quantification value, dimensionless, ranging from 0 to 1, with larger values indicating heavier bus load; D is the data length quantification value, in bytes; ε is the load change correction coefficient, dimensionless, ranging from 0.1 to 0.5, used to balance the impact of dynamic changes in bus load on priority calculation; Tint is the time interval from the data generation time to the current time, in seconds. The integral value of the bus load rate over the time interval is dimensionless and reflects the dynamic trend of bus load changes.
[0078] The detailed implementation process of this technical solution is as follows: The logical derivation of the formula is based on the multi-objective optimization theory in systems engineering. The core objective is to maximize bus utilization while ensuring priority transmission of critical data. The numerator focuses on the priority attribute of the data itself. (E×W)(3 / 2) is in the form of a power of 3 / 2 because the urgency of the data and the weight of the sending device are the core factors that determine the priority. Their importance needs to be highlighted through nonlinear amplification. For example, when E=10 and W=10, (10×10)(3 / 2)=316.23, while when E=5 and W=5, (5×5)(3 / 2)=55.90. The difference between the two is significant, ensuring the priority advantage of the core data. T(-1) is in the reciprocal form because the stronger the timeliness of the data, the higher the priority should be. For example, when T=1 second, T(-1)=1, and when T=5 seconds, T(-1)=0.2, reflecting the attenuation effect of timeliness on priority.
[0079] The denominator section focuses on the constraints of bus transmission. The square root form is used because the impact of bus load rate on transmission increases non-linearly; as L increases from 0.5 to 1.0, As the constraint increases from 0.707 to 1.0, the constraint effect gradually strengthens, avoiding excessive data transmission congestion under high load. D(1 / 3) is in the form of a power of 1 / 3 because the data length has a relatively small impact on the transmission time. Using a lower power can balance its relationship with other constraint factors. For example, when D=8 bytes, D(1 / 3)=2, and when D=64 bytes, D^(1 / 3)=4, the constraint effect increases moderately. The integral of the bus load rate reflects the dynamic trend of load changes. When the load continues to rise, the integral value increases, the constraint effect is strengthened, and the algorithm is prompted to reduce the priority of non-critical data and reserve transmission resources for critical data. The value of ε is dynamically determined by the bus load volatility (see the supplement above for the specific logic), which can balance the influence of dynamic changes and static load and avoid excessive or insufficient constraints.
[0080] The following is an example of parameter calculation for the formula: For a certain fault alarm data, E=10, W=10, T=0.5 seconds, L=0.6, D=8 bytes, Tint=0.5 seconds, and bus load volatility=0.2 (corresponding to ε=0.3).
[0081] Number of sampling points n=50 (Tint=0.5 seconds, sampling interval 10ms). Average value = 0.6 The numerator is (10 × 10)(3 / 2) × 0.5(-1) = 316.23 × 2 = 632.46; the denominator is... P = 632.46 / 1.5492 + 0.3 × 0.3 ≈ 408.26. For a certain normal state data, E = 2, W = 5, T = 3 seconds, L = 0.6, D = 16 bytes, Tint = 3 seconds, bus load volatility = 0.1 (corresponding to ε = 0.1), number of sampling points n = 300. Average value = 0.6 The numerator (2×5)(3 / 2)×3(-1)=31.62×0.333≈10.54; the denominator... P = 10.54 / 1.952 + 0.1 × 1.8 ≈ 5.60. The priority difference between the two is significant, ensuring that fault alarm data is transmitted first.
[0082] The hardware implementation of this technical solution involves the processor acquiring attribute information and bus operating parameters of data frames via the CAN communication module, storing them in a designated buffer in SRAM, and using a timer interrupt to trigger priority calculation, with each interrupt cycle lasting 1ms to ensure real-time performance. The software implementation uses C language to write the core calculation functions, accelerating formula calculations through a floating-point arithmetic unit to avoid computational delays.
[0083] Traditional technical solutions have the following technical problems: baud rate adaptation is based only on the current recognition results, without taking into account historical adaptation data and data priority, resulting in low adaptation accuracy and errors in data parsing of key devices.
[0084] Based on this, after automatically identifying the baud rate corresponding to the transmitting device, the adjustment range of the data parsing parameters is calculated using the baud rate adaptation adjustment coefficient formula, which is:
[0085]
[0086] Where K is the baud rate adaptation adjustment coefficient, which is dimensionless; S is the synchronization segment stability quantization value, which is dimensionless and ranges from 0 to 1. The larger the value, the more stable the synchronization segment characteristics. , σ is the maximum allowable bit period fluctuation value (preset to 20μs); σ is the average value of the bit period fluctuation data in microseconds (see the supplement above for specific calculation method); B0 is the initial identification baud rate in kilobits per second; Bavg is the average value of the historical adaptation baud rates in kilobits per second; α is the deviation correction coefficient, dimensionless, ranging from 0.05 to 0.2, used to correct the impact of historical adaptation deviation on the current adjustment; N is the number of historical adaptations, dimensionless (fixed at 5); Bprevn is the baud rate of the nth historical adaptation in kilobits per second; Btruen is the actual verification baud rate after the nth adaptation in kilobits per second (see the supplement above for specific acquisition method); P is the transmission priority quantization value, dimensionless.
[0087] The detailed implementation process of this technical solution is as follows: The logical derivation of the formula is based on error correction theory, and the core objective is to achieve precise adjustment of baud rate adaptation by combining current identification features, historical adaptation deviations, and data priorities. Part 1 Focusing on the accuracy of the current identification, S is the quantification value of the synchronization segment stability, which is calculated by (1-σ / σmax). The larger S is, the more reliable the current identification result is. σ is the average value of the bit period fluctuation data. The smaller σ is, the more stable the synchronization segment characteristics are. The ratio of S / σ reflects the confidence level of the current identification. This is used to correct the deviation between the current recognition result and the historical average. When B0 is greater than Bavg, this value is positive and the adjustment coefficient increases. When B0 is less than Bavg, this value is negative and the adjustment coefficient decreases, ensuring that the adaptation result approaches the historical best value.
[0088] Part Two Focusing on historical bias correction and data priority weighting, The sum of historical adaptation deviations reflects the systematic errors of past adaptations. The value of α is dynamically determined by the standard deviation of historical deviations to control the degree of influence of historical deviations. P(1 / 2) is the square root of the data priority, highlighting the adaptation accuracy requirements of key data (high P value). For example, when P=408.26, P(1 / 2)≈20.21, and when P=5.60, P^(1 / 2)≈2.37. The historical deviation correction weight of key data is greater to ensure its adaptation accuracy.
[0089] The following is an example of parameter calculation for the formula: The initial identification baud rate of a fault alarm module is B0 = 500kbps, the average historical adaptation baud rate is Bavg = 498kbps, the quantization value of synchronization segment stability is S = 0.95 (σ = 1μs, σmax = 20μs), the average bit period fluctuation is σ = 1μs, the number of historical adaptations is N = 5, and the total historical deviation is... Historical deviation standard deviation σerr = 2 kbps (corresponding to α = 0.1), transmission priority quantization value P = 408.26. Part 1 Part Two K = 0.0109 + 10.105 ≈ 10.1159. The adjustment range of the data parsing parameters is K × 0.1%, that is, the baud rate is adjusted to 500 × (1 + 10.1159 × 0.1%) ≈ 505.058 kbps. The actual verified baud rate is 505 kbps, and the adaptation error is only 0.0116%. For a certain ordinary auxiliary device, B0 = 125 kbps, Bavg = 124.5 kbps, S = 0.8 (σ = 4 μs), σ = 4 μs, the total historical deviation = 2 kbps, the standard deviation of historical deviation σerr = 1 kbps (corresponding to α = 0.05), P = 5.60. Part 1 Part Two K = 0.0011 + 0.237 ≈ 0.2381. The adjustment range is 0.2381 × 0.1%, and the baud rate is adjusted to 125 × (1 + 0.2381 × 0.1%) ≈ 125.0298 kbps, with an adaptation error of 0.0238%, which meets the parsing requirements.
[0090] The hardware implementation of this technical solution involves the CAN communication module's baud rate register supporting adjustments with a precision of 1kbps. The processor configures this register via the I2C interface, and adjustment commands are sent via interrupts to ensure real-time adjustment. In the software implementation, historical adaptation data is stored in Flash memory, and CRC checks ensure data integrity after each adaptation. Priority weights are calculated using an FPU for accelerated computation.
[0091] Traditional technical solutions have the following technical problems: the data cache capacity is fixed and cannot adapt to dynamic changes in bus load, data priority and transmission rate, resulting in cache overflow or idleness, which affects data processing efficiency.
[0092] Based on this, the dynamically adjusted data cache allocation capacity is calculated using a dynamic cache capacity allocation formula, which is:
[0093]
[0094] Where C is the currently allocated cache capacity in bytes; Cmax is the maximum cache capacity supported by the display in bytes; P is the transmission priority quantization value, dimensionless; K is the baud rate adaptation adjustment coefficient, dimensionless; V is the data transmission rate quantization value, in kilobytes per second; Tdisp is the display refresh cycle of the display in seconds; Cmin is the minimum cache guarantee capacity in bytes; L is the bus load rate quantization value, dimensionless; λ is the load attenuation coefficient, dimensionless, ranging from 0.3 to 0.8, used to adjust the degree of influence of bus load on the minimum cache guarantee.
[0095] The detailed implementation process of this technical solution is as follows: The logical derivation of the formula is based on the dynamic optimization allocation theory of cache resources. The core objective is to rationally allocate cache capacity according to data transmission requirements and bus status, avoiding overflow or idleness. Part 1 Focusing on data transmission needs, P×K reflects the data priority and adaptation accuracy. The larger the value, the more important the data and the more accurate the adaptation, requiring more cache allocation. V×Tdisp reflects the display's processing power per unit time. V is the data transmission rate, and Tdisp is the display refresh cycle. The larger the product of the two, the stronger the display's processing power, and the cache allocation can be appropriately reduced to ensure that cache resources are not idle.
[0096] Part Two Focusing on the impact of bus load on the minimum cache, Cmin guarantees the minimum cache capacity, ensuring that data has basic cache space even in low-load scenarios; The load decay function is used to reduce the value of the function as the bus load rate L increases. The minimum cache capacity is appropriately reduced to reserve more cache for high-priority data. The value of λ is dynamically determined by the bus load range, which can balance the relationship between load changes and cache guarantee. When L=0, e0=1 and the minimum cache is Cmin. When L=1, e(-1 / λ) decreases as λ decreases, so as to release cache resources reasonably.
[0097] The following is an example of parameter calculation for the formula: Maximum display cache capacity Cmax = 512KB, minimum guaranteed cache capacity Cmin = 32KB, for a certain fault alarm data: P = 408.26, K = 10.1159, V = 100KB / s, Tdisp = 0.1 seconds, L = 0.8 (corresponding to λ = 0.3). Part 1: 512× =512× =512×412.98≈211445 bytes; the second part 32×e(-0.8 / 0.3)=32×e(-2.6667)=32×0.0694≈2.22 bytes; C=211445+2.22≈211447 bytes. For a certain normal state data, P=5.60, K=0.2381, V=50KB / s, Tdisp=0.1 seconds, L=0.8 (corresponding to λ=0.3). The first part 512× =512× =512 × 0.2666 ≈ 136 bytes; the second part is 32 × 0.0694 ≈ 2.22 bytes; C = 136 + 2.22 ≈ 138 bytes. The cache capacity allocated to high-priority data is significantly larger than that for low-priority data, ensuring cache space for critical data.
[0098] The hardware implementation of this technical solution involves a data cache module using 1MB of SRAM, divided into multiple dynamic partitions. The capacity of each partition is configured through the processor's memory management unit (MMU), which supports byte-level capacity adjustment. In the software implementation, the cache allocation function is triggered by a timer interrupt, with each interrupt cycle lasting 2ms. The partition capacity is dynamically adjusted based on the calculated results, while simultaneously monitoring cache occupancy to ensure real-time adjustments.
[0099] Traditional technical solutions have the following technical problems: when the cache utilization rate is too high, data is simply discarded without considering data priority, resulting in the loss of critical data.
[0100] Based on this, the step of dynamically adjusting the allocated capacity of the data cache also includes real-time monitoring of the data cache occupancy rate. When the occupancy rate exceeds a preset occupancy threshold, the data in the data cache is sorted based on the transmission priority quantization value. Data with a transmission priority quantization value higher than the preset priority threshold is retained, and the cache space occupied by data with a transmission priority quantization value lower than the preset priority threshold is released. The preset occupancy threshold and the preset priority threshold are both pre-configured based on the maximum cache capacity of the display screen and the operating requirements of the special equipment.
[0101] The detailed implementation process of this technical solution is as follows: The preset occupancy threshold is set to 85%, meaning that when the cache occupancy rate exceeds 85%, the cache cleanup mechanism is triggered; the preset priority threshold is set to 8, meaning that data with a transmission priority quantization value higher than 8 is retained, and data with a priority lower than 8 is released. Real-time monitoring of cache occupancy rate is achieved by the processor reading the number of bytes used in the cache through the status register of the memory management unit, comparing it with the maximum cache capacity, calculating the occupancy rate, and the monitoring period is 1ms.
[0102] The cache cleanup mechanism works as follows: when the occupancy rate exceeds 85%, the processor pauses data reception, sorts the data in the cache in descending order according to the transmission priority quantization value, and uses quicksort as the sorting algorithm with a time complexity of O(nlogn) to ensure cleanup efficiency; the first N data items after sorting are retained, and the cache space for the remaining data is released; after cleanup is completed, data reception is resumed, and the cleanup log is stored in Flash memory for easy subsequent investigation.
[0103] The software implementation of this technical solution is as follows: the cache cleanup function is used as an interrupt service routine, with a higher priority than the data receiving routine, to ensure timely cleanup.
[0104] Traditional technical solutions have the following technical problems: the display screen only displays data in a fixed order, which cannot respond to the real-time display needs of high-priority data, resulting in a delay in the presentation of key information.
[0105] Based on this, the step of controlling the display screen to process and display data according to transmission priority includes: preset an emergency priority threshold; when a data frame with a transmission priority quantization value higher than the emergency priority threshold is detected, pausing the data currently being processed with a transmission priority quantization value lower than the emergency priority threshold, prioritizing the processing and display of the data frames with a transmission priority quantization value higher than the emergency priority threshold, and resuming the processing and display of data with a transmission priority quantization value lower than the emergency priority threshold after the data frames with a transmission priority quantization value higher than the emergency priority threshold have been displayed; the emergency priority threshold is determined based on the quantization value range of multi-dimensional indicators and the safety operation requirements of special equipment.
[0106] The detailed implementation process of this technical solution is as follows: The emergency priority threshold is set to 8, corresponding to security control and fault alarm data with an emergency level of 8 or higher. The detection of high-priority data is achieved by the processor calculating the transmission priority quantization value in real time after receiving the data frame and comparing it with the emergency priority threshold. When P > 8, an emergency display interruption is triggered on the screen.
[0107] The display control is implemented through the SPI interface. During normal display, the processor sends display data to the display in priority order, and the display refresh cycle is 0.1 seconds. When an emergency display interrupt is triggered, the processor sends a pause command to the display, which pauses the current display task and saves the current display state. The processor loads the display parameters of high-priority data, including display position, font size, color, etc. Fault alarm data is displayed in the center of the top of the display, with bold red font and a font size of 24. Safety control data is displayed on the left side of the display, with bold yellow font and a font size of 20. After the high-priority data is displayed for 3 seconds, the processor sends a recovery command, and the display returns to its previous display state and continues to process low-priority data.
[0108] The software implementation of this technical solution involves setting the priority of the emergency display interrupt program to the highest level to ensure priority response.
[0109] Traditional technical solutions have the following technical problems: interference with the acquisition of CAN bus operating parameters leads to abnormal data, affecting the accuracy of subsequent priority calculation and cache adjustment.
[0110] Based on this, the steps for collecting the operating parameters of the CAN bus include: collecting the bus load rate, data transmission rate, and bus idle time according to a preset sampling period; performing a moving average filtering process on the collected bus load rate, data transmission rate, and bus idle time to remove abnormal fluctuation data; the window size of the moving average filtering process is determined based on the preset sampling period and the average transmission period of the data frame; the preset sampling period is pre-configured based on the operating conditions of the special equipment and the real-time requirements of data interaction.
[0111] The detailed implementation process of this technical solution is as follows: The preset sampling period is set to 10ms, and the average transmission period of the data frame is 5ms. Therefore, the window size of the moving average filter is set to 5 sampling periods, i.e., 50ms. The moving average filter is implemented as follows: the processor stores the collected running parameters in a circular buffer of length 5. Each time new data arrives, the oldest data is removed, the new data is added, and the average of the 5 data in the buffer is calculated as the filtered parameter value.
[0112] The criteria for judging abnormal data are as follows: when the collected parameter value exceeds ±30% of the normal range, it is considered abnormal data and is directly replaced with the previous filtered result in the buffer. The normal range is set as follows: bus load rate 0 to 1, data transfer rate 0 to 500KB / s, and bus idle time 0 to 10ms.
[0113] The hardware implementation of this technical solution involves integrating a filter circuit into the CAN bus monitoring unit to reduce the impact of electromagnetic interference on parameter acquisition. In the software implementation, the filter function is written in C language and has an execution time of less than 1μs, ensuring that the real-time performance of data interaction is not affected.
[0114] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
[0115] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A data interaction method for a special equipment display screen with CAN communication, comprising acquiring data frames sent by various devices on the CAN bus, characterized in that, It also includes the following steps: S1: Collect the operating parameters of the CAN bus, including bus load rate, data transmission rate, and bus idle time; S2: Extract the attribute information of each data frame, including data type, data length, sending device identifier, and data generation time. Based on the attribute information and the operating parameters, calculate the transmission priority of each data frame through multi-dimensional indicators. S3: Analyze the synchronization segment characteristics and bit period fluctuation data of each data frame, combine them with historical adaptation baud rate data, automatically identify the baud rate corresponding to the transmitting device, and dynamically adjust the data parsing parameters according to the identification results; S4: Based on the bus load rate, data transmission rate and maximum display capacity of the display screen in the operating parameters, dynamically adjust the allocated capacity of the data buffer, transmit the data frames to the display screen according to the transmission priority, and control the display screen to process and display the data in the order of the transmission priority. The transmission priority quantization value is calculated using a dynamic priority calculation formula, which is as follows: Where P is the transmission priority quantization value; E is the data urgency quantization value; W is the sending device weight quantization value; T is the data timeliness quantization value; L is the bus load rate quantization value; D is the data length quantization value; ε is the load change correction coefficient; and Tint is the time interval from the data generation time to the current time. The integral value of the bus load rate over the time interval; After automatically identifying the baud rate corresponding to the transmitting device, the adjustment range of the data parsing parameters is calculated using the baud rate adaptation adjustment coefficient formula, which is: Where K is the baud rate adaptation adjustment coefficient, S is the synchronization segment stability quantization value, σ is the average value of the bit period fluctuation data, B0 is the initial identification baud rate, Bavg is the average value of the historical adaptation baud rate, α is the deviation correction coefficient, N is the number of historical adaptations, Bprevn is the baud rate of the nth historical adaptation, Btruen is the actual verification baud rate after the nth adaptation, and P is the transmission priority quantization value.
2. The data interaction method for a special equipment display screen with CAN communication according to claim 1, characterized in that, The multi-dimensional indicators include data urgency, sending device weight, data timeliness, and bus load impact coefficient. The data urgency is determined based on the data type. The sending device weight is pre-configured based on the functional importance of the sending device in special equipment. The data timeliness is calculated based on the difference between the data generation time and the current time. The bus load impact coefficient is determined based on the bus load rate and bus idle time.
3. The data interaction method for a special equipment display screen with CAN communication according to claim 2, characterized in that, The calculation of transmission priority adopts a multi-dimensional index quantification and integration method. The data urgency, sending device weight, data timeliness, and bus load impact coefficient are all converted into quantified values with the same value range through normalization processing. The normalized quantified values are integrated through a preset logical relationship to obtain the transmission priority quantified value.
4. The data interaction method for a special equipment display screen with CAN communication according to claim 1, characterized in that, The synchronization segment features include the number of level transitions and the transition interval in the synchronization segment of the data frame. The bit period fluctuation data is the variance of the transition interval. The steps of parsing the synchronization segment features and bit period fluctuation data of each data frame include: statistically analyzing the synchronization segment features and bit period fluctuation data of a consecutive preset number of data frames; calculating the average value of the synchronization segment features and the average value of the bit period fluctuation data; and using the average value as the basic data for identifying the baud rate corresponding to the transmitting device.
5. The data interaction method for a special equipment display screen with CAN communication according to claim 4, characterized in that, The dynamically adjusted data cache allocation capacity is calculated using a dynamic cache capacity allocation formula, which is: Where C is the currently allocated buffer capacity in bytes; Cmax is the maximum buffer capacity supported by the display in bytes; P is the transmission priority quantization value, dimensionless; and K is the baud rate adaptation adjustment coefficient, dimensionless. V is the data transfer rate quantization value, in kilobytes per second; Tdisp is the display refresh cycle of the screen, in seconds; Cmin is the minimum buffer guarantee capacity, in bytes; L is the bus load rate quantization value, dimensionless. λ is the load attenuation coefficient, which is dimensionless and ranges from 0.3 to 0.
8. It is used to adjust the impact of bus load on minimum cache guarantee.
6. The data interaction method for a special equipment display screen with CAN communication according to claim 5, characterized in that, The step of dynamically adjusting the allocated capacity of the data cache also includes real-time monitoring of the data cache occupancy rate. When the occupancy rate exceeds a preset occupancy threshold, the data in the data cache is sorted based on the transmission priority quantization value. Data with a transmission priority quantization value higher than the preset priority threshold is retained, and the cache space occupied by data with a transmission priority quantization value lower than the preset priority threshold is released. The preset occupancy threshold and the preset priority threshold are both pre-configured based on the maximum cache capacity of the display screen and the operating requirements of the special equipment.
7. The data interaction method for a special equipment display screen with CAN communication according to claim 1, characterized in that, The steps of controlling the display screen to process and display data according to transmission priority include: preset an emergency priority threshold; when a data frame with a transmission priority quantization value higher than the emergency priority threshold is detected, pause the data currently being processed with a transmission priority quantization value lower than the emergency priority threshold, prioritize the processing and display of the data frames with a transmission priority quantization value higher than the emergency priority threshold, and resume the processing and display of data with a transmission priority quantization value lower than the emergency priority threshold after the data frames with a transmission priority quantization value higher than the emergency priority threshold have been displayed; the emergency priority threshold is determined based on the quantization value range of multi-dimensional indicators and the safety operation requirements of special equipment.
8. The data interaction method for a special equipment display screen with CAN communication according to claim 1, characterized in that, The steps for collecting the operating parameters of the CAN bus include: collecting bus load rate, data transmission rate, and bus idle time according to a preset sampling period; performing moving average filtering on the collected bus load rate, data transmission rate, and bus idle time to remove abnormal fluctuation data; the window size of the moving average filtering is determined based on the preset sampling period and the average transmission period of the data frame; the preset sampling period is pre-configured based on the operating conditions of the special equipment and the real-time requirements of data interaction.