CN111831391A - Method and device for managing preset container in automatic driving simulation system - Google Patents

Method and device for managing preset container in automatic driving simulation system Download PDF

Info

Publication number
CN111831391A
CN111831391A CN202010514085.0A CN202010514085A CN111831391A CN 111831391 A CN111831391 A CN 111831391A CN 202010514085 A CN202010514085 A CN 202010514085A CN 111831391 A CN111831391 A CN 111831391A
Authority
CN
China
Prior art keywords
preset
container
task
containers
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010514085.0A
Other languages
Chinese (zh)
Other versions
CN111831391B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010514085.0A priority Critical patent/CN111831391B/en
Publication of CN111831391A publication Critical patent/CN111831391A/en
Application granted granted Critical
Publication of CN111831391B publication Critical patent/CN111831391B/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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors

Abstract

The application discloses a method and a device for managing a preset container in an automatic driving simulation system, and relates to the technical field of automatic driving. The specific implementation scheme is as follows: judging whether the initialization condition of a preset container is met or not; if the initialization condition of the preset container is met, setting the number index of the preset containers as a preset value so that the preset value is smaller than the number of the preset containers required by the new user task to avoid the new user task from being distributed to the preset containers; and initializing the preset container after the preset time. The method modifies the quantity index of the preset containers before the initialization of the preset containers, avoids new user tasks from hitting the preset containers, initializes the preset containers after the preset time, can ensure that the initialization of the preset containers does not influence the tasks being served, and reduces the influence on the hit rate.

Description

