CN112148435A - Method and device for determining target module scheduling strategy for automatic driving system - Google Patents

Method and device for determining target module scheduling strategy for automatic driving system Download PDF

Info

Publication number
CN112148435A
CN112148435A CN201910576066.8A CN201910576066A CN112148435A CN 112148435 A CN112148435 A CN 112148435A CN 201910576066 A CN201910576066 A CN 201910576066A CN 112148435 A CN112148435 A CN 112148435A
Authority
CN
China
Prior art keywords
water level
module
value
data
level value
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
CN201910576066.8A
Other languages
Chinese (zh)
Other versions
CN112148435B (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.)
Beijing Momenta Technology Co Ltd
Original Assignee
Beijing Chusudu Technology Co ltd
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 Beijing Chusudu Technology Co ltd filed Critical Beijing Chusudu Technology Co ltd
Priority to CN201910576066.8A priority Critical patent/CN112148435B/en
Publication of CN112148435A publication Critical patent/CN112148435A/en
Application granted granted Critical
Publication of CN112148435B publication Critical patent/CN112148435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and a device for determining a target module scheduling strategy for an automatic driving system, wherein the method comprises the following steps: acquiring a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the number of data read by the target module from the corresponding buffer area, and the write value identifies the number of data written by another module into the corresponding buffer area; calculating the difference value between the written value and the read value to obtain a target water level value between the target module and the other module; acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy; and determining a water level value interval to which the target water level value belongs, and taking a scheduling strategy corresponding to the determined water level value interval as a scheduling strategy of the target module. By applying the scheme provided by the embodiment of the invention, the scheduling strategy of each module can be customized in real time, the data delay is reduced, and the waste of system resources is avoided.

Description

