CN113859155A - Power-off method and device for vehicle controller, electronic equipment and storage medium - Google Patents

Power-off method and device for vehicle controller, electronic equipment and storage medium Download PDF

Info

Publication number
CN113859155A
CN113859155A CN202111116209.0A CN202111116209A CN113859155A CN 113859155 A CN113859155 A CN 113859155A CN 202111116209 A CN202111116209 A CN 202111116209A CN 113859155 A CN113859155 A CN 113859155A
Authority
CN
China
Prior art keywords
closing
functional component
asynchronous
asynchronous functional
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111116209.0A
Other languages
Chinese (zh)
Other versions
CN113859155B (en
Inventor
孙忠刚
张晓谦
于鑫
姜珊
许凯程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Group Corp
Original Assignee
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FAW Group Corp filed Critical FAW Group Corp
Priority to CN202111116209.0A priority Critical patent/CN113859155B/en
Publication of CN113859155A publication Critical patent/CN113859155A/en
Application granted granted Critical
Publication of CN113859155B publication Critical patent/CN113859155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/03Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for supply of electrical power to vehicle subsystems or for
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention discloses a power-down method, a power-down device, electronic equipment and a storage medium of a vehicle controller, wherein the method comprises the following steps: when a target vehicle receives a power-off request, closing each asynchronous functional component according to preset closing time corresponding to each asynchronous functional component; after the asynchronous functional components are closed, closing an operating system of the target vehicle and closing an external power device of the target vehicle; after the operating system and the external power device are turned off, a main relay of the target vehicle is turned off. Through the technical scheme of the embodiment of the invention, the delay of the power-off process of the vehicle controller is realized, and the technical effect of ensuring the safe power-off of the vehicle controller is achieved.

Description

Power-off method and device for vehicle controller, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of automobile safety, in particular to a power-down method and device of an automobile controller, electronic equipment and a storage medium.
Background
With the rapid development of automobile intellectualization, the quantity of automobile controllers is more and more, and the control is more and more complicated. In a real-time Control System for a vehicle, software development of an ECU (Electronic Control Unit) is mostly developed according to an Automotive Open System Architecture (AUTOSAR) standard.
In the power-off process of the ECU, the power-off process is mostly completed by an ECUM (ECU Manager) functional module under the AUTOSAR standard, but the ECUM module cannot ensure that all the functional modules can correctly execute the closing operation. If the power-off process of the vehicle controller has a problem, parts can be damaged, and the whole vehicle has potential safety hazards.
Disclosure of Invention
The embodiment of the invention provides a power-down method and device for a vehicle controller, electronic equipment and a storage medium, which are used for delaying the power-down process of the vehicle controller and ensuring the safe power-down of the vehicle controller.
In a first aspect, an embodiment of the present invention provides a power down method for a vehicle controller, where the method includes:
when a target vehicle receives a power-off request, closing each asynchronous functional component according to preset closing time corresponding to each asynchronous functional component;
after the asynchronous functional components are closed, closing an operating system of the target vehicle and closing an external power device of the target vehicle;
after the operating system and the external power device are turned off, a main relay of the target vehicle is turned off.
In a second aspect, an embodiment of the present invention further provides a power down device for a vehicle controller, where the device includes:
the component closing module is used for closing each asynchronous functional component according to preset closing duration corresponding to each asynchronous functional component when the target vehicle receives a power-off request;
the system and device closing module is used for closing the operating system of the target vehicle and closing an external power device of the target vehicle after the asynchronous functional components are closed;
and the relay closing module is used for closing the main relay of the target vehicle after the operating system and the external power device are closed.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the power-down method of the vehicle controller according to any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the power-down method for the vehicle controller according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when the target vehicle receives the power-off request, the power-off processing is carried out on each asynchronous functional component according to the preset power-off duration corresponding to each asynchronous functional component, after the power-off processing of each asynchronous functional component is completed, the operating system of the target vehicle is turned off, the external power device of the target vehicle is turned off, and the main relay of the target vehicle is turned off after the operating system and the external power device are turned off, so that the problem that the vehicle controller cannot be safely powered off under different power-off working conditions in the power-off process is solved, the power-off process of the vehicle controller is delayed, and the safe power-off technical effect of the vehicle controller is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a power-down method of a vehicle controller according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a power-down method of a vehicle controller according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a power-down method of a vehicle controller according to a third embodiment of the present invention;
fig. 4 is a schematic flowchart of another power-down method for a vehicle controller according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a power-off device of a vehicle controller according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a power-off method for a vehicle controller according to an embodiment of the present invention, where the method is applicable to a situation where the vehicle controller is powered off, and the method may be executed by a power-off device for the vehicle controller, where the device may be implemented in the form of software and/or hardware, where the hardware may be an electronic device, and optionally, the electronic device may be a mobile terminal, a server, and the like.
As shown in fig. 1, the method of this embodiment specifically includes the following steps:
and S110, when the target vehicle receives a power-off request, closing each asynchronous functional component according to the preset closing time length corresponding to each asynchronous functional component.
The target vehicle may be any vehicle equipped with a vehicle controller. The power-down request may be a request generated by the target vehicle to turn off the vehicle controller, may be in the form of a control instruction, or the like. The asynchronous functional component may be a functional module of the vehicle-mounted software that runs asynchronously. The preset shutdown duration may be a preset duration that allows shutdown of each asynchronous functional component.
Specifically, when the user wants to turn off the vehicle controller of the target vehicle, a power-off request may be generated and issued by a vehicle key, a vehicle-mounted system, or the like. When the target vehicle receives the power-off request, the preset closing duration corresponding to each asynchronous functional component can be obtained, and the asynchronous functional components are closed in sequence. In the process of closing each asynchronous functional component, the time spent for closing each asynchronous functional component does not exceed the preset closing time length corresponding to the asynchronous functional component.
It should be noted that, if the time taken to turn off a certain asynchronous functional component is less than or equal to the preset turn-off duration corresponding to the asynchronous functional component, it may be determined that the asynchronous functional component is turned off. If the preset closing time corresponding to the asynchronous functional component is reached and the asynchronous functional component is not completely closed, the closing operation of the asynchronous functional component can be skipped in order to ensure the subsequent closing operation of the vehicle controller.
And S120, after the closing processing of each asynchronous functional component is completed, closing an operating system of the target vehicle and an external power device of the target vehicle.
The operating system may be an operating system of a vehicle controller. The external power device may be an external power driving chip of the target vehicle or the like.
Specifically, after each asynchronous functional component is shut down, the operating system of the target vehicle may be further shut down. After the operating system is shut down, the external power devices of the target vehicle may be shut down.
Optionally, the asynchronous functional component includes at least one of a COM component and an NVM component, and may further include other asynchronous functional components.
And S130, after the operating system and the external power device are closed, closing a main relay of the target vehicle.
The main relay may be a device in the vehicle controller as a main switch.
Specifically, after the asynchronous functional components, the operating system and the external power device are turned off, it may be determined that a period of time has elapsed between the current time and the time when the power-off request is received, and then the main relay may be turned off to complete power-off of the vehicle controller of the target vehicle.
According to the technical scheme of the embodiment of the invention, when the target vehicle receives the power-off request, the power-off processing is carried out on each asynchronous functional component according to the preset power-off duration corresponding to each asynchronous functional component, after the power-off processing of each asynchronous functional component is completed, the operating system of the target vehicle is turned off, the external power device of the target vehicle is turned off, and the main relay of the target vehicle is turned off after the operating system and the external power device are turned off, so that the problem that the vehicle controller cannot be safely powered off under different power-off working conditions in the power-off process is solved, the power-off process of the vehicle controller is delayed, and the safe power-off technical effect of the vehicle controller is ensured.
Example two
Fig. 2 is a schematic flow chart of a power-down method of a vehicle controller according to a second embodiment of the present invention, and reference is made to the technical solution of this embodiment for a manner of performing a shutdown process on each asynchronous functional component according to a preset shutdown duration corresponding to each asynchronous functional component in this embodiment. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 2, the method of this embodiment specifically includes the following steps:
s210, when the target vehicle receives a power-off request, for each asynchronous functional component, if the component closing time length of the asynchronous functional component is detected to be smaller than the preset closing time length corresponding to the asynchronous functional component, or the asynchronous functional component is not closed completely in the preset closing time length, closing the next asynchronous functional component.
The component shutdown duration may be time actually spent in shutdown processing of the asynchronous functional component.
Specifically, when the target vehicle receives a power-off request, the shutdown processing is performed for each asynchronous functional component, and when the asynchronous functional component performs the shutdown processing, the component shutdown duration of the asynchronous functional component is recorded. If the closing time length of the component is less than the preset closing time length, the asynchronous functional component is closed within the preset closing time length, and the next asynchronous functional component can be closed. If the asynchronous functional component is not completely closed within the preset closing duration, the problem that the asynchronous functional component cannot directly execute the closing operation is indicated, and at this time, in order to ensure that the vehicle controller can be normally powered off, the asynchronous functional component can be skipped to be closed, and the next asynchronous functional component is closed.
Illustratively, the preset closing time of the asynchronous function component a is 2 seconds, the asynchronous function component a is closed, if the component closing time of the asynchronous function component a is less than 2 seconds, or the closing time of the asynchronous function component a reaches 2 seconds, the asynchronous function component a still does not complete the closing operation, so that the asynchronous function component a is closed, and the next asynchronous function component is closed.
Optionally, if it is detected that the component shutdown duration of the asynchronous functional component is shorter than the preset shutdown duration corresponding to the asynchronous functional component, and the asynchronous functional component is not completely shutdown within the preset shutdown duration, the shutdown processing on the asynchronous functional component is continuously executed.
Specifically, if it is detected that the component closing time length of the asynchronous functional component is shorter than the preset closing time length corresponding to the asynchronous functional component, the asynchronous functional component may be considered to be still in the component closing process, at this time, the closing processing of the asynchronous functional component may be continuously performed, and the component closing time may be continuously recorded.
And S220, if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
Specifically, if the next asynchronous functional component does not exist, it is indicated that the shutdown processing has been performed on each asynchronous functional component in sequence. The shutdown operation has been performed for these asynchronous functional components regardless of whether all of these asynchronous functional components have completed the shutdown operation and are in a shutdown state. In this case, it can be determined that the shutdown processing by each asynchronous functional component is completed.
And S230, after the closing processing of each asynchronous functional component is finished, closing an operating system of the target vehicle and closing an external power device of the target vehicle.
And S240, after the operating system and the external power device are closed, closing a main relay of the target vehicle.
According to the technical scheme of the embodiment, when the target vehicle receives the power-off request, for each asynchronous functional component, if the component closing time length of the asynchronous functional component is detected to be smaller than the preset closing time length corresponding to the asynchronous functional component or the asynchronous functional component is not closed completely within the preset closing time length, closing processing is performed on the next asynchronous functional component, and if the next asynchronous functional component does not exist, it is determined that the closing processing of each asynchronous functional component is completed, so that the time control is performed on the process of closing the asynchronous functional component. After the asynchronous functional components are closed, the operating system of the target vehicle is closed, the external power device of the target vehicle is closed, and after the operating system and the external power device are closed, the main relay of the target vehicle is closed, so that the problem that the components are damaged due to the fact that the asynchronous functional components are immediately powered off when the vehicle controller is powered off is solved, the power-off process of the vehicle controller is delayed, and the safe power-off technical effect of the vehicle controller is guaranteed.
EXAMPLE III
Fig. 3 is a schematic flow chart of a power-down method of a vehicle controller according to a third embodiment of the present invention, in this embodiment, a timer is added to monitor a total time length for turning off each asynchronous functional component, and for each asynchronous functional component, a manner of detecting a working state of the asynchronous functional component according to a preset period may refer to the technical solution of this embodiment. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 3, the method of this embodiment specifically includes the following steps:
and S310, starting a timer when the target vehicle receives a power-off request.
Wherein, the timer is configured with a preset overtime duration. The timer can be a timing device for accurately controlling time, and can be a hardware timer, such as a hardware watchdog and the like. The preset timeout period may be a preset time taken from the acceptance of the power-down request to the possible closing of the main relay.
Specifically, when the target vehicle receives a power-off request, in order to monitor the shutdown processing procedure of each asynchronous functional component within the preset shutdown duration, a timer including a preset timeout duration may be started.
And S320, aiming at each asynchronous functional component, detecting the working state of the asynchronous functional component according to a preset period.
The preset period may be a period duration for polling to detect the operating state of the asynchronous functional component. The operating state may be used to describe the current state of the asynchronous functional component, for example: an on state and an off state.
Specifically, when the asynchronous functional modules are closed, the operating state of the asynchronous functional modules may be periodically detected during the closing process of each asynchronous functional module, so as to determine whether the asynchronous functional modules have completed the closing process.
It should be noted that the preset periods corresponding to different asynchronous functional components may be the same or different, and the setting of the specific period time may be set according to actual requirements, which is not specifically limited in this embodiment.
S330, if the working state of the asynchronous functional component is detected to be a closed state within the preset closing duration corresponding to the asynchronous functional component, or the working state of the asynchronous functional component is detected to be an open state when the preset closing duration is reached, closing the next asynchronous functional component.
Specifically, when each asynchronous functional component is closed, the working state of the asynchronous functional component is detected according to a preset period. If the working state of the asynchronous functional component is detected to be the closed state periodically within the preset closing duration corresponding to the asynchronous functional component, it indicates that the asynchronous functional component is closed within the preset closing time, and the next asynchronous functional component can be closed. If the working state of the asynchronous functional component is detected to be still in an open state periodically when the preset closing duration is reached, the problem that the asynchronous functional component cannot directly execute the closing operation is indicated, and at the moment, in order to ensure that the vehicle controller can be powered off normally, the asynchronous functional component can be skipped to be closed, and the next asynchronous functional component is closed.
And S340, if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
Specifically, if the next asynchronous functional component does not exist, it is indicated that the shutdown processing has been performed on each asynchronous functional component in sequence. The shutdown operation has been performed for these asynchronous functional components regardless of whether all of these asynchronous functional components have completed the shutdown operation and are in a shutdown state. In this case, it can be determined that the shutdown processing by each asynchronous functional component is completed.
And S350, after the closing processing of each asynchronous functional component is finished, closing an operating system of the target vehicle and closing an external power device of the target vehicle.
And S360, after the operating system and the external power device are closed, if the execution time length between the starting time of the timer and the current time is less than the preset overtime length, executing the reset operation of the timer, and closing the main relay of the target vehicle.
The starting time may be the time for starting the timer, and the execution duration may be the duration between the starting time and the current time, and is used for measuring the starting duration of the timer.
Specifically, after the operating system and the external power device are turned off, the execution duration between the starting time of the timer and the current time is less than the preset timeout duration, which indicates that the asynchronous functional components are turned off, and the time spent by the operating system and the external power device is within the preset range. In this case, the reset operation may be performed on the timer for the next use, and the main relay is turned off to complete the power-off of the vehicle controller of the target vehicle.
For example, if the timer is a hardware watchdog timer, the reset operation of the timer may be a hardware watchdog feeding operation.
And S370, if the execution time length between the starting time of the timer and the current time reaches the preset timeout time length, the timer is not reset, and the operation of starting the timer is returned to be executed.
Specifically, when the execution time length between the starting time of the timer and the current time reaches the preset timeout time length, the fact that the reset operation is not executed on the timer indicates that the shutdown of the operating system and the external power device is not completed within the preset timeout time length means that the reset operation cannot be executed on the timer. In this case, the vehicle controller is reset, and the power-off operation is performed again, that is, the operations of starting the timer, turning off the asynchronous functional components, turning off the operating system, turning off the external power device, and the like are performed in return.
It should be noted that, if the number of times of powering down again exceeds a preset threshold, for example: 1 time, 2 times and the like, prompt information can be generated and sent to a user of the target vehicle, so that the user can autonomously check whether the power-off problem of the vehicle controller is influenced.
It should be further noted that, in the embodiment of the present invention, a first re-monitoring for periodic detection and timeout monitoring of each asynchronous functional component is adopted, and a second re-monitoring for monitoring all operations before the main relay is turned off by using a timer is also adopted. Through the double monitoring, the condition that the main relay is directly powered off in the running process of the asynchronous functional components under different working conditions can be avoided, and the power-off safety of the vehicle controller is improved. And, can avoid through the first heavy monitoring because a certain asynchronous function subassembly power-off abnormity and can't carry out the problem of the power down of vehicle controller, can monitor the whole power down time in the first heavy monitoring through the second heavy monitoring, guarantee vehicle controller safety power down.
As an alternative implementation of the foregoing embodiments, fig. 4 is a schematic flow chart of another power-down method for a vehicle controller according to a third embodiment of the present invention. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
In a real-time control system for a vehicle, powering down a vehicle controller typically includes: the method comprises the steps of closing power drive, closing a communication protocol stack, closing each asynchronous functional component, closing an operating system, closing an external power device, closing a main relay and the like.
In the power-down process, before the operating system is shut down, the shutdown process of the partially asynchronous functional component is executed asynchronously under the scheduling of the control system. During the closing process, various power-off working conditions of the target vehicle are difficult to cover, and the risk that the vehicle controller cannot be safely powered off exists.
As shown in fig. 4, the power-off method of the vehicle controller specifically includes the following steps:
the first step is as follows: after the vehicle controller receives the power-off request, a hardware watchdog timer is started, a hardware watchdog timeout period (preset timeout duration) is set according to the normal power-off duration of the system, and the whole power-off process is monitored overtime.
The second step is that: and carrying out periodic timing monitoring on each asynchronous operation in the power-down process before the operating system is closed. According to the characteristics of each asynchronous module (asynchronous functional component), a module overtime monitoring threshold (preset closing time length) is set. And polling the closing state of the asynchronous module in the periodic task, if the asynchronous module is closed before the corresponding overtime monitoring threshold is overtime, resetting the overtime monitoring threshold, and starting the subsequent closing process of the asynchronous module. If the corresponding overtime monitoring threshold value is overtime and the asynchronous module is not closed, the asynchronous module is not waited to be closed, the closing process of the asynchronous module is considered to be abnormal, and the subsequent closing process of the asynchronous module is directly started.
Alternatively, the asynchronous module may be a COM component or an NVM component, etc. The periodic tasks may include: reading the closing state of the asynchronous module, accumulating the running period count value of the asynchronous module, judging whether the asynchronous module is closed or the closing time length of the asynchronous module exceeds an overtime monitoring threshold, if so, closing the next asynchronous component, and if not, returning to the step of reading the closing state of the asynchronous module.
The third step: and in the power-off operation after the operating system and the external power device are closed, adding a hardware watchdog feeding operation. If the task closed by the monitoring asynchronous module is abnormal, the hardware watchdog feeding operation can not be carried out within the overtime period of the hardware watchdog. At this time, the vehicle controller is reset, and the power-off process is executed again. If the watchdog feeding operation is carried out within the hardware watchdog overtime period, the main relay can be closed, and the power-off is completed.
According to the technical scheme of the embodiment, when the target vehicle receives the power-off request, the timer is started, so that the whole power-off process is monitored through the timer. And detecting the working state of the asynchronous functional component according to a preset period aiming at each asynchronous functional component, if the working state of the asynchronous functional component is detected to be a closed state within a preset closing duration corresponding to the asynchronous functional component, or the working state of the asynchronous functional component is detected to be an open state when the preset closing duration is reached, closing the next asynchronous functional component, and if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed, so as to periodically detect whether each asynchronous functional component is closed. After the closing processing of each asynchronous functional component is finished, the operating system of the target vehicle is closed, the external power device of the target vehicle is closed, after the operating system and the external power device are closed, if the execution time length between the starting time of the timer and the current time is less than the preset timeout time length, executing a reset operation of the timer and turning off a main relay of the target vehicle, if an execution duration between a start time of the timer and a current time reaches a preset timeout duration, the reset operation of the timer is not executed, the operation of starting the timer is returned to be executed, the problem of device damage caused by immediate power-off when the vehicle controller is powered off is solved, the problem that the whole power-off process cannot be monitored is solved, the power-off process of the vehicle controller is delayed, and the technical effect of ensuring the safe power-off of the vehicle controller is achieved.
Example four
Fig. 5 is a schematic structural diagram of a power-off device of a vehicle controller according to a fourth embodiment of the present invention, where the device includes: a component shutdown module 410, a system and device shutdown module 420, and a relay shutdown module 430.
The component shutdown module 410 is configured to, when the target vehicle receives a power-off request, perform shutdown processing on each asynchronous functional component according to a preset shutdown duration corresponding to the asynchronous functional component; a system and device shutdown module 420, configured to, after the asynchronous functional components are shutdown, shutdown the operating system of the target vehicle and shutdown external power devices of the target vehicle; a relay shutdown module 430 to shut down a main relay of the target vehicle after the operating system and the external power device are shut down.
Optionally, the component shutdown module 410 is further configured to, for each asynchronous function component, perform shutdown processing on a next asynchronous function component if it is detected that a component shutdown duration of the asynchronous function component is smaller than a preset shutdown duration corresponding to the asynchronous function component, or the asynchronous function component is not completely shutdown within the preset shutdown duration; and if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
Optionally, the apparatus further comprises: and the time detection module is used for continuing to execute the closing processing of the asynchronous functional component if detecting that the component closing time length of the asynchronous functional component is smaller than the preset closing time length corresponding to the asynchronous functional component and the asynchronous functional component is not closed completely in the preset closing time length.
Optionally, the component shutdown module 410 is further configured to, for each asynchronous functional component, detect a working state of the asynchronous functional component according to a preset period; if the working state of the asynchronous functional component is detected to be a closed state within a preset closing time length corresponding to the asynchronous functional component, or the working state of the asynchronous functional component is detected to be an open state when the preset closing time length is reached, closing the next asynchronous functional component; and if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
Optionally, the apparatus further comprises: the timer starting module is used for starting a timer, wherein the timer is configured with preset timeout duration; correspondingly, the device further comprises: and the overtime judging module is used for executing the resetting operation on the timer and closing a main relay of the target vehicle if the execution time between the starting time of the timer and the current time is less than the preset overtime after the operating system and the external power device are closed.
Optionally, the apparatus further comprises: and the power-down returning module is used for returning to execute the operation of starting the timer if the reset operation is not executed on the timer when the execution duration between the starting time of the timer and the current time reaches the preset timeout duration.
Optionally, the asynchronous functional component includes at least one of a COM component and an NVM component.
According to the technical scheme of the embodiment of the invention, when the target vehicle receives the power-off request, the power-off processing is carried out on each asynchronous functional component according to the preset power-off duration corresponding to each asynchronous functional component, after the power-off processing of each asynchronous functional component is completed, the operating system of the target vehicle is turned off, the external power device of the target vehicle is turned off, and the main relay of the target vehicle is turned off after the operating system and the external power device are turned off, so that the problem that the vehicle controller cannot be safely powered off under different power-off working conditions in the power-off process is solved, the power-off process of the vehicle controller is delayed, and the safe power-off technical effect of the vehicle controller is ensured.
The power-down device of the vehicle controller provided by the embodiment of the invention can execute the power-down method of the vehicle controller provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 50 suitable for use in implementing embodiments of the present invention. The electronic device 50 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, electronic device 50 is embodied in the form of a general purpose computing device. The components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 that couples the various system components (including the system memory 502 and the processing unit 501).
Bus 503 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 50 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 50 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 502 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)504 and/or cache memory 505. The electronic device 50 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 503 by one or more data media interfaces. System memory 502 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 508 having a set (at least one) of program modules 507 may be stored, for example, in system memory 502, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 507 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The electronic device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with the electronic device 50, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 50 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 511. Also, the electronic device 50 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 512. As shown, the network adapter 512 communicates with the other modules of the electronic device 50 over the bus 503. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 501 executes various functional applications and data processing, such as implementing a power-down method of a vehicle controller provided by an embodiment of the present invention, by executing a program stored in the system memory 502.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a power-down method for a vehicle controller, the method including:
when a target vehicle receives a power-off request, closing each asynchronous functional component according to preset closing time corresponding to each asynchronous functional component;
after the asynchronous functional components are closed, closing an operating system of the target vehicle and closing an external power device of the target vehicle;
after the operating system and the external power device are turned off, a main relay of the target vehicle is turned off.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A power-down method of a vehicle controller is characterized by comprising the following steps:
when a target vehicle receives a power-off request, closing each asynchronous functional component according to preset closing time corresponding to each asynchronous functional component;
after the asynchronous functional components are closed, closing an operating system of the target vehicle and closing an external power device of the target vehicle;
after the operating system and the external power device are turned off, a main relay of the target vehicle is turned off.
2. The method according to claim 1, wherein the closing the asynchronous functional components according to the preset closing time corresponding to the asynchronous functional components comprises:
for each asynchronous functional component, if detecting that the component closing time length of the asynchronous functional component is less than a preset closing time length corresponding to the asynchronous functional component or the asynchronous functional component is not closed completely within the preset closing time length, closing the next asynchronous functional component;
and if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
3. The method of claim 2, further comprising:
and if detecting that the component closing time length of the asynchronous functional component is less than the preset closing time length corresponding to the asynchronous functional component and the asynchronous functional component is not closed completely in the preset closing time length, continuing to execute closing processing on the asynchronous functional component.
4. The method according to claim 1, wherein the closing the asynchronous functional components according to the preset closing time corresponding to the asynchronous functional components comprises:
aiming at each asynchronous functional component, detecting the working state of the asynchronous functional component according to a preset period;
if the working state of the asynchronous functional component is detected to be a closed state within a preset closing time length corresponding to the asynchronous functional component, or the working state of the asynchronous functional component is detected to be an open state when the preset closing time length is reached, closing the next asynchronous functional component;
and if the next asynchronous functional component does not exist, determining that the closing processing of each asynchronous functional component is completed.
5. The method according to claim 1, before performing the shutdown processing on each asynchronous functional component according to the preset shutdown duration corresponding to the asynchronous functional component, further comprising:
starting a timer, wherein a preset timeout duration is configured in the timer;
correspondingly, the turning off the main relay of the target vehicle after the operating system and the external power device are turned off comprises:
after the operating system and the external power device are closed, if the execution time between the starting time of the timer and the current time is less than the preset timeout time, executing the reset operation of the timer, and closing a main relay of the target vehicle.
6. The method of claim 5, further comprising:
and if the reset operation is not executed on the timer when the execution time length between the starting time of the timer and the current time reaches the preset timeout length, returning to execute the operation of starting the timer.
7. The method of claim 1, wherein the asynchronous functional component comprises at least one of a COM component and an NVM component.
8. An electric power-off device for a vehicle controller, comprising:
the component closing module is used for closing each asynchronous functional component according to preset closing duration corresponding to each asynchronous functional component when the target vehicle receives a power-off request;
the system and device closing module is used for closing the operating system of the target vehicle and closing an external power device of the target vehicle after the asynchronous functional components are closed;
and the relay closing module is used for closing the main relay of the target vehicle after the operating system and the external power device are closed.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of powering down the vehicle controller of any of claims 1-7.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a method for powering down a vehicle controller according to any one of claims 1 to 7.
CN202111116209.0A 2021-09-23 2021-09-23 Power-off method and device for vehicle controller, electronic equipment and storage medium Active CN113859155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111116209.0A CN113859155B (en) 2021-09-23 2021-09-23 Power-off method and device for vehicle controller, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111116209.0A CN113859155B (en) 2021-09-23 2021-09-23 Power-off method and device for vehicle controller, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113859155A true CN113859155A (en) 2021-12-31
CN113859155B CN113859155B (en) 2023-03-14

Family

ID=78993408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111116209.0A Active CN113859155B (en) 2021-09-23 2021-09-23 Power-off method and device for vehicle controller, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113859155B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681921A (en) * 2011-03-16 2012-09-19 浩鑫股份有限公司 System and method for quickly starting computer
CN105015541A (en) * 2014-04-28 2015-11-04 上海汽车集团股份有限公司 Electrification/power-off control method of control system of hybrid vehicle and control device
CN106696871A (en) * 2015-11-18 2017-05-24 北汽福田汽车股份有限公司 High-voltage control system and method of electric automobile and electric automobile
US20180144560A1 (en) * 2016-11-22 2018-05-24 GM Global Technology Operations LLC Motor vehicle device and system controller and method
CN113341924A (en) * 2021-06-09 2021-09-03 中国第一汽车股份有限公司 ECU power-off method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681921A (en) * 2011-03-16 2012-09-19 浩鑫股份有限公司 System and method for quickly starting computer
CN105015541A (en) * 2014-04-28 2015-11-04 上海汽车集团股份有限公司 Electrification/power-off control method of control system of hybrid vehicle and control device
CN106696871A (en) * 2015-11-18 2017-05-24 北汽福田汽车股份有限公司 High-voltage control system and method of electric automobile and electric automobile
US20180144560A1 (en) * 2016-11-22 2018-05-24 GM Global Technology Operations LLC Motor vehicle device and system controller and method
CN113341924A (en) * 2021-06-09 2021-09-03 中国第一汽车股份有限公司 ECU power-off method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113859155B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN111767184A (en) Fault diagnosis method and device, electronic equipment and storage medium
CN108872762B (en) Electronic equipment leakage detection method and device, electronic equipment and storage medium
EP0679981A2 (en) Reset circuit of electronic device
CN113246887B (en) Sequential circuit control method and device, electronic equipment and storage medium
JP2009110156A (en) Log output device and log output program
CN110457907B (en) Firmware program detection method and device
CN111124761B (en) Equipment restarting method, device, equipment and medium
CN108241522B (en) Sleep state switching method and device in virtualization environment and electronic equipment
CN113859155B (en) Power-off method and device for vehicle controller, electronic equipment and storage medium
CN111918236A (en) Internet of things security sensor network searching method, device, equipment and storage medium
CN115576734B (en) Multi-core heterogeneous log storage method and system
CN111400037A (en) Memory management method and device, computer storage medium and terminal
CN110696807B (en) Engine shutdown control method under traffic jam condition, vehicle and storage medium
CN115756309A (en) Battery management equipment parameter storage method, battery management equipment and energy storage system
CN115292077A (en) Kernel exception handling method and system
CN112328423A (en) Processing method, device and storage medium for search service loophole
US20100077191A1 (en) Information processor, external memory and control method
CN111930502A (en) Server management method, device, equipment and storage medium
CN112181761B (en) Program execution control method, program execution test device, code detection device, program execution equipment and medium
CN110647235B (en) Data processing method and device based on terminal equipment and terminal equipment
US20240217526A1 (en) Fault management device for devices in a mobility device and a fault management method thereof
CN108415788B (en) Data processing apparatus and method for responding to non-responsive processing circuitry
CN110758394B (en) Engine starting control method and system under traffic jam working condition, vehicle and storage medium
US10528467B2 (en) Information processing device and information processing method
CN114416483A (en) Running state monitoring method and device for multi-processing unit, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant