Sleep control method and device, vehicle and storage medium
By setting an identification list in the electronic control unit to filter non-network management messages, the problems of high costs and frequent abnormal wake-ups in the prior art are solved, and the effect of reducing energy consumption and message management costs is achieved.
Patent Information
- Application Number
- CN202510022085.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art is costly when avoiding the non-network management packet wake-up of electronic control units, and there are problems of frequent abnormal wake-up and increased energy consumption.
By responding to the pending message and exiting the pending state when the electronic control unit is in the sleep state, it is determined whether the identification frame identifier of the to be identified in the pending message is included in the identification list. If the identification list does not include the identification, which means that the message is a non-network management message, the control electronic control unit enters a sleep state.
It effectively reduces the cost of filtering non-network management packets, reduces the energy consumption of electronic control units, and avoids frequent abnormal wake-ups.
Smart Images

Figure CN119945812A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and more specifically, to a sleep control method, device, vehicle, and computer-readable storage medium. Background Art
[0002] In the related art, in order to prevent non-network management messages from waking up an electronic control unit in a dormant state, a message detector for detecting whether a message is a network management message can be set. When the electronic control unit is in a dormant state, the message detector detects whether the received message is a network management message. If the message is detected to be a non-network management message, the electronic control unit continues to remain in a dormant state, thereby effectively preventing non-network management messages from waking up the electronic control unit in a dormant state, reducing the occurrence of frequent abnormal wake-ups of the electronic control unit, and reducing the energy consumption of the electronic control unit. However, the cost of using this method for message management is relatively high. Summary of the invention
[0003] The present application proposes a sleep control method, device, vehicle and computer-readable storage medium to reduce the cost of message management.
[0004] In a first aspect, an embodiment of the present application provides a sleep control method, the method comprising:
[0005] When the electronic control unit in the vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, the electronic control unit exits the dormant state;
[0006] In response to exiting the dormant state, the electronic control unit determines whether the identification list includes the data frame identification to be identified in the message to be processed; the identification list includes the data frame identification included in the network management message for the electronic control unit;
[0007] If the identification list does not include the data frame identification to be identified, the electronic control unit enters a dormant state.
[0008] In a second aspect, an embodiment of the present application further provides a sleep control device, the device comprising:
[0009] A response module, configured to, when the electronic control unit in the vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, cause the electronic control unit to exit the dormant state;
[0010] A determination module, for the electronic control unit to determine whether the identification list includes the data frame identification to be identified in the message to be processed in response to exiting the dormant state; the identification list includes the data frame identification included in the network management message for the electronic control unit;
[0011] The sleep control module is used to enable the electronic control unit to enter a sleep state if the identification list does not include the data frame identification to be identified.
[0012] In a third aspect, an embodiment of the present application further provides a vehicle, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above method.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0014] The present application provides a sleep control method, device, vehicle and computer-readable storage medium. In the present application, after receiving a message to be processed, the electronic control unit exits the sleep state, and then the electronic control unit determines whether the pre-stored identification list includes the data frame identification to be identified in the message to be processed. If the identification list does not include the data frame identification to be identified, it means that the message to be processed is a non-network management message. At this time, it is determined that the electronic control unit can sleep, and the electronic control unit is controlled to enter the sleep state, so that the non-network management message is filtered by setting the identification list. There is no need to set hardware to filter the non-network management message, which reduces the cost of filtering the non-network management message, thereby reducing the cost of message management.
[0015] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic diagram of a vehicle hardware environment suitable for an embodiment of the present application is shown.
[0018] Figure 2 A flowchart of a sleep control method proposed according to an embodiment of the present application is shown.
[0019] Figure 3A flowchart of a sleep control method proposed according to another embodiment of the present application is shown.
[0020] Figure 4 A schematic diagram showing a configuration process of a sleep control method in an embodiment of the present application is shown.
[0021] Figure 5 A schematic diagram of a sleep control process in an embodiment of the present application is shown.
[0022] Figure 6 A schematic diagram of another sleep control process in an embodiment of the present application is shown.
[0023] Figure 7 A structural block diagram of a sleep control device proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0025] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0026] Reference Figure 1 , Figure 1 A schematic diagram of a vehicle hardware environment suitable for an embodiment of the present application is shown, wherein the vehicle 100 includes a driving system 110, which may have multiple built-in autonomous driving functions. The driving system 110 may store an electronic map, and the driving system 110 may plan a driving route based on the electronic map stored in the driving system, and may also control the vehicle's autonomous driving based on the planned driving route.
[0027] The driving system 110 may include a data acquisition device 111 , one or more (only one is shown in the figure) processors 112 , and a memory 113 .
[0028] The electronic control unit 111 may be an electronic controller (ECU) inside the vehicle for implementing different functions. For example, the electronic control unit 111 may include a control unit on the radar side for implementing a radar detection function.
[0029] The processor 112 may be a microcontroller unit (MCU) having a built-in memory 113 . The memory 113 stores a program that can execute the contents of the following embodiments, and the processor 112 may execute the program stored in the memory 113 .
[0030] The processor 112 may include one or more processors. The processor 112 uses various interfaces and lines to connect various parts of the entire vehicle 100, and executes various functions of the vehicle 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 113, and calling data stored in the memory 113.
[0031] The memory 113 may include a random access memory (RAM) or a read-only memory (ROM). The memory 15 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 15 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.
[0032] See also Figure 2 , Figure 2 A flowchart of a sleep control method proposed according to an embodiment of the present application is shown, which is used for a vehicle, and the method includes:
[0033] S110: When an electronic control unit in the vehicle is in a sleep state, in response to receiving a message to be processed for the electronic control unit, the electronic control unit exits the sleep state.
[0034] The vehicle in this embodiment can be an electric vehicle or a fuel vehicle, or a car, an SUV, a bus, a truck, etc.
[0035] The electronic control unit in the vehicle may be any electronic control unit in the vehicle. For example, the electronic control unit in the vehicle may refer to the electronic controller on the radar side of the vehicle. In another example, the electronic control unit in the vehicle may be the electronic controller on the camera side. In another example, the electronic control unit in the vehicle may be the electronic controller on the lamp side.
[0036] Generally speaking, when the vehicle is cold-started, the vehicle is powered on. After the vehicle is powered on, each electronic control unit in the vehicle enters a working mode. When the vehicle meets the vehicle sleep conditions, the vehicle enters a sleep state. Accordingly, each electronic control unit of the vehicle enters a sleep state. The vehicle sleep conditions can be set based on demand. For example, the vehicle sleep condition is that the vehicle speed is zero. For another example, the vehicle sleep condition is that the vehicle gear is in the parking gear, etc.
[0037] The electronic control unit can correspond to a working state and a sleeping state. When the electronic control unit is in the working state, all functions of the electronic control unit can be realized, and the energy consumption of the electronic control unit is relatively high; when the electronic control unit is in the sleeping state, only some functions of the electronic control unit exist, and the energy consumption of the electronic control unit is relatively low.
[0038] In some embodiments, each electronic control unit may correspond to its own unit sleep condition. When the vehicle meets the unit sleep condition, the electronic control unit enters the sleep state, and at this time, other electronic control units may remain in the working state. For example, when the user turns off the in-vehicle camera function during vehicle driving, it is determined that the unit sleep condition of the control unit on the in-vehicle camera side is met, and the control unit on the in-vehicle camera side enters the sleep state.
[0039] In some embodiments, a power flag indicating whether the electronic control unit enters a dormant state may be stored, and whether the electronic control unit is in a dormant state may be determined by the power flag. Exemplarily, the power flag of the electronic control unit may be set to NOR and STB, respectively, the power flag STB indicates that the electronic control unit is in a dormant state, and the power flag NOR indicates that the electronic control unit is in a working state.
[0040] In some further embodiments, the vehicle may further send a detection signal to the electronic control unit, and determine whether the electronic control unit is in a dormant state based on a reply signal returned by the electronic control unit in response to the control signal.
[0041] The message to be processed may refer to a message for the electronic control unit, that is, a message sent to the electronic control unit, which may be a network management message and an application message, etc. The message to be processed is sent to the electronic control unit by other devices or other equipment on the vehicle.
[0042] When the electronic control unit in the vehicle is in a dormant state, if a message to be processed is received, it means that the electronic control unit needs to identify the message to be processed, the electronic control unit exits the dormant state, enters the working state, the electronic control unit is powered on, and enters the working state.
[0043] S120: In response to exiting the sleep state, the electronic control unit determines whether the identifier list includes the identifier of the data frame to be identified in the message to be processed.
[0044] The identification list includes data frame identifications included in the network management message for the electronic control unit, and the identification list may include multiple data frame identifications; the data frame identification in the message to be processed is used as the data frame identification to be identified. Therefore, when the identification list includes the data frame identification to be identified in the message to be processed, it means that the message to be processed is a network management message, and when the identification list does not include the data frame identification to be identified in the message to be processed, it means that the message to be processed is a non-network management message.
[0045] In some implementations, the data frame identifier to be identified and the data frame identifier in the identifier list may be a CAN (Controller Area Network) ID, where the CAN ID in the CAN protocol refers to an identifier in a data frame, which is used to distinguish different messages and determine the priority of a message. The CAN protocol supports two message formats, with the standard format identifier being 11 bits and the extended format identifier being 29 bits.
[0046] Correspondingly, the CAN ID list in the identification list includes the CAN ID of the network management message for the electronic control unit. At this time, the data frame identifier to be identified in the message to be processed refers to the CAN ID in the message to be processed.
[0047] In some embodiments, the electronic control unit has a standby domain memory space (Standby RAM), and accordingly, S120 may include: the electronic control unit responds to exiting the sleep state, and the electronic control unit determines whether the identification list includes the data frame identification to be identified in the standby domain memory space of the electronic control unit; the identification list is stored in the standby domain memory space.
[0048] Generally speaking, when the electronic control unit is in a sleep state, the data in the backup domain memory space of the electronic control unit will not be lost. Therefore, after the electronic control unit enters the sleep state and exits the sleep state, the identification list still exists and can still be used, thereby avoiding the identification list being stored in other locations, resulting in the loss of the identification list, and making it difficult to achieve the goal of judging the message to be processed based on the identification list.
[0049] S130: If the identifier list does not include the data frame identifier to be identified, the electronic control unit enters a dormant state.
[0050] If the identification list does not include the data frame identification to be identified, it means that the message to be processed is a non-network management message, and the electronic control unit is directly controlled to enter the sleep state. If the identification list includes the data frame identification to be identified, it means that the message to be processed is a network management message, and the working state of the electronic control unit is maintained, so that the electronic control unit enters the full startup stage (FULLBOOT, FULLBOOT can refer to the process from powering on the electronic control unit to completing all necessary initialization steps).
[0051] In some embodiments, the aforementioned identification list is stored in a first storage area of a backup domain memory space; the backup domain memory space also includes a second storage area; the second storage area stores a target application, and accordingly, S120 includes: the electronic control unit responds to exiting a sleep state, and in the backup domain memory space of the electronic control unit, the electronic control unit determines, through the target application, whether the identification list includes a data frame identification to be identified; S130 includes: if the identification list does not include a data frame identification to be identified, in the backup domain memory space of the electronic control unit, the electronic control unit controls itself to enter a sleep state through the target application.
[0052] That is, the target application refers to a program for implementing step S120 and step S130, which may be a code set or a function set, and is built into the spare domain memory space.
[0053] Further, in some embodiments, S120 may also include: the electronic control unit loads the diskless startup program in response to exiting the sleep state; during the process of the electronic control unit running the diskless startup program, when the diskless startup program determines that the electronic control unit loads the diskless startup program after exiting the sleep mode, the diskless startup program obtains a mapping table; the mapping table includes an address of the second storage area; the diskless startup program jumps to the second storage area through the address of the second storage area in the mapping table to start the target application in the second storage area; in response to the target application being started, the electronic control unit determines through the target application whether the identifier list includes the data frame identifier to be identified
[0054] A diskless boot ROM is a read-only program stored in ROM, which is used to initialize the system of an electronic control unit and load the operating system or boot loader of the electronic control unit. BootROM is a firmware or software that runs when the electronic control unit starts and is responsible for basic hardware initialization tasks such as setting the clock, resetting peripherals, configuring I / O pins, etc.
[0055] After the electronic control unit loads the diskless boot program, it enters the diskless boot program stage. In the diskless boot stage, the electronic control unit continues to run the diskless boot program. During the running of the diskless boot program, if it is determined that the electronic control unit loads the diskless boot program after exiting the sleep mode, it means that the purpose of the electronic control unit loading the diskless boot program is to filter the message rather than to completely start the electronic control unit. Therefore, at this time, the diskless boot program runs to obtain the mapping table, determines the location of the target application through the mapping table, and then jumps to the location of the target application - the second storage area, and loads the target application in the second storage area, so as to determine whether the identification list includes the data frame identification to be identified through the target application.
[0056] Among them, the mapping table can be an IVT (interrupt vector) table. In the IVT table, the jump target after loading the BOOTROM to enter the diskless boot program stage is the target application. Therefore, after the electronic control unit enters the diskless boot stage, it jumps to the target application through the IVT table, and implements steps S120 and S130 through the target application.
[0057] Typically, the address of the first storage area storing the identification list is obtained, and the address of the second storage area storing the target application is obtained. In the IVT table, the address of the jump target after the BOOTROM is loaded into the IVT table to enter the startup phase is the address of the second storage area where the target application is located. In the diskless startup phase, the address of the second storage area where the target application is located in the IVT table is used to jump to the target application in the second storage area, and the target application obtains the identification list according to the address of the first storage area where the identification list is located. Thus, steps S120 and S130 are implemented by the target application.
[0058] As mentioned above, the power flag of the electronic control unit can be set. When the electronic control unit is in a sleep state, the power flag is STB. When the electronic control unit exits the sleep state after receiving the message to be processed, the power flag is not modified. Therefore, the diskless startup program can determine whether to load the diskless startup program after the electronic control unit exits the sleep mode based on the power flag, or to load the diskless startup program by cold start. If the power flag is STB, it is determined that the diskless startup program is loaded after the electronic control unit exits the sleep mode, and a mapping table is obtained. If the power flag is not STB, it means that the diskless startup program is loaded after the cold start. At this time, the electronic control unit needs to be fully started, and the diskless startup program is directly used to control the electronic control unit to enter the full startup stage.
[0059] It is worth mentioning that after the electronic control unit enters the diskless startup stage, jumping to the target application through the diskless startup program is equivalent to executing steps S120 and S130 in the boot loader (BootLoader) startup stage after the diskless startup stage, thereby realizing message filtering. There is no need for the electronic control unit to fully start (enter the full startup stage) and then filter the message, thereby avoiding the electronic control unit entering the full startup stage to execute steps S120 and S130, resulting in energy waste.
[0060] In some embodiments, S130 may further include: if the identifier list does not include the data frame identifier to be identified, adding 1 to the cumulative number of abnormal message wake-ups; if the cumulative number of abnormal message wake-ups does not reach a specified number, the electronic control unit enters a dormant state. The specified number can be set based on demand, such as 1000.
[0061] Correspondingly, if the identification list does not include the data frame identification to be identified, after the cumulative number of abnormal message wake-ups is added by 1, the method also includes: if the cumulative number of abnormal message wake-ups reaches a specified number, the electronic control unit enters the full startup phase, the cumulative number of abnormal message wake-ups is recorded in the abnormal log, and the cumulative number of abnormal message wake-ups is cleared to zero.
[0062] That is to say, if the identification list does not include the data frame identification to be identified, it means that the message to be processed is a non-network management message. At this time, it is also necessary to accumulate the number of times the non-network management message is received to obtain the cumulative number of abnormal message wake-ups; when the cumulative number of abnormal message wake-ups does not reach the specified number, it means that the number of times the non-network management message is received is low, and the electronic control unit is still controlled to enter a sleep state.
[0063] When the cumulative number of abnormal message wake-ups reaches the specified number, it means that the number of times non-network management messages are received is high. At this time, the electronic control unit needs to enter the full startup stage and record the cumulative number of abnormal message wake-ups in the abnormal log. After the electronic control unit enters the full startup stage, the reason for multiple receipts of non-network management messages can be determined through the abnormal log to implement fault analysis, thereby reducing the frequent sending of non-network management messages due to vehicle faults, and failing to wake up the electronic control unit in time for fault analysis, thereby improving the accuracy of fault analysis.
[0064] At the same time, the accumulated number of message abnormal awakenings can also be cleared, so that the accumulated number of message abnormal awakenings can be accumulated again after the electronic control unit enters the sleep state again.
[0065] In some embodiments, S130 may include: if the identification list does not include the data frame identification to be identified, in the spare domain memory space of the electronic control unit, the target application program adds 1 to the cumulative number of abnormal message awakenings, and if the cumulative number of abnormal message awakenings does not reach the specified number, the target application program controls the electronic control unit to enter a dormant state. That is, the target application program also realizes the accumulation of the cumulative number of abnormal awakenings.
[0066] In this embodiment, after receiving the message to be processed, the electronic control unit exits the sleep state, and then the electronic control unit determines whether the pre-stored identification list includes the data frame identification to be identified in the message to be processed. If the identification list does not include the data frame identification to be identified, it means that the message to be processed is a non-network management message. At this time, it is determined that the electronic control unit can sleep, and the electronic control unit is controlled to enter the sleep state, so that the non-network management message is filtered by setting the identification list. There is no need to set hardware to filter the non-network management message, which reduces the cost of filtering the non-network management message, thereby reducing the cost of message management.
[0067] In addition, in the present application, the target application is loaded when the diskless boot program is running, so that the message is filtered by loading the target application, thereby eliminating the need to filter the message after the electronic control unit enters the full boot phase, effectively saving the energy consumption of the electronic control unit entering the full boot phase, greatly reducing the energy consumption of the electronic control unit, and improving the energy utilization rate of the electronic control unit.
[0068] In some embodiments, Figure 3 As shown, step S110 includes: when the electronic control unit is in a sleep state, the message transceiver associated with the electronic control unit exits the sleep state in response to receiving a message to be processed, and requests the electronic control unit to exit the sleep state.
[0069] The message transceiver may refer to a CAN (Controller Area Network) message transceiver, and the message transceiver associated with the electronic control unit refers to a message transceiver for receiving messages for the electronic control unit and sending the messages to the electronic control unit. For example, the electronic control unit may refer to a control unit on the radar side of the vehicle, and the message transceiver associated with the electronic control unit refers to a message transceiver for receiving messages for the control unit on the radar side.
[0070] Generally speaking, when a vehicle is cold-started, the vehicle is powered on, and each electronic control unit and message transceiver on the vehicle enters a working mode. When the vehicle meets the vehicle sleep conditions, the vehicle enters a sleep state, and accordingly, each electronic control unit and message transceiver of the vehicle enters a sleep state. The vehicle sleep conditions can be set based on demand. For example, the vehicle sleep condition is that the vehicle speed is zero, and another example is that the vehicle gear is in the parking gear, etc.
[0071] In some embodiments, each electronic control unit may correspond to its own unit sleep condition. When the vehicle meets the unit sleep condition, the electronic control unit and the associated message transceiver enter the sleep state, and correspondingly, other electronic control units and associated message transceivers may remain in the working state.
[0072] The message transceiver may have a standby mode pin (STB pin), and the message transceiver may be controlled to enter a sleep state or a working state by switching the standby mode pin of the message transceiver. Generally speaking, the standby mode pin of the message transceiver includes a sleep pin (voltage is 3v) and a working pin (5v), and the message transceiver may be controlled to enter a sleep state (switched to the sleep pin) or a working state (switched to the working pin) by switching the standby mode pin.
[0073] The message transceiver receives a message to be processed, switches the standby mode pin to the working pin, exits the sleep state, enters the working state, and powers on. After that, the message transceiver requests the electronic control unit to exit the sleep state. After that, the electronic control unit responds to exiting the sleep state and entering the working state. The electronic control unit powers on and loads BOOTROM to enter the diskless startup stage.
[0074] Correspondingly, such as Figure 3 As shown, S130 includes: if the identification list does not include the data frame identification to be identified, the electronic control unit controls the standby mode pin of the message transceiver to switch to the sleep pin to put the message transceiver into a sleep state; in response to the message transceiver entering the sleep state, the electronic control unit enters the sleep state.
[0075] That is to say, if the identification list does not include the data frame identification to be identified, the electronic control unit controls the standby mode pin of the message transceiver to switch to the sleep pin, so that the message transceiver enters the sleep state, and the electronic control unit controls the message transceiver to enter the sleep state. After that, the electronic control unit responds to the message transceiver entering the sleep state and enters the sleep state itself.
[0076] In some embodiments, S130 may also include: if the identification list does not include the data frame identification to be identified, the cumulative number of abnormal message wake-ups is added by 1; if the cumulative number of abnormal message wake-ups does not reach a specified number, the electronic control unit controls the standby mode pin of the message transceiver to switch to the sleep pin, so that the message transceiver enters a sleep state; in response to the message transceiver entering the sleep state, the electronic control unit enters the sleep state.
[0077] That is to say, when the cumulative number of abnormal message wake-ups does not reach the specified number, it means that the number of non-network management message receptions is low, and it is still necessary to control the electronic control unit to enter the sleep state. The electronic control unit controls the message transceiver to enter the sleep state, and also enters the sleep state itself.
[0078] Further, S130 may also include: if the identification list does not include the data frame identification to be identified, in the spare domain memory space of the electronic control unit, the cumulative number of abnormal message wake-ups is added by 1 through the target application; if the cumulative number of abnormal message wake-ups does not reach the specified number, in the spare domain memory space of the electronic control unit, the standby mode pin of the message transceiver is controlled by the target application to switch to the sleep pin so that the message transceiver enters the sleep state; in response to the message transceiver entering the sleep state, the electronic control unit is controlled by the target application to enter the sleep state. At this time, the target application can also realize the control of the standby mode pin of the message transceiver to realize the control of the state of the message transceiver.
[0079] In this embodiment, for the message transceiver, it is also necessary to control the message transceiver to enter or exit the sleep state according to whether the message to be processed is a network management message, thereby avoiding the situation where high energy consumption occurs when the message transceiver is always in the working state, thereby reducing the energy consumption of the vehicle.
[0080] In some embodiments, the configuration process of implementing the sleep control method in this application is as follows: Figure 4 As shown, first, program addresses and parameter addresses are allocated in the spare domain memory space of the electronic control unit to determine the second memory address of the second storage area storing the target application and the first memory address of the first storage area storing the identification list.
[0081] Afterwards, a target application is created to implement the initialization of the electronic control unit (control of exiting sleep mode or entering sleep mode), filtering mechanism (logic of step S120), transceiver control logic (controlling the state of the message transceiver by controlling the standby mode pin of the message transceiver) and log recording (recording the cumulative number of abnormal message wake-ups in the abnormal log) through the target application.
[0082] The target application is stored in the second storage area and the identification list is stored in the first storage area by configuring based on the address of the second storage area of the target application and the address of the first storage area of the identification list through the segment reference method.
[0083] Afterwards, the IVT table is configured so that in the diskless boot phase, the target application in the spare domain memory space is jumped to through the IVT table, and the target application filters the non-network management messages through the identification list.
[0084] After completing the configuration of the sleep control method, the sleep control method is as follows Figure 5 As shown, after the electronic control unit enters the sleep state, the power flag of the electronic control unit is set to STB (sleep state). If a message to be processed is generated, the electronic control unit exits the sleep mode and enters the diskless startup stage.
[0085] In the diskless startup stage, determine whether the power mark position of the electronic control unit is STB (since the electronic control unit entering the diskless startup stage is not necessarily triggered by receiving a message to be processed, it is necessary to determine whether the power mark position of the electronic control unit is STB). If it is not STB, it means that the electronic control unit entering the diskless startup stage is not triggered by receiving a message to be processed, and the electronic control unit directly enters the full startup stage.
[0086] If it is STB, it means that the electronic control unit enters the diskless boot phase due to the receipt of a message to be processed, and parses the IVT table to jump to the target application in the spare domain memory space.
[0087] Afterwards, the target application performs message filtering logic: if the identification list does not include the data frame identification to be identified of the message to be processed, the cumulative number of abnormal message wake-ups is added by 1. If the cumulative number of abnormal message wake-ups does not reach the specified number, the electronic control unit enters a dormant state. If the cumulative number of abnormal message wake-ups reaches the specified number, the electronic control unit enters a full startup phase.
[0088] If the identification list includes the data frame identification to be identified of the message to be processed, it means that the message to be processed is a network management message, and the wake-up is normal, the power flag bit becomes NOR, and the electronic control unit enters the full startup stage.
[0089] In one embodiment, if Figure 6As shown, after the electronic control unit is in a dormant state, it receives a message, the electronic control unit exits the dormant state, and directly enters the diskless startup stage. In the diskless startup stage, it enters the fast startup process through the IVT table: the message is filtered through the target application, so that when the message is a non-network management message, the electronic control power supply enters the dormant state again, and when the message is a network management message, the main application for controlling the electronic control unit is loaded, so that the main application is run in the system memory, and the full startup stage is entered.
[0090] It can be seen that in the present application, there is no need to obtain relevant data (such as IVT map or boot loader (BootLoader)) from external storage during the diskless startup phase, and thus there is no need to process the relevant data (the processing here includes, for example, loading, verification and analysis), thereby eliminating the steps of obtaining and processing the relevant data, so that the target application can be quickly started in the spare domain memory space to achieve message filtering, which is equivalent to completing the message filtering in the startup phase of the boot loader after the diskless startup phase. Therefore, the electronic control unit no longer needs to enter the full startup phase to achieve message filtering, which reduces the energy consumption of the electronic control unit entering the full startup phase, thereby reducing the energy consumption of the sleep control method.
[0091] See attached Figure 7 , Figure 7 The structure block diagram of a sleep control device proposed in one embodiment of the present application is shown. For a vehicle, the device 800 includes:
[0092] A response module 810 is used for, when the electronic control unit in the vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, causing the electronic control unit to exit the dormant state;
[0093] A determination module 820 is used for the electronic control unit to determine whether the identification list includes the data frame identification to be identified in the message to be processed in response to exiting the dormant state; the identification list includes the data frame identification included in the network management message for the electronic control unit;
[0094] The sleep control module 830 is configured to cause the electronic control unit to enter a sleep state if the identifier list does not include the identifier of the data frame to be identified.
[0095] Optionally, the determination module 820 is further configured to determine, in the spare domain memory space of the electronic control unit, whether the identification list includes the data frame identification to be identified; the identification list is stored in the spare domain memory space.
[0096] Optionally, the identification list is stored in the first storage area of the backup domain memory space; the backup domain memory space also includes a second storage area; the second storage area stores a target application; the determination module 820 is also used for the electronic control unit to determine whether the identification list includes the data frame identification to be identified through the target application in the backup domain memory space of the electronic control unit; the sleep control module 830 is also used for the electronic control unit to control itself to enter a sleep state through the target application in the backup domain memory space of the electronic control unit if the identification list does not include the data frame identification to be identified.
[0097] Optionally, the determination module 820 is also used for the electronic control unit to load the diskless startup program in response to exiting the sleep state; when the electronic control unit is running the diskless startup program, when the diskless startup program determines that the electronic control unit loads the diskless startup program after exiting the sleep mode, the diskless startup program obtains a mapping table; the mapping table includes the address of the second storage area; the diskless startup program jumps to the second storage area through the address of the second storage area in the mapping table to start the target application in the second storage area; the electronic control unit responds to the start of the target application, and determines through the target application whether the identification list includes the data frame identifier to be identified.
[0098] Optionally, the response module 810 is also used for, when the electronic control unit is in a sleep state, the message transceiver associated with the electronic control unit responds to receiving a message to be processed, the message transceiver exits the sleep state, and requests the electronic control unit to exit the sleep state.
[0099] Optionally, the sleep control module 830 is also used to control the standby mode pin of the message transceiver to switch to the sleep pin if the identification list does not include the data frame identification to be identified, so that the message transceiver enters the sleep state; in response to the message transceiver entering the sleep state, the electronic control unit enters the sleep state.
[0100] Optionally, the sleep control module 830 is further used to add 1 to the cumulative number of abnormal message wake-ups if the identifier list does not include the data frame identifier to be identified; if the cumulative number of abnormal message wake-ups does not reach a specified number, the electronic control unit enters a sleep state.
[0101] Optionally, the sleep control module 830 is also used to record the cumulative number of abnormal message wake-ups in the abnormal log and clear the cumulative number of abnormal message wake-ups to zero if the cumulative number of abnormal message wake-ups reaches a specified number, when the electronic control unit enters the full startup phase.
[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0103] In addition, each function in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of software function module.
[0104] On the other hand, the present application also provides a computer-readable storage medium, in which program code is stored. The program code can be called by a processor to execute the method described in the above method embodiment.
[0105] The computer readable storage medium can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a cluster of ROMs. Optionally, the computer readable storage medium includes a non-transitory computer-readable storage medium. The computer readable storage medium has storage space for program codes that execute any of the method steps in the above method. These program codes can be read from or written into one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A sleep control method, characterized in that: The method comprises: When an electronic control unit in the vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, the electronic control unit exits the dormant state; In response to exiting the dormant state, the electronic control unit determines whether the identification list includes the identification of the data frame to be identified in the message to be processed; the identification list includes the data frame identification included in the network management message for the electronic control unit; If the identifier list does not include the data frame identifier to be identified, the electronic control unit enters a dormant state.
2. The method according to claim 1, characterized in that In response to exiting the dormant state, the electronic control unit determines whether the identifier list includes the identifier of the data frame to be identified in the message to be processed, including: In response to exiting the sleep state, the electronic control unit determines whether the identification list includes the data frame identification to be identified in the spare domain memory space of the electronic control unit; the identification list is stored in the spare domain memory space.
3. The method according to claim 2, characterized in that The identification list is stored in the first storage area of the standby domain memory space; the standby domain memory space also includes a second storage area; the second storage area stores the target application; In response to the electronic control unit exiting the dormant state, the electronic control unit determines, in the spare domain memory space of the electronic control unit, whether the identifier list includes the identifier of the data frame to be identified, including: In response to exiting the dormant state, the electronic control unit determines, in a spare domain memory space of the electronic control unit, through the target application program, whether the identifier list includes the data frame identifier to be identified; If the identifier list does not include the to-be-identified data frame identifier, the electronic control unit enters a dormant state, including: If the identifier list does not include the data frame identifier to be identified, in the spare domain memory space of the electronic control unit, the electronic control unit controls itself to enter a dormant state through the target application.
4. The method according to claim 3, characterized in that In response to the electronic control unit exiting the dormant state, the electronic control unit determines, through the target application, in the spare domain memory space of the electronic control unit whether the identification list includes the data frame identification to be identified, including: The electronic control unit loads a diskless boot program in response to exiting the dormant state; When the electronic control unit runs the diskless startup program, the diskless startup program determines that the electronic control unit loads the diskless startup program after exiting the sleep mode, and the diskless startup program acquires a mapping table; the mapping table includes an address of the second storage area; The diskless boot program jumps to the second storage area through the address of the second storage area in the mapping table to start the target application in the second storage area; In response to the target application being started, the electronic control unit determines through the target application whether the identifier list includes the data frame identifier to be identified.
5. The method according to claim 1, characterized in that When the electronic control unit in the vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, the electronic control unit exits the dormant state, including: When the electronic control unit is in a sleep state, in response to receiving the message to be processed, the message transceiver associated with the electronic control unit exits the sleep state and requests the electronic control unit to exit the sleep state.
6. The method according to claim 5, characterized in that If the identifier list does not include the to-be-identified data frame identifier, the electronic control unit enters a dormant state, including: If the identifier list does not include the to-be-identified data frame identifier, the electronic control unit controls the standby mode pin of the message transceiver to switch to a sleep pin, so that the message transceiver enters a sleep state; In response to the message transceiver entering the sleep state, the electronic control unit enters the sleep state.
7. The method according to claim 1, characterized in that If the identifier list does not include the to-be-identified data frame identifier, the electronic control unit enters a dormant state, including: If the identifier list does not include the data frame identifier to be identified, the accumulated number of abnormal message wake-ups is increased by 1; If the accumulated number of abnormal awakenings due to the message does not reach a specified number, the electronic control unit enters a dormant state.
8. The method according to claim 7, characterized in that If the identifier list does not include the data frame identifier to be identified, after adding 1 to the cumulative number of abnormal message wake-ups, the method further includes: If the accumulated number of abnormal wake-up messages reaches a specified number, the electronic control unit enters a full startup phase; The accumulated number of abnormal awakenings due to the message is recorded in the abnormal log, and the accumulated number of abnormal awakenings due to the message is cleared.
9. A sleep control device, characterized in that: The device comprises: A response module, configured to, when an electronic control unit in a vehicle is in a dormant state, in response to receiving a message to be processed for the electronic control unit, cause the electronic control unit to exit the dormant state; A determination module, configured for the electronic control unit to determine, in response to exiting a dormant state, whether a list of identifiers includes a data frame identifier to be identified in the message to be processed; the list of identifiers includes a data frame identifier included in a network management message for the electronic control unit; The sleep control module is used to enable the electronic control unit to enter a sleep state if the identifier list does not include the data frame identifier to be identified.
10. A vehicle, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the method according to any one of claims 1 to 8.