Method and device for determining target module scheduling strategy for automatic driving system
Technical Field
The invention relates to the technical field of intelligent driving, in particular to a method and a device for determining a target module scheduling strategy for an automatic driving system.
Background
The integration of software algorithm modules of an autopilot system is a system project and needs to solve the problems of synchronization and communication. Currently, a common inter-module system scheduling method includes: serial, issue-receive. Specifically, assuming that there are three modules A, B, C, B depending on the result of receiving A and C depending on the result of receiving B, the serial scheduling is A- > B- > C- > A- > B- > C- >, as shown in FIG. 1. The publishing-receiving mode is a parallel mode, wherein A publishes a message, B subscribes to the message of A, and C subscribes to the message of B. Taking B as an example, B is triggered to execute only when A issues a message, otherwise B waits all the time; similarly, B will issue a message after execution to trigger C execution. The publish-accept scheme improves the parallelism of the system and is therefore widely used.
However, in practical applications, due to different data volumes generated by the modules at different times and due to one or more modules stuck due to network failures and the like, the issue-receive scheme has the following disadvantages: each module can only fetch the data at the tail of the message queue, and can not fetch other data in the queue, and when any module is stuck, the data delay in the queue is too large, and the newer data can not be timely fetched. Moreover, the length of the buffer queue is increased, and frame loss is started even after the buffer area is fully written, so that waste of system resources is caused. Therefore, in order to solve the above problems, a method for determining a target module scheduling strategy for an autonomous driving system is needed.
Disclosure of Invention
The invention provides a method and a device for determining a target module scheduling strategy for an automatic driving system, which are used for customizing the scheduling strategy of each module in real time, reducing data delay and avoiding waste of system resources. The specific technical scheme is as follows.
In a first aspect, an embodiment of the present invention provides a method for determining a target module scheduling policy for an autonomous driving system, where the autonomous driving system includes a plurality of modules, each two modules having a signal flow relationship respectively set a buffer in a memory, a previous module writes data into the buffer in a signal flow direction, and a subsequent module reads data from the buffer, where a manner of storing data in the buffer is a circular queue manner, and the target module is any one of the plurality of modules, and the method includes:
acquiring a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that the other module has written to the corresponding buffer;
calculating a difference between the written value and the read value to obtain a target water level value between the target module and the other module;
acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy;
and determining a water level value interval to which the target water level value belongs, and taking a scheduling strategy corresponding to the determined water level value interval as a scheduling strategy of the target module.
Optionally, the pre-storing of the corresponding relationship between each water level value interval and each scheduling policy includes:
when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area;
when the water level value interval is from the first threshold value to the second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold;
when the water level value interval is larger than the second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer zone; the second preset water level value is smaller than the first preset water level value.
Optionally, the method further includes:
determining the data volume to be read corresponding to the scheduling strategy of the target module;
and performing modulus operation on the quantity of the data to be read to the queue capacity of the buffer area corresponding to the target module to obtain the position of the data to be extracted, and reading the data from the position.
Optionally, the read value of the read counter stored in the target module is obtained by:
when the target module reads data from the corresponding buffer area, adding 1 to the reading value of the reading counter stored in the target module;
the write value of the write counter stored in the other module is obtained by:
and when the other module writes data into the corresponding buffer zone, adding 1 to the write value of the write counter stored in the other module.
Optionally, the method further includes:
acquiring target water level values of all modules in the system;
and identifying a target water level value larger than a preset threshold value, and improving the process processing priority of the module corresponding to the identified target water level value.
In another aspect, an embodiment of the present invention provides an apparatus for determining a target module scheduling policy for an autonomous driving system, where the autonomous driving system includes a plurality of modules, each two modules having a signal flow relationship respectively set a buffer in a memory, a previous module writes data into the buffer in a signal flow direction, and a subsequent module reads data from the buffer, where a manner of storing data in the buffer is a circular queue manner, and the target module is any one of the plurality of modules, the apparatus includes:
a numerical value obtaining unit configured to obtain a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that the other module has written to the corresponding buffer;
a difference calculation unit, configured to calculate a difference between the written value and the read value to obtain a target water level value between the target module and the other module;
the data acquisition unit is used for acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy;
and the strategy determining unit is used for determining the water level value interval to which the target water level value belongs and taking the scheduling strategy corresponding to the determined water level value interval as the scheduling strategy of the target module.
Optionally, the apparatus further comprises: the data storage unit is used for pre-storing the corresponding relation between each water level value interval and each scheduling strategy; the data storage unit is specifically configured to:
when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area;
when the water level value interval is from the first threshold value to the second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold;
when the water level value interval is larger than the second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer zone; the second preset water level value is smaller than the first preset water level value.
Optionally, the apparatus further comprises:
the data volume determining unit is used for determining the data volume to be read corresponding to the scheduling strategy of the target module;
and the data reading unit is used for taking the modulus of the data volume to be read to the queue capacity of the buffer area corresponding to the target module to obtain the position of the data to be extracted and reading the data from the position.
Optionally, the apparatus further comprises:
a read value determining unit, configured to add 1 to a read value of a read counter stored in the target module when the target module reads data from its corresponding buffer;
and the write value determining unit is used for adding 1 to the write value of the write counter stored in the other module when the other module writes data into the corresponding buffer area.
Optionally, the apparatus further comprises:
the water level value acquisition unit is used for acquiring target water level values of all modules in the system;
and the priority adjusting unit is used for identifying the target water level value larger than the preset threshold value and improving the process processing priority of the module corresponding to the identified target water level value.
As can be seen from the above, the method and apparatus for determining a target module scheduling policy for an autopilot system according to the embodiments of the present invention can obtain a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the number of data read by the target module from the corresponding buffer area, and the write value identifies the number of data written by another module into the corresponding buffer area; then calculating the difference value between the written value and the read value to obtain a target water level value between the target module and the other module; then, corresponding relations between pre-stored water level value intervals and scheduling strategies can be obtained; and finally, determining a water level value interval to which the target water level value belongs, and taking a scheduling strategy corresponding to the determined water level value interval as a scheduling strategy of the target module, so that the scheduling strategy of the target module can be customized according to the current water level value between the target module and another module, namely the data volume to be processed, and further, the excessive data volume to be processed can be avoided, thereby reducing data delay and avoiding system resource waste. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
The innovation points of the embodiment of the invention comprise:
1. the concept of water level is introduced to model the message communication system, so that the dynamic performance of the system, namely the current data processing condition of the system, can be analyzed conveniently; the water level value visually reflects the blocking condition of the message queue, the water level value is high to indicate that the data volume to be processed is higher, and the water level value is low to indicate that the data volume to be processed is lower, so that the scheduling strategy of the system is customized through the water level value, the problem of frame loss is solved conveniently, and the scheduling strategy has better flexibility and expansibility; the mode of storing data in the buffer area is a circular queue mode, and the data structure can reflect the water level characteristic of the system and simultaneously save the system memory application cost.
2. When the water level value is lower, the current data to be processed is low, and under the condition, all data in the buffer area are read, so that the low time delay and high throughput of the system can be ensured; when the water level value is higher, the data volume to be processed is higher, and under the condition, part of data in the buffer area is read, so that the high throughput and the low time delay of the system can be considered; when the water level value is too high, the data volume to be processed is high, and under the condition, only a small amount of data in the buffer area is read, so that the low time delay of the system can be realized.
3. The data storage mode in the buffer area is a circular queue mode, so that the data position can be conveniently indexed, and the data reading can be accurately carried out.
4. And dynamically adjusting the thread priority according to the target water level value of each module in the system, and preferentially taking care of the modules with higher water levels, thereby achieving the purpose of giving consideration to the throughput and the throughput of the system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is to be understood that the drawings in the following description are merely exemplary of some embodiments of the invention. For a person skilled in the art, without inventive effort, further figures can be obtained from these figures.
FIG. 1 is a schematic diagram of serial and issue-receive scheduling between modules;
FIG. 2 is a schematic diagram of a directed acyclic graph integrated with software algorithm modules of an autopilot system in an embodiment of the present invention;
FIG. 3 is a diagram illustrating data stored in a buffer according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a method for determining a target module scheduling strategy for an autonomous driving system according to an embodiment of the present invention;
FIG. 5 is a class diagram representation of an autopilot system based on water level monitoring in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for determining a target module scheduling policy for an autonomous driving system according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the embodiments and drawings of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a method for determining a target module scheduling strategy for an automatic driving system, which can customize the scheduling strategy of a target module according to the current water level value between the target module and another module, namely unprocessed data volume, thereby reducing data delay and avoiding waste of system resources. The following provides a detailed description of embodiments of the invention.
In an embodiment of the present invention, the automatic driving system may include a plurality of modules, each two modules having a signal flow relationship may have a buffer area correspondingly disposed in the memory, and a previous module writes data into the buffer area in a signal flow direction and a subsequent module reads data from the buffer area.
Specifically, as shown in fig. 2, integration of software algorithm modules of the autopilot system may be abstracted to a DAG (Directed Acyclic Graph), that is, a Graph in which any one edge has a direction and no loop exists. As shown in FIG. 2, the ellipses represent modules, the boxes represent buffers, and each edge represents the flow of data. The corresponding workflow of fig. 2 is: the data produced by module a (modulea) is written into buffer 1, the data read by module b (moduleb) is written into buffer 2, and the result of processing is written into buffer 2, and then module c (modulec) and module d (moduled) each read data from buffer 2 and process it.
It should be noted that whatever the algorithm modules, their data links can be abstracted using the model. That is, whatever the algorithm module, the scheduling policy of each module can be determined by using the method provided by the present embodiment.
In one example, as in an autonomous driving map location and obstacle detection system, module a may be a camera driver, module B may be image pre-processing, module C may be obstacle detection, and module D may be a map construction.
On the basis of the above model, the concept of water level can be established. Specifically, for each buffer, a read counter, which may also be referred to as a read _ counter, is stored in a module that reads the buffer, and represents the number of data that has been read; the write module stores a write counter, which may also be referred to as a write _ counter, indicating the number of data that has been written. The water level between module a and module B can be expressed as
waterlevel=ModuleA::write_counter-ModuleB::read_counter
The water level value indicates the amount of data to be processed in the buffer area, the real-time performance of the module is reflected, the water level value is small, the amount of the data to be processed is small, and the system can run in real time; the water level value is increased, which indicates that the data volume to be processed is large, the real-time performance of the system is poor, and blockage or delay occurs; the water level value reaches the maximum value, which indicates that the system verifies that the data received by the block cannot be processed normally.
The water level can be represented not only between two adjacent modules, but also between a plurality of modules connected in series, for example, the water level between the module A and the module D can be represented as
waterlevel=ModuleA::write_counter-ModuleD::read_counter
Thus, not only local systems but also overall systems can be analyzed with water levels.
The data may be stored in the buffer in a circular queue. As shown in fig. 3, taking buffer 1 as an example, module a writes data to buffer 1, and every time one write _ counter is written, it adds 1; module B reads data from buffer 1, one for each read, read _ counter plus 1.
Fig. 4 is a flowchart illustrating a method for determining a target module scheduling policy for an automatic driving system according to an embodiment of the present invention. The method is applied to the electronic equipment.
The method specifically comprises the following steps.
S410: acquiring a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that another module has written to the corresponding buffer.
The target module is any one of the automatic driving systems. The other module is any module before the target module in the data flow direction, taking fig. 2 as an example, when the target module is module B, the other module is module a; when the target module is module C, the other module may be either module A or B.
For example, a storage location of a read value of a read counter in a target module and a storage location of a write value of a write counter in another module may be saved in advance, and the read value and the write value may be acquired from the respective locations.
The read value of the read counter stored in the target module can be obtained by the following steps: when the target module reads data from its corresponding buffer, 1 is added to the read value of the read counter stored in the target module. The write value of the write counter stored in the other module may be obtained by: when another module writes data to its corresponding buffer, the write value of the write counter stored in the other module is incremented by 1.
S420: and calculating the difference value between the written value and the read value to obtain a target water level value between the target module and the other module.
The difference between the written value and the read value is the data that has been written into the buffer but not yet read, i.e. the data to be processed.
S430: and acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy.
In the embodiment of the present invention, the corresponding relationship between each water level value interval and each scheduling policy may be pre-stored according to the following manner: when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area; when the water level value interval is from a first threshold value to a second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold; when the water level value interval is larger than a second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer area; the second preset water level value is smaller than the first preset water level value.
The specific values of the first threshold, the second threshold, the first preset water level value, and the second preset water level value may be preset, which is not limited in the embodiment of the present invention.
That is, when the water level value is lower, it indicates that the current data volume to be processed is low, and in this case, all data in the buffer area are read, so that low time delay and high throughput of the system can be ensured; when the water level value is higher, the data volume to be processed is higher, and under the condition, part of data in the buffer area is read, so that the high throughput and the low time delay of the system can be considered; when the water level value is too high, the data volume to be processed is high, and under the condition, only a small amount of data in the buffer area is read, so that the low time delay of the system can be realized.
S440: and determining a water level value interval to which the target water level value belongs, and taking a scheduling strategy corresponding to the determined water level value interval as a scheduling strategy of the target module.
For example, when the water level value intervals are respectively less than 4, 4-6 and greater than 6, and the target water level value is 2, it may be determined that the corresponding water level value interval is less than 4; when the target water level value is 7, it may be determined that the corresponding water level value interval is greater than 6.
As can be seen from the above, the concept of water level is introduced to model the message communication system, so as to facilitate analysis of the dynamic performance of the system, i.e., the current data processing condition of the system; the water level value visually reflects the blocking condition of the message queue, the water level value is high to indicate that the data volume to be processed is higher, and the water level value is low to indicate that the data volume to be processed is lower, so that the scheduling strategy of the system is customized through the water level value, the problem of frame loss is solved conveniently, and the scheduling strategy has better flexibility and expansibility; the mode of storing data in the buffer area is a circular queue mode, and the data structure can reflect the water level characteristic of the system and simultaneously save the system memory application cost.
In particular, a class diagram representation of an autopilot system based on water level monitoring may be as shown in fig. 5. The IModule is an abstract class of the module, member variables of input _ buffer and output _ buffer point to an input buffer area and an output buffer area, and member variables of read _ counter and write _ counter respectively represent the number of data read from the input buffer area and the number of data written into the output buffer area. IMudule provides the default read and write methods, reading from the buffer, and the corresponding counter is incremented by 1 each time the reading or writing is performed.
The module ABCD inheriting the IModule can respectively overwrite read and write methods, and more flexible message receiving and sending is realized. The parameters introduced by read and write are water level values, so that the subclasses can determine what read-write strategy is according to actual conditions when the interface is realized. For example, some modules have high real-time requirements on data, if the data is too old and is expected to be discarded, and new data is directly processed, the read function can be customized, and when the water level value is higher than a certain threshold value, the frame data is not processed.
The IRingBuffer is also an abstract class, and mainly provides three methods, namely push supporting writing data through an index (write _ counter) and pop supporting reading data through the index (read _ counter). Most importantly, the getWaterLevel method, the input module and the output module of the input buffer area can obtain the water level value.
As an implementation manner of the embodiment of the present invention, after determining the scheduling policy corresponding to the target module, the electronic device may further determine a data amount to be read corresponding to the scheduling policy of the target module, then modulo the data amount to be read with respect to a queue capacity of a buffer corresponding to the target module, obtain a position of the data to be extracted, and read the data from the position.
Modulo is the remainder calculation, e.g., 1 modulo 5 is 1, 2 modulo 5 is 2.
The data storage mode in the buffer area is a circular queue mode, so that the data position can be conveniently indexed, and the data reading can be accurately carried out.
It is understood that the automatic driving system includes a plurality of modules, and the amount of data to be processed corresponding to each module may be different greatly. In this case, when the process processing priorities of the modules are the same, the water level value corresponding to the module with larger data volume to be processed is continuously increased, and the system throughput is reduced.
As an implementation manner of the embodiment of the present invention, the electronic device may obtain a target water level value of each module in the system, identify a target water level value greater than a preset threshold, and improve a process processing priority of a module corresponding to the identified target water level value.
And dynamically adjusting the thread priority according to the target water level value of each module in the system, and preferentially taking care of the modules with higher water levels, thereby achieving the purpose of giving consideration to the throughput and the throughput of the system.
Fig. 6 is a device for determining a target module scheduling policy for an autonomous driving system according to an embodiment of the present invention, where the autonomous driving system includes a plurality of modules, each two modules having a signal flow relationship are respectively provided with a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, and a subsequent module reads data from the buffer, where a manner of storing data in the buffer is a circular queue manner, and the target module is any one of the plurality of modules, and the device includes:
a value obtaining unit 610 configured to obtain a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that the other module has written to the corresponding buffer;
a difference calculating unit 620, configured to calculate a difference between the written value and the read value to obtain a target water level value between the target module and the other module;
a data obtaining unit 630, configured to obtain a correspondence between each pre-stored water level value interval and each scheduling policy;
the policy determining unit 640 is configured to determine a water level value interval to which the target water level value belongs, and use a scheduling policy corresponding to the determined water level value interval as the scheduling policy of the target module.
As can be seen from the above, the concept of water level is introduced to model the message communication system, so as to facilitate analysis of the dynamic performance of the system, i.e., the current data processing condition of the system; the water level value visually reflects the blocking condition of the message queue, the water level value is high to indicate that the data volume to be processed is higher, and the water level value is low to indicate that the data volume to be processed is lower, so that the scheduling strategy of the system is customized through the water level value, the problem of frame loss is solved conveniently, and the scheduling strategy has better flexibility and expansibility; the mode of storing data in the buffer area is a circular queue mode, and the data structure can reflect the water level characteristic of the system and simultaneously save the system memory application cost.
In another embodiment of the present invention, the apparatus further comprises: the data storage unit is used for pre-storing the corresponding relation between each water level value interval and each scheduling strategy; the data storage unit is specifically configured to:
when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area;
when the water level value interval is from the first threshold value to the second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold;
when the water level value interval is larger than the second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer zone; the second preset water level value is smaller than the first preset water level value.
In another embodiment of the present invention, the apparatus further comprises:
the data volume determining unit is used for determining the data volume to be read corresponding to the scheduling strategy of the target module;
and the data reading unit is used for taking the modulus of the data volume to be read to the queue capacity of the buffer area corresponding to the target module to obtain the position of the data to be extracted and reading the data from the position.
In another embodiment of the present invention, the apparatus further comprises:
a read value determining unit, configured to add 1 to a read value of a read counter stored in the target module when the target module reads data from its corresponding buffer;
and the write value determining unit is used for adding 1 to the write value of the write counter stored in the other module when the other module writes data into the corresponding buffer area.
In another embodiment of the present invention, the apparatus further comprises:
the water level value acquisition unit is used for acquiring target water level values of all modules in the system;
and the priority adjusting unit is used for identifying the target water level value larger than the preset threshold value and improving the process processing priority of the module corresponding to the identified target water level value.
The above device embodiment corresponds to the method embodiment, and has the same technical effect as the method embodiment, and for the specific description, refer to the method embodiment. The device embodiment is obtained based on the method embodiment, and for specific description, reference may be made to the method embodiment section, which is not described herein again.
Those of ordinary skill in the art will understand that: the figures are merely schematic representations of one embodiment, and the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those of ordinary skill in the art will understand that: modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, or may be located in one or more devices different from the embodiments with corresponding changes. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for determining a target module scheduling policy for an autonomous driving system, wherein the autonomous driving system includes a plurality of modules, each two modules having a signal flow relationship are respectively provided with a buffer in a memory, a previous module writes data into the buffer in a signal flow direction, and a subsequent module reads data from the buffer, the buffer stores data in a circular queue, and the target module is any one of the plurality of modules, the method includes:
acquiring a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that the other module has written to the corresponding buffer;
calculating a difference between the written value and the read value to obtain a target water level value between the target module and the other module;
acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy;
and determining a water level value interval to which the target water level value belongs, and taking a scheduling strategy corresponding to the determined water level value interval as a scheduling strategy of the target module.
2. The method of claim 1, wherein pre-storing the correspondence between each water level value interval and each scheduling policy comprises:
when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area;
when the water level value interval is from the first threshold value to the second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold;
when the water level value interval is larger than the second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer zone; the second preset water level value is smaller than the first preset water level value.
3. The method of claim 2, wherein the method further comprises:
determining the data volume to be read corresponding to the scheduling strategy of the target module;
and performing modulus operation on the quantity of the data to be read to the queue capacity of the buffer area corresponding to the target module to obtain the position of the data to be extracted, and reading the data from the position.
4. A method according to any of claims 1-3, wherein the read value of the read counter stored in the target module is obtained by:
when the target module reads data from the corresponding buffer area, adding 1 to the reading value of the reading counter stored in the target module;
the write value of the write counter stored in the other module is obtained by:
and when the other module writes data into the corresponding buffer zone, adding 1 to the write value of the write counter stored in the other module.
5. The method of any one of claims 1-3, further comprising:
acquiring target water level values of all modules in the system;
and identifying a target water level value larger than a preset threshold value, and improving the process processing priority of the module corresponding to the identified target water level value.
6. An apparatus for determining a target module scheduling policy for an autonomous driving system, wherein the autonomous driving system includes a plurality of modules, each two modules having a signal flow relationship are respectively provided with a buffer in a memory, a previous module writes data into the buffer in a signal flow direction, a subsequent module reads data from the buffer, the buffer stores data in a circular queue, and the target module is any one of the plurality of modules, the apparatus includes:
a numerical value obtaining unit configured to obtain a read value of a read counter stored in a target module and a write value of a write counter stored in another module before the target module; the read value identifies the amount of data that the target module has read from the corresponding buffer, and the write value identifies the amount of data that the other module has written to the corresponding buffer;
a difference calculation unit, configured to calculate a difference between the written value and the read value to obtain a target water level value between the target module and the other module;
the data acquisition unit is used for acquiring the corresponding relation between each pre-stored water level value interval and each scheduling strategy;
and the strategy determining unit is used for determining the water level value interval to which the target water level value belongs and taking the scheduling strategy corresponding to the determined water level value interval as the scheduling strategy of the target module.
7. The apparatus of claim 6, wherein the apparatus further comprises: the data storage unit is used for pre-storing the corresponding relation between each water level value interval and each scheduling strategy; the data storage unit is specifically configured to:
when the water level value interval is smaller than a first threshold value, determining that the corresponding scheduling strategy is to read all data in the corresponding buffer area;
when the water level value interval is from the first threshold value to the second threshold value, determining the corresponding scheduling strategy as reading data corresponding to a first preset water level value in the corresponding buffer zone; the second threshold is greater than the first threshold;
when the water level value interval is larger than the second threshold value, determining that the corresponding scheduling strategy is to read data corresponding to a second preset water level value in the corresponding buffer zone; the second preset water level value is smaller than the first preset water level value.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the data volume determining unit is used for determining the data volume to be read corresponding to the scheduling strategy of the target module;
and the data reading unit is used for taking the modulus of the data volume to be read to the queue capacity of the buffer area corresponding to the target module to obtain the position of the data to be extracted and reading the data from the position.
9. The apparatus of any of claims 6-8, further comprising:
a read value determining unit, configured to add 1 to a read value of a read counter stored in the target module when the target module reads data from its corresponding buffer;
and the write value determining unit is used for adding 1 to the write value of the write counter stored in the other module when the other module writes data into the corresponding buffer area.
10. The apparatus of any of claims 6-8, further comprising:
the water level value acquisition unit is used for acquiring target water level values of all modules in the system;
and the priority adjusting unit is used for identifying the target water level value larger than the preset threshold value and improving the process processing priority of the module corresponding to the identified target water level value.
CN201910576066.8A 2019-06-28 2019-06-28 Method and device for determining target module scheduling strategy for automatic driving system Active CN112148435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910576066.8A CN112148435B (en) 2019-06-28 2019-06-28 Method and device for determining target module scheduling strategy for automatic driving system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910576066.8A CN112148435B (en) 2019-06-28 2019-06-28 Method and device for determining target module scheduling strategy for automatic driving system

