Data monitoring and sending method and apparatus, electronic device, and vehicle
By obtaining the vehicle status in the vehicle, determining the target abnormal event and conducting preemption arbitration, the problems of waste of resources and failure of signal transmission when sending abnormal event data are solved, and efficient and safe data transmission is achieved.
Patent Information
- Application Number
- PCT/CN2024/133549
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-21
- Filing Date
- 2024-11-21
- Publication Date
- 2025-05-30
AI Technical Summary
In vehicles, sending abnormal event data is likely to cause waste of resources and failure to send signals, affecting driving safety.
By obtaining the vehicle status, a target exception event that meets the trigger condition is determined, and preemption arbitration is performed to determine the transmission order. Signal arrangement is performed in the data transmission channel to ensure that events with high priority are sent first.
It effectively avoids resource waste and signal transmission failure, ensures timely and efficient transmission of abnormal event data, and improves driving safety.
Smart Images

Figure CN2024133549_30052025_PF_FP_ABST
Abstract
Description
Data monitoring and sending method, device, electronic equipment and vehicle
[0001] This disclosure claims priority to an application for patent entitled “Method, device, electronic device and vehicle for monitoring and transmitting data” filed with the Patent Office of China on November 21, 2023, with application number 202311560277.5, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of vehicle technology, and in particular to a method, device, electronic device, and vehicle for monitoring and sending data. Background Art
[0003] With the increasing prevalence of connected car functionality in vehicles, an increasing number of signals on the CAN network are being sent to the cloud via TBOX (data acquisition equipment). In the vehicle network data acquisition chain, each controller sends the signal to be collected to the CAN bus in its domain. The gateway forwards this signal to the CAN bus in the infotainment domain where the TBOX resides. The TBOX then collects the signal and sends it to the cloud. The TBOX sampling cycle is typically 1 second, but can be longer. When collecting signals, the TBOX needs to clearly identify the CAN ID and the location of the CAN ID where the collected signal resides. Each signal's location is fixed. That is, once the CAN ID is confirmed, the same location can only be used for one signal. If emergency transmission is required to address an abnormal event, additional resources must be used to transmit the signal, resulting in wasted resources. This can even lead to signal transmission failure due to channel occupancy, impacting user driving safety. Summary of the Invention
[0004] In view of this, the purpose of the present disclosure is to propose a data monitoring and sending method, device, electronic equipment and vehicle to solve the problem of resource waste and even signal transmission failure when sending abnormal event data.
[0005] Based on the above objectives, a first aspect of the present disclosure provides a method for monitoring and sending data, comprising:
[0006] Obtain the vehicle status and determine the target abnormal events that meet the trigger conditions based on the vehicle status;
[0007] Perform preemptive arbitration on target abnormal events and determine the transmission order of target abnormal events;
[0008] Determine the events to be sent according to the transmission order, and perform signal arrangement of the events to be sent in the data transmission channel to obtain the signal arrangement order;
[0009] Send pending events according to the signal arrangement order.
[0010] Optionally, determining a target abnormal event that meets a trigger condition according to the vehicle state includes:
[0011] determining at least one trigger condition corresponding to the abnormal event;
[0012] determining at least one trigger state corresponding to the trigger condition;
[0013] In response to the vehicle state satisfying all trigger states of the trigger conditions, determining that the trigger condition is satisfied;
[0014] In response to all triggering conditions of the abnormal event being met, setting an event flag of the abnormal event;
[0015] The value of the abnormal event after being set is assigned to a priority value according to the event flag, and the abnormal event after being assigned is determined as the target abnormal event.
[0016] Optionally, performing preemptive arbitration according to the priority of the target abnormal event to determine the transmission order of the target abnormal event includes:
[0017] Determining a priority value of the target abnormal event;
[0018] Obtaining the occupancy status of the data transmission channel at the current moment;
[0019] Preemption arbitration is performed according to the priority value and the occupancy status to obtain the transmission order.
[0020] Optionally, performing preemption arbitration according to the priority value and the occupancy status to obtain the transmission order includes:
[0021] Sort in descending order according to the priority values to obtain an arrangement order;
[0022] In response to the occupancy status being that the data transmission channel is not occupied, sorting the target abnormal events according to the arrangement order to obtain the transmission order;
[0023] In response to the occupancy status being that the data sending channel is occupied, after the data sending channel completes sending the current event, the arrangement order is updated to obtain a new arrangement order, and the target abnormal events are sorted according to the new arrangement order to obtain the transmission order.
[0024] Optionally, sorting the target abnormal events according to the arrangement order to obtain the transmission order includes:
[0025] Determining a correspondence between the priority value and the target abnormal event;
[0026] The target abnormal events are sorted according to the arrangement order and the corresponding relationship to obtain the transmission order.
[0027] Optionally, updating the arrangement order to obtain a new arrangement order includes:
[0028] Determining a time period during which the data transmission channel changes from being occupied to being unoccupied;
[0029] In response to a new target abnormal event being triggered within the time period, re-sorting the target abnormal event according to its priority value and the arrangement order to obtain a new arrangement order;
[0030] In response to no new target abnormal event being triggered within the time period, the arrangement order is determined as the new arrangement order.
[0031] Optionally, after determining that the occupancy status is that the data sending channel is occupied, the method further includes:
[0032] Real-time monitoring of whether there are unoccupied idle data transmission channels;
[0033] In response to the existence of the idle data sending channel, preemptive arbitration is performed on the target abnormal event based on the idle data sending channel first.
[0034] Optionally, the performing signal arrangement on the to-be-sent events in the data sending channel to obtain a signal arrangement sequence includes:
[0035] Determining an event identification ID and event sending data of the event to be sent, wherein the event sending data includes at least one data signal;
[0036] Determining a signal arrangement order of the signal data in the event sending data;
[0037] Determining an identification bit and a signal data bit in the data transmission channel;
[0038] The event identification ID is added to the identification bit, and the event sending data is added to the signal data bit according to the signal arrangement sequence to obtain the signal arrangement sequence.
[0039] Optionally, determining an identification bit and a signal data bit in the data sending channel includes:
[0040] Determine the first byte in the data sending channel as the identification bit;
[0041] The remaining bytes except the first byte in the data sending channel are determined as the signal data bits.
[0042] Optionally, the data monitoring and sending method further includes:
[0043] In response to the completion of sending the event to be sent, the value of the event to be sent is assigned to a default value, the event flag of the event to be sent is restored to a default state, and preemptive arbitration is performed again.
[0044] Optionally, before the event to be sent is sent, the method further includes:
[0045] Real-time monitoring of whether there are unoccupied idle data transmission channels;
[0046] In response to the existence of the idle data sending channel, preemptive arbitration is performed on the remaining target abnormal events that do not include the to-be-sent event based on the idle data sending channel.
[0047] Optionally, the data monitoring and sending method further includes:
[0048] In response to the existence of a target priority value having the same priority, determining at least two sibling events corresponding to the target priority value;
[0049] Determine the setting time of each event of the same level, and sort the setting times according to the time sequence to obtain a time arrangement order;
[0050] The sibling events in the transmission sequence are sorted according to the chronological order.
[0051] A second aspect of the present disclosure provides a data monitoring and sending device, comprising: a processor, wherein the processor is configured to execute the following program modules stored in a memory:
[0052] The abnormality determination module is configured to: obtain the vehicle state and determine the target abnormal event that meets the trigger condition according to the vehicle state;
[0053] The preemption arbitration module is configured to: perform preemption arbitration on target abnormal events and determine the transmission order of the target abnormal events;
[0054] The signal arrangement module is configured to: determine the events to be sent according to the transmission order, and perform signal arrangement on the events to be sent in the data transmission channel to obtain a signal arrangement order;
[0055] The event sending module is configured to send the events to be sent according to the signal arrangement order.
[0056] A third aspect of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method provided in the first aspect of the present disclosure is implemented.
[0057] A fourth aspect of the present disclosure provides a vehicle, comprising the data monitoring and sending device provided by the second aspect of the present disclosure or the electronic device provided by the third aspect of the present disclosure.
[0058] As can be seen from the above, the data monitoring and transmission method, device, electronic device and vehicle provided by the present disclosure can obtain the vehicle status and determine the target abnormal events that meet the trigger conditions based on the vehicle status; through the vehicle status, real-time monitoring of abnormal events is achieved, and then the target abnormal events that meet the trigger conditions are determined so that the signal can be sent in time to improve the transmission efficiency. Then, preemptive arbitration is performed on the target abnormal events to determine the transmission order of the target abnormal events; when there are multiple target abnormal events, it is necessary to determine the transmission order of the target abnormal events through preemptive arbitration to avoid disorderly preemption of data transmission channels between target abnormal events, avoid excessive resource occupation and resource waste, and ensure that the signal can be sent smoothly. The events to be sent are determined according to the transmission order, and the signals of the events to be sent are arranged in the data transmission channel to obtain the signal arrangement order; and the events to be sent are sent according to the signal arrangement order. Through preemptive arbitration and signal arrangement, it is possible to use a small amount of CAN transmission resources to complete the transmission of multiple event data, and through signal arrangement, the event data can be correctly parsed in the cloud. The use of event preemption strategy can ensure that the target abnormal event with the highest priority sends data first, and preemption arbitration for the next target abnormal event will be performed again when the sending is completed, thus efficiently completing data collection and sending and reducing resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] FIG1 is a schematic diagram of a link for transmitting and collecting data in an Internet of Vehicles according to an embodiment of the present disclosure;
[0061] FIG2 is a schematic diagram showing the positional correspondence between the signals collected by the TBOX and the data transmission channels according to an embodiment of the present disclosure;
[0062] FIG3 is a flow chart of a method for monitoring and sending data according to an embodiment of the present disclosure;
[0063] FIG4 is a schematic diagram of determining whether an abnormal event is triggered according to an embodiment of the present disclosure;
[0064] FIG5 is a schematic diagram of a preemptive arbitration mode according to an embodiment of the present disclosure;
[0065] FIG6 is a schematic diagram of abnormal event data arrangement according to an embodiment of the present disclosure;
[0066] FIG7 is an overall schematic diagram of a method for monitoring and transmitting vehicle abnormal event data according to an embodiment of the present disclosure;
[0067] FIG8 is a flowchart of determining a target abnormal event according to an embodiment of the present disclosure;
[0068] FIG9 is a flow chart of determining the transmission order of target abnormal events according to an embodiment of the present disclosure;
[0069] FIG10 is a flow chart of determining signal arrangement sequence according to an embodiment of the present disclosure;
[0070] FIG11 is a flowchart of the same-level event sorting according to an embodiment of the present disclosure;
[0071] FIG12 is a schematic diagram of the structure of a device for monitoring and sending data according to an embodiment of the present disclosure;
[0072] FIG13 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0074] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.
[0075] It should be understood herein that any number of elements in the drawings is for illustration only and not for limitation, and any naming is only for distinction and does not have any limiting meaning.
[0076] Based on the description of the above background technology, the following situations also exist in the related art:
[0077] According to the link for sending and collecting data in the Internet of Vehicles (IoV) as shown in Figure 1, it can be seen that with the popularization of IoV functions in vehicles, more and more signals on the Controller Area Network (CAN) are sent to the cloud through data acquisition equipment (Telematics Box, TBOX). Figure 1 describes the link for vehicle data acquisition in related technologies. Each Electronic Control Unit (ECU) sends the signal to be collected to the CAN bus of its domain according to a certain frequency (for example, milliseconds or hundreds of milliseconds). The collected signal is then sent to the gateway via the CAN bus. The gateway forwards the collected signal to the CAN bus of the domain where the TBOX is located (for example, the entertainment system bus Infomercial CAN, referred to as Info CAN). The TBOX then collects the signal and sends it to the cloud. Due to the cost control of TBOX in mass-produced vehicles, the sampling period of most TBOX in related technologies is 1 second or even longer.
[0078] Among them, CAN bus includes the following types:
[0079] The Powertrain CAN bus (PT CAN) is responsible for vehicle power and has the highest signal priority and signal transmission rate in the vehicle's CAN network. The PT CAN bus generally includes the following ECUs: Engine Control Module (ECM), Supplemental Restraint System (SRS), Battery Management System (BMS), Electronic Park Brake (EPB), etc.
[0080] The Chassis Control CAN (CH CAN) bus is responsible for the vehicle chassis and four-wheel braking, stabilization, and steering. Because it involves braking, power steering, and steering for the entire vehicle, its network signal priority is high. The CH CAN bus typically hosts the following ECUs: the Antilock Brake System (ABS), the Electronic Stability Program (ESP), and the Electric Power Steering (EPS).
[0081] The Body CAN bus is responsible for the management and control of some intelligent hardware on the vehicle body that improves communication or safety. Its network signal priority is relatively low. The Body CAN bus generally has the following ECUs: Air Conditioning (AC), 360° Around View Monitor (AVM), Body Control Module (BCM) (such as sunroof, windows, fog lights, turn signals, wipers), Immobilizer (IMMO), Tire Pressure Monitoring System (PMS), etc.
[0082] The entertainment system bus, Info CAN, is an auxiliary optional device, so its priority is relatively low. It is mainly responsible for the management and control of some intelligent hardware on the vehicle body that improves entertainment. The Info CAN bus generally has the following ECUs: Video Audio Entertainment System (VAES) and Instrument Pack (IPK). Among them, the digital instrument in the instrument pack has entertainment functions such as music, map, and call.
[0083] The Diagnostic CAN (DiagCAN) bus primarily provides remote diagnostics and typically consists of a single TBOX. For electric vehicle CAN network models, the control unit is primarily centered around the vehicle control module (VCM).
[0084] Furthermore, according to the positional correspondence between the signal collected by the TBOX and the data transmission channel as shown in FIG2 , it can be seen that when collecting signals, the TBOX needs to clearly define the data transmission channel (which can be a complete CANID resource or a part of a CAN signal frame, and can be flexibly changed according to the amount of data sent by the event. In the embodiment of the present disclosure, the complete CANID is used as an example for explanation). The CANID and the position of the collected signal in the CANID, that is, the byte (or bit) to byte (or bit), are fixed. That is, after the CANID is confirmed, the same position can only be used for one signal.
[0085] If an emergency signal is required for an abnormal event, an additional data transmission channel must be used to send the signal, resulting in a waste of resources. For a TBOX with only one data transmission channel, signal transmission may even fail due to channel occupancy or disorderly channel preemption, affecting user driving safety.
[0086] The data monitoring and transmission method, device, electronic device, and vehicle provided by the embodiments of the present disclosure can obtain the vehicle status and determine the target abnormal events that meet the trigger conditions based on the vehicle status; the vehicle status is used to realize real-time monitoring of abnormal events, and then the target abnormal events that meet the trigger conditions are determined so that the signals can be sent in a timely manner to improve the transmission efficiency. Then, the target abnormal events are preemptively arbitrated to determine the transmission order of the target abnormal events; when there are multiple target abnormal events, it is necessary to determine the transmission order of the target abnormal events through preemptive arbitration to avoid disorderly preemption of the data transmission channel between target abnormal events, avoid excessive resource occupation and waste, and ensure that the signal can be sent smoothly. The events to be sent are determined according to the transmission order, and the signals of the events to be sent are arranged in the data transmission channel to obtain the signal arrangement order; and the events to be sent are sent according to the signal arrangement order. Through preemptive arbitration and signal arrangement, it is possible to use a small amount of CAN transmission resources to complete the transmission of multiple event data, and through signal arrangement, the event data can be correctly parsed in the cloud. The use of event preemption strategy can ensure that the target abnormal event with the highest priority sends data first, and preemption arbitration for the next target abnormal event will be performed again when the sending is completed, thus efficiently completing data collection and sending and reducing resource waste.
[0087] The following describes a method for monitoring and transmitting data according to an exemplary embodiment of the present disclosure with reference to the accompanying drawings.
[0088] In some embodiments, as shown in FIG3 , a method for monitoring and sending data includes:
[0089] Step 301: Obtain the vehicle status and determine the target abnormal event that meets the trigger condition according to the vehicle status.
[0090] In a specific implementation, the vehicle state refers to the operating state of each component of the vehicle during driving, such as the window state, door lock state, keyhole state, vehicle life state, battery static flow, airbag state, power battery thermal management state, engine fuel level state, power battery charge state, vehicle speed state, etc., and the vehicle state may change at any time during the vehicle's driving. For example, when the vehicle is just started, the power battery has sufficient power, and the power battery charge state is saturated (charge greater than or equal to 80%); after driving a certain distance, when the power battery charge is partially consumed, the power battery charge state changes to sufficient state (charge less than 80% and greater than or equal to 30%); as the vehicle continues to drive, the power battery charge state changes to deficient state (charge less than 30%).
[0091] Abnormal events include fault events, warning events, and prompt events, which are unusual signals detected during normal vehicle operation. Examples include battery thermal runaway fault signals, overspeed warning signals, and low battery warning signals. Each abnormal event has at least one separate trigger condition, and each trigger condition has its own logic for determining whether it is triggered. An abnormal event in which all trigger conditions are triggered is considered a target abnormal event. Whether the trigger conditions are met is determined based on the vehicle's state, as each trigger condition corresponds to at least one trigger state. Whether the trigger state is met is determined based on the vehicle's state.
[0092] For example, taking the low battery prompt event as an example, the low battery prompt event corresponds to a trigger condition: the battery power is too low; the trigger condition of the low battery power corresponds to a trigger condition: the power state of the power battery is a power-deficient state.
[0093] The power battery's state of charge can be determined based on the vehicle's status. When the power battery's charge level is below a certain threshold, the vehicle's state of charge is considered low-power. If the power battery's charge level is above the threshold, the vehicle's state of charge is considered normal. If the power battery's state of charge is low-power, the trigger state is determined to be met. That is, when the same vehicle state as the trigger state is detected, the trigger state is met. When all trigger states for the same trigger condition are met, the trigger condition is determined to be met, and an abnormal event is triggered. That is, when the low-power state is detected, the low-power warning event is determined to be triggered.
[0094] As shown in Figure 4, for example, when the trigger condition for abnormal event 1 is met, abnormal event 1 is determined to be triggered, and the event flag of abnormal event 1 is set. The value of the set abnormal event is assigned to the priority value. After the assignment is completed, the abnormal event is determined to be the target abnormal event. Setting represents a method of mapping input to output by externally forcing an input to change; resetting is to change the input value to the initial state at power-on through a program. Simply put, resetting is clearing to 0, and setting is setting to 1. Setting requires a mandatory input.
[0095] For example, the initial state of the value of the event flag is 0. After it is set, the priority of the abnormal event is determined by setting the value to different values, so the value can be set to the abnormal event priority value. If the priority of the abnormal event is level 3, the corresponding priority value is 3 (the larger the value, the higher the priority, and other forms of values can also be used to divide the levels, such as A, B, C...). Then the value is set from the initial state of 0 to 3. If the priority of the abnormal event is level 5, the corresponding priority value is 5. Then the value is set from the initial state of 0 to 5. Among them, the priority level can also be subdivided. For example, the priority of the abnormal event is level 5.1, and the priority value is 5.1. After the abnormal event is assigned, it becomes a target abnormal event and triggers the downstream preemption arbitration.
[0096] Step 302: Preemptive arbitration is performed on the target abnormal events to determine the transmission order of the target abnormal events.
[0097] In specific implementations, target abnormal events may be triggered simultaneously, or the data transmission channel may be occupied while the current event is being transmitted. During the transmission of the current event, multiple target abnormal events may already exist and need to be transmitted. In this case, it is necessary to sort the target abnormal events according to their priority to determine the transmission order of the target abnormal events. Because higher-priority target abnormal events correspond to actual problems that pose a greater safety threat to vehicle driving, they are transmitted first.
[0098] The preemptive arbitration process is shown in Figure 5. By defining the priority of each target abnormal event, each target abnormal event is assigned a priority value. The larger the priority value, the higher the priority. When the flag of the target abnormal event is set, the corresponding value is assigned to the priority value of the target abnormal event; when the flag of the target abnormal event is not set, the value is assigned to the initial value 0. When the data transmission channel is idle, the preemptive arbitration module works to determine the maximum priority value and give the currently idle data transmission channel resources to the event with the highest priority among the current target abnormal events; when the data transmission channel is busy, the preemptive arbitration module does not work because the data transmission channel is occupied, that is, it ensures that the event currently occupying the data transmission channel completes the data transmission before preemptive arbitration is performed. That is, when the data transmission channel is idle, the target abnormal event ranked first in the transmission order is sent first.
[0099] Step 303: Determine the events to be sent according to the transmission sequence, and perform signal arrangement on the events to be sent in the data transmission channel to obtain a signal arrangement sequence.
[0100] During specific implementation, the target abnormal event ranked first in the transmission order is the event to be sent. In order to meet the requirements of all situations, as shown in Figure 6, the case where there is only one data transmission channel is used as an example for explanation. The data sending resource has only one CANID, but different target abnormal event data needs to be sent, and the signal arrangement of each target abnormal event is different. Therefore, it is necessary to add an event identification ID at a preset position in the CANID (for example, the first position at the beginning) to confirm the event to be sent currently in the data sending channel. The full name of ID is Identity document, which means identity identification number, and the event identification ID means the identity identification number of the abnormal event. When the event identification ID is 1, the target abnormal event 1 is the event to be sent, and the data sending channel sends the data of abnormal event 1. The signal arrangement order is shown in Figure 6. Byte 1 is event identification ID 1, and the signal arrangement starting from byte 2 is all data belonging to abnormal event 1. Similarly, when performing data parsing in the cloud, it is also necessary to first determine the event identification ID and then parse the corresponding data.
[0101] By adding event identification IDs, the data of different abnormal events can be distinguished so that the cloud can parse the data corresponding to different abnormal events at the same position of the CAN ID in the same frame when performing data analysis, thereby achieving higher data transmission efficiency with less resource usage, and accurately and efficiently collecting and sending data on low-probability abnormal events to the cloud.
[0102] Step 304: Send the events to be sent according to the signal arrangement sequence.
[0103] In a specific implementation, after determining the signal arrangement order, the pending events are sent according to the signal arrangement order, for example, the signal is transmitted from byte1 to byten (the last digit). After the signal data at byten is sent, the pending events are sent and the signal transmission channel enters the idle state. After the pending events are sent, the event flag of abnormal event 1 is reset to the initial state, that is, the value is reset to 0. Since sending the pending events takes a certain amount of time, the data transmission channel is idle after the pending events are sent. At this time, the transmission order needs to be updated, and a new pending event is determined and sent according to the updated transmission order.
[0104] In the case where there are multiple data sending channels, priority is given to whether there is an idle data sending channel. If so, the idle channel is used to transmit event data. If not, the data sending channel that first enters the idle state is used to send event data. The arrangement of data in any data sending channel can use the method shown in step 303.
[0105] In summary, the data monitoring and transmission method provided by the embodiment of the present disclosure is shown in FIG7 . Each abnormal event determines the event triggering according to its own judgment logic. The preemptive arbitration module determines which abnormal event the current resources should be used for sending based on the data transmission requirements of the triggered target abnormal event, combined with the event priority and the occupancy of the data transmission channel. When the event data is sent, the fixed position of the CANID is used as a unit to distinguish the data of different abnormal events by adding an event identification ID. This allows the cloud to parse the data corresponding to different events at the same position of the same CANID frame when performing data parsing, thereby achieving the goal of sending the data of the event to be sent to the cloud with the least resource consumption and the highest efficiency.
[0106] Therefore, the data monitoring and sending method provided by the embodiment of the present disclosure can realize real-time monitoring of abnormal events through the vehicle status, and then determine the target abnormal events that meet the trigger conditions, so as to send signals in time and improve the sending efficiency. Then, when there are multiple target abnormal events, the transmission order of the target abnormal events is determined by preemptive arbitration, so as to avoid disorderly preemption of data transmission channels between target abnormal events, avoid excessive resource occupation and waste of resources, and ensure that the signal can be sent smoothly. Finally, after the signal sorting is completed, the event to be sent is sent. Through preemptive arbitration and signal arrangement, it is possible to use a small amount of CAN sending resources to complete the sending of multiple event data, and through signal arrangement, the event data can be correctly parsed in the cloud. The use of event preemption strategy can ensure that the target abnormal event with the highest priority sends data first, and when the sending is completed, preemptive arbitration is performed again for the next target abnormal event, which efficiently completes the collection and sending of data and reduces the waste of resources.
[0107] In some embodiments, as shown in FIG8 , determining a target abnormal event that meets a trigger condition according to the vehicle state includes:
[0108] Step 801: Determine at least one trigger condition corresponding to an abnormal event.
[0109] In practice, since each abnormal event corresponds to at least one trigger condition, determining whether an abnormal event has been triggered requires determining whether all corresponding trigger conditions have been triggered. For example, abnormal event 1 has two trigger conditions: trigger condition 1 and trigger condition 2. If only trigger condition 1 or trigger condition 2 is triggered, abnormal event 1 will not be triggered. Abnormal event 1 will only be triggered if both trigger conditions 1 and 2 are triggered.
[0110] Step 802: Determine at least one trigger state corresponding to the trigger condition.
[0111] In specific implementations, since each trigger condition corresponds to at least one trigger state, determining whether the trigger condition is satisfied requires determining whether all corresponding trigger states are detected. For example, Trigger Condition 1 has two trigger states: Trigger State 1 and Trigger State 2. If only Trigger State 1 or Trigger State 2 is detected, Trigger Condition 1 will not be triggered. Trigger Condition 1 is satisfied only when both Trigger State 1 and Trigger State 2 are detected.
[0112] Step 803: In response to the vehicle state satisfying all triggering states of the triggering conditions, determining that the triggering conditions are satisfied.
[0113] In a specific implementation, when the vehicle state includes all trigger states corresponding to the trigger conditions, it means that all trigger conditions of the trigger condition have been detected, and it can be determined that the trigger condition is met.
[0114] Step 804: In response to all triggering conditions of the abnormal event being met, the event flag of the abnormal event is set.
[0115] In specific implementations, when all trigger conditions are met, it can be determined that an abnormal event has been triggered and needs to be transmitted, and the abnormal event is determined to be the target abnormal event. Before determining the abnormal event to be transmitted as the target abnormal event, the abnormal event needs to undergo simple preliminary processing, namely setting the event flag of the abnormal event. Setting refers to a method of mapping input to output by externally forcing the input to change. Simply put, setting requires forcibly giving an input. Therefore, after the event flag is set, the event flag is in an input-ready state, and the given input can be placed in the event flag.
[0116] Step 805: assigning the value of the abnormal event after setting as a priority value according to the event flag, and determining the abnormal event after assigning the value as the target abnormal event.
[0117] In a specific implementation, the priority value is used as a given input after the event flag is set. Each abnormal event corresponds to a priority value. If each abnormal event corresponds to a unique priority value, it is preferred to assign a different priority value to each abnormal event, with the greater the importance of the abnormal event, the higher the priority value. If there are abnormal events with the same priority value, the order of their triggering time in preemptive arbitration needs to be determined.
[0118] For example, the initial state of the value of the event flag is 0. After it is set, the priority of the target abnormal event is determined by setting the value to different values, so the value can be set to the abnormal event priority value. If the priority of the abnormal event is level 3, the corresponding priority value is 3 (the larger the value, the higher the priority, and other forms of values can also be used to divide the levels, such as A, B, C...). Then the value is set from the initial state of 0 to 3. If the priority of the abnormal event is level 5, the corresponding priority value is 5. Then the value is set from the initial state of 0 to 5. Among them, the priority levels can also be subdivided. For example, the priority of the target abnormal event is level 5.1, and the priority value is 5.1. After the abnormal event is assigned, it becomes a target abnormal event, which will trigger the downstream preemption arbitration.
[0119] In some embodiments, as shown in FIG9 , preemptive arbitration is performed based on the priority of the target abnormal event to determine the transmission order of the target abnormal event, including:
[0120] Step 901: Determine the priority value of the target abnormal event.
[0121] In specific implementation, it is first necessary to read the event flag of each target abnormal event to determine the priority value corresponding to each target abnormal event, and then determine the order of each target abnormal event according to the priority value.
[0122] Step 902: Obtain the occupancy status of the data transmission channel at the current moment.
[0123] During specific implementation, since the data transmission channel may be transmitting other data, it is necessary to first determine the occupancy status of the transmission channel at the current moment before performing preemptive arbitration. If the data transmission channel is occupied, preemptive arbitration will not be performed until the data transmission channel becomes unoccupied and preemptive arbitration is started. Because preemptive arbitration needs to ensure timeliness, if preemptive arbitration is performed when the data transmission channel is occupied, a new target abnormal event may be triggered during the time period when the data transmission channel changes from an occupied state to an idle state. At this time, preemptive arbitration needs to be performed again to determine a new order. As a result, during the time period when the data transmission channel changes from an occupied state to an idle state, a preemptive arbitration needs to be performed every time a new target abnormal event is triggered, wasting computing resources. If preemptive arbitration is not performed again, target abnormal events with higher priorities may be transmitted later, resulting in untimely data transmission. Therefore, preemptive arbitration is not performed until the data transmission channel changes from an occupied state to an idle state, ensuring the timeliness of preemptive arbitration while avoiding the waste of resources from multiple arbitrations.
[0124] Step 903: Perform preemptive arbitration based on the priority value and occupancy status to obtain the transmission order.
[0125] In specific implementation, step 903 includes:
[0126] Step 9031: Sort in descending order according to the priority value to obtain the arrangement order.
[0127] During specific implementation, it is first necessary to sort the priority value of each read target abnormal event in descending order to obtain the arrangement order of the priority values.
[0128] Step 9032: In response to the occupancy status indicating that the data transmission channel is not occupied, the target abnormal events are sorted according to the arrangement order to obtain a transmission order.
[0129] During specific implementation, if the occupancy status of the data sending channel is that the data sending channel is not occupied, it is determined that the data sending channel is in an idle state, and data or signal transmission can be performed. Since the priority value corresponds to the target abnormal event one by one, the target abnormal event is sorted according to the arrangement order and correspondence of the priority value to obtain the transmission order of the target abnormal event. When transmitting, the target abnormal event in the first priority is preferentially selected for transmission.
[0130] Step 9033: In response to the occupancy status being that the data transmission channel is occupied, after the data transmission channel completes sending the current event, the arrangement order is updated to obtain a new arrangement order, and the target abnormal events are sorted according to the new arrangement order to obtain a transmission order.
[0131] During specific implementation, if the occupancy status of the data transmission channel is that the data transmission channel is occupied, it is determined that the data transmission channel is in an occupied state. At this time, it is impossible to transmit the target abnormal event. At this time, it is necessary to wait for the data transmission channel to complete the transmission of the currently transmitting event data. After the transmission is completed, the arrangement order is updated (if no new target abnormal event is triggered during the time period when the data transmission channel changes from the occupied state to the idle state, no update is required), and the target abnormal events are sorted according to the new arrangement order to obtain the transmission order. This transmission order is the sending order of the target abnormal event. However, each time a target abnormal event is successfully sent, the transmission order needs to be updated to ensure that the newly triggered target abnormal event is not missed.
[0132] In some embodiments, as shown in FIG10 , signal arrangement is performed on the events to be sent in the data sending channel to obtain a signal arrangement sequence, including:
[0133] Step 1001: Determine an event ID and event sending data of an event to be sent, wherein the event sending data includes at least one data signal.
[0134] In specific implementations, the target abnormal event ranked first in the transmission order is the event to be sent. Each abnormal event is associated with a unique event ID and unique event sending data that represents the abnormal event content. The event sending data includes at least one data signal. Typically, the event sending data is composed of multiple data signals arranged in a specific order.
[0135] Step 1002: Determine the signal arrangement order of the signal data in the event sending data.
[0136] In specific implementations, as shown in Figure 6 , the signal data in the event transmission data has a specific signal arrangement order, and each signal data occupies at least one byte of the data transmission channel. For example, signal 1, which is ranked first, occupies byte 2. The signal arrangement order can be understood as signal 1 to signal n from left to right in Figure 6 .
[0137] Step 1003: Determine the identification bit and the signal data bit in the data transmission channel.
[0138] In specific implementations, to address all scenarios, we'll use a single data transmission channel as an example. For example, in Figure 6, for CANID-1, the first byte is designated as the identifier, and the remaining bytes are designated as signal data bits. The identifier is used to add an event ID, and the signal data bits are used to add event transmission data.
[0139] Step 1004: Add the event ID to the identification bit, and add the event sending data to the signal data bit according to the signal arrangement sequence to obtain the signal arrangement sequence.
[0140] During specific implementation, there is only one CANID-1 for data sending resources, but different target abnormal event data needs to be sent, and the signal arrangement of each target abnormal event is different. Therefore, it is necessary to add an event identification ID at a preset position in CANID-1 (such as the first position at the beginning) to confirm the abnormal event corresponding to the event to be sent currently sent in the data sending channel. When the event identification ID is 1, abnormal event 1 is the event to be sent, and the data sending channel sends the data of abnormal event 1. The signal arrangement order is shown in Figure 6. Byte1 adds the event identification ID "1", that is, 1 is set to the flag bit, and the signal arrangement starting from byte2 is all event sending data belonging to abnormal event 1, and the arrangement order is the signal arrangement order of the signal data in the event sending data. Similarly, when performing data parsing in the cloud, it is also necessary to first determine the event identification ID and then parse the corresponding data.
[0141] In the case where there are multiple data sending channels, priority is given to whether there is an idle data sending channel. If so, the idle channel is used to transmit event data. If not, the data sending channel that first enters the idle state is used to send event data. The data arrangement method in any data sending channel is the same.
[0142] By adding event identification IDs, the data of different abnormal events can be distinguished so that the cloud can parse the data corresponding to different abnormal events at the same position of the CAN ID in the same frame when performing data analysis, thereby achieving higher data transmission efficiency with less resource usage, and accurately and efficiently collecting and sending data on low-probability abnormal events to the cloud.
[0143] In some embodiments, the data monitoring and sending method further includes:
[0144] In response to the completion of sending the event to be sent, the value of the event to be sent is assigned to a default value, and the event flag of the event to be sent is restored to a default state, and preemption arbitration is performed again.
[0145] In a specific implementation, after abnormal event 1, which is the event to be sent, is sent, the event flag of abnormal event 1 is reset, that is, the value of the event to be sent is assigned to a default value, for example, reset to 0. The event flag of the event to be sent is then restored to the default state. In the default state, the event flag remains at the default value and cannot be set, that is, no value is allowed to be assigned. Only when all the triggering conditions of the abnormal event are met can it be set, and the value can be assigned according to the priority value.
[0146] In some embodiments, as shown in FIG11 , the data monitoring and sending method further includes:
[0147] Step 1101: In response to the existence of a target priority value having the same priority, determine at least two events of the same level corresponding to the target priority value.
[0148] In specific implementation, different abnormal events may have the same priority value, which is the target priority value. When abnormal events with the same target priority value come, it will not be possible to sort them only according to the size of the priority value. Therefore, it is necessary to filter out abnormal events with the same target priority value, that is, to determine at least two events of the same level corresponding to the target priority value.
[0149] Step 1102: Determine the setting time of each event of the same level, sort the setting time according to the time sequence, and obtain the time arrangement sequence.
[0150] In specific implementation, for events of the same level, they can be sorted in chronological order according to the trigger time of the abnormal event. The trigger time can be understood as the setting time of each event of the same level. After determining the setting time of each event of the same level, the setting time is sorted according to the time sequence to obtain the time arrangement order.
[0151] Step 1103: Sort the events of the same level in the transmission sequence according to the time sequence.
[0152] In specific implementation, each abnormal event among the same-level events corresponds to a setting time in the time arrangement sequence. The same-level events in the transmission order are sorted according to the position of the setting time in the time arrangement sequence, thereby realizing the sorting of the same-level events with the same priority value.
[0153] It should be noted that the method of the embodiments of the present disclosure can be performed by a single device, such as a computer or server. The method of the embodiments of the present disclosure can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the multiple devices will interact with each other to complete the method.
[0154] It should be noted that the above description is limited to some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0155] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure further provides a data monitoring and sending device.
[0156] Referring to FIG12 , the data monitoring and sending device includes a processor, wherein the processor is configured to execute the following program modules stored in a memory:
[0157] The abnormality determination module 10 is configured to: obtain the vehicle state and determine the target abnormal event that meets the trigger condition according to the vehicle state;
[0158] The preemption arbitration module 20 is configured to: perform preemption arbitration on the target abnormal event and determine the transmission order of the target abnormal event;
[0159] The signal arrangement module 30 is configured to: determine the events to be sent according to the transmission order, and perform signal arrangement on the events to be sent in the data transmission channel to obtain a signal arrangement order;
[0160] The event sending module 40 is configured to send the events to be sent according to the signal arrangement sequence.
[0161] Optionally, the abnormality determination module 10 includes:
[0162] A condition determination unit is configured to: determine at least one trigger condition corresponding to the abnormal event;
[0163] A state determination unit is configured to: determine at least one trigger state corresponding to the trigger condition;
[0164] A condition determination unit is configured to: determine that a trigger condition is satisfied in response to the vehicle state satisfying all trigger conditions of the trigger condition;
[0165] A setting control unit is configured to: in response to all triggering conditions of the abnormal event being met, set the event flag of the abnormal event;
[0166] The target determination unit is configured to: assign the value of the set abnormal event as a priority value according to the event flag bit, and determine the abnormal event after the assignment as the target abnormal event.
[0167] Optionally, the preemption arbitration module 20 includes:
[0168] The value determination submodule is configured to: determine the priority value of the target abnormal event;
[0169] The occupancy judgment submodule is configured to: obtain the occupancy status of the data transmission channel at the current moment;
[0170] The sequence determination submodule is configured to: perform preemptive arbitration according to the priority value and occupancy status to obtain the transmission sequence.
[0171] Optionally, the submodules are determined sequentially, including:
[0172] The arrangement order determining unit is configured to: sort in descending order according to the priority values to obtain an arrangement order;
[0173] The first event sorting unit is configured to: in response to the occupancy status indicating that the data transmission channel is not occupied, sort the target abnormal events according to the arrangement order to obtain a transmission order;
[0174] The second event sorting unit is configured to: in response to the occupancy status being that the data sending channel is occupied, after the data sending channel completes sending the current event, update the sorting order to obtain a new sorting order, and sort the target abnormal events according to the new sorting order to obtain a transmission order.
[0175] Optionally, the first event sequencing unit includes:
[0176] The corresponding relationship determination subunit is configured to: determine the corresponding relationship between the priority value and the target abnormal event;
[0177] The first sorting subunit is configured to sort the target abnormal events according to the arrangement order and the corresponding relationship to obtain a transmission order.
[0178] Optionally, the second event sequencing unit includes:
[0179] The time period determination subunit is configured to: determine a time period when the data transmission channel changes from being occupied to being unoccupied;
[0180] The reordering subunit is configured to: in response to a new target abnormal event being triggered within a time period, reorder the events according to the priority value and arrangement order of the new target abnormal event to obtain a new arrangement order;
[0181] The order preserving subunit is configured to: in response to no new target abnormal event being triggered within a time period, determine the arrangement order as a new arrangement order.
[0182] Optionally, the sequence determination submodule further includes:
[0183] The first idle channel monitoring unit is configured to: monitor in real time whether there is an unoccupied idle data sending channel;
[0184] The first transmission channel switching unit is configured to: in response to the existence of an idle data transmission channel, preferentially perform preemptive arbitration on the target abnormal event according to the idle data transmission channel.
[0185] Optionally, the signal arrangement module 30 includes:
[0186] An event parsing unit is configured to: determine an event identification ID of an event to be sent and event sending data, wherein the event sending data includes at least one data signal;
[0187] The signal sequence determining unit is configured to: determine a signal arrangement sequence of the signal data in the event sending data;
[0188] The channel identification unit is configured to: determine an identification bit and a signal data bit in a data transmission channel;
[0189] The signal adding unit is configured to: add the event identification ID to the identification bit, and add the event sending data to the signal data bit according to the signal arrangement sequence to obtain the signal arrangement sequence.
[0190] Optionally, the channel identification unit includes:
[0191] The identification bit determination subunit is configured to: determine the first byte in the data transmission channel as the identification bit;
[0192] The data bit determination subunit is configured to determine the remaining bytes in the data transmission channel except the first byte as signal data bits.
[0193] Optionally, the abnormality determination module 10 further includes:
[0194] The data recovery unit is configured to: in response to the completion of sending the event to be sent, assign the value of the event to be sent to a default value, restore the event flag of the event to be sent to a default state, and perform preemptive arbitration again.
[0195] Optionally, the abnormality determination module 10 further includes:
[0196] The second idle channel monitoring unit is configured to: monitor in real time whether there is an unoccupied idle data sending channel;
[0197] The second transmission channel switching unit is configured to: in response to the existence of an idle data transmission channel, preferentially perform preemptive arbitration on the remaining target abnormal events that do not include the to-be-sent events according to the idle data transmission channel.
[0198] Optionally, the sequence determination submodule further includes:
[0199] a same-level event monitoring unit configured to: in response to the existence of a target priority value having the same priority, determine at least two same-level events corresponding to the target priority value;
[0200] The time sorting unit is configured to: determine the setting time of each event of the same level, sort the setting time according to the time sequence, and obtain the time arrangement order;
[0201] The third event sorting unit is configured to sort the events of the same level in the transmission sequence according to the time arrangement order.
[0202] For the convenience of description, the above devices are described as being functionally divided into various modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0203] The apparatus of the above embodiment is used to implement the corresponding data monitoring and sending method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0204] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the data monitoring and sending method described in any of the above embodiments is implemented.
[0205] FIG13 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other within the device via the bus 1050.
[0206] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0207] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0208] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0209] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0210] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0211] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0212] The electronic device of the above embodiment is used to implement the corresponding data monitoring and sending method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0213] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the data monitoring and sending method described in any of the above embodiments.
[0214] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0215] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data monitoring and sending method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0216] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a vehicle, including a data monitoring and sending device or electronic device, and executes the data monitoring and sending method described in any of the above embodiments through the data monitoring and sending device or electronic device, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0217] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0218] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.
[0219] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0220] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0221] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0222] In addition, to simplify the description and discussion, and so as not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the purview of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0223] Although the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0224] The embodiments of the present disclosure are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A method for monitoring and sending data, characterized in that: include: Acquire a vehicle state, and determine a target abnormal event that meets a trigger condition according to the vehicle state; Performing preemptive arbitration on the target abnormal event to determine the transmission order of the target abnormal event; Determine the events to be sent according to the transmission sequence, and perform signal arrangement on the events to be sent in the data transmission channel to obtain a signal arrangement sequence; The events to be sent are sent according to the signal arrangement sequence.
2. The method for monitoring and sending data according to claim 1, characterized in that: The determining, according to the vehicle state, a target abnormal event that meets a trigger condition includes: determining at least one trigger condition corresponding to the abnormal event; determining at least one trigger state corresponding to the trigger condition; In response to the vehicle state satisfying all trigger states of the trigger condition, determining that the trigger condition is satisfied; In response to all triggering conditions of the abnormal event being met, setting an event flag of the abnormal event; The value of the abnormal event after being set is assigned to a priority value according to the event flag bit, and the abnormal event after the assignment is determined as the target abnormal event.
3. The method for monitoring and sending data according to claim 1, characterized in that: The preemption arbitration is performed according to the priority of the target abnormal event to determine the transmission order of the target abnormal event, including: Determining a priority value of the target abnormal event; Obtaining the occupancy status of the data transmission channel at the current moment; Preemption arbitration is performed according to the priority value and the occupancy status to obtain the transmission order.
4. The method for monitoring and sending data according to claim 3, characterized in that: The performing preemption arbitration according to the priority value and the occupancy status to obtain the transmission order includes: Sorting in descending order according to the priority values to obtain an arrangement order; In response to the occupancy status being that the data transmission channel is not occupied, sorting the target abnormal events according to the arrangement order to obtain the transmission order; In response to the occupancy status being that the data sending channel is occupied, after the data sending channel completes sending the current event, the arrangement order is updated to obtain a new arrangement order, and the target abnormal events are sorted according to the new arrangement order to obtain the transmission order.
5. The method for monitoring and sending data according to claim 4, characterized in that: The step of sorting the target abnormal events according to the arrangement order to obtain the transmission order includes: Determining a correspondence between the priority value and the target abnormal event; The target abnormal events are sorted according to the arrangement order and the corresponding relationship to obtain the transmission order.
6. The method for monitoring and sending data according to claim 4, characterized in that: The updating of the arrangement order to obtain a new arrangement order includes: Determine a time period during which the data transmission channel changes from being occupied to being unoccupied; In response to a new target abnormal event being triggered within the time period, re-arranging according to the priority value of the new target abnormal event and the arrangement order to obtain the new arrangement order; In response to no new target abnormal event being triggered within the time period, the arrangement order is determined as the new arrangement order.
7. The method for monitoring and sending data according to claim 4, characterized in that: After determining that the occupancy condition is that the data transmission channel is occupied, the method further includes: Real-time monitoring of whether there are unoccupied idle data transmission channels; In response to the existence of the idle data sending channel, preemption arbitration is performed on the target abnormal event according to the idle data sending channel first.
8. The method for monitoring and sending data according to claim 1, characterized in that: The signal arrangement of the events to be sent in the data sending channel to obtain a signal arrangement sequence includes: Determine an event identification ID and event sending data of the event to be sent, wherein the event sending data includes at least one data signal; Determining a signal arrangement order of the signal data in the event sending data; Determining an identification bit and a signal data bit in the data transmission channel; The event identification ID is added to the identification bit, and the event sending data is added to the signal data bit according to the signal arrangement sequence to obtain the signal arrangement sequence.
9. The method for monitoring and sending data according to claim 8, characterized in that: The determining of the identification bit and the signal data bit in the data transmission channel includes: Determine the first byte in the data transmission channel as the identification bit; The remaining bytes except the first byte in the data sending channel are determined as the signal data bits.
10. The method for monitoring and sending data according to claim 2, characterized in that: Also includes: In response to the event to be sent being sent completely, the value of the event to be sent is assigned a default value, the event flag of the event to be sent is restored to a default state, and preemption arbitration is performed again.
11. The method for monitoring and sending data according to claim 10, characterized in that: Before the event to be sent is sent, the method further includes: Real-time monitoring of whether there are unoccupied idle data transmission channels; In response to the existence of the idle data sending channel, preemption arbitration is performed on the remaining target abnormal events that do not include the to-be-sent event based on the idle data sending channel.
12. The method for monitoring and sending data according to claim 4, characterized in that: Also includes: In response to the existence of a target priority value having the same priority, determining at least two events of the same level corresponding to the target priority value; Determine the setting time of each event of the same level, and sort the setting time according to the time sequence to obtain the time arrangement sequence; The sibling events in the transmission sequence are sorted according to the chronological order.
13. A data monitoring and sending device, characterized in that: include: A processor, wherein the processor is configured to execute the following program modules stored in the memory: The abnormality determination module is configured to: obtain a vehicle state, and determine a target abnormal event that meets a trigger condition according to the vehicle state; The preemption arbitration module is configured to: perform preemption arbitration on the target abnormal event to determine the transmission order of the target abnormal event; A signal arrangement module is configured to: determine the events to be sent according to the transmission sequence, and perform signal arrangement on the events to be sent in the data transmission channel to obtain a signal arrangement sequence; The event sending module is configured to send the events to be sent according to the signal arrangement sequence.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 12 is implemented.
15. A vehicle, characterized in that: Includes the data monitoring and sending device as claimed in claim 13 or the electronic device as claimed in claim 14.
Citation Information
Patent Citations
Mechanism and system for transmitting vehicle emergency message based on DSRC
CN101350134A
Open systems and the corresponding interfaces for automotive electronics (OSEK) architecture-based automobile fault diagnosis method and device, automobile and storage medium
CN109062195A
Data transmission method and data transmission device for vehicle
CN115459886A
Data monitoring and sending method and device, electronic equipment and vehicle
CN117376265A
On-vehicle device, on-vehicle device program, vehicle-to-vehicle communication support device, and vehicle-to-vehicle communication support program
JP2017046080A
Cited By
Signal redundancy control method based on drive-by-wire gateway and related device
CN121142945A
Chip, control method and device
CN121326836A