CN114003371B - Automatic driving load balancing method and device, electronic equipment and storage medium - Google Patents

Automatic driving load balancing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114003371B
CN114003371B CN202111144561.5A CN202111144561A CN114003371B CN 114003371 B CN114003371 B CN 114003371B CN 202111144561 A CN202111144561 A CN 202111144561A CN 114003371 B CN114003371 B CN 114003371B
Authority
CN
China
Prior art keywords
load
information
service
module
migratable
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
CN202111144561.5A
Other languages
Chinese (zh)
Other versions
CN114003371A (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.)
China Automotive Innovation Corp
Original Assignee
China Automotive Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Automotive Innovation Corp filed Critical China Automotive Innovation Corp
Priority to CN202111144561.5A priority Critical patent/CN114003371B/en
Publication of CN114003371A publication Critical patent/CN114003371A/en
Application granted granted Critical
Publication of CN114003371B publication Critical patent/CN114003371B/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
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides an automatic driving load balancing method, an automatic driving load balancing device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining first load information corresponding to a data acquisition module; receiving second load information sent by the computing module; if the load of the calculation module is determined to be overloaded based on the second load information, determining target migration business from the second migratable business based on the first load information and the second load information; the second migratable service is a migratable service in the services executed by the computing module before load balancing, and the target migration service is a service executed by the data acquisition module in the second migratable service after load balancing; a first notification message is sent to the computing module. By the automatic driving load balancing method, loads of the data acquisition module and the computing platform can be dynamically balanced, and processing capacities of two sides are maximally applied.

Description

Automatic driving load balancing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of automotive technologies, and in particular, to an automatic driving load balancing method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of the automatic driving technology, the level of the automatic driving function of the vehicle is higher and higher in practical use, and the automatic driving is more and more applied to the practical driving life. In a high-level automatic driving control system, a large amount of data is collected and processed, and great demands are made on the computing power of the automatic driving system in multiple links of data perception, fusion, decision, control and the like. The data processing of autopilot can be performed in the data acquisition module and the computing platform of the vehicle, but the hardware computing power of the chips currently applied to both is not enough to meet the requirements of the L4-level autopilot scheme. Under the condition that the self computing power of a chip alone cannot meet the automatic driving requirement, the data processing of automatic driving needs to be adjusted through load dynamic balance scheduling.
At present, load balancing applied to automatic driving is mainly centralized on a single side, and load balancing is performed based on process scheduling provided by a single-side operating system, so that a data acquisition module and a calculation module can only be separately adjusted, and the efficiency and the effect of load balancing are limited.
Disclosure of Invention
In order to overcome the defects in the prior art, embodiments of the present disclosure provide an automatic driving load balancing method and apparatus, an electronic device, and a storage medium, which can dynamically balance loads of a data acquisition module and a computing platform, and maximize application of processing capabilities of both sides.
The embodiment of the application provides an automatic driving load balancing method, which comprises the following steps: determining first load information corresponding to a data acquisition module; receiving second load information sent by the computing module; if the load of the calculation module is determined to be overloaded based on the second load information, determining target migration business from the second migratable business based on the first load information and the second load information; the second migratable service is a migratable service in the services executed by the computing module before load balancing; the target migration service is a service executed by the data acquisition module in the second migratable service after load balancing; sending a first notification message to the computing module, wherein the first notification message is used for indicating the computing module not to execute the target migration service; the first load information includes a first total CPU (central processing unit) occupancy rate, first total memory usage information, and information of the first migratable service, and the second load information includes a second total CPU occupancy rate, second total memory usage information, and information of the second migratable service.
Specifically, after receiving the second load information sent by the computing module, the method further includes: if the data acquisition module is determined to be overloaded based on the first load information and/or the calculation module is determined to be sufficient in load margin based on the second load information, determining a target migration service from the first migratable service based on the first load information and the second load information; the first migratable service is a migratable service in the services executed by the data acquisition module before load balancing; the target migration service is a service executed by a computing module in the first migratable service after load balancing; and sending a second notification message to the computing module, wherein the second notification message is used for indicating the computing module to execute the target migration service.
Specifically, if determining that the load of the computing module is overloaded based on the second load information, determining the target migration service from the second migratable service based on the first load information and the second load information includes: and if the second total CPU occupancy rate is greater than the second total CPU occupancy rate threshold value, or the second total memory usage information represents that the second total memory usage amount is greater than the second total memory usage amount threshold value, determining that the load of the calculation module is overloaded, and determining the target migration service from the second migratable service based on the first load information and the second load information.
Specifically, if it is determined that the data collection module is overloaded based on the first load information and it is determined that the calculation module has sufficient load margin based on the second load information, determining a target migration service from the first migratable service based on the first load information and the second load information includes: if the first total CPU occupancy rate is greater than a first total CPU occupancy rate threshold value, or the first total memory usage information represents that the first total memory usage amount is greater than a first total memory usage amount threshold value, determining that the load of the data acquisition module is overloaded; and/or; if the second total CPU occupancy rate is smaller than the third total CPU occupancy rate threshold value and the second total memory usage information represents that the second total memory usage is smaller than the third total memory usage threshold value, determining that the load allowance of the computing module is sufficient; and determining target migrated traffic from the first migratable traffic based on the first load information and the second load information.
Specifically, the information of the first migratable service includes CPU occupancy rates and memory usage information corresponding to a plurality of first migratable services, and the information of the second migratable service includes CPU occupancy rates and memory usage information corresponding to a plurality of second migratable services.
Specifically, before determining the first load information corresponding to the data acquisition module, the method further includes: determining first calculation force information corresponding to the data acquisition module; receiving second calculation force information sent by the calculation module; determining a load weight based on the first calculated force information and the second calculated force information; the load weight is used for representing the optimal load ratio of the data acquisition module and the calculation module after load balancing; the first computing power information comprises first CPU parameter information and first memory parameter information, and the second computing power information comprises second CPU parameter information and second memory parameter information.
Specifically, if determining that the load of the computing module is overloaded based on the second load information, determining the target migration service from the second migratable service based on the first load information and the second load information includes: and if the calculation module is determined to be overloaded based on the second load information, determining the target migration service from the second migratable services based on the load weight, the first load information and the second load information.
The embodiment of the application provides an automatic driving load balancing device, and the device comprises: the determining module is used for determining first load information corresponding to the data acquisition module; the receiving module is used for receiving the second load information sent by the calculating module; the processing module is used for determining a target migration service from the second migratable services based on the first load information and the second load information if the load overload of the calculation module is determined based on the second load information; the second migratable service is a migratable service in the services executed by the computing module before load balancing; the target migration service is a service executed by the data acquisition module in the second migratable service after load balancing; the notification module is used for sending a first notification message to the computing module, wherein the first notification message is used for indicating the computing module not to execute the target migration service; the first load information includes a first total CPU (central processing unit) occupancy rate, first total memory usage information, and information of the first migratable service, and the second load information includes a second total CPU occupancy rate, second total memory usage information, and information of the second migratable service.
Specifically, the processing module is configured to, after receiving second load information sent by the computing module, determine a target migration service from the first migratable service based on the first load information and the second load information if it is determined that the data acquisition module is overloaded based on the first load information and/or it is determined that the computing module has sufficient load margin based on the second load information; the first migratable service is a migratable service in the services executed by the data acquisition module before load balancing; the target migrated service is a service executed by the computing module in the first migratable service after load balancing; and sending a second notification message to the computing module, wherein the second notification message is used for indicating the computing module to execute the target migration service.
Specifically, the processing module is configured to determine that the load of the computing module is overloaded if the second total CPU occupancy is greater than the second total CPU occupancy threshold, or the second total memory usage information indicates that the second total memory usage is greater than the second total memory usage threshold, and determine the target migration traffic from the second migratable traffic based on the first load information and the second load information.
Specifically, the processing module is configured to determine that the data acquisition module is overloaded when the first total CPU occupancy rate is greater than the first total CPU occupancy rate threshold, or the first total memory usage information indicates that the first total memory usage amount is greater than the first total memory usage amount threshold; and/or; if the second total CPU occupancy rate is smaller than the third total CPU occupancy rate threshold value and the second total memory usage information represents that the second total memory usage is smaller than the third total memory usage threshold value, determining that the load allowance of the computing module is sufficient; and determining target migrated traffic from the first migratable traffic based on the first load information and the second load information.
Specifically, the information of the first migratable service includes CPU occupancy rates and memory usage information corresponding to a plurality of first migratable services, and the information of the second migratable service includes CPU occupancy rates and memory usage information corresponding to a plurality of second migratable services.
Specifically, the device further comprises a load weight determining module, which is used for determining first calculation force information corresponding to the data acquisition module before determining first load information corresponding to the data acquisition module; receiving second calculation force information sent by the calculation module; determining a load weight based on the first force calculation information and the second force calculation information; the load weight is used for representing the optimal load ratio of the data acquisition module and the calculation module after load balancing; the first force calculation information comprises first CPU parameter information and first memory parameter information, and the second force calculation information comprises second CPU parameter information and second memory parameter information.
Specifically, the processing module is configured to determine, if it is determined that the computing module is overloaded based on the second load information, the target migration service from the second migratable service based on the load weight, the first load information, and the second load information.
Accordingly, the present application provides an electronic device, which includes a processor and a memory, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the above-mentioned automatic driving load balancing method.
Accordingly, embodiments of the present disclosure provide a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the above-mentioned automatic driving load balancing method.
The embodiment of the application has the following beneficial effects:
(1) By dynamically balancing the loads of the data acquisition module and the computing platform, the condition of unbalanced load on two sides is avoided as much as possible, so that the processing capacity on two sides is utilized to the maximum extent;
(2) After load balancing, the information of whether the data is processed or not can be obtained by analyzing the reference label of the data, so that the data acquisition module or the calculation module does not need to process the processed data in the migration service data, the data processing efficiency can be improved, and unnecessary calculation waste is reduced;
(3) By preferentially ensuring that the load of the computing module is not overloaded and simultaneously utilizing the processing capacity of the computing module as much as possible, the data processing delay can be avoided, and the data processing efficiency of automatic driving can be improved.
Drawings
In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of an application scenario of an automatic driving load balancing method according to an embodiment of the present application;
fig. 2 is a first flowchart of an automatic driving load balancing method according to an embodiment of the present disclosure;
FIG. 3 is a second flowchart of an automatic driving load balancing method according to an embodiment of the present disclosure;
fig. 4 is a third flowchart of an automatic driving load balancing method according to an embodiment of the present disclosure;
fig. 5 is a fourth flowchart illustrating an automatic driving load balancing method according to an embodiment of the present application;
fig. 6 is a fifth flowchart illustrating an automatic driving load balancing method according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an automatic driving load balancing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of a hardware structure of a server of an automatic driving load balancing method according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be apparent that the described embodiment is only one embodiment of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An "embodiment" as referred to herein relates to a particular feature, structure, or characteristic that may be included in at least one implementation of the present application. In the description of the embodiments of the present application, it should be understood that the terms "upper", "lower", "left", "right", "top", "bottom", and the like refer to orientations or positional relationships based on orientations or positional relationships shown in the drawings, which are used for convenience of description and simplicity of description, and do not indicate or imply that the referred devices/systems or elements must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be construed as limiting the present application. The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein. Furthermore, the terms "comprises," "comprising," and "having"/"is," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system/apparatus, article, or apparatus that comprises a list of steps or elements/modules is not necessarily limited to those steps or elements/modules expressly listed, but may include other steps or elements/modules not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application, and includes a vehicle 101, where the vehicle 101 includes a data acquisition module 1011 and a calculation module 1012. Specifically, in the application scenario of the present application, the automatic driving control system of the vehicle 101 may be in L3 and L4 levels, and has a great demand for the calculation power of multiple links of data perception, fusion, decision and control. The vehicle 101 may process data through the data acquisition module 1011 and the calculation module 1012. The data acquisition module 1011 can acquire various data such as sensors, positioning information, image information and the like, wherein the sensors can comprise millimeter radar waves, lasers, inertial sensors and the like; the calculation module 1012 may perform fusion decision control on the data. Meanwhile, since the data acquisition module 1011 can also process data, the processing capacity of both sides can be reasonably utilized by controlling the load balance of the data acquisition module 1011 and the calculation module 1012, and the chip calculation capacity of the data acquisition module 1011 and the calculation module 1012 can meet the requirement of the automatic driving function.
In one embodiment, the data acquisition module 1011 may dynamically determine the traffic that needs to be migrated between the data acquisition module 1011 and the calculation module 1012 and notify the calculation module 1012 of the determination result, thereby reasonably using the calculation capability of both sides while preventing the response speed and the safety of the automatic driving from being affected by the data processing delay caused by the excessive load. Specifically, migratable traffic may exist in both data collection module 1011 and computing module 1012, respectively, and migration may represent changing migratable traffic that should be handled by one side to be handled by the other side.
An exemplary process of an automatic driving load balancing method provided by the present application is described below. In method embodiments of the present application, the execution subject may be a data collection module. Fig. 2 is a first flowchart of an automatic driving load balancing method provided in an embodiment of the present application, and the present specification provides methods or process operation steps as shown in the embodiment or flowchart, but may include more or less operation steps based on conventional or non-inventive labor. The sequence of steps recited in the embodiments is only one of many execution sequences, and does not represent the only execution sequence, and in actual execution, the steps can be executed according to the method or the flow sequence shown in the embodiment or the figure, or executed in parallel (for example, a parallel processor or a multi-thread processing environment). Specifically, as shown in fig. 2, the method includes:
step S201: and determining first load information corresponding to the data acquisition module.
Specifically, the first load information may include a first total processing unit (central processing unit) occupancy rate, first total memory usage information, and information of the first migratable service. The occupancy rate of a first total processing unit (central processing unit), the use information of the first total memory and the information of the first migratable service all correspond to the data acquisition module. The first migratable service may be a migratable service among services executed by the data acquisition module before load balancing. The information of the first migratable service may include CPU occupancy and memory usage information corresponding to a plurality of first migratable services.
Specifically, step S201 may be performed based on a preset cycle.
Step S202: and receiving second load information sent by the calculation module.
Specifically, the second load information may include second total CPU occupancy, second total memory usage information, and information of the second migratable service. The second total CPU occupancy, the second total memory usage information, and the second migratable service information all correspond to the computing module. The second migratable service may be a migratable service among services executed by the computing module before load balancing. The information of the second migratable service may include CPU occupancy and memory usage information corresponding to a plurality of second migratable services.
Specifically, step S202 may be performed based on a preset cycle, and the execution cycle thereof may be identical to step S201.
In a specific embodiment, the content of the first migratable service may be identical to the content of the second migratable service, that is, all migratable services exist in the data collection module and the calculation module. Specifically, the first migratable service and the second migratable service may include a coordinate system conversion service of the location information.
In a particular embodiment, the services executed by the computing module may include a second migratable service and a second non-migratable service, where the second non-migratable service may be a decision service in an autonomous driving solution, such as a driving decision service or other service directly related to vehicle control. Specifically, the second non-migratable service may also be an automatic driving core service determined according to the service requirements of the user.
Step S203: determining whether to determine that the computing module is overloaded based on the second load information; if yes, the process proceeds to step S204.
Step S204: and determining target migration services from the second migratable services based on the first load information and the second load information.
Specifically, the target migration service may be a service executed by the data acquisition module in the second migratable service after load balancing, that is, after load balancing, the execution subject of the target migration service is changed from the calculation module to the data acquisition module. By executing step S204, it is possible to determine the services processed by the data acquisition module instead of the calculation module, and determine which services are respectively processed by the data acquisition module and the calculation module after load balancing.
Steps S203, S204 are further explained below based on fig. 4.
Fig. 4 is a schematic third flow chart of an automatic driving load balancing method according to an embodiment of the present disclosure. Wherein steps S401-S403 are exemplary flows of steps S203-S204 illustrated in fig. 2. In this exemplary flow. As shown in fig. 4 in particular, the method comprises:
step S401: judging whether the second total CPU occupancy rate is greater than a second total CPU occupancy rate threshold value or whether the second total memory usage information represents that the second total memory usage amount is greater than a second total memory usage amount threshold value; if yes, the process proceeds to step S402.
Step S402: determining that the computing module is overloaded.
Step S403: and determining target migration business from the second migratable business based on the first load information and the second load information.
In the embodiment of the application, the load of the computing module is determined to be overloaded based on any one of the CPU or the total memory of the computing module, and the target immigration service processed by the data acquisition module is determined to be exchanged, so that the load of the computing module can be reduced when the load of the computing module is overloaded. The second total CPU occupancy threshold and the second total memory usage threshold in step S401 may be determined based on an actual scene.
The following is explained on the basis of fig. 2. As illustrated in fig. 2, the method further comprises:
step S205: and sending the first notification information to the calculation module.
In a specific embodiment, the first notification message may be used to instruct the computing module not to perform the target migration service. While step S205 is executed, the data collection module starts to bring the target migration service into the execution queue, and the target migration service may be in a state of waiting for processing or starting to process in the data collection module.
In the embodiment of the present application, the first migratable service and the second migratable service may be processed by the data collection module and the calculation module, respectively, and they may be in an unprocessed or in-queue state or may be in a processed state. If it is determined that the target migration service is in a state of being processed by the computing module while the target migration service is in the state of being processed by the computing module, the first notification information may be used to instruct the computing module to send data corresponding to the target migration service to the data acquisition module, and the data is marked with a reference tag, where the reference tag is used to represent whether the data is processed, and the data acquisition module may obtain information whether the data is processed by analyzing the reference tag of the data. Therefore, the data acquisition module does not need to process the data which is already processed by the calculation module in the data of the target migration service, the data processing efficiency can be improved, and unnecessary calculation waste is reduced.
In a specific embodiment, by periodically performing steps S201 to S205 based on a preset frequency, the condition of unbalanced load caused by overload of the computing module can be handled in time, and the loads of the data acquisition module and the computing platform are dynamically balanced, so as to maximally utilize the processing capacities at both sides.
The following further describes steps of an automatic driving load balancing method according to an embodiment of the present application with reference to fig. 6. Fig. 6 is a fifth flowchart illustrating an automatic driving load balancing method according to an embodiment of the present application. In a specific embodiment, before performing step S201, steps S601-S603 are further included. As shown in fig. 6 in particular, the method comprises:
step S601: and determining first calculation force information corresponding to the data acquisition module.
Specifically, the first calculation force information may include first CPU parameter information and first memory parameter information. The first CPU parameter information and the first memory parameter information both correspond to the data acquisition module.
In a specific embodiment, step S601 may be performed at the time of system start-up.
Step S602: and receiving second calculation force information sent by the calculation module.
Specifically, the second calculation force information may include second CPU parameter information and second memory parameter information. The second CPU parameter information and the second memory parameter information both correspond to the calculation module.
In a specific embodiment, step S602 may be performed at the time of system start-up.
Step S603: determining a load weight based on the first calculated force information and the second calculated force information.
In a specific embodiment, the load weight may be used to characterize an optimal load ratio of the data acquisition module and the calculation module after load balancing. It should be noted that the optimal load proportion is the optimal load proportion of the data acquisition module and the calculation module when the total load of the vehicle does not exceed the standard; if the total load of the vehicle exceeds the standard, the load balancing method takes the guarantee that the load of the computing module does not exceed the standard as a primary target, and the load distribution proportion of the data acquisition module and the computing module is not a fixed numerical value at the moment.
In a specific embodiment, in step S204 illustrated in fig. 2, a target migrated traffic may be determined from the second migratable traffic based on the load weight, the first load information, and the second load information. When the total load of the vehicle does not exceed the standard, the load distribution proportion of the data acquisition module and the calculation module can be determined based on the load weight, and the target migration service is determined from the second migratable services according to the respective load conditions of the current data acquisition module and the calculation module, which are characterized by the first load information and the second load information, and the CPU occupancy rate and the memory use information of each second migratable service, so that the load distribution proportion after load balancing is ensured to be as close to the load weight as possible.
An exemplary flow of another automated driving load balancing method provided herein is described below. Fig. 3 is a second flow chart of an automatic driving load balancing method according to an embodiment of the present application, specifically, as shown in fig. 3, the method includes:
step S301: and determining first load information corresponding to the data acquisition module.
Step S302: and receiving second load information sent by the computing module.
Step S303: determining whether to determine that the computing module is overloaded based on the second load information; if yes, the process proceeds to step S304.
Step S304: and determining target migration business from the second migratable business based on the first load information and the second load information.
Step S305: and sending the first notification information to the calculation module.
Specifically, the detailed descriptions of steps S301-S305 refer to the above descriptions of steps S201-S205, which are not repeated herein.
Step S306: judging whether the data acquisition module is overloaded or not based on the first load information; if yes, the process proceeds to step S307.
Step S307: judging whether the load margin of the calculation module is determined to be sufficient based on the second load information; if yes, the process proceeds to step S308.
Step S308: and determining target migrated traffic from the first migratable traffic based on the first load information and the second load information.
Specifically, the target migrated service may be a service executed by the computing module in the first migratable service after load balancing, that is, after load balancing, the execution subject of the target migrated service is changed from the data acquisition module to the computing module.
In a specific embodiment, steps S601-S603 illustrated in fig. 6 may be further included before step S301; in step S308, target migrated traffic may be determined from the first migratable traffic based on the load weight, the first load information, and the second load information. Specifically, when the total load of the vehicle does not exceed the standard, the load distribution proportion of the data acquisition module and the calculation module may be determined based on the load weight, and the target migration service may be determined from the first migratable services according to the respective load conditions of the current data acquisition module and the calculation module, which are characterized by the first load information and the second load information, including the CPU occupancy information and the total memory usage information, and the CPU occupancy and the memory usage information of each first migratable service, so as to ensure that the load distribution proportion after load balancing is as close to the load weight as possible. Specifically, when the total load of the vehicle exceeds the standard, if the load distribution proportion after load balancing is close to or equal to the load weight, the load overload of the module is calculated; and preferentially ensuring that the load of the calculation module is in a reasonable interval, and determining the target migration service so as to enable the load of the calculation module after migration to be close to or in the maximum load capacity of the calculation module, for example, adjusting to enable the second total CPU occupancy rate to be smaller than or equal to and close to the second total CPU occupancy rate threshold value, and the second total memory usage information represents that the second total memory usage is smaller than or close to the second total memory usage threshold value, so that the processing capacity of the calculation module is used to the maximum extent while the calculation module is not overloaded.
In a specific embodiment, S306-S307 may also be: judging whether the data acquisition module is overloaded based on the first load information or whether the calculation module is sufficient in load allowance based on the second load information; if yes, the process proceeds to step S308. In this way, even if the load of the data collection module is not overloaded, if the load margin of the calculation module is sufficient, the first migratable service in the data collection module can still be migrated out. Since the hardware processing capacity of the computing module is higher than that of the data acquisition module, the computing module can be maximally utilized, and the data processing efficiency of automatic driving is higher.
Steps S306-S308 are further described below based on FIG. 5.
Fig. 5 is a fourth flowchart illustrating an automatic driving load balancing method according to an embodiment of the present application. Wherein steps S501-S505 are exemplary flows of steps SS06-S308 illustrated in fig. 3. In this exemplary flow. As shown in particular in fig. 5, the method comprises:
step S501: judging whether the first total CPU occupancy rate is larger than a first total CPU occupancy rate threshold value or whether the first total memory usage information represents that the first total memory usage is larger than a first total memory usage threshold value; if yes, the process proceeds to step S502.
Step S502: determining a data acquisition module load overload.
Step S503: judging whether the second total CPU occupancy rate is smaller than a third total CPU occupancy rate threshold value or not, and the second total memory usage information represents that the second total memory usage is smaller than a third total memory usage threshold value; if yes, the process proceeds to step S504.
Step S504: determining that the computing module load margin is sufficient.
Step S505: and determining target migrated traffic from the first migratable traffic based on the first load information and the second load information.
In the embodiment of the application, the overload of the data acquisition module is determined by overload of any one of the CPU or the total memory of the data acquisition module, the sufficient load allowance of the calculation module is determined by the balance of the CPU and the total memory of the calculation module, and then the target migration service processed by the calculation module is determined. The first total CPU occupancy threshold and the first total memory usage threshold in step S501, and the third total CPU occupancy threshold and the third total memory usage threshold in step S503 may be determined based on an actual scene. The third total CPU occupancy threshold may be smaller than the second total CPU occupancy threshold, and the third total memory usage threshold may be smaller than the second total CPU occupancy threshold.
In another embodiment of S306-S307 in the above description, S306-S307 are: judging whether the load of the data acquisition module is determined to be overloaded based on the first load information or whether the load margin of the calculation module is sufficient based on the second load information; if yes, the process proceeds to step S308. In this specific embodiment, the relationship between step S501-step S502 and step S503-step S504 may be yes, that is, if the determination result in step S501 is yes, steps S502 and S505 are executed; if the determination result in step S503 is yes, steps S504 and S505 are executed. In this way, in the case that the determination result in step S503 is yes, even if the load of the data collection module is not overloaded, if the load margin of the calculation module is sufficient, the first migratable service in the data collection module can still be migrated. Because the hardware processing capacity of the computing module is higher than that of the data acquisition module, the computing module can be utilized to the maximum extent, and the data processing efficiency of the automatic driving is higher. If the result of the determination in step S501 is yes, the data acquisition module is overloaded, and if it is determined that no target migration service exists in the process of determining the target migration service from the first migratable service based on the first load information and the second load information and the target migration service can meet the requirement that the computation module is not overloaded after load balancing, the migration of the service is not performed, and the load margin of the computation module is preferentially ensured.
The following is explained on the basis of fig. 3. As illustrated in fig. 3, the method further comprises:
step S309: and sending the second notification information to the computing module.
In a specific embodiment, the second notification message may be used to instruct the computing module to execute the target migration service. While step S309 is executed, the data collection module starts to remove the target migrated traffic from the execution queue, and the target migrated traffic may be in a state of waiting for processing or starting to be processed in the calculation module.
In the embodiment of the present application, the first migratable service and the second migratable service may be processed by the data collection module and the calculation module, respectively, and they may be in an unprocessed or in-queue state or may be in a processed state. If it is determined that the target migration service is in a state of being processed by the data acquisition module while the target migration service is determined, the data acquisition module may send data corresponding to the target migration service to the calculation module, the data is marked with a reference tag, the reference tag is used to represent whether the data has been processed, and the calculation module may obtain information whether the data has been processed by analyzing the reference tag of the data. Therefore, the calculation module does not need to process the data which is already processed by the data acquisition module in the data of the target migration service, the data processing efficiency can be improved, and unnecessary calculation waste is reduced.
In a specific embodiment, by periodically executing steps S301 to S309 based on a preset frequency, when the computing module has a margin, the unbalanced load caused by the overload of the data acquisition module can be timely handled, and the loads of the data acquisition module and the computing platform are dynamically balanced, so as to maximize the processing capacity on both sides. The core service in the automatic driving function is located in the computing module, so that the automatic driving load balancing method in the embodiment of the application can preferentially ensure that the load of the computing module is not overloaded, and the target migration service is determined according to the actual condition under the condition that the load of the computing module has allowance.
Correspondingly, the application provides an automatic driving load balancing device. Fig. 7 is a schematic structural diagram of an automatic driving load balancing apparatus according to an embodiment of the present application. As illustrated in fig. 7, the automatic driving load balancing apparatus 700 includes:
the determining module 701 is configured to determine first load information corresponding to the data acquisition module.
A receiving module 702, configured to receive the second load information sent by the calculating module.
A processing module 703 is configured to determine, if it is determined that the computing module is overloaded based on the second load information, a target migration service from the second migratable services based on the first load information and the second load information.
Specifically, the second migratable service may be a migratable service among services executed by the computing module before load balancing; the target migration service may be a service executed by the data acquisition module in the second migratable service after load balancing.
A notification module 704 configured to send a first notification message to the computing module.
Specifically, the first notification message may be used to instruct the computing module not to perform the target migration service.
Specifically, the first load information may include a first total CPU (central processing unit) occupancy rate, first total memory usage information, and information of the first migratable service, and the second load information may include a second total CPU occupancy rate, second total memory usage information, and information of the second migratable service.
Specifically, the processing module 703 may be configured to, after receiving the second load information sent by the computing module, determine, based on the first load information, that the data acquisition module is overloaded and/or determine, based on the second load information, that the load margin of the computing module is sufficient, determine, based on the first load information and the second load information, a target migration-out service from the first migratable service; and sending a second notification message to the computing module. Specifically, the first migratable service may be a migratable service among services executed by the data acquisition module before load balancing; the target migrated service may be a service executed by the computing module in the first migratable service after load balancing; the second notification message may be used to instruct the computing module to execute the target migration service.
Specifically, the processing module 703 may be configured to determine that the load of the computing module is overloaded if the second total CPU occupancy is greater than the second total CPU occupancy threshold, or the second total memory usage information indicates that the second total memory usage is greater than the second total memory usage threshold, and determine the target migration traffic from the second migratable traffic based on the first load information and the second load information.
Specifically, the processing module 703 may be configured to determine that the load of the data acquisition module is overloaded if the first total CPU occupancy is greater than the first total CPU occupancy threshold, or the first total memory usage information indicates that the first total memory usage is greater than the first total memory usage threshold; and, or; and if the second total CPU occupancy rate is smaller than the third total CPU occupancy rate threshold value and the second total memory usage information represents that the second total memory usage amount is smaller than the third total memory usage amount threshold value, determining that the load allowance of the calculation module is sufficient, and determining the target migration service from the first migratable service based on the first load information and the second load information.
Specifically, the information of the first migratable service may include CPU occupancy rates and memory usage information corresponding to a plurality of first migratable services, and the information of the second migratable service may include CPU occupancy rates and memory usage information corresponding to a plurality of second migratable services.
Specifically, the device may further include a load weight determining module, configured to determine first computational power information corresponding to the data acquisition module before determining the first load information corresponding to the data acquisition module; receiving second calculation force information sent by the calculation module; determining a load weight based on the first force calculation information and the second force calculation information; the load weight is used for representing the optimal load ratio of the data acquisition module and the calculation module after load balancing. Specifically, the first calculation power information may include first CPU parameter information and first memory parameter information, and the second calculation power information may include second CPU parameter information and second memory parameter information.
Specifically, the processing module 703 may be configured to determine the target migration traffic from the second migratable traffic based on the load weight, the first load information, and the second load information if it is determined that the computing module is overloaded based on the second load information.
The device and the method in the embodiment of the application are based on the same application concept. Specifically, the automatic driving load balancing apparatus 700 may be used to adjust the load balancing of the data acquisition module 1011 and the calculation module 1012 in the vehicle 101 illustrated in fig. 1 based on the automatic driving load balancing method of the present application.
The method provided by the embodiment of the application can be executed in a computer terminal, a server or a similar operation device. Taking the example of running on a server, fig. 8 is a hardware structure block diagram of the server of the automatic driving load balancing method provided in the embodiment of the present application. As shown in fig. 8, the server 800 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 810 (the CPU 810 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 830 for storing data, one or more storage media 820 (e.g., one or more mass storage devices) for storing applications 823 or data 822. Memory 830 and storage medium 820 may be, among other things, transitory or persistent storage. The program stored in the storage medium 820 may include one or more modules, each of which may include a series of instruction operations in a server. Still further, the central processor 810 may be configured to communicate with the storage medium 820 to execute a series of instruction operations in the storage medium 820 on the server 800. The server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input-output interfaces 840, and/or one or more operating systems 821, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and so forth.
The input/output interface 840 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 800. In one example, i/o Interface 840 includes a Network adapter (NIC) that may be coupled to other Network devices via a base station to communicate with the internet. In one example, the input/output interface 840 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 800 may also include more or fewer components than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
An embodiment of the present application further provides an electronic device, which includes a processor and a memory, where at least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the above-mentioned automatic driving load balancing method.
The present application provides a storage medium, where the storage medium may be disposed in a server to store at least one instruction, at least one program, a code set, or a set of instructions related to implementing an automatic driving load balancing method in an embodiment of the method, where the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the automatic driving load balancing method.
Specifically, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: various media that can store program codes, such as a usb disk, a Read-only Memory (ROM), a removable hard disk, a magnetic disk, or an optical disk.
In the present invention, unless otherwise expressly stated or limited, the terms "connected" and "connected" are to be construed broadly, e.g., as meaning either a fixed connection or a removable connection, or an integral part; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in mutual relationship between the two elements. The specific meanings of the above terms in the present invention can be understood according to specific situations by those of ordinary skill in the art.
It should be noted that: the sequence of the above-mentioned embodiments of the present application is only for description, and does not represent the advantages of the embodiments, and the specific embodiments are described in the specification, and other embodiments are also within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in the order of execution in different embodiments and achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown or connected to enable the desired results to be achieved, and in some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the apparatus/system, since they are based on embodiments similar to the method embodiments, the description is relatively simple, and reference may be made to the partial description of the method embodiments for relevant points.
The foregoing is a preferred embodiment of the present invention, and it should be noted that it would be apparent to those skilled in the art that various modifications and enhancements can be made without departing from the principles of the invention, and such modifications and enhancements are also considered to be within the scope of the invention.

Claims (9)

1. An automatic driving load balancing method is applied to a data acquisition module, and comprises the following steps:
determining first calculation force information corresponding to the data acquisition module;
receiving second calculation force information sent by the calculation module;
determining a load weight based on the first calculated force information and the second calculated force information; the load weight is used for representing the optimal load ratio of the data acquisition module and the calculation module after load balancing; the first computing power information comprises first CPU parameter information and first memory parameter information, and the second computing power information comprises second CPU parameter information and second memory parameter information;
all migratable services exist in the data acquisition module and the calculation module;
determining first load information corresponding to a data acquisition module;
receiving second load information sent by the computing module;
if the load of the computing module is determined to be overloaded based on the second load information, determining target migration-in service from second migratable service based on the first load information and the second load information; the second migratable service is a migratable service in services executed by the computing module before load balancing; the target immigration service is a service executed by the data acquisition module in the second migratable service after load balancing; wherein the second migratable service includes a coordinate system transformation service of location information;
sending a first notification message to the computing module, wherein the first notification message is used for indicating the computing module not to execute the target migration service;
the first load information includes a first total CPU occupancy rate, first total memory usage information and information of a first migratable service, and the second load information includes a second total CPU occupancy rate, second total memory usage information and information of the second migratable service.
2. The automatic driving load balancing method according to claim 1, wherein after receiving the second load information sent by the calculation module, the method further comprises:
determining a target migration service from the first migratable service based on the first load information and the second load information if the data collection module is determined to be overloaded based on the first load information and/or the computing module is determined to be sufficient in load margin based on the second load information; the first migratable service is a migratable service in services executed by the data acquisition module before load balancing; the target migrated service is a service executed by the computing module in the first migratable service after load balancing;
and sending a second notification message to the computing module, wherein the second notification message is used for indicating the computing module to execute the target migration service.
3. The method of claim 1, wherein determining a target migration traffic from a second migratable traffic based on the first load information and the second load information if the computing module is determined to be overloaded based on the second load information comprises:
and if the second total CPU occupancy rate is greater than a second total CPU occupancy rate threshold value, or the second total memory usage information indicates that the second total memory usage amount is greater than a second total memory usage amount threshold value, determining that the load of the computing module is overloaded, and determining a target migration service from the second migratable service based on the first load information and the second load information.
4. The method of claim 2, wherein determining a target migration traffic from the first migratable traffic based on the first load information and the second load information if the data collection module is determined to be overloaded based on the first load information and/or the computing module is determined to have sufficient load margin based on the second load information comprises:
if the first total CPU occupancy rate is greater than a first total CPU occupancy rate threshold value, or the first total memory usage information represents that the first total memory usage amount is greater than a first total memory usage amount threshold value, determining that the load of the data acquisition module is overloaded; and/or;
if the second total CPU occupancy rate is smaller than a third total CPU occupancy rate threshold value, and the second total memory usage information represents that the second total memory usage is smaller than a third total memory usage threshold value, determining that the load allowance of the computing module is sufficient;
and determining target migrated services from the first migratable services based on the first load information and the second load information.
5. The automatic driving load balancing method according to claim 1, wherein the information about the first migratable services includes CPU occupancy rates and memory usage information corresponding to a plurality of first migratable services, and the information about the second migratable services includes CPU occupancy rates and memory usage information corresponding to a plurality of second migratable services.
6. The method of claim 5, wherein determining a target migration traffic from a second migratable traffic based on the first load information and the second load information if the computing module is determined to be overloaded based on the second load information comprises:
if the computing module is determined to be overloaded based on the second load information, determining the target migration service from the second migratable services based on the load weight, the first load information, and the second load information.
7. An autonomous driving load balancing apparatus, the apparatus comprising:
the weight determining module is used for determining first calculation force information corresponding to the data acquisition module; receiving second calculation force information sent by the calculation module; determining a load weight based on the first force information and the second force information; the load weight is used for representing the optimal load ratio of the data acquisition module and the calculation module after load balancing; the first computing power information comprises first CPU parameter information and first memory parameter information, and the second computing power information comprises second CPU parameter information and second memory parameter information; all migratable services exist in the data acquisition module and the calculation module;
the determining module is used for determining first load information corresponding to the data acquisition module;
the receiving module is used for receiving the second load information sent by the calculating module;
a processing module, configured to determine a target migration service from second migratable services based on the first load information and the second load information if the computing module is determined to be overloaded based on the second load information; the second migratable service is a migratable service in the services executed by the computing module before load balancing; the target immigration service is a service executed by the data acquisition module in the second migratable service after load balancing; the second migratable service comprises a coordinate system conversion service of the position information;
a notification module, configured to send a first notification message to the computing module, where the first notification message is used to instruct the computing module not to execute the target migration service;
the first load information includes a first total CPU occupancy rate, first total memory usage information and information of a first migratable service, and the second load information includes a second total CPU occupancy rate, second total memory usage information and information of the second migratable service.
8. An electronic device, comprising a processor and a memory, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and wherein the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the method for automatically balancing driving load according to any one of claims 1 to 6.
9. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of automated driving load balancing according to any one of claims 1 to 6.
CN202111144561.5A 2021-09-28 2021-09-28 Automatic driving load balancing method and device, electronic equipment and storage medium Active CN114003371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111144561.5A CN114003371B (en) 2021-09-28 2021-09-28 Automatic driving load balancing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111144561.5A CN114003371B (en) 2021-09-28 2021-09-28 Automatic driving load balancing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114003371A CN114003371A (en) 2022-02-01
CN114003371B true CN114003371B (en) 2023-03-07

Family

ID=79921957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111144561.5A Active CN114003371B (en) 2021-09-28 2021-09-28 Automatic driving load balancing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114003371B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance
CN111131486A (en) * 2019-12-30 2020-05-08 北京三快在线科技有限公司 Load adjustment method and device of execution node, server and storage medium
CN111475281A (en) * 2020-03-07 2020-07-31 咪咕音乐有限公司 Load balancing method, server and computer readable storage medium
CN112929408A (en) * 2021-01-19 2021-06-08 郑州阿帕斯数云信息科技有限公司 Dynamic load balancing method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007036372A1 (en) * 2005-09-08 2007-04-05 International Business Machines Corporation Load distribution in storage area networks
US8843924B2 (en) * 2011-06-17 2014-09-23 International Business Machines Corporation Identification of over-constrained virtual machines
CN108334402A (en) * 2018-03-07 2018-07-27 山东超越数控电子股份有限公司 A kind of the virtual management system and its resource regulating method of non-stop layer framework
CN108737255B (en) * 2018-05-31 2020-07-10 北京明朝万达科技股份有限公司 Load balancing method, load balancing device and server
CN110764908A (en) * 2019-10-12 2020-02-07 腾讯云计算(北京)有限责任公司 Load adjusting method and device, server and storage medium
CN111147604B (en) * 2019-12-31 2022-03-29 重庆邮电大学 Load balancing method for edge calculation of Internet of vehicles
CN112817694B (en) * 2021-02-02 2024-08-02 中国工商银行股份有限公司 Automatic load balancing method and device for distributed system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance
CN111131486A (en) * 2019-12-30 2020-05-08 北京三快在线科技有限公司 Load adjustment method and device of execution node, server and storage medium
CN111475281A (en) * 2020-03-07 2020-07-31 咪咕音乐有限公司 Load balancing method, server and computer readable storage medium
CN112929408A (en) * 2021-01-19 2021-06-08 郑州阿帕斯数云信息科技有限公司 Dynamic load balancing method and device

Also Published As

Publication number Publication date
CN114003371A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN111212106B (en) Edge computing task processing and scheduling method and device in industrial internet environment
CN108112037B (en) Load balancing method based on fog calculation and cooperative communication network
CN112000388B (en) Concurrent task scheduling method and device based on multi-edge cluster cooperation
Callegaro et al. Optimal computation offloading in edge-assisted UAV systems
CN112261120B (en) Cloud-side cooperative task unloading method and device for power distribution internet of things
CN110784894B (en) LTE system load balancing method and device
CN112817694A (en) Automatic load balancing method and device for distributed system
CN112272957B (en) Landing control method, equipment, base station, unmanned aerial vehicle and storage medium
CN113961264A (en) Intelligent unloading algorithm and system for video monitoring cloud edge coordination
CN117785465A (en) Resource scheduling method, device, equipment and storage medium
EP2996382A1 (en) Physical resource adjustment method, device and controller
CN114741200A (en) Data center station-oriented computing resource allocation method and device and electronic equipment
CN114003371B (en) Automatic driving load balancing method and device, electronic equipment and storage medium
CN108985556B (en) Method, apparatus, equipment and the computer storage medium of flow scheduling
CN114143836B (en) Load balancing method, device and terminal based on edge computing gateway
CN116546667A (en) Control method and device of sensor system, computer equipment and storage medium
CN112969157B (en) Network load balancing method for unmanned aerial vehicle
CN112188636B (en) User scheduling method and device and transmission base station
CN101997720A (en) Transregional monitoring flow on demand method and video management server
CN115617524A (en) Communication task load balancing method, device, system, electronic equipment and storage medium
CN117528599B (en) LoRa-based wireless communication method and device and electronic equipment
CN113504976B (en) Scheduling method, system, terminal equipment and storage medium for software-defined network architecture
CN116095087B (en) Virtual power plant distributed computing network resource scheduling method, system and electronic equipment
CN101801033B (en) AC selection method and equipment
CN116132973B (en) Terminal capability configuration method and device and electronic equipment

Legal Events

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