CN112148435B - 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
CN112148435B
CN112148435B CN201910576066.8A CN201910576066A CN112148435B CN 112148435 B CN112148435 B CN 112148435B CN 201910576066 A CN201910576066 A CN 201910576066A CN 112148435 B CN112148435 B CN 112148435B
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.)
Active
Application number
CN201910576066.8A
Other languages
Chinese (zh)
Other versions
CN112148435A (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 Momenta 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 Momenta Technology Co Ltd filed Critical Beijing Momenta 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

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method and a device for determining a target module scheduling strategy of 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 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 into the corresponding buffer; calculating the difference value between the written value and the read value to obtain a target water level value between the target module and another module; acquiring a corresponding relation between each water level value interval and each scheduling strategy which are stored in advance; 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 of an automatic driving system.
Background
The integration of software algorithm modules of an autopilot system is a system engineering, and the problems of synchronization and communication need to be solved. The current common inter-module system scheduling modes include: serial, publish-receive. Specifically, assuming that there are three modules A, B, C, B depends on the result of receiving a, and C depends on the result of receiving B, as shown in fig. 1, the serial scheduling mode is a- > B- > C- > and. The publish-receive formula is in parallel, A publishes the message, B subscribes to A's message, and C subscribes to B's message. Taking B as an example, only when A issues a message, B execution is triggered, otherwise B waits all the time; similarly, after B is executed, a message is issued to trigger C to execute. The publish-accept scheme improves the parallelism of the system and is therefore widely used.
However, in practical applications, since the data amounts generated by the modules are different at different times, and one or more modules are stuck due to network failure or the like, the following drawbacks exist in the publish-receive scheme: each module can only take the data at the tail of the message queue, but can not take other data in the queue, and when any module is blocked, the data delay in the queue is too large, so that newer data can not be obtained in time. And, buffer queue length increases, will begin to lose frames even after writing full buffer, causes the waste of the system resource. Accordingly, in order to solve the above-described problems, a method for determining a target module scheduling strategy for an automatic driving system is needed.
Disclosure of Invention
The invention provides a method and a device for determining a target module scheduling strategy of an automatic driving system, which are used for customizing the scheduling strategy of each module in real time, reducing data delay and avoiding system resource waste. The specific technical scheme is as follows.
In a first aspect, an embodiment of the present invention provides a method for determining a scheduling policy of a target module in an autopilot system, where the autopilot system includes a plurality of modules, each two modules having a signal flow relationship correspondingly set a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, a next module reads data from the buffer, a manner of storing data in the buffer is a ring 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 into the corresponding buffer;
calculating a 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 a corresponding relation between each water level value interval and each scheduling strategy which are stored in advance;
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 the scheduling strategy of the target module.
Optionally, pre-storing the corresponding relation between each water level value interval and each scheduling policy includes:
when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read 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 comprises:
determining the data quantity to be read corresponding to the scheduling strategy of the target module;
and taking the model of the data quantity 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 a reading value of a reading counter stored in the target module;
the write value of the write counter stored in the other module is obtained by:
when the other module writes data into the corresponding buffer area, the writing value of the writing counter stored in the other module is increased by 1.
Optionally, the method further comprises:
obtaining a target water level value of each module in the system;
and identifying a target water level value which is 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 of an autopilot system, where the autopilot system includes a plurality of modules, each two modules having a signal flow relationship correspondingly set a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, a next module reads data from the buffer, a manner of storing data in the buffer is a ring queue manner, and the target module is any one of the plurality of modules, and the apparatus includes:
a value acquisition unit configured to acquire a read value of a read counter stored in a target module and a write value of a write counter stored in another module preceding 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 into the corresponding buffer;
the difference value calculating unit is used for calculating the difference value between the writing value and the reading 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 water level value interval and each scheduling strategy which are stored in advance;
and the strategy determining unit is used for 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 the scheduling strategy of the target module.
Optionally, the apparatus further includes: the data storage unit is used for storing the corresponding relation between each water level value interval and each scheduling strategy in advance; the data storage unit is specifically configured to:
when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read 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 includes:
the data quantity determining unit is used for determining the data quantity 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 quantity to be read to the queue capacity of the buffer area corresponding to the target module, obtaining the position of the data to be extracted, and reading the data from the position.
Optionally, the apparatus further includes:
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 a buffer area corresponding to the target module;
and the writing value determining unit is used for adding 1 to the writing value of the writing counter stored in the other module when the other module writes data into the corresponding buffer area.
Optionally, the apparatus further includes:
the water level value acquisition unit is used for acquiring a target water level value of each module in the system;
and the priority adjustment unit is used for identifying a target water level value which is larger than a 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 may 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 another module has written into the corresponding buffer; then calculating the difference between the written value and the read value to obtain a target water level value between the target module and another module; then, the corresponding relation between each water level value interval and each scheduling strategy which are stored in advance 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, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
The innovation points of the embodiment of the invention include:
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, is conveniently analyzed; the water level value intuitively reflects the blocking condition of the message queue, the high water level value indicates that the current data volume to be processed is higher, and the low water level value indicates that the current data volume to be processed is lower, so that the system scheduling strategy is customized according to the water level value, the problem of frame loss is conveniently solved, the system has better flexibility and expansibility, and one strategy is used for one module, so that the stability of the system is enhanced; the data is stored in the buffer area in a ring queue mode, and the data structure can reflect the water level characteristic of the system and save the application cost of the system memory.
2. When the water level value is lower, the current data volume 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 current data volume to be processed is higher, and in this case, partial 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 current data to be processed is high, and in this case, only a small amount of data in the buffer area is read, so that low time delay of the system can be realized.
3. The data storage mode in the buffer area is a ring queue mode, so that the data position can be conveniently indexed, and the data reading can be accurately performed.
4. And dynamically adjusting the priority of the thread according to the target water level value of each module in the system, and preferentially taking care of the module with higher water level, thereby achieving the aim of taking account of the throughput sum 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 apparent that the drawings in the following description are only some embodiments of the invention. Other figures may be derived from these figures without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of an inter-module serial and publish-receive scheduling scheme;
FIG. 2 is a schematic diagram of a directed acyclic graph of software algorithm module integration for an autopilot system in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of data stored in a buffer according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for determining a target module scheduling policy for an autopilot system according to one 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 autopilot system according to an embodiment of the present invention.
Detailed Description
The technical solutions 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 will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "comprising" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. A process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those 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 scheduling strategy of a target module of an automatic driving system, which can customize the scheduling strategy of the target module according to the current water level value between the target module and another module, namely the unprocessed data volume, so that the data delay can be reduced, and the waste of system resources is avoided. The following describes embodiments of the present invention in detail.
In an embodiment of the present invention, the autopilot system may include a plurality of modules, each of the two modules having a signal flow relationship is provided with a buffer area in the memory, the former module in the signal flow direction writes data into the buffer area, and the latter module reads data from the buffer area.
Specifically, as shown in fig. 2, the integration of the software algorithm modules of the autopilot system may be abstracted into a DAG (Directed Acyclic Graph ), that is, a graph in which any edge is directed and no loop exists. As shown in FIG. 2, the ellipses represent modules, the boxes represent buffers, and each edge represents the flow direction of the data. The workflow corresponding to fig. 2 is: data produced by the module a (ModuleA) is written into the buffer 1, the module B (ModuleB) reads the data therefrom, the processing result is written into the buffer 2, and then the module C (ModuleC) and the module D (ModuleD) each read the data from the buffer 2 for processing.
It should be noted that whatever the algorithm modules, their data links can be abstracted with the above model. That is, whatever the algorithm module, the method provided by the present embodiment may be used to determine the scheduling policy of each module.
In one example, as in an autopilot map locating and obstacle detection system, module a may be camera driven, module B may be image preprocessing, module C may be obstacle detection, and module D may be map construction.
On the basis of the above model, the concept of water level can be established. Specifically, for each buffer, a module for reading it stores a read counter, which may also be referred to as a read_counter counter, representing the number of data that have been read; the write module stores a write counter, which may also be referred to as a write_counter counter, representing the number of data that have been written. Then the water level between module a and module B may be expressed as
waterlevel=ModuleA::write_counter-ModuleB::read_counter
The water level value indicates the quantity of data to be processed in the buffer zone, reflects the real-time performance of the module, has small water level value, indicates that the quantity of the data to be processed is small, and can be operated in real time; the water level value becomes large, which means that the amount of data to be processed is large, the real-time performance of the system is poor, and blocking or delay occurs; the water level value reaches the maximum value, which indicates that the system verifies that the data received by the blockage cannot be processed normally.
The water level can be expressed 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 expressed as
waterlevel=ModuleA::write_counter-ModuleD::read_counter
Therefore, not only the local system but also the whole system can be analyzed by water level.
The data storage manner in the buffer area may be a ring queue manner. Taking buffer 1 as an example, as shown in FIG. 3, module A writes data to buffer 1, one for each write, write_counter plus 1; module B reads data from buffer 1, one for each read, read_counter plus 1.
Fig. 4 is a flowchart of a method for determining a target module scheduling policy for an autopilot 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 module in an automatic driving system. Another module is any module before the target module in the data flow direction, taking fig. 2 as an example, when the target module is the module B, the other module is the module a; when the target module is module C, the other module may be module a or B.
For example, a storage location of the read value of the read counter in the target module and a storage location of the write value of the write counter in the other module may be saved in advance, and the read value and the write value may be acquired from the corresponding locations.
Wherein the read value of the read counter stored in the target module can be obtained by: when the target module reads data from its corresponding buffer, the read value of the read counter stored in the target module is increased by 1. The write value of the write counter stored in another module may be obtained by: when the other module writes data into its corresponding buffer, the write value of the write counter stored in the other module is increased by 1.
S420: and calculating the difference value between the writing value and the reading value to obtain a target water level value between the target module and another module.
The difference between the written value and the read value is the data which is already written into the buffer but not yet read, namely 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 invention, the corresponding relation between each water level value interval and each scheduling policy can be prestored according to the following mode: when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read the data corresponding to the 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 zone; 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 low, the current data 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 current data volume to be processed is higher, and in this case, partial 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 current data to be processed is high, and in this case, only a small amount of data in the buffer area is read, so that 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 interval is less than 4, 4-6, and greater than 6, respectively, 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.
From the above, it can be seen that the present embodiment introduces a water level concept to model the message communication system, so as to analyze the dynamic performance of the system, that is, the current data processing condition of the system; the water level value intuitively reflects the blocking condition of the message queue, the high water level value indicates that the current data volume to be processed is higher, and the low water level value indicates that the current data volume to be processed is lower, so that the system scheduling strategy is customized according to the water level value, the problem of frame loss is conveniently solved, the system has better flexibility and expansibility, and one strategy is used for one module, so that the stability of the system is enhanced; the data is stored in the buffer area in a ring queue mode, and the data structure can reflect the water level characteristic of the system and save the application cost of the system memory.
Specifically, 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, with input_buffer and output_buffer member variables pointing to the input buffer and output buffer, and with read_counter and write_counter member variables representing the amount of data read from the input buffer and the amount of data written to the output buffer, respectively. Imude provides default read and write methods, read from and write to the buffer, with a corresponding counter self-increment of 1 every time read or write occurs.
The module ABCD of the inherited IMmodule can respectively overwrite the read method and the write method, thereby realizing more flexible messaging. The parameters of read and write are water level values, so that the subclass can decide what read-write strategy 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, the modules want to be discarded, and new data is directly processed, then a read function can be customized, and when the water level value is higher than a certain threshold value, the frame of data is not processed.
IRingBuffer is also an abstract class that provides mainly three methods, push supports writing data through an index (write_counter), pop supports reading data through an index (read_counter). Most importantly, the getWaterlevel method is transferred into an input module and an output module of a buffer zone, and a water level value can be obtained.
As an implementation manner of the embodiment of the present invention, after determining a scheduling policy corresponding to a target module, an electronic device may further determine an amount of data to be read corresponding to the scheduling policy of the target module, and then modulo the amount of data to be read by a queue capacity of a buffer area corresponding to the target module, to obtain a position of data to be extracted, and read the data from the position.
Taking the modulus, i.e., taking the remainder, e.g., 1 to 5 modulus is 1,2 to 5 modulus is 2.
The data storage mode in the buffer area is a ring queue mode, so that the data position can be conveniently indexed, and the data reading can be accurately performed.
It will be appreciated that the autopilot system includes a plurality of modules, and that the amount of data to be processed for each module may vary significantly. In this case, when the process processing priorities of the modules are the same, the water level value corresponding to the module with the larger data volume to be processed is continuously increased, resulting in the throughput and the reduction of the system.
As an implementation manner of the embodiment of the invention, the electronic device can acquire the target water level value of each module in the system, then identify the target water level value greater than a preset threshold value, and improve the process processing priority of the module corresponding to the identified target water level value.
And dynamically adjusting the priority of the thread according to the target water level value of each module in the system, and preferentially taking care of the module with higher water level, thereby achieving the aim of taking account of the throughput sum of the system.
Fig. 6 is a device for determining a target module scheduling policy of an autopilot system according to an embodiment of the present invention, where the autopilot system includes a plurality of modules, each two modules having a signal flow relationship correspondingly set a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, a next module reads data from the buffer, a manner of storing data in the buffer is a ring 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 preceding 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 into the corresponding buffer;
a difference calculating unit 620, configured to calculate a difference between the write 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 water level value interval and each scheduling policy stored in advance;
and a policy determining unit 640, 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 a scheduling policy of the target module.
From the above, it can be seen that the present embodiment introduces a water level concept to model the message communication system, so as to analyze the dynamic performance of the system, that is, the current data processing condition of the system; the water level value intuitively reflects the blocking condition of the message queue, the high water level value indicates that the current data volume to be processed is higher, and the low water level value indicates that the current data volume to be processed is lower, so that the system scheduling strategy is customized according to the water level value, the problem of frame loss is conveniently solved, the system has better flexibility and expansibility, and one strategy is used for one module, so that the stability of the system is enhanced; the data is stored in the buffer area in a ring queue mode, and the data structure can reflect the water level characteristic of the system and save the application cost of the system memory.
In another embodiment of the present invention, the apparatus further comprises: the data storage unit is used for storing the corresponding relation between each water level value interval and each scheduling strategy in advance; the data storage unit is specifically configured to:
when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read 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 quantity determining unit is used for determining the data quantity 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 quantity to be read to the queue capacity of the buffer area corresponding to the target module, obtaining 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 a buffer area corresponding to the target module;
and the writing value determining unit is used for adding 1 to the writing value of the writing 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 a target water level value of each module in the system;
and the priority adjustment unit is used for identifying a target water level value which is larger than a preset threshold value and improving the process processing priority of the module corresponding to the identified target water level value.
The device embodiment corresponds to the method embodiment, and has the same technical effects as the method embodiment, and the specific description refers to the method embodiment. The apparatus embodiments are based on the method embodiments, and specific descriptions may be referred to in the method embodiment section, which is not repeated herein.
Those of ordinary skill in the art will appreciate that: the drawing is a schematic diagram of one embodiment and the modules or flows in the drawing are not necessarily required to practice the invention.
Those of ordinary skill in the art will appreciate that: the modules in the apparatus of the embodiments may be distributed in the apparatus of the embodiments according to the description of the embodiments, or may be located in one or more apparatuses different from the present embodiments with corresponding changes. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for determining a target module scheduling policy for an automatic driving system, wherein the automatic driving system includes a plurality of modules, each two modules having a signal flow relationship correspondingly set a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, a next module reads data from the buffer, 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 method comprising:
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 into the corresponding buffer;
calculating a 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 a corresponding relation between each water level value interval and each scheduling strategy which are stored in advance;
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 the scheduling strategy of the target module;
obtaining a target water level value of each module in the system; and identifying a target water level value which is larger than a preset threshold value, and improving the process processing priority of the module corresponding to the identified target water level value.
2. The method of claim 1, wherein pre-storing the correspondence of each water level value interval to each scheduling policy comprises:
when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read 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 quantity to be read corresponding to the scheduling strategy of the target module;
and taking the model of the data quantity 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, characterized in that 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 a reading value of a reading counter stored in the target module;
the write value of the write counter stored in the other module is obtained by:
when the other module writes data into the corresponding buffer area, the writing value of the writing counter stored in the other module is increased by 1.
5. An apparatus for determining a target module scheduling policy for an automatic driving system, wherein the automatic driving system includes a plurality of modules, each two modules having a signal flow relationship are correspondingly provided with a buffer in a memory, a previous module in a signal flow direction writes data into the buffer, a next module reads data from the buffer, 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 comprising:
a value acquisition unit configured to acquire a read value of a read counter stored in a target module and a write value of a write counter stored in another module preceding 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 into the corresponding buffer;
the difference value calculating unit is used for calculating the difference value between the writing value and the reading 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 water level value interval and each scheduling strategy which are stored in advance;
the strategy determining unit is used for 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 the scheduling strategy of the target module;
the water level value acquisition unit is used for acquiring a target water level value of each module in the system;
and the priority adjustment unit is used for identifying a target water level value which is larger than a preset threshold value and improving the process processing priority of the module corresponding to the identified target water level value.
6. The apparatus of claim 5, wherein the apparatus further comprises: the data storage unit is used for storing the corresponding relation between each water level value interval and each scheduling strategy in advance; the data storage unit is specifically configured to:
when the water level value interval is smaller than the first threshold value, determining the corresponding scheduling strategy 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 that the corresponding scheduling strategy is to read 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.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the data quantity determining unit is used for determining the data quantity 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 quantity to be read to the queue capacity of the buffer area corresponding to the target module, obtaining the position of the data to be extracted, and reading the data from the position.
8. The apparatus of any one of claims 5-7, wherein 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 a buffer area corresponding to the target module;
and the writing value determining unit is used for adding 1 to the writing value of the writing counter stored in the other module when the other module writes data into the corresponding buffer area.
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 CN112148435A (en) 2020-12-29
CN112148435B true 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
CN112148435A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
EP3270287A1 (en) Scheduling method and system for video analysis tasks
CN109840111B (en) Graphical service processing system and method
KR102490908B1 (en) Resource scheduling method and terminal device
CN111221643B (en) Task processing method and task processing device
US11144330B2 (en) Algorithm program loading method and related apparatus
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
CN113992525A (en) Method and device for adjusting number of applied containers
CN115211092A (en) Message pulling method and device and computer storage medium
CN111382026A (en) Caton monitoring method, device, system, storage medium and computer equipment
CN116185588A (en) Task scheduling method and device, electronic equipment and readable storage medium
CN112148435B (en) Method and device for determining target module scheduling strategy for automatic driving system
CN108415765B (en) Task scheduling method and device and intelligent terminal
CN109409948B (en) Transaction abnormity detection method, device, equipment and computer readable storage medium
CN110502320B (en) Thread priority adjusting method and device, electronic equipment and storage medium
CN107992361B (en) Background application cleaning method and device, storage medium and electronic equipment
CN110580185B (en) Data preprocessing method, device and storage medium
CN114461323B (en) Clamping and processing method and device, electronic equipment and storage medium
CN110795239A (en) Application memory leakage detection method and device
CN115454620A (en) Load prediction method, load prediction device, electronic device, and storage medium
CN110781950A (en) Message processing method and device
CN110647401B (en) Frequency modulation method, frequency modulation device, storage medium and electronic equipment
CN113051005B (en) Loading method and device
CN114443262A (en) Computing resource management method, device, equipment and system
CN110891029A (en) Flow control method and device for home network and flow controller

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

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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant