CN111572469B - Task processing control method and device and vehicle - Google Patents
Task processing control method and device and vehicle Download PDFInfo
- Publication number
- CN111572469B CN111572469B CN201910117165.XA CN201910117165A CN111572469B CN 111572469 B CN111572469 B CN 111572469B CN 201910117165 A CN201910117165 A CN 201910117165A CN 111572469 B CN111572469 B CN 111572469B
- Authority
- CN
- China
- Prior art keywords
- preset
- cycle period
- time
- signal
- cycle
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000011217 control strategy Methods 0.000 claims abstract description 19
- 238000012546 transfer Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 13
- 230000009471 action Effects 0.000 description 4
- 230000000737 periodic effect Effects 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric 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/02—Electric 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
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60W—CONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
- B60W50/00—Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60W—CONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
- B60W50/00—Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
- B60W2050/0001—Details of the control system
- B60W2050/0019—Control system elements or transfer functions
Landscapes
- Engineering & Computer Science (AREA)
- Mechanical Engineering (AREA)
- Automation & Control Theory (AREA)
- Human Computer Interaction (AREA)
- Transportation (AREA)
- Programmable Controllers (AREA)
Abstract
The embodiment of the invention provides a task processing control method, a task processing control device and a vehicle, wherein the task processing control method applied to a vehicle control unit comprises the following steps: according to a preset cycle, sequentially calling an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each cycle; acquiring a first signal sent by a signal acquisition device connected with a vehicle control unit through a called input signal acquisition function; processing the first signal through the called control strategy function to obtain a second signal; and sending a second signal to a corresponding signal execution device through the called output signal sending function. In the scheme provided by the embodiment of the invention, the time interval between the calling time of the output signal sending function in each period of the preset cycle period and the starting time of the corresponding period is the same, so that the phenomenon of cycle fluctuation is avoided, and the realization of the normal function of the whole vehicle controller is favorably ensured.
Description
Technical Field
The present invention relates to a vehicle control unit, and more particularly, to a method and a device for controlling task processing, and a vehicle.
Background
A Vehicle Control Unit (VCU) is a core control component of the whole automobile, collects signals of an accelerator pedal, signals of a brake pedal and other components, and controls the action of each component Controller at the lower layer after making corresponding judgment so as to drive the automobile to normally run.
One basic function of the vehicle control unit is to accurately transmit message data according to a design cycle. However, when the vehicle control unit calls the function to process, because the function for receiving the input signal and the function for sending the output signal are located in different periods, in the actual operation process, the function for receiving the input signal does not correspond to the function for outputting the signal, and a signal processing step with a fixed time is carried out before sending the output signal every time, so that the fluctuation phenomenon that the time length of a certain period is longer and the time length of another adjacent period is shorter exists in the period where the function for outputting the signal is located.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a task processing control method, a task processing control device and a vehicle, which are used for solving the problem that the output signal of the current vehicle controller fluctuates periodically in the use process.
In order to solve the above technical problem, an embodiment of the present invention provides a method for controlling task processing, which is applied to a vehicle controller, and includes:
according to a preset cycle, sequentially calling an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each cycle; wherein,
acquiring a first signal sent by a signal acquisition device connected with a vehicle control unit through a called input signal acquisition function;
processing the first signal through the called control strategy function to obtain a second signal;
and sending a second signal to a corresponding signal execution device through the called output signal sending function.
Specifically, as described above, the task processing control method further includes:
receiving a preset initialization signal, wherein the preset initialization signal comprises: electrifying the whole vehicle;
and resetting the preset starting time of the preset cycle period according to the preset initialization signal.
Preferably, in the method for controlling task processing as described above, the preset loop period at least includes: a first cycle period and a second cycle period;
the first initial time of the first cycle period is the preset initial time after the preset cycle period is initialized, and the first initial time is the time for entering the first cycle period for the first time;
the second initial time of the second cycle period is separated from the first initial time by a first preset time length, and the second initial time is the time for entering the second cycle period for the first time.
Further, in the method for controlling task processing as described above, the cycle interval of the first cycle period is a second preset duration, and the cycle interval of the second cycle period is a third preset duration;
the sum of the first preset time length and at least one third preset time length is different from any integral multiple of the second preset time length.
Another preferred embodiment of the present invention also provides a task processing control apparatus, including:
the transfer module is used for sequentially transferring an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each period according to a preset cycle period; wherein,
the acquisition module is used for acquiring a first signal transmitted by a signal acquisition device connected with the vehicle control unit through the called input signal acquisition function;
the processing module is used for calling the control strategy function and processing the first signal to obtain a second signal;
and the sending module is used for calling the output signal sending function and sending the second signal to the corresponding signal execution device.
Specifically, the task processing control device described above further includes:
the receiving module is used for receiving a preset initialization signal, and the preset initialization signal comprises: electrifying the whole vehicle;
and the initialization module is used for resetting the preset starting time of the preset cycle period according to the preset initialization signal.
In accordance with still another preferred embodiment of the present invention, there is provided a vehicle control unit including: the control device for task processing as described above.
Still another preferred embodiment of the present invention provides a vehicle including: the vehicle control unit is described above.
Compared with the prior art, the task processing control method, the task processing control device and the vehicle provided by the embodiment of the invention at least have the following beneficial effects:
in the embodiment of the invention, a signal acquisition function, a control strategy function and an output signal sending function are sequentially called in each period of a preset cycle period, a first signal sent by a signal acquisition device is acquired through a called input signal acquisition function, and the acquired first signal is processed through the control strategy function to obtain a second signal, wherein the first signal comprises but is not limited to a signal sent by the signal acquisition device acquired in the current period; and then, a second signal is sent to a corresponding signal execution device through an output signal sending function, wherein the second signal comprises but is not limited to a signal obtained after the current period is processed through a control strategy function, so that the operation flows executed in each period are the same, the time interval between the time for starting to call and executing the output signal sending function in each period and the starting time of the corresponding period is the same, the periodic fluctuation phenomenon is avoided, the consistency of the whole vehicle controller with the preset period in the actual operation process is ensured, and the realization of the normal function of the whole vehicle controller is ensured.
Drawings
FIG. 1 is a flow chart of a task processing control method according to the present invention;
FIG. 2 is a second flowchart illustrating a task processing control method according to the present invention;
fig. 3 is a schematic structural diagram of a task processing control device according to the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the full understanding of the embodiments of the present invention. Thus, it will be apparent to those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Referring to fig. 1, a preferred embodiment of the present invention provides a method for controlling task processing, which is applied to a vehicle controller, and includes:
step S101, according to a preset cycle, sequentially calling an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each cycle; wherein,
step S102, acquiring a first signal sent by a signal acquisition device connected with a vehicle control unit through a called input signal acquisition function;
step S103, processing the first signal through the called control strategy function to obtain a second signal;
and step S104, sending a second signal to a corresponding signal execution device through the called output signal sending function.
In the embodiment of the invention, a signal acquisition function, a control strategy function and an output signal sending function are sequentially called in each period of a preset cycle period, a first signal sent by a signal acquisition device is acquired through a called input signal acquisition function, and the acquired first signal is processed through the control strategy function to obtain a second signal, wherein the first signal comprises but is not limited to a signal sent by the signal acquisition device acquired in the current period; and then, a second signal is sent to a corresponding signal execution device through an output signal sending function, wherein the second signal comprises but is not limited to a signal obtained after the current period is processed through a control strategy function, so that the operation flows executed in each period are the same, the time interval between the time for starting to call and executing the output signal sending function in each period and the starting time of the corresponding period is the same, the periodic fluctuation phenomenon is avoided, the consistency of the whole vehicle controller with the preset period in the actual operation process is ensured, and the realization of the normal function of the whole vehicle controller is ensured.
Referring to fig. 2, specifically, the control method of task processing as described above further includes:
step S201, receiving a preset initialization signal, where the preset initialization signal includes: electrifying the whole vehicle;
in step S202, the preset start time of the preset cycle period is reset according to the preset initialization signal.
In the embodiment of the invention, when the preset initialization signal is received, the preset starting time of the preset cycle period is reset, so that the preset cycle period starts timing again and circulates, the phenomena of blockage and the like of the whole vehicle controller caused by long-time accumulation after the cycle starts to circulate and excessive occupation of operation and storage resources of the whole vehicle controller are avoided, the smooth operation of the whole vehicle controller is ensured, and meanwhile, the influence of the accumulation of time errors caused by various reasons on the preset cycle period is avoided. The preset initialization signal includes, but is not limited to, a vehicle power-on signal and an initialization signal input by a user. The preset starting time is the time for entering the preset cycle for the first time.
Preferably, in the method for controlling task processing as described above, the preset loop period at least includes: a first cycle period and a second cycle period;
the first initial time of the first cycle period is the preset initial time after the preset cycle period is initialized, and the first initial time is the time for entering the first cycle period for the first time;
the second initial time of the second cycle period is separated from the first initial time by a first preset time length, and the second initial time is the time for entering the second cycle period for the first time.
In an embodiment of the present invention, the preset cycle period at least includes: the two cycle periods with different initial times are beneficial to increasing the number of task processing nodes on the time axis, and further the task processing efficiency of the whole vehicle controller is ensured and improved.
Further, in the method for controlling task processing as described above, the cycle interval of the first cycle period is a second preset duration, and the cycle interval of the second cycle period is a third preset duration;
the sum of the first preset time length and at least one third preset time length is different from any integral multiple of the second preset time length.
Furthermore, the cycle intervals of the two cycle periods are different, and no repeated task processing node exists, so that the calculation resources of the vehicle control unit are favorably and reasonably utilized by the balanced distribution of tasks, the requirements of different tasks on processing time are met, the influence of the overweight of the tasks when the task processing nodes in different periods are overlapped on the subsequent task processing process is favorably avoided, and the task processing efficiency is improved.
Referring to fig. 3, another preferred embodiment of the present invention also provides a task processing control apparatus, including:
the invoking module 301 is configured to invoke an input signal acquiring function, a control strategy function, and an output signal sending function in sequence at the beginning of each period according to a preset cycle period; wherein,
the acquisition module 302 is configured to acquire a first signal sent by a signal acquisition device connected to the vehicle control unit through a called input signal acquisition function;
the processing module 303 is configured to invoke a control policy function, and process the first signal to obtain a second signal;
and the sending module 304 is configured to invoke an output signal sending function and send a second signal to a corresponding signal execution device.
Alternatively, the acquisition module 302, the processing module 303 and the sending module 304 may be subordinate sub-modules of the retrieving module 301.
Specifically, the task processing control device described above further includes:
a receiving module 305, configured to receive a preset initialization signal, where the preset initialization signal includes: electrifying the whole vehicle;
the initialization module 306 is configured to reset a preset start time of a preset cycle period according to a preset initialization signal.
The embodiment of the control device of the present invention is a control device corresponding to the embodiment of the control method, and all implementation means in the embodiment of the control method are applied to the embodiment of the control device, and the same technical effects can be achieved.
In accordance with still another preferred embodiment of the present invention, there is provided a vehicle control unit including: the control device for task processing as described above.
The vehicle control unit provided by the invention comprises: according to the control device for task processing, in the actual operation process of the vehicle control unit, the time interval between the time for starting to call and execute the output signal sending function in each period and the starting time of the corresponding period is the same, so that the phenomenon of period fluctuation is avoided, the vehicle control unit is ensured to be consistent with the preset period in the actual operation process, and the normal function of the vehicle control unit is ensured to be realized.
Still another preferred embodiment of the present invention provides a vehicle including: the vehicle control unit is described above.
The vehicle provided by the invention comprises the vehicle control unit, and the realization of the normal function of the vehicle control unit is ensured by avoiding the periodic fluctuation of the output signal of the vehicle control unit in the running process, so that the real-time property of vehicle control is improved, the safety of the vehicle is ensured, and the vehicle can run normally.
Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (6)
1. A control method for task processing is applied to a vehicle control unit, and is characterized by comprising the following steps:
according to a preset cycle, sequentially calling an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each cycle; wherein,
acquiring a first signal sent by a signal acquisition device connected with the vehicle control unit through the acquired input signal acquisition function;
processing the first signal through the called control strategy function to obtain a second signal;
sending the second signal to a corresponding signal execution device through the called output signal sending function;
wherein the preset cycle period at least comprises: a first cycle period and a second cycle period;
the first initial time of the first cycle period is a preset initial time after the preset cycle period is initialized, and the first initial time is a time for entering the first cycle period for the first time;
a second initial time of the second cycle period is separated from the first initial time by a first preset time length, wherein the second initial time is the time of entering the second cycle period for the first time;
the cycle interval of the first cycle period is a second preset time length, and the cycle interval of the second cycle period is a third preset time length;
the sum of the first preset time length and at least one third preset time length is different from any integral multiple of the second preset time length.
2. The method of controlling task processing according to claim 1, further comprising:
receiving a preset initialization signal, wherein the preset initialization signal comprises: electrifying the whole vehicle;
resetting the preset starting time of the preset cycle period according to the preset initialization signal.
3. A control apparatus for task processing, comprising:
the transfer module is used for sequentially transferring an input signal acquisition function, a control strategy function and an output signal sending function at the beginning of each period according to a preset cycle period; wherein,
the acquisition module is used for acquiring a first signal sent by a signal acquisition device connected with the vehicle control unit through the acquired input signal acquisition function;
the processing module is used for calling a control strategy function and processing the first signal to obtain a second signal;
the sending module is used for calling the output signal sending function and sending the second signal to a corresponding signal execution device;
wherein the preset cycle period at least comprises: a first cycle period and a second cycle period;
the first initial time of the first cycle period is a preset initial time after the preset cycle period is initialized, and the first initial time is a time for entering the first cycle period for the first time;
a second initial time of the second cycle period is separated from the first initial time by a first preset time length, wherein the second initial time is the time of entering the second cycle period for the first time;
the cycle interval of the first cycle period is a second preset time length, and the cycle interval of the second cycle period is a third preset time length;
the sum of the first preset time length and at least one third preset time length is different from any integral multiple of the second preset time length.
4. The task processing control device according to claim 3, further comprising:
a receiving module, configured to receive a preset initialization signal, where the preset initialization signal includes: electrifying the whole vehicle;
the initialization module is used for resetting the preset starting time of the preset cycle period according to the preset initialization signal;
wherein the preset cycle period at least comprises: a first cycle period and a second cycle period;
the first initial time of the first cycle period is a preset initial time after the preset cycle period is initialized, and the first initial time is a time for entering the first cycle period for the first time;
a second initial time of the second cycle period is separated from the first initial time by a first preset time length, wherein the second initial time is the time of entering the second cycle period for the first time;
the cycle interval of the first cycle period is a second preset time length, and the cycle interval of the second cycle period is a third preset time length;
the sum of the first preset time length and at least one third preset time length is different from any integral multiple of the second preset time length.
5. A vehicle control unit, comprising: a control apparatus for task processing according to any one of claims 3 or 4.
6. A vehicle, characterized by comprising: the vehicle control unit of claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910117165.XA CN111572469B (en) | 2019-02-15 | 2019-02-15 | Task processing control method and device and vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910117165.XA CN111572469B (en) | 2019-02-15 | 2019-02-15 | Task processing control method and device and vehicle |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111572469A CN111572469A (en) | 2020-08-25 |
CN111572469B true CN111572469B (en) | 2022-04-26 |
Family
ID=72116726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910117165.XA Active CN111572469B (en) | 2019-02-15 | 2019-02-15 | Task processing control method and device and vehicle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111572469B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114770514B (en) * | 2022-05-11 | 2024-08-27 | 北京睿知文峰教育科技有限公司 | STM 32-based artificial intelligent robot control method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102008043646A1 (en) * | 2008-11-11 | 2010-05-12 | Robert Bosch Gmbh | Method and system for controlling communication between a function computer and a monitoring module |
CN106844084B (en) * | 2017-03-16 | 2020-03-17 | 北京新能源汽车股份有限公司 | Program control method and device and automobile |
CN109189567B (en) * | 2018-08-30 | 2021-10-08 | 百度在线网络技术(北京)有限公司 | Time delay calculation method, device, equipment and computer readable storage medium |
-
2019
- 2019-02-15 CN CN201910117165.XA patent/CN111572469B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111572469A (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110673948B (en) | Cloud game resource scheduling method, server and storage medium | |
CN101197812B (en) | System and method for implementing page invocation | |
CN108540568B (en) | Computing capacity sharing method and intelligent equipment | |
CN111506430B (en) | Method and device for processing data under multitasking and electronic equipment | |
CN108922524A (en) | Control method, system, device, Cloud Server and the medium of intelligent sound equipment | |
CN107239330A (en) | The method for allocating tasks and its device of automobile open system framework operating system | |
CN111572469B (en) | Task processing control method and device and vehicle | |
CN114648131A (en) | Federal learning method, device, system, equipment and medium | |
CN108829519A (en) | Method for scheduling task, cloud platform and computer readable storage medium based on cloud platform | |
CN100461683C (en) | Universal business system and device, network access system and business processing method | |
CN107025134B (en) | Database service system and method compatible with multiple databases | |
CN113242149B (en) | Long connection configuration method, apparatus, device, storage medium, and program product | |
Trumler et al. | Self-configuration via cooperative social behavior | |
CN109117340A (en) | A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication | |
CN113098960A (en) | Service operation method, device, server and storage medium | |
CN114546926A (en) | Core cluster synchronization, control method, data processing method, core, device, and medium | |
CN106919488A (en) | The determination method and device of the responsive state of application program | |
CN116932236A (en) | Dual-communication architecture algorithm calling method and device based on memory occupation mode | |
US11979295B2 (en) | Reinforcement learning agent training method, modal bandwidth resource scheduling method and apparatus | |
CN115733710B (en) | Message sending method, target node, non-target node and message transmission system | |
CN115827255B (en) | Application resource self-adaptive allocation management method and system for concentrator | |
CN115499791B (en) | Service-oriented communication method, device, electronic equipment and storage medium | |
CN117435354B (en) | Method, device and system for running algorithm model, electronic equipment and storage medium | |
CN113590319B (en) | Method and device for balancing computing resource load of message queue | |
CN116911393B (en) | Quantum chip design system, quantum chip design method, electronic equipment and storage medium |
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 |