Publications (2)

Publication Number Publication Date
CN112148435A true CN112148435A (en) 2020-12-29
CN112148435B CN112148435B (en) 2024-03-29

Family

ID=73869371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910576066.8A Active CN112148435B (en) 2019-06-28 2019-06-28 Method and device for determining target module scheduling strategy for automatic driving system

Country Status (1)

Country Link
CN (1) CN112148435B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800867A (en) * 2010-01-19 2010-08-11 深圳市同洲电子股份有限公司 Method, device and digital-television receiving terminal for realizing ring buffer
CN102591815A (en) * 2011-12-27 2012-07-18 Tcl集团股份有限公司 Method and device for using annular data buffer to read and write batch data
CN106201347A (en) * 2016-07-04 2016-12-07 联想(北京)有限公司 Information processing method and solid state hard disc
WO2017054377A1 (en) * 2015-09-28 2017-04-06 青岛海信电器股份有限公司 Audio data processing method, apparatus and system
CN107491398A (en) * 2017-08-04 2017-12-19 歌尔科技有限公司 Method of data synchronization, device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800867A (en) * 2010-01-19 2010-08-11 深圳市同洲电子股份有限公司 Method, device and digital-television receiving terminal for realizing ring buffer
CN102591815A (en) * 2011-12-27 2012-07-18 Tcl集团股份有限公司 Method and device for using annular data buffer to read and write batch data
WO2017054377A1 (en) * 2015-09-28 2017-04-06 青岛海信电器股份有限公司 Audio data processing method, apparatus and system
CN106201347A (en) * 2016-07-04 2016-12-07 联想(北京)有限公司 Information processing method and solid state hard disc
CN107491398A (en) * 2017-08-04 2017-12-19 歌尔科技有限公司 Method of data synchronization, device and electronic equipment