Method and device for managing preset container in automatic driving simulation system
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing a preset container in an autopilot simulation system.
Background
In the field of automatic driving simulation, aiming at a small amount of scene tasks, a container can be preset, initialization is carried out in advance, the task waiting time of a user is reduced, and the simulation efficiency is improved.
Since the preset resources need to be dynamically updated, if the preset container is serving the user task, initializing the preset container will affect the user task and hit rate. How to reduce the influence of initialization of the preset container on the task and hit rate of the user is a problem to be solved urgently.
Disclosure of Invention
The application provides a method and a device for managing a preset container in an automatic driving simulation system, which are used for solving the problem of how to reduce the influence of initialization of the preset container on a user task and a hit rate in the related technology.
According to a first aspect, there is provided a method of managing a preset container in an automatic driving simulation system, comprising:
judging whether the initialization condition of a preset container is met or not;
if the initialization condition of the preset container is met, setting the number index of the preset container as a preset value, so that the preset value is smaller than the number of preset containers required by a new user task, and the new user task is prevented from being allocated to the preset container; and
after a preset time, initializing the preset container.
According to the method for managing the preset container in the automatic driving simulation system, whether the initialization condition of the preset container is met or not is judged, if the initialization condition of the preset container is met, the number index of the preset container is set to be the preset value, so that the preset value is smaller than the number of the preset containers required by a new user task, the new user task is prevented from being distributed to the preset container, and the preset container is initialized after the preset time. Therefore, the number index of the preset containers is modified before the initialization of the preset containers, the new user tasks are prevented from hitting the preset containers, the preset containers are initialized after the preset time, the initialization of the preset containers can be ensured not to influence the tasks being served, and the influence on the hit rate is reduced.
According to a second aspect, there is provided an apparatus for managing a preset container in an automatic driving simulation system, comprising:
the first judgment module is used for judging whether the initialization condition of the preset container is met or not;
the setting module is used for setting the quantity index of the preset containers to be a preset value when the initialization condition of the preset containers is met, so that the preset value is smaller than the quantity of the preset containers required by a new user task, and the new user task is prevented from being distributed to the preset containers; and
and the initialization module is used for initializing the preset container after preset time.
The management device of the preset container in the automatic driving simulation system in the embodiment of the application sets the number index of the preset container to the preset value by judging whether the initialization condition of the preset container is met or not, so that the preset value is smaller than the number of the preset containers required by a new user task, the new user task is prevented from being distributed to the preset container, and the preset container is initialized after the preset time. Therefore, the number index of the preset containers is modified before the initialization of the preset containers, the new user tasks are prevented from hitting the preset containers, the preset containers are initialized after the preset time, the initialization of the preset containers can be ensured not to influence the tasks being served, and the influence on the hit rate is reduced.
According to a third aspect, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of managing a preset container in an autopilot simulation system according to an embodiment of the first aspect.
According to a fourth aspect, there is provided a non-transitory computer-readable storage medium having stored thereon a computer program for causing a computer to execute the method for managing preset containers in an automatic driving simulation system according to the embodiment of the first aspect described above.
According to the method and the device, the problem of how to reduce the influence of initialization of the preset container on the user task and the hit rate is solved, the number index of the preset container is modified before the initialization of the preset container, the situation that a new user task hits the preset container is avoided, the preset container is initialized after the preset time, the fact that the task which is being served is not influenced by the initialization of the preset container can be guaranteed, and the influence on the hit rate is reduced.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a schematic flowchart illustrating a method for managing a preset container in an automatic driving simulation system according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for managing a preset container in an automatic driving simulation system according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for managing a preset container in an automatic driving simulation system according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an activity process of a pre-set container according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for managing preset containers in an automatic driving simulation system according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a device for managing preset containers in another automatic driving simulation system according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device of a method for managing a preset container in an automatic driving simulation system according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
A method and apparatus for managing preset containers in an automatic driving simulation system according to an embodiment of the present application will be described below with reference to the accompanying drawings.
The embodiment of the application provides a method for managing a preset container in an automatic driving simulation system, aiming at the problem of how to reduce the influence of initialization of the preset container on a user task and a hit rate in the automatic driving simulation in the related art.
According to the method for managing the preset containers in the automatic driving simulation system, whether the initialization condition of the preset containers is met or not is judged, if the initialization condition of the preset containers is met, the number index of the preset containers is set to be the preset number, so that the preset value is smaller than the number of the preset containers required by a new user task, the new user task is prevented from being distributed to the preset containers, and the preset containers are initialized after the preset time. Therefore, the number index of the preset containers is modified before the initialization of the preset containers, the new user tasks are prevented from hitting the preset containers, the preset containers are initialized after the preset time, the initialization of the preset containers can be ensured not to influence the tasks being served, and the influence on the hit rate is reduced.
Fig. 1 is a schematic flowchart of a method for managing a preset container in an automatic driving simulation system according to an embodiment of the present disclosure.
The method for managing the preset container in the automatic driving simulation system provided by the embodiment of the application can be executed by the device for managing the preset container in the automatic driving simulation system provided by the embodiment of the application, and the device can be configured in electronic equipment to ensure that the initialization of the preset container does not influence the task in service and reduce the influence on the hit rate.
As shown in fig. 1, the method for managing a preset container in an automatic driving simulation system includes:
step 101, judging whether the initialization condition of the preset container is met.
In an autopilot simulation, a container is an entity that mirrors a runtime. Containers can be created, started, stopped, deleted, paused, etc., the essence of a container being a process, but unlike processes that are executed directly at the host, the container process runs in a separate namespace that is owned by itself. Thus, the container may have its own root file system, network configuration and process space, and user I D space.
In the field of automatic driving simulation, aiming at a small amount of scene tasks, a container can be preset, initialization is carried out in advance, the task waiting time of a user is reduced, and the simulation efficiency is improved. The small amount of scene tasks refers to simulation tasks with the scene number smaller than a preset threshold value.
In this embodiment, a vehicle passing a traffic light can be used as a scene, overtaking is also a field in the driving process, a section of driving process in which the scenes are connected in series is a simulation task, and each scene corresponds to a preset container.
The preset container is generally preset for mirror images and maps, and then the preset container includes mirror image resources, map resources, and the like. For the preset container, since the mirror image is updated every week and every day, the preset container needs to be reset, i.e. initialized.
For each preset container, it is determined whether an initialization condition is satisfied. The initialization condition may be set as needed, for example, the number of user tasks at the current time is less than a preset number.
And 102, if the initialization condition of the preset container is met, setting the number index of the preset container to be a preset value, so that the preset value is smaller than the number of the preset containers required by the new user task, and the new user task is prevented from being allocated to the preset container.
In practical applications, if a new task is allocated to an idle preset container, that is, if the idle preset container is hit by the new task, the new preset container occupied by the new user task is initialized, which may affect the execution of the new user task. In order to reduce the influence on the user task, if the initialization condition of the preset container is satisfied, the number index of the preset container is set to a preset value. The preset value is smaller than the number of preset containers required by the new user task, so that the new user task is prevented from being distributed to the preset containers, and the preset containers are prevented from being hit by the new user task. A hit here refers to a preset container serving a user task for simulating the user task.
For example, if the new user task is 5 intersections passing through a road, each intersection is a scene, and the new user task corresponds to 5 scenes, that is, the number of the preset containers required by the new user task is 5, the number index of the preset containers may be set to a value smaller than 5, for example, to 0, or to 1, or to 2, or to 3, or to 4.
Since the number of preset containers required by different user tasks may be different, when there are a plurality of new user tasks, the preset value may be made smaller than the minimum value of the number of preset containers required in the new user tasks, and the number index of the preset containers may also be set to 0, whereby all new user tasks are not assigned to the preset containers.
If the autopilot simulation system defines a minimum value for the number of scenes of the user task, the number of preset bins indicator may be set to a value less than the defined minimum value for the number of scenes. For example, if the number of scenes defining the user task cannot be less than 2, the number index of the preset container may be set to 0 or 1.
In this embodiment, the number index of the preset containers is set to be smaller than the number of the preset containers required by the new user task, so that the number of the preset containers cannot meet the number required by the new user task, and the new user task cannot be allocated to the preset containers.
Step 103, after a preset time, initializing a preset container.
If a user task occupies the preset container, the user task may be terminated if the preset container is initialized when occupied, thereby affecting the execution of the user task and the hit rate.
Since the scene task is a small amount, the scene task can be completed in a short time, such as 2 hours. Therefore, in order to reduce the influence of initialization of the preset containers on the user task and the hit rate, in this embodiment, the timer may be started when the number of the preset containers is set to the preset number, and the preset containers may be initialized after the preset time.
Specifically, if there is an idle preset container, the idle preset container may be directly initialized, and for the preset container occupied by the user task, the initialization may be performed after the preset time for setting the number of the preset containers to the preset number. Or, after the preset time for setting the number of the preset containers to the preset number, initializing all the preset containers.
In the embodiment of the application, whether the initialization condition of the preset container is met or not is judged, if the initialization condition of the preset container is met, the number of the preset containers is set to be the preset number so that the preset containers are prevented from being hit by new user tasks, and the preset containers are initialized after the preset time. Therefore, the number of the preset containers is modified before the initialization of the preset containers, the phenomenon that new tasks hit the preset containers is avoided, and the preset containers are initialized after the preset time, so that the initialization of the preset containers can not influence the tasks which are being served, and the influence on the hit rate is reduced.
Through statistics, resources such as images and maps of a small amount of scene tasks submitted by a user have obvious aggregations, and the time for submitting the tasks is concentrated. Based on this, in an embodiment of the present application, when determining whether the initialization condition of the preset container is satisfied, it may be determined whether the current time is a preset time period, so as to determine whether the initialization condition of the preset container is satisfied.
Specifically, a time period for initializing the preset container, referred to as a preset time period herein, may be specified, the current time is obtained, whether the current time reaches the preset time period is determined, and if the current time reaches the preset time period, it is considered that the preset container may be initialized, that is, it is determined that the initialization condition of the preset container is satisfied.
In this embodiment, the preset time period may be obtained according to actual experience, and may be a time period in which the number of tasks submitted by the user is small.
For example, through statistics, the time for a user to submit a task is mostly concentrated on 09: 00-23:00, then 09: time periods other than 00-23:00 are taken as the preset time periods, and if the current time is 08:30, the preset time periods belong to 09: and determining that the initialization condition of the preset container is currently met in time periods other than 00-23: 00.
In the embodiment of the application, when the initialization condition of the preset container is judged to be met, whether the current time reaches the preset time period is judged, and if the current time reaches the preset time period, the initialization condition of the preset container is judged to be met. Therefore, the preset container can be initialized in a time period when the user submits less tasks, so that the influence of starting and stopping the preset container on the tasks of the user is as small as possible.
In one embodiment of the present application, after initializing the preset container, the user task may be received, and a series of determinations may be made as to whether to execute the user task. Fig. 2 is a schematic flow chart of a method for managing preset containers in another automatic driving simulation system according to an embodiment of the present application.
As shown in fig. 2, the method further comprises:
step 201, receiving a user task, and acquiring a number of scenes corresponding to the user task.
In this embodiment, the user may input the user task through an interface provided by the automatic driving system, and thus, the automatic driving simulation system may obtain the user task and obtain the number of scenes corresponding to the user task according to the received user task.
Step 202, if the number of scenes corresponding to the user task is smaller than a first preset threshold, further judging whether the mirror image resources and map resources of the preset container meet the mirror image resources and map resources required by the user task.
Since the preset container is for a small number of task scenes, after the number of scenes corresponding to the user task is obtained, it is determined whether the number of scenes corresponding to the user task is smaller than a first preset threshold, which is referred to as a first preset threshold for convenience of distinction. If the number of scenes corresponding to the user tasks is smaller than a first preset threshold value, the user tasks can be considered to be a small number of scene tasks.
Since a small amount of scene tasks are completed through the preset container, if mirror resources and map resources required by user tasks are not preset, simulation cannot be performed. Therefore, after the scene number of the user task is determined to be smaller than the first preset threshold, whether the mirror image resource and the map resource of the preset container meet the mirror image resource and the map resource required by the user task is further judged.
Specifically, for each scene of the user task, whether the mirror image resource and the map resource required by the scene are the same as those of a certain preset container is judged.
Step 203, if the image resources and map resources of the preset containers meet the image resources and map resources required by the user task, further determining whether the number of the preset containers currently idle is greater than the number of scenes corresponding to the user task.
In this embodiment, if the preset container is preset, that is, each scene has a corresponding preset container, the mirror image resource and the map resource of the preset container may be considered to meet the mirror image resource and the map resource required by the user task. Otherwise, the preset container does not have mirror image resources and map resources required by the preset user task, and the creation and initialization of the preset container can be applied.
In order to ensure that the user task is not affected, whether the number of the currently idle preset containers is larger than the number of scenes corresponding to the user task is further judged.
And 204, if the number of the preset containers which are idle currently is larger than the number of scenes corresponding to the user tasks, distributing the user tasks to the corresponding preset containers for loading.
And if the number of the currently idle preset containers is larger than the number of the scenes corresponding to the user tasks, the user tasks can be considered to hit the preset containers, and then the user tasks are distributed to the corresponding preset containers to be loaded so as to complete the user tasks through the preset containers.
It can be understood that, when the number of scenes of the user task is greater than the preset threshold, or the image resource and the map resource of the preset container cannot satisfy the image resource and the map resource required by the user task, or the number of the currently idle preset containers is less than or equal to the number of scenes corresponding to the user task, the user task cannot be allocated to the preset container.
In the embodiment of the application, after the initialization of the preset container, the user task can be received, the number of scenes corresponding to the user task is obtained, if the number of scenes corresponding to the user task is smaller than a first preset threshold value, whether the image resources and the map resources of the preset container meet the image resources and the map resources required by the user task or not is further judged, if the image resources and the map resources required by the user task are met, whether the number of the preset containers which are idle at present is larger than the number of scenes corresponding to the user task or not is further judged, and if the number of the preset containers which are idle at present is larger than the number of scenes corresponding to the user task, the user task is allocated to the corresponding preset container to be loaded. Therefore, after the initialization of the preset container, whether the user task can be loaded to the preset container or not is determined by judging according to the scene number of the user task, the mirror image resource and the map resource required by the user task and the number of the preset containers which are idle at present, and the simulation of a small number of scene tasks can be realized.
In practical applications, the inventors have found two problems: (1) when a cluster docker (application container engine) is overloaded, the containers are frequently subjected to deployment failure, so that the actual capacity of the containers is insufficient, and the queuing time of user tasks in a small-scene task queue is prolonged; (2) sometimes it is found that all containers of a tasklet are running but have actually been stopped altogether, causing all tasks of the user to be stuck in the queue. That is, in practical applications, user tasks may have a problem of getting stuck in a queue. Based on this, in an embodiment of the present application, the solution can be solved by using the method shown in fig. 3, and fig. 3 is a flowchart illustrating a method for managing preset containers in another automatic driving simulation system provided in the embodiment of the present application.
As shown in fig. 3, the method for managing the preset container in the automatic driving simulation system may further include:
step 301, a user task queue is obtained.
In this embodiment, the received user tasks may be sequentially placed in a queue according to the time for receiving the user tasks, and the automatic driving simulation system may obtain the user tasks from the queue and process the user tasks. Therefore, the user task queue of the current time can be obtained, wherein the user task queue comprises the user task which is being processed and the user task which is to be processed.
Step 302, determine whether there is a stuck task in the user task queue.
After the user task queue is obtained, whether a stuck task exists in the user task queue is judged, that is, whether a task stuck in the user task queue exists in the user task queue is judged.
In practical application, when the preset container is in a stop state, the preset container does not execute user tasks. Based on this, as an example, the state of the preset container loaded with the user task may be determined, and if all the preset containers are in a stop state in the process of executing the user task, it indicates that the preset container cannot execute the current task, so that the tasks in the user task queue may be blocked in the user task queue, that is, a stuck task exists in the user task queue.
As another example, it may be determined whether a task whose queuing time exceeds a preset time in the user task queue exists, and if a task whose queuing time exceeds the preset time exists, the task may be considered as a stuck task, that is, a stuck task exists in the user task queue.
Step 303, if the stuck task exists, acquiring a preset container corresponding to the stuck task.
And when the fact that the stuck task exists in the user task queue is determined, a preset container corresponding to the stuck task is obtained. Specifically, the preset container corresponding to the stuck task may be obtained according to the preset container to which the stuck task is loaded, where the preset container to which the stuck task is loaded is the preset container corresponding to the stuck task.
And step 304, cloning the preset container corresponding to the morton task to generate a cloned preset container.
In this embodiment, in order to ensure that the stuck task can be successfully completed, the preset container corresponding to the stuck task may be cloned to generate a cloned preset container. Wherein the cloned preset container and the cloned preset container have the same mirror image resource and map resource.
If the preset container corresponding to the katton task is multiple, each preset container can be cloned, and therefore a clone preset container corresponding to each preset container is generated. For example, if the preset containers corresponding to a certain katton task include container a, container b, container c, and container d, the cloning is performed to generate the cloning preset container a of the container 1Cloning of vessel b Preset vessel bCloning of container c Preset Container cCloning of container d Preset Container d
The reason why the new container causes inconsistent resource characteristics is that the preset container corresponding to the morton task is cloned instead of being newly created. For example, if the newly created container is actually preset with n images and the original queue has m images, the task will fail.
In this embodiment, the user tasks in the user task queue may be monitored at intervals, and when a stuck task exists in the user task queue, a clone preset container of the preset container corresponding to the stuck task is triggered to be generated.
Further, when the clone preset container is generated, an alarm may be given, specifically, a text prompt, a voice prompt, or a text plus voice alarm may be given.
Step 305, assigning the katon task to a clone preset container for loading.
After the clone container is generated, the katton task is distributed to the clone preset container to be loaded so as to complete the katton task through the clone preset container.
In the embodiment of the application, whether a stuck task exists in the user task queue can be judged by obtaining the user task queue, if the stuck task exists, a preset container corresponding to the stuck task is obtained, the preset container corresponding to the stuck task is cloned to generate a clone preset container, and the stuck task is distributed to the clone preset container to be loaded. Therefore, when the stuck task exists in the user task queue, the stuck task can be processed by cloning the preset container.
In order to ensure that the user task pairs in the user task queue are successfully processed, in one embodiment of the present application, when determining whether a stuck task exists in the user task queue, it may be determined whether a stuck task exists in the user task queue according to the number of tasks to be processed in the user task queue.
Specifically, to-be-processed tasks in the user task queue are obtained, and whether the number of to-be-processed tasks is greater than a preset threshold is determined. If the number of the tasks to be processed is larger than a second preset threshold value, the tasks to be processed exceeding the preset threshold value can be regarded as the stuck tasks.
The task to be processed exceeding the preset threshold value is a user task with later receiving time in the user task queue according to the sequence of the receiving time.
For example, the user tasks in the user task queue are arranged according to the receiving time sequence of the user tasks, which is A, B, C, D, and if the second preset threshold is 3, the user task exceeding the second preset threshold is D, that is, the user task D is a stuck task.
In this embodiment, the user tasks in the user task queue may be monitored at intervals, and when it is found that the number of the tasks to be processed in the user task queue is greater than the second preset threshold, it is determined that the stuck task exists in the user task queue, and then a clone preset container of the preset container corresponding to the stuck task is triggered to be generated.
In the embodiment of the application, when judging whether the stuck tasks exist in the user task queue, the tasks to be processed in the user task queue are obtained, and if the number of the tasks to be processed is larger than a second preset threshold, the tasks to be processed exceeding the preset threshold are used as the stuck tasks. Therefore, when the number of tasks in the user task queue exceeds a second preset threshold value, a clone preset container of the preset container corresponding to the pause task is triggered to be generated, and the dynamic increase of the preset container is realized.
In order to improve the personalized requirements of the simulation, in an embodiment of the present application, after the initialization of the preset container, the user-defined environment information may also be obtained, and then the user-defined environment information is added to the initialized preset container.
Wherein, the user-defined environment information comprises: environment variables, mirror numbers, upload patterns of replacement modules, maximum number of concurrently processed tasks, and the like.
In the embodiment of the application, after the preset container is initialized, the user-defined environment information can be acquired, and the user-defined environment information is added to the initialized preset container. Therefore, after the initialization of the preset container, the environment information customized by the user can be obtained, and accordingly, the running environment is prepared before the simulation task running scene.
In the embodiment of the present application, the activity process of the preset container after receiving the user task is described below with reference to fig. 4. Fig. 4 is a schematic diagram of an activity process of a preset container according to an embodiment of the present application.
As shown in fig. 4, step 401, receiving a user task; step 402, determining whether the user task can be allocated to a preset container, and when the scene number of the user task is smaller than a first preset threshold, the image resource and the map resource of the preset container meet the image resource and the map resource required by the user task, and the number of the currently idle preset containers is larger than the scene number corresponding to the user task, considering that the user task can be allocated to the preset container, that is, the user task hits the preset container, where a specific determination method is similar to that in fig. 2, and is not described herein again.
If the user task cannot be allocated to the preset container, executing step 403, applying for container creation and initialization, and after the initialization is completed, preparing a running environment according to user-defined environment information; if the preset container is hit, step 404 is performed to load the user task into the preset container. After the preset container receives the user task, step 405 is performed to prepare an operating environment according to the user-defined environment information. Thereafter, a scene simulation is performed in step 406.
In order to implement the foregoing embodiments, the present application further provides a device for managing a preset container in an automatic driving simulation system. Fig. 5 is a schematic structural diagram of a device for managing preset containers in an automatic driving simulation system according to an embodiment of the present application.
As shown in fig. 5, the apparatus 500 for managing a preset container in the automatic driving simulation system includes: a first judgment module 510, a setting module 520 and an initialization module 530.
A first judging module 510, configured to judge whether an initialization condition of a preset container is satisfied;
a setting module 520, configured to set the number index of the preset containers to a preset value when the initialization condition of the preset containers is met, so that the preset value is smaller than the number of the preset containers required by the new user task, and the new user task is prevented from being allocated to the preset containers; and
an initialization module 530 is configured to initialize the preset container after a preset time.
In a possible implementation manner of the embodiment of the present application, the first determining module 510 is specifically configured to:
acquiring current time;
judging whether the current time reaches a preset time period or not; and
and if the preset time period is reached, judging that the initialization condition of the preset container is met.
Fig. 6 is a schematic structural diagram of a device for managing preset containers in another automatic driving simulation system according to an embodiment of the present application.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 6, the apparatus may further include:
a first obtaining module 540, configured to receive a user task and obtain a number of scenes corresponding to the user task;
a second judging module 550, configured to further judge whether the image resource and the map resource of the preset container meet the image resource and the map resource required by the user task when the number of the scenes corresponding to the user task is smaller than the first preset threshold;
the second determining module 550 is further configured to, when the image resource and the map resource of the preset container meet the image resource and the map resource required by the user task, further determine whether the number of the preset containers currently idle is greater than the number of the scenes corresponding to the user task;
the first allocating module 560 is configured to allocate the user task to the corresponding preset container for loading when the number of currently idle preset containers is greater than the number of scenes corresponding to the user task.
In a possible implementation manner of the embodiment of the present application, the apparatus may further include:
the second acquisition module is used for acquiring a user task queue;
the third judging module is used for judging whether a stuck task exists in the user task queue;
the third acquisition module is used for acquiring the preset container corresponding to the stuck task when the stuck task exists;
the generating module is used for cloning the preset container corresponding to the pause task to generate a cloned preset container; and
and the second distribution module is used for distributing the katon task to the clone preset container for loading.
In a possible implementation manner of the embodiment of the present application, the third determining module is specifically configured to:
acquiring a task to be processed in a user task queue; and
and if the number of the tasks to be processed is larger than a second preset threshold value, taking the tasks to be processed exceeding the preset threshold value as the stuck tasks.
In a possible implementation manner of the embodiment of the present application, the apparatus may further include:
the fourth acquisition module is used for acquiring user-defined environment information;
and the adding module is used for adding the user-defined environment information to the initialized preset container.
It should be noted that the explanation of the embodiment of the method for managing a preset container in an automatic driving simulation system is also applicable to the device for managing a preset container in an automatic driving simulation system of this embodiment, and therefore, the explanation thereof is omitted here.
The management device of the preset container in the automatic driving simulation system in the embodiment of the application sets the number index of the preset container to the preset value by judging whether the initialization condition of the preset container is met or not, so that the preset value is smaller than the number of the preset containers required by a new user task, the new user task is prevented from being distributed to the preset container, and the preset container is initialized after the preset time. Therefore, the number index of the preset containers is modified before the initialization of the preset containers, the new user tasks are prevented from hitting the preset containers, the preset containers are initialized after the preset time, the initialization of the preset containers can be ensured not to influence the tasks being served, and the influence on the hit rate is reduced.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 7, is a block diagram of an electronic device for management of a preset container in an automatic driving simulation system according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of the GU I on an external input/output device (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 7 illustrates an example of a processor 601.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor to cause the at least one processor to perform a method for managing a preset container in an automatic driving simulation system provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute a method of managing preset containers in an automatic driving simulation system provided by the present application.
The memory 602, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the method for managing preset containers in the automatic driving simulation system in the embodiment of the present application (e.g., the first determining module 510, the setting module 520, and the initializing module 530 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 602, that is, implements a management method of a preset container in the automatic driving simulation system in the above-described method embodiment.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of management electronics of a preset container among the automatic driving simulation systems, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes a memory remotely located from the processor 601, and these remote memories may be connected via a network to an electronic device of a method of managing preset containers in an automated driving simulation system. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method for managing a preset container in an automatic driving simulation system may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 7 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the management method of the preset container in the automatic driving simulation system, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific AS ics, computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the number index of the preset containers is modified before the initialization of the preset containers, so that new user tasks are prevented from hitting the preset containers, the preset containers are initialized after the preset time, the fact that the tasks which are being served are not influenced by the initialization of the preset containers can be guaranteed, and the influence on the hit rate is reduced.
In the description of the present specification, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (14)

1. A method for managing a preset container in an automatic driving simulation system is characterized by comprising the following steps:
judging whether the initialization condition of a preset container is met or not;
if the initialization condition of the preset container is met, setting the number index of the preset container as a preset value, so that the preset value is smaller than the number of preset containers required by a new user task, and the new user task is prevented from being allocated to the preset container; and
after a preset time, initializing the preset container.
2. The method for managing a preset container in an automatic driving simulation system according to claim 1, wherein the judging whether the initialization condition of the preset container is satisfied comprises:
acquiring current time;
judging whether the current time reaches a preset time period or not; and
and if the preset time period is reached, judging that the initialization condition of the preset container is met.
3. The method for managing a preset container in an automatic driving simulation system according to claim 1, further comprising, after initializing the preset container:
receiving a user task and acquiring the number of scenes corresponding to the user task;
if the number of scenes corresponding to the user task is smaller than a first preset threshold value, further judging whether the mirror image resources and the map resources of the preset container meet the mirror image resources and the map resources required by the user task;
if the mirror image resources and the map resources of the preset containers meet the mirror image resources and the map resources required by the user task, further judging whether the number of the preset containers which are idle at present is larger than the number of scenes corresponding to the user task;
and if the number of the preset containers which are idle currently is larger than the number of scenes corresponding to the user tasks, distributing the user tasks to the corresponding preset containers for loading.
4. The method for managing the preset container in the automatic driving simulation system according to claim 3, further comprising:
acquiring a user task queue;
judging whether a stuck task exists in the user task queue or not;
if the stuck task exists, acquiring a preset container corresponding to the stuck task;
cloning a preset container corresponding to the pause task to generate a cloned preset container; and
and distributing the katton task to the clone preset container for loading.
5. The method for managing a preset container in an automatic driving simulation system according to claim 4, wherein the determining whether a stuck task exists in the user task queue comprises:
acquiring a task to be processed in the user task queue; and
and if the number of the tasks to be processed is larger than a second preset threshold value, taking the tasks to be processed exceeding the preset threshold value as the stuck tasks.
6. The method for managing a preset container in an automatic driving simulation system according to claim 1, further comprising, after initializing the preset container:
acquiring user-defined environment information;
and adding the user-defined environment information to the initialized preset container.
7. An apparatus for managing a preset container in an automatic driving simulation system, comprising:
the first judgment module is used for judging whether the initialization condition of the preset container is met or not;
the setting module is used for setting the quantity index of the preset containers to be a preset value when the initialization condition of the preset containers is met, so that the preset value is smaller than the quantity of the preset containers required by a new user task; and
and the initialization module is used for initializing the preset container after preset time.
8. The apparatus for managing preset containers in an automated driving simulation system according to claim 7, wherein the first determining module is specifically configured to:
acquiring current time;
judging whether the current time reaches a preset time period or not; and
and if the preset time period is reached, judging that the initialization condition of the preset container is met.
9. The apparatus for managing the preset containers in the automatic driving simulation system according to claim 7, further comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for receiving user tasks and acquiring the number of scenes corresponding to the user tasks;
the second judging module is used for further judging whether the mirror image resources and the map resources of the preset container meet the mirror image resources and the map resources required by the user task when the number of the scenes corresponding to the user task is smaller than a first preset threshold;
the second judging module is further configured to further judge whether the number of currently idle preset containers is greater than the number of scenes corresponding to the user task when the mirror image resources and the map resources of the preset containers meet the mirror image resources and the map resources required by the user task;
and the first allocation module is used for allocating the user tasks to the corresponding preset containers for loading when the number of the currently idle preset containers is larger than the number of scenes corresponding to the user tasks.
10. The apparatus for managing the preset container in the automatic driving simulation system according to claim 9, further comprising:
the second acquisition module is used for acquiring a user task queue;
the third judging module is used for judging whether a stuck task exists in the user task queue or not;
the third acquisition module is used for acquiring a preset container corresponding to the stuck task when the stuck task exists;
the generating module is used for cloning the preset container corresponding to the pause task to generate a cloned preset container; and
and the second distribution module is used for distributing the katton task to the clone preset container for loading.
11. The apparatus for managing preset containers in an automated driving simulation system according to claim 10, wherein the third determining module is specifically configured to:
acquiring a task to be processed in the user task queue; and
and if the number of the tasks to be processed is larger than a second preset threshold value, taking the tasks to be processed exceeding the preset threshold value as the stuck tasks.
12. The apparatus for managing the preset containers in the automatic driving simulation system according to claim 7, further comprising:
the fourth acquisition module is used for acquiring user-defined environment information;
and the adding module is used for adding the user-defined environment information to the initialized preset container.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of managing a preset container among the automatic driving simulation system of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a method of managing preset containers in an automatic driving simulation system according to any one of claims 1 to 6.
CN202010514085.0A 2020-06-08 2020-06-08 Method and device for managing preset containers in automatic driving simulation system Active CN111831391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010514085.0A CN111831391B (en) 2020-06-08 2020-06-08 Method and device for managing preset containers in automatic driving simulation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010514085.0A CN111831391B (en) 2020-06-08 2020-06-08 Method and device for managing preset containers in automatic driving simulation system

Publications (2)

Publication Number Publication Date
CN111831391A true CN111831391A (en) 2020-10-27
CN111831391B CN111831391B (en) 2023-09-22

Family

ID=72899262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010514085.0A Active CN111831391B (en) 2020-06-08 2020-06-08 Method and device for managing preset containers in automatic driving simulation system

Country Status (1)

Country Link
CN (1) CN111831391B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763602A (en) * 2016-01-29 2016-07-13 腾讯科技(深圳)有限公司 Data request processing method, server and cloud interactive system
US20170109203A1 (en) * 2015-10-15 2017-04-20 International Business Machines Corporation Task scheduling
CN108594819A (en) * 2018-05-03 2018-09-28 济南浪潮高新科技投资发展有限公司 Automatic Pilot vehicle computing resource management system and method
CN110287003A (en) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 The management method and management system of resource
CN110717248A (en) * 2019-09-11 2020-01-21 武汉光庭信息技术股份有限公司 Method and system for generating automatic driving simulation scene, server and medium
CN110979287A (en) * 2019-12-31 2020-04-10 广州文远知行科技有限公司 Updating method and device of brake table, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170109203A1 (en) * 2015-10-15 2017-04-20 International Business Machines Corporation Task scheduling
CN105763602A (en) * 2016-01-29 2016-07-13 腾讯科技(深圳)有限公司 Data request processing method, server and cloud interactive system
WO2017129106A1 (en) * 2016-01-29 2017-08-03 腾讯科技(深圳)有限公司 Data request processing method, server and system
CN108594819A (en) * 2018-05-03 2018-09-28 济南浪潮高新科技投资发展有限公司 Automatic Pilot vehicle computing resource management system and method
CN110287003A (en) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 The management method and management system of resource
CN110717248A (en) * 2019-09-11 2020-01-21 武汉光庭信息技术股份有限公司 Method and system for generating automatic driving simulation scene, server and medium
CN110979287A (en) * 2019-12-31 2020-04-10 广州文远知行科技有限公司 Updating method and device of brake table, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YUNHEE KANG等: "Twister Platform for MapReduce Applications on a Docker Container", 《2016 INTERNATIONAL CONFERENCE ON PLATFORM TECHNOLOGY AND SERVICE(PLATCON)》 *
夏伟;李慧云;: "基于深度强化学习的自动驾驶策略学习方法", 集成技术, no. 03 *
李明;曾楠;: "融合服务器虚拟化和容器技术的设计研究", 电子世界, no. 07 *

Also Published As

Publication number Publication date
CN111831391B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN111913794A (en) Method and device for sharing GPU, electronic equipment and readable storage medium
US9608933B2 (en) Method and system for managing cloud computing environment
CN111694646A (en) Resource scheduling method and device, electronic equipment and computer readable storage medium
JP7214786B2 (en) Scheduling method, device, device and medium for deep learning inference engine
CN111459645B (en) Task scheduling method and device and electronic equipment
CN111506401B (en) Automatic driving simulation task scheduling method and device, electronic equipment and storage medium
JP7170768B2 (en) Development machine operation task processing method, electronic device, computer readable storage medium and computer program
CN112000450A (en) Neural network architecture searching method and device
CN111880914A (en) Resource scheduling method, resource scheduling apparatus, electronic device, and storage medium
CN114356547B (en) Low-priority blocking method and device based on processor virtualization environment
CN111290768A (en) Updating method, device, equipment and medium for containerization application system
CN111930539A (en) Task management method, device and equipment based on label engine and storage medium
US20150235156A1 (en) Enabling Capacity On Demand In A Computing System Using A Calendar
CN111913809A (en) Task execution method, device, equipment and storage medium under multi-thread scene
CN115080209A (en) System resource scheduling method and device, electronic equipment and storage medium
CA2631255A1 (en) Scalable scheduling of tasks in heterogeneous systems
CN111796940B (en) Resource allocation method and device and electronic equipment
CN110908675B (en) Method and device for acquiring running environment and electronic equipment
CN111782147A (en) Method and apparatus for cluster scale-up
CN111831391B (en) Method and device for managing preset containers in automatic driving simulation system
CN111176838A (en) Method and device for distributing embedded vectors for nodes in bipartite graph
CN112527451B (en) Method, device, equipment and storage medium for managing container resource pool
US20210149726A1 (en) Scheduling device, scheduling system, scheduling method, and non-transitory computer-readable medium
CN113419865A (en) Cloud resource processing method, related device and computer program product
CN112527527A (en) Consumption speed control method and device of message queue, electronic equipment and medium

Legal Events

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