Also Published As

Publication number Publication date
CN112148435B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
US11144330B2 (en) Algorithm program loading method and related apparatus
US20070038987A1 (en) Preprocessor to improve the performance of message-passing-based parallel programs on virtualized multi-core processors
CN109840111B (en) Graphical service processing system and method
Hu et al. On exploring image resizing for optimizing criticality-based machine perception
US20220138012A1 (en) Computing Resource Scheduling Method, Scheduler, Internet of Things System, and Computer Readable Medium
EP4170561A1 (en) Method and device for improving performance of data processing model, storage medium and electronic device
CN115269108A (en) Data processing method, device and equipment
CN108667740B (en) Flow control method, device and system
CN115211092A (en) Message pulling method and device and computer storage medium
CN109634714B (en) Intelligent scheduling method and device
CN108415765B (en) Task scheduling method and device and intelligent terminal
CN111123728B (en) Unmanned vehicle simulation method, device, equipment and computer readable medium
CN111953569B (en) State information reporting method, device, equipment and medium
CN112148435A (en) Method and device for determining target module scheduling strategy for automatic driving system
CN113841119B (en) Control device and distributed processing method
CN110390463B (en) Wind control data processing method and device and terminal equipment
CN115617532B (en) Target tracking processing method, system and related device
CN112860779B (en) Batch data importing method and device
CN115454620A (en) Load prediction method, load prediction device, electronic device, and storage medium
CN115294564A (en) Method, device, medium and electronic equipment for detecting identification effectiveness of point cloud data
CN114301857A (en) Water meter communication method and device based on Internet of things
CN114244681A (en) Equipment connection fault early warning method and device, storage medium and electronic equipment
CN110647401B (en) Frequency modulation method, frequency modulation device, storage medium and electronic equipment
US9047572B2 (en) Mode determination for multivariate time series data
CN112784755A (en) Light face tracking method and storage device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220303

Address after: 100083 unit 501, block AB, Dongsheng building, No. 8, Zhongguancun East Road, Haidian District, Beijing

Applicant after: BEIJING MOMENTA TECHNOLOGY Co.,Ltd.

Address before: 100083 room 28, 4 / F, block a, Dongsheng building, 8 Zhongguancun East Road, Haidian District, Beijing

Applicant before: BEIJING CHUSUDU TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant