Task processing method and device based on vehicle, electronic equipment, medium and vehicle

Through OpenGL shared context technology, the on-board 360 panoramic image resources are dynamically managed, solving the problem of different panoramic image functions caused by different hardware platforms, and achieving cross-platform adaptation and efficient task management.

CN119105867APending Publication Date: 2024-12-10ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411137184.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the process of intelligent automobile development, the applicable performance and functional differences in on-board panoramic images are difficult to achieve a unified 360 panoramic image function due to different vehicle shapes, sensors and intelligent driving hardware platforms.

Method used

Using OpenGL-based shared context technology, we realize the cross-platform 360 panoramic image function by obtaining target configuration files, selecting resources and generating tasks, and dynamically managing data, rendering and displaying resources.

Benefits of technology

It realizes dynamic task management of different processing objects, has strong software functions differential robustness and expansion range, and has good hardware adaptability on different intelligent driving hardware platforms, improving applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105867A_ABST
    Figure CN119105867A_ABST
Patent Text Reader

Abstract

The invention relates to a task processing method and device based on a vehicle, electronic equipment, a medium and the vehicle, and the method comprises the steps: obtaining a target configuration file corresponding to a processing object; selecting a target resource from a resource pool corresponding to the processing object by using a pre-constructed shared context object corresponding to the processing object according to the target configuration file; generating a to-be-processed task based on the target resource by utilizing a shared context object corresponding to the processing object, and adding the to-be-processed task into a task queue; and executing the to-be-processed task according to the time sequence of the to-be-processed task in the task queue. By adopting the technical scheme, dynamic management of tasks of different processing objects is realized by adopting a layered architecture, and the method has relatively strong software function difference robustness and an expansion range, and is supported in different intelligent driving hardware platforms, so that the scheme has relatively strong hardware adaptability, and the applicability of the scheme is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a vehicle-based task processing method, device, electronic equipment, medium and vehicle. Background Art

[0002] In the process of the evolution of automobile intelligence, the use of four surround-view camera sensors to complete in-vehicle panoramic imaging can not only provide users with a 360-degree field of view, but also display obstacles and distances in real time. It has become an indispensable function.

[0003] However, from the perspective of the development direction of vehicle-mounted panoramic imaging, the applicability, functional differences, and expansion range of vehicle-mounted panoramic imaging are different due to different vehicle shapes, sensors, and intelligent driving hardware platforms. It can be seen that how to use a unified architecture to achieve universal 360-degree panoramic imaging functions has become a difficulty in current research. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, at least one embodiment of the present disclosure provides a vehicle-based task processing method, device, electronic device, medium and vehicle.

[0005] In a first aspect, the present disclosure provides a vehicle-based task processing method, comprising:

[0006] Get the target configuration file corresponding to the processing object;

[0007] According to the target configuration file, using a pre-built shared context object corresponding to the processing object, selecting a target resource from a resource pool corresponding to the processing object;

[0008] Using the shared context object corresponding to the processing object, generating a task to be processed based on the target resource and adding the task to be processed to a task queue;

[0009] Execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

[0010] In a second aspect, the present disclosure provides a vehicle-based task processing device, comprising:

[0011] A file acquisition module is used to obtain a target configuration file corresponding to a processing object;

[0012] A resource selection module, configured to select a target resource from a resource pool corresponding to the processing object using a pre-built shared context object corresponding to the processing object according to the target configuration file;

[0013] A task generation module, used to generate a to-be-processed task based on the target resource by using the shared context object corresponding to the processing object and add the to-be-processed task to a task queue;

[0014] The task execution module is used to execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

[0015] In a third aspect, the present disclosure provides an electronic device, including: a processor and a memory;

[0016] The processor is used to execute any of the vehicle-based task processing methods provided in the embodiments of the present disclosure by calling the program or instruction stored in the memory.

[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute any of the vehicle-based task processing methods provided in the embodiments of the present disclosure.

[0018] In a fifth aspect, the present disclosure provides a vehicle, comprising the vehicle-based task processing device as described in the second aspect or the electronic device as described in the third aspect or the computer-readable storage medium as described in the fourth aspect.

[0019] In a sixth aspect, the present disclosure provides a computer program product, which is used to execute any of the vehicle-based task processing methods provided in the embodiments of the present disclosure.

[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:

[0021] In the disclosed embodiment, by obtaining the target configuration file corresponding to the processing object, according to the target configuration file, using the pre-built shared context object corresponding to the processing object, selecting the target resource from the resource pool corresponding to the processing object, and using the shared context object corresponding to the processing object, generating the pending task based on the target resource and adding the pending task to the task queue, and then executing the pending task according to the timing of the pending task in the task queue. The above technical scheme is adopted, by constructing corresponding shared context objects and resource pools for different processing objects, using the shared context object corresponding to the processing object to select the target resource from the corresponding resource pool and generate the pending task to be added to the task list and execute it according to the timing, thereby, the hierarchical architecture is adopted to realize the dynamic management of tasks of different processing objects, which has strong software function difference robustness and expansion range, and this scheme constructs the shared context object corresponding to each processing object based on the shared context technology of OpenGL. Since OpenGL is the underlying native interface of the hardware GPU, it is supported in different intelligent driving hardware platforms, so this scheme has strong hardware adaptability, which improves the applicability of this scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 A flowchart of a vehicle-based task processing method provided by an embodiment of the present disclosure;

[0025] Figure 2 A flowchart of a vehicle-based task processing method provided by another embodiment of the present disclosure;

[0026] Figure 3 A flowchart of a vehicle-based task processing method provided by another embodiment of the present disclosure;

[0027] Figure 4 A schematic diagram of components for implementing a vehicle-based task processing method according to an exemplary embodiment of the present disclosure is shown;

[0028] Figure 5 A schematic diagram of the structure of a vehicle-based task processing device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understandable that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments, and the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. In the absence of conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field belong to the scope of protection of the present disclosure.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0031] From the perspective of the development direction of vehicle-mounted panoramic imaging, the applicability, functional differences, and expansion range of vehicle-mounted panoramic imaging vary with different vehicle shapes, sensors, and intelligent driving hardware platforms. Therefore, how to use a unified architecture to achieve a universal 360-degree panoramic imaging function has become a difficulty in current research.

[0032] In response to the above problems, the solution disclosed in this paper starts from the rendering pipeline, considers the characteristics of data, rendering and display, and proposes a method for data, rendering and display of vehicle-mounted 360-degree panoramic images based on OpenGL. Three OpenGL shared context objects are used to realize the dynamic management of data resources, rendering tasks and display targets, and realize a universal vehicle-mounted 360-degree panoramic imaging function, which has strong software function difference robustness and expansion range. This solution is based on the shared context technology of OpenGL. OpenGL is a programming interface used to accelerate the rendering and display of 2D and 3D vector graphics. The underlying layer relies on the hardware GPU and is supported by most intelligent driving hardware, so it has strong hardware adaptability.

[0033] Figure 1 A flowchart of a vehicle-based task processing method provided in accordance with an embodiment of the present disclosure is provided. The method may be executed by a vehicle-based task processing device provided in accordance with an embodiment of the present disclosure, wherein the device may be implemented using software and / or hardware, and may generally be integrated into a vehicle, and specifically may be integrated into a vehicle computer processor.

[0034] like Figure 1 As shown, the vehicle-based task processing method may include the following steps:

[0035] Step 101, obtaining a target configuration file corresponding to a processing object.

[0036] The processing object may include but is not limited to at least one of a data resource, a rendering element, and a display target. It is understandable that for different processing objects, the corresponding task operation types are different. For example, for data resources, the corresponding task operation types include loading, stopping, releasing, etc.; for rendering elements, the corresponding task operation types include starting, suspending, ending, etc.; for display targets, the corresponding task operation types include adding, deleting, switching, etc.

[0037] In the embodiments of the present disclosure, different processing objects correspond to different configuration files, wherein the configuration files can be pre-configured by the user according to actual needs, or can be automatically generated and stored according to dynamic functional status signals. The present disclosure does not limit the generation method of the configuration files. During the initialization process after the vehicle system is started, the vehicle processor can obtain configuration files corresponding to different processing objects (for ease of description and distinction, the configuration files of the processing objects obtained are called target configuration files). For example, during initialization, the vehicle processor obtains the data resource configuration file corresponding to the data resource, then the data resource configuration file is the obtained target configuration file, and the processing object is the data resource.

[0038] Step 102 : According to the target configuration file, a target resource is selected from a resource pool corresponding to the processing object using a pre-built shared context object corresponding to the processing object.

[0039] The shared context object corresponding to the processing object is pre-built based on OpenGL's shared context technology and can be built when the vehicle system is initialized. Using the shared context technology, cross-thread resource sharing can be achieved based on OpenGL technology, thereby maximizing the efficiency of GPU task parallel processing; at the same time, OpenGL technology has good scalability on different hardware platforms, and can realize the deployment of 360 panoramic images on multiple platforms.

[0040] In this embodiment, the processing object includes but is not limited to at least one of data resources, rendering elements and display targets, the shared context object corresponding to the processing object includes but is not limited to at least one of a data sharing context object, a rendering sharing context object and a display sharing context object, the resource pool corresponding to the processing object includes but is not limited to at least one of a data resource pool, a rendering element pool and a display target pool, and the resource pool can also be constructed when the vehicle system is initialized.

[0041] The data resource pool is used to implement the management and configuration of related functions such as loading, stopping, and releasing data resources. The types of data resources contained in the data resource pool include but are not limited to fisheye camera internal parameters, fisheye camera external parameters, camera video streams, trajectory resources, 2D car model resources, 3D car model resources, transparent chassis resources, reversing radar (Parking Distance Control, PDC) resources, etc. The rendering element pool is used to implement the management and configuration of related functions such as starting, suspending, and ending rendering elements. The types of rendering elements contained in the rendering element pool include but are not limited to top view rendering, single view rendering, etc. Figure 2 3D rendering, wheel view rendering, single view Figure 3 The display target pool is used to manage and configure related functions such as adding, switching, and deleting display targets. The types of display targets included in the display target pool include but are not limited to vehicle screens, server clouds, mobile phone APPs, and tablet APPs.

[0042] In this embodiment, for the acquired target configuration file, a shared context object corresponding to the processing object may be used to select a target resource from a resource pool corresponding to the processing object according to the target configuration file.

[0043] Step 103: using the shared context object corresponding to the processing object, generating a task to be processed based on the target resource and adding the task to be processed to a task queue.

[0044] In this embodiment, the vehicle computer processor can use the shared context object corresponding to the processing object to generate a task to be processed based on the target resource, and add the task to be processed to the task queue.

[0045] Among them, the task queue can be constructed when the vehicle system is initialized. The task queue is used to realize the parallel running processing of data tasks, rendering tasks, and display tasks. Data tasks may include but are not limited to loading, stopping, and releasing data. Rendering tasks may include but are not limited to starting, suspending, and ending rendering elements. Display tasks may include but are not limited to adding, switching, and deleting display targets.

[0046] In the disclosed embodiment, the configuration file records parameters such as the operation type for the processing object (such as loading and releasing data resources), the type of required resources (such as camera internal parameters, external parameters, etc.), etc. Therefore, the shared context object is based on the target configuration file. It can select the target resource from the corresponding resource pool according to the type of resource, and generate tasks to be processed according to the operation type and the selected target resource.

[0047] Exemplarily, if the target configuration file obtained is a data resource configuration file, the data resource configuration file can be dynamically loaded using the data sharing context object, and data resources (target resources) can be selected from the data resource pool in real time according to the data resource configuration file, and pending tasks for loading, stopping or releasing the target resources are generated, and the generated pending tasks are added to the task queue. For example, if the pending tasks generated are loading target resource tasks, the data sharing context object pushes the loading target resource tasks to the task queue. Among them, for the configuration of the data resource configuration file, the configuration operation can be performed according to the configuration data resource file customized by the user when the program is pre-started, or the loading, stopping or releasing of the corresponding resources can be realized through dynamic functional status signals, and the data resource configuration file can be configured and stored.

[0048] Exemplarily, if the target configuration file obtained is a rendering element configuration file, the rendering element configuration file can be dynamically loaded using the rendering shared context object, and a rendering element (target resource) can be selected from the rendering element pool in real time according to the rendering element configuration file, and a pending task for starting, suspending or ending the rendering element is generated, and the generated pending task is added to the task queue. For example, if the generated pending task is to start the rendering element task, the rendering shared context object pushes the start rendering element task to the task queue. Among them, for the configuration of the rendering element configuration file, the configuration operation can be performed according to the user-defined configuration rendering element file when the program is pre-started, or the corresponding rendering element can be started, suspended or ended through a dynamic functional status signal, and the rendering element configuration file can be configured and stored.

[0049] Exemplarily, if the target configuration file obtained is a display target configuration file, the display target configuration file can be dynamically loaded using the display shared context object, and the display target (target resource) can be selected from the display target pool in real time according to the display target configuration file, and a pending task of adding, switching or deleting the display target is generated, and the generated pending task is added to the task queue. For example, if the pending task generated is to start the display target task, the display shared context object pushes the start display target task to the task queue. Among them, for the configuration of the display target configuration file, the configuration operation can be performed according to the user-defined configuration display target file when the program is pre-started, or the corresponding display target can be added, switched or deleted through a dynamic function status signal, and the display target configuration file can be configured and stored.

[0050] It should be noted that in the embodiment of the present disclosure, when target configuration files of multiple processing objects are obtained, the shared context object corresponding to each processing object is used to generate tasks to be processed according to the corresponding target configuration files and add them to the task queue. The shared context object corresponding to each processing object generates tasks to be processed in parallel and pushes the tasks to be processed to the task queue. Based on the OpenGL technology, cross-thread resource sharing is realized, thereby maximizing the utilization of the GPU task parallel processing capability and improving task processing efficiency.

[0051] Step 104: execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

[0052] In the disclosed embodiment, for each pending task in the task queue, each pending task can be executed according to the first-in-first-out rule based on the time sequence (ie, time sequence) in which the pending tasks are added to the task queue.

[0053] It should be noted that the thread executing the pending tasks in the task queue and the thread generating the pending tasks based on the target configuration file using the shared context object also run in parallel to improve the task processing efficiency.

[0054] The vehicle-based task processing method of the disclosed embodiment obtains the target configuration file corresponding to the processing object, selects the target resource from the resource pool corresponding to the processing object by using the pre-built shared context object corresponding to the processing object according to the target configuration file, and generates the pending task based on the target resource and adds the pending task to the task queue by using the shared context object corresponding to the processing object, and then executes the pending task according to the timing of the pending task in the task queue. The above technical scheme is adopted, by constructing corresponding shared context objects and resource pools for different processing objects, selecting the target resource from the corresponding resource pool by using the shared context object corresponding to the processing object and generating the pending task to be added to the task list and executed according to the timing, thereby, the hierarchical architecture is adopted to realize the dynamic management of tasks of different processing objects, and has strong software function difference robustness and expansion range, and the scheme constructs the shared context object corresponding to each processing object based on the shared context technology of OpenGL, because OpenGL is the underlying native interface of the hardware GPU, which is supported in different intelligent driving hardware platforms, so the scheme has strong hardware adaptability, which improves the applicability of the scheme.

[0055] In an optional embodiment of the present disclosure, Figure 2 As shown, based on the above-mentioned embodiment, the vehicle-based task processing method disclosed in the present invention may further include the following steps:

[0056] Step 201 : when a state signal of a target function is detected, determining a target shared context object corresponding to the state signal of the target function.

[0057] Among them, the target function can be one of the many functions of the vehicle, including but not limited to transparent car film function, reversing image function, panoramic image function, panoramic image day and night mode skin switching function, panoramic image car film color change function, panoramic image theme switching function, sunroof function, etc.

[0058] When a user is using a vehicle, the user can operate the vehicle's functions according to their own needs. For example, the user can turn on or off a certain function of the vehicle. The function currently operated by the user is the target function. After the user operates the target function, the vehicle will generate a corresponding status signal based on the user's operation of the target function. The vehicle processor will then detect the status signal, where the status signal is used to indicate the action on the target function, such as turning on or off. For example, taking the transparent car film function as an example, when the user triggers the transparent car model function by clicking the screen, the vehicle processor will detect the turn-on signal (i.e., status signal) of the transparent car film function (i.e., the target function).

[0059] In the disclosed embodiment, when the vehicle computer processor detects a status signal of a target function, a target shared context object corresponding to the status signal of the target function may be further determined.

[0060] As an example, a mapping relationship between different status signals of different functions and associated shared context objects can be established in advance. When the status signal of a target function is detected, the mapping relationship between the different status signals of different functions and the associated shared context objects is first obtained, and then the obtained mapping relationship is queried according to the status signal of the target function to determine the target shared context object corresponding to the status signal of the target function, wherein the determined target shared context object is at least one of a data shared context object, a rendering shared context object, and a display shared context object.

[0061] As another example, a correspondence between different status signals of different functions and related processing objects can be established in advance. When the status signal of the target function is detected, the correspondence between the different status signals of the different functions and the related processing objects is first obtained, and then the correspondence is queried according to the status signal of the target function to determine the target processing object corresponding to the current status signal of the target function, and then the shared context object corresponding to the target processing object is obtained as the target shared context object corresponding to the status signal of the target function.

[0062] Step 202 : Distribute the state signal of the target function to the target shared context object, and the target shared context object generates a to-be-processed task corresponding to the target function based on the state signal of the target function.

[0063] In the disclosed embodiment, after determining the target shared context object corresponding to the state signal of the target function, the state signal of the target function can be distributed to the target shared context object. It can be understood that if there are multiple target shared context objects, the state signal of the target function is distributed to each target shared context object. After the target shared context object receives the state signal of the target function, it can generate a to-be-processed task corresponding to the target function based on the state signal of the target function.

[0064] It should be noted that, in the embodiment of the present disclosure, for the same state signal of the same target function, the to-be-processed tasks generated by each target shared context object have the same task identifier, so as to facilitate the determination of the upstream dependent tasks of each task.

[0065] In an optional implementation of the present disclosure, when distributing the status signal of the target function to the target shared context object, it is possible to first detect whether there is a data shared context object in the target shared context object. If there is a data shared context object in the target shared context object, it is possible to first determine whether the data resources associated with the target function have been loaded through the data shared context object. If they have been loaded, the status signal of the target function is distributed to other shared context objects in the target shared context object except the data shared context object, and other shared context objects generate pending tasks corresponding to the target function based on the status signal of the target function. Accordingly, if there is no data shared context object in the target shared context object, or if the data resources related to the target function are not loaded, the status signal of the target function is distributed to each target shared context object. Taking the transparent car film function as an example, after the vehicle processor detects the start signal of the transparent car film function, it can determine that the target shared context object corresponding to the start signal of the transparent car film includes a data shared context object and a rendering shared context object. The data shared context object first determines whether the data resources related to the transparent car film have been loaded. If not, the task of loading the data resources is added to the task queue to load the relevant data resources into the video memory after executing the pending task; if the relevant data resources have been loaded, switch to the corresponding cached video memory space, so as not to lose the frame rate performance without adding additional video memory resources. In other words, only when the data resources related to the target function have been loaded, there is no need to load the relevant data resources again. At this time, there is no need to send the status signal of the target function to the data shared context object, and it only needs to be sent to other target shared context objects, thereby avoiding repeated data resource loading work and avoiding the adverse effects of unnecessary repeated task execution on task processing efficiency.

[0066] Step 203: Use the target shared context object to add the to-be-processed task corresponding to the target function to the task queue.

[0067] In the embodiment of the present disclosure, for a to-be-processed task generated by a target shared context object and corresponding to a state signal of a target function, the target shared context object adds the to-be-processed task generated by itself to a task queue.

[0068] Taking the transparent car film function as an example, after the vehicle processor detects the activation signal of the transparent car film function, it can determine that the target shared context object corresponding to the activation signal of the transparent car film includes a data shared context object and a rendering shared context object, and distribute the activation signal of the transparent car film function to the data shared context object and the rendering shared context object. Then, the data shared context object loads the relevant data resources according to the state signal of the target function, and adds the task of loading the data resources to the task queue. At the same time, the rendering shared context object selects the corresponding transparent car film rendering element according to the state signal of the target function, and adds the task of turning on the transparent car film rendering element to the task queue. After executing these two tasks, the transparent car film function of the vehicle can be realized.

[0069] Taking the panoramic image mode as an example, after the vehicle processor detects the start signal of the panoramic image mode, it can determine that the corresponding target shared context object includes the display shared context object, and send the start signal of the panoramic image mode to the display shared context object, so that the display shared context object obtains the vehicle display screen as the display target according to the start signal of the panoramic image mode, and adds the task of starting the vehicle display screen to the task queue. After executing the task, the panoramic impact data collected by the vehicle's camera device will be presented on the vehicle display screen to provide the vehicle's field of view. If the vehicle processor detects the start signal of the stop camera mode later, the determined target shared context object is still the display shared context object, and sends the start signal of the stop camera mode to the display shared context object, so that the display shared context object obtains the mobile phone APP as the display target according to the start signal of the stop camera mode, and adds the task of switching the display target to the mobile phone APP to the task queue, so that after executing the task, the data collected by the vehicle's camera device will be displayed in the user APP for the user to view the vehicle information.

[0070] The vehicle-based task processing method of the disclosed embodiment determines the target shared context object corresponding to the status signal of the target function when the status signal of the target function is detected, distributes the status signal of the target function to the target shared context object, and generates a to-be-processed task corresponding to the target function based on the status signal of the target function by the target shared context object, and then uses the target shared context object to add the to-be-processed task corresponding to the target function to the task queue, thereby achieving real-time generation of the corresponding to-be-processed task according to the status signal of the vehicle function, and each target shared context object processes the generated to-be-processed task in parallel, which helps to improve the efficiency of task processing.

[0071] Further, in an optional embodiment of the present disclosure, in Figure 2On the basis of the illustrated embodiment, the vehicle-based task processing method of the present invention further includes: obtaining a task execution record of a task to be processed corresponding to a target function, and then obtaining a target processing object in the task execution record and a resource type of a target processing resource associated with the target processing object, and then generating configuration files for each target processing object corresponding to different status signals of the target function based on the target processing object and the resource type of the target processing resource associated with the target processing object.

[0072] Exemplarily, after the target function exits, the task execution record of the pending task corresponding to the target function can be obtained. The task execution record records the execution information of all tasks related to the target function, including the task execution information when the target function is turned on and the task execution information when the target function is ended, etc. Therefore, different tasks to be executed when different operations are performed on the target function (different operations generate different status signals) can be extracted from the task execution record, as well as the target processing object (at least one of the data resource, rendering element or display target) matched by each task and the resource type of the target processing resource associated with the target processing object. Then, for different operations of the target function (i.e. different status signals), based on the relevant target processing object and the resource type of the target processing resource, a corresponding configuration file can be generated, and the configuration files of each target processing object corresponding to the different status signals of the target function can be obtained, and the generated configuration files can be saved. Thus, the dynamic generation of the configuration file is realized, and then when the user operates the target function again, the corresponding configuration file can be queried according to the status signal, and the pending task can be generated based on the configuration file using the relevant shared context object, and finally the response to the status signal of the target function is realized.

[0073] In an optional embodiment of the present disclosure, Figure 3 As shown, based on the above embodiment, step 104 may include the following sub-steps:

[0074] Step 301, obtaining the current task to be processed according to the time sequence of the tasks to be processed in the task queue.

[0075] In the disclosed embodiment, for all pending tasks in the task queue, the current pending task is obtained according to the time sequence of the pending tasks. That is, the current pending task is the pending task in the task queue that is closest to the current time.

[0076] Step 302: Determine, based on the task operation type of the current task to be processed, whether the current task to be processed has any upstream dependent task.

[0077] As mentioned above, different processing objects have different corresponding task operation types. For example, for data resources, the corresponding task operation types include loading, stopping, releasing, etc.; for rendering elements, the corresponding task operation types include starting, suspending, ending, etc.; for display targets, the corresponding task operation types include adding, deleting, switching, etc. Therefore, the pending tasks in the task queue can have the same or different task operation types.

[0078] In the disclosed embodiment, for the currently pending task obtained, the task operation type of the currently pending task can be obtained, and it can be determined whether the currently pending task has an upstream dependent task according to the task operation type. If there is no upstream dependent task, the currently pending task is directly executed, and after the execution is completed, the next pending task in the task queue is continuously obtained as the currently pending task to repeat the method steps of this embodiment; if there is an upstream dependent task, step 303 is continued.

[0079] It is understandable that the task operation type of the current pending task is different and the upstream dependent tasks are different. For example, the upstream dependent task of the start rendering task is the load data resource task, the upstream dependent task of the new display target task is the start rendering task, and the task of loading, stopping or releasing data resources does not have an upstream dependent task. In addition, the current pending task and its upstream dependent task have the same task identifier.

[0080] Step 303: If there is an upstream dependent task, check whether the upstream dependent task is completed.

[0081] In the embodiment of the present disclosure, when it is determined that the current task to be processed has an upstream dependent task, it is further detected whether the upstream dependent task is completed, and if it is completed, step 304 is executed, and if it is not completed, step 305 and subsequent steps are executed. In other words, if the upstream dependent task is completed, the current task to be processed is directly executed, otherwise, the current task to be processed is executed after the upstream dependent task is completed.

[0082] Step 304: If the upstream dependent task has been completed, execute the current task to be processed.

[0083] In this embodiment, if the upstream dependent task of the current task to be processed has been completed, the current task to be processed is executed.

[0084] Step 305: If the upstream dependent task is not completed, suspend the current task to be processed.

[0085] In this embodiment, if the upstream dependent task of the current task to be processed is not completed, the current task to be processed is suspended, and the current task to be processed is executed after the upstream dependent task is completed.

[0086] Step 306, according to the sequence of the tasks to be processed in the task queue, obtain the next task to be processed as a new current task to be processed and execute the step of determining whether the new current task to be processed has an upstream dependent task and its subsequent steps.

[0087] In the disclosed embodiment, after the current pending task is suspended, the next pending task is obtained as the new current pending task according to the time sequence of each pending task in the task queue, and it is determined whether the new current pending task has an upstream dependent task according to the task operation type of the new current pending task. If not, the new current pending task is directly executed. If it exists, it is further determined whether its upstream dependent task is completed. If it is completed, the new current pending task is directly executed. If not, the new current pending task is suspended to wait for its upstream dependent task to be completed before executing the new current pending task. After executing the new current pending task or suspending the new current pending task, the next pending task in the task queue is continuously obtained as the current pending task and the method flow of the present embodiment is repeatedly executed until there are no pending tasks to be executed in the task queue.

[0088] Step 307: When it is detected that the upstream dependent task is completed, the current task to be processed is executed.

[0089] In the disclosed embodiment, when it is detected that the upstream dependent task of the current task to be processed is completed, the current task to be processed is executed.

[0090] It should be noted that in the disclosed embodiment, after the upstream dependent task of the currently pending task is completed, the processing priority of the currently pending task is higher than the processing priority of the pending tasks in the task queue, but lower than the processing priority of the task currently being executed. If the upstream dependent tasks of two pending tasks are completed at the same time, the pending task that is suspended first (that is, before the order of execution) will be executed first to ensure the timeliness of task processing.

[0091] For example, pending task 1 is suspended, and pending task 3 is currently obtained in the task queue but has not yet been executed. At this time, it is detected that the upstream dependent task of pending task 1 has been completed, so pending task 1 is executed first, and after pending task 1 is completed, pending task 3 is executed. If pending task 3 is being executed when it is detected that the upstream dependent task of pending task 1 is completed, pending task 1 is executed after pending task 3 is completed.

[0092] Figure 4 A schematic diagram of components for implementing a vehicle-based task processing method according to an exemplary embodiment of the present disclosure is shown. Figure 4As shown, the resource pool includes a data resource pool, a rendering element pool and a display target pool, wherein the types of data resources contained in the data resource pool include but are not limited to camera intrinsic parameters, camera extrinsic parameters, video stream resources, trajectory resources, car model resources, etc., the types of rendering elements contained in the rendering element pool include but are not limited to top view rendering, single view rendering, trajectory rendering, car model rendering, transparent chassis rendering, etc., and the types of display targets contained in the display target pool include but are not limited to car screen, server cloud, mobile phone APP, tablet APP, etc. The data sharing context object selects the required data resources from the data resource pool and generates data-related tasks and adds them to the task queue. The rendering sharing context object selects the required rendering element resources from the rendering element pool and generates rendering-related tasks and adds them to the task queue. The display sharing context object selects the required display target resources from the display target pool and generates display-related tasks and adds them to the task queue. For each task in the task queue, the current task is obtained in sequence according to the task sequence and it is determined whether it has an upstream dependent task. If the upstream dependent task has been completed, the current task is run directly, otherwise it is equivalent to running the current task after its upstream dependent task is completed. For example, Figure 4 In the task queue shown, data 1, rendering 1, data 2, display 1, etc. are all tasks to be processed. The time sequence (i.e., timing) of each task in the task queue is from left to right, and tasks with the same number in the task queue have dependencies. For data 1, which is the first in timing, there is no upstream dependent task, so data 1 is executed directly, and then rendering 1 is obtained. The upstream dependent task of rendering 1 is data 1. At this time, data 1 has been completed, so rendering 1 is executed directly. Execute each task in the task queue in sequence. When rendering 3 is obtained, its upstream dependent task should be data 3, but because the data 3 task is not completed, rendering 3 is suspended and waits for data 3 to be executed. Then the next task in the task queue is data 3. There is no upstream dependent task, so data 3 is executed directly. After data 3 is executed, run rendering 3, and after rendering 3 is executed, execute the display 2 task.

[0093] The vehicle-based task processing method of the disclosed embodiment determines whether the current task to be processed has any upstream dependent tasks, and if so, first detects whether the upstream dependent tasks are completed. If completed, the current task to be processed is directly executed. If not completed, the current task to be processed is suspended to wait for the completion of its upstream dependent tasks before executing the current task to be processed, thereby ensuring the smooth execution of each task.

[0094] In summary, the vehicle-based task processing solution provided by the present disclosure uses OpenGL technology to implement a panoramic image rendering engine, realizes cross-platform development adaptation, and solves the applicability performance problem caused by different hardware of the intelligent driving platform; uses data sharing context objects to asynchronously accelerate the loading of resources, realizes OpenGL cross-thread resource sharing, and solves the startup time and rendering performance frame rate problems of panoramic images; uses rendering sharing context objects to bind multiple rendering tasks according to rendering configuration parameters, so that each task is independent and configurable, and solves the problem of the extended range of panoramic images; uses display sharing context objects to separate the display process, avoid the vertical synchronization mechanism of hardware devices, and can output to different display targets based on dynamic status signals. By adopting a layered architecture of data sharing context objects, rendering sharing context objects, and display sharing context objects, dynamic management of data resources, rendering tasks, and display targets is achieved, with strong software function difference robustness and extended range.

[0095] Corresponding to the above method embodiment, the embodiment of the present disclosure also provides a vehicle-based task processing device.

[0096] Figure 5 A schematic diagram of the structure of a vehicle-based task processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the vehicle-based task processing device 40 may include: a file acquisition module 410 , a resource selection module 420 , a task generation module 430 and a task execution module 440 .

[0097] The file acquisition module 410 is used to acquire a target configuration file corresponding to the processing object;

[0098] A resource selection module 420, configured to select a target resource from a resource pool corresponding to the processing object using a pre-built shared context object corresponding to the processing object according to the target configuration file;

[0099] A task generation module 430, configured to generate a to-be-processed task based on the target resource by using the shared context object corresponding to the processing object and to add the to-be-processed task to a task queue;

[0100] The task execution module 440 is used to execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

[0101] Optionally, the processing object includes at least one of a data resource, a rendering element, and a display target;

[0102] The shared context object corresponding to the processing object includes at least one of a data shared context object, a rendering shared context object, and a display shared context object;

[0103] The resource pool corresponding to the processing object includes at least one of a data resource pool, a rendering element pool and a display target pool.

[0104] Optionally, the vehicle-based task processing device 40 further includes:

[0105] a determination module, configured to, when a state signal of a target function is detected, determine a target shared context object corresponding to the state signal of the target function;

[0106] a distribution module, configured to distribute the state signal of the target function to the target shared context object, and the target shared context object generates a to-be-processed task corresponding to the target function based on the state signal of the target function;

[0107] An adding module is used to add a to-be-processed task corresponding to the target function to the task queue by using the target shared context object.

[0108] Optionally, the determination module is further configured to:

[0109] When the state signal of the target function is detected, a mapping relationship between different state signals of different functions and the associated shared context objects is obtained;

[0110] The mapping relationship is queried according to the state signal of the target function to determine the target shared context object corresponding to the state signal of the target function.

[0111] Optionally, the distribution module is further configured to:

[0112] Detecting whether there is a data sharing context object in the target sharing context object;

[0113] If the data sharing context object exists, determining whether the data resource associated with the target function has been loaded through the data sharing context object;

[0114] If loaded, the state signal of the target function is distributed to other shared context objects in the target shared context object except the data shared context object, and the other shared context objects generate to-be-processed tasks corresponding to the target function based on the state signal of the target function.

[0115] Optionally, the vehicle-based task processing device 40 further includes:

[0116] A first acquisition module, used to acquire a task execution record of a task to be processed corresponding to the target function;

[0117] A second acquisition module, used to acquire a target processing object in the task execution record and a resource type of a target processing resource associated with the target processing object;

[0118] The file generating module is used to generate configuration files of each of the target processing objects corresponding to different status signals of the target function based on the target processing objects and resource types of the target processing resources associated with the target processing objects.

[0119] Optionally, the task execution module 440 is further configured to:

[0120] Obtaining the current task to be processed according to the time sequence of the tasks to be processed in the task queue;

[0121] According to the task operation type of the current task to be processed, determining whether the current task to be processed has an upstream dependent task;

[0122] If there is an upstream dependent task, check whether the upstream dependent task is completed;

[0123] If the upstream dependent task has been completed, the current pending task is executed.

[0124] Optionally, the task execution module 440 is further configured to:

[0125] If the upstream dependent task is not completed, suspend the current pending task;

[0126] According to the time sequence of the tasks to be processed in the task queue, the next task to be processed is obtained as a new current task to be processed and the step of determining whether the new current task to be processed has an upstream dependent task and its subsequent steps are executed;

[0127] When it is detected that the upstream dependent task is completed, the current task to be processed is executed.

[0128] The vehicle-based task processing device provided in the embodiments of the present disclosure can execute any vehicle-based task processing method applicable to electronic devices provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not fully described in the embodiments of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.

[0129] An embodiment of the present disclosure also provides an electronic device, including: a processor and a memory; the processor calls the program or instructions stored in the memory to execute the steps of each embodiment of the vehicle-based task processing method as described in any of the aforementioned embodiments. To avoid repeated description, they will not be repeated here.

[0130] The embodiments of the present disclosure also provide a computer-readable storage medium, which is non-transitory and stores programs or instructions. The programs or instructions enable a computer to execute the steps of each embodiment of the vehicle-based task processing method as described in any of the aforementioned embodiments. To avoid repeated description, they are not repeated here.

[0131] An embodiment of the present disclosure also provides a vehicle, comprising a vehicle-based task processing device as described in any of the foregoing embodiments of the present disclosure, or an electronic device as described in any of the foregoing embodiments of the present disclosure, or a computer-readable storage medium as described in any of the foregoing embodiments of the present disclosure.

[0132] The embodiments of the present disclosure also provide a computer program product, which is used to execute the steps of each embodiment of the vehicle-based task processing method as described in any of the aforementioned embodiments.

[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0134] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A vehicle-based task processing method, characterized in that: The method comprises: Get the target configuration file corresponding to the processing object; According to the target configuration file, using a pre-built shared context object corresponding to the processing object, selecting a target resource from a resource pool corresponding to the processing object; Using the shared context object corresponding to the processing object, generating a task to be processed based on the target resource and adding the task to be processed to a task queue; Execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

2. The method according to claim 1, characterized in that The processing object includes at least one of a data resource, a rendering element, and a display target; The shared context object corresponding to the processing object includes at least one of a data shared context object, a rendering shared context object, and a display shared context object; The resource pool corresponding to the processing object includes at least one of a data resource pool, a rendering element pool, and a display target pool.

3. The method according to claim 2, characterized in that The method further comprises: In case a state signal of a target function is detected, determining a target shared context object corresponding to the state signal of the target function; Distributing the state signal of the target function to the target shared context object, and having the target shared context object generate a to-be-processed task corresponding to the target function based on the state signal of the target function; The target shared context object is used to add the to-be-processed task corresponding to the target function to the task queue.

4. The method according to claim 3, characterized in that The step of determining, when a state signal of a target function is detected, a target shared context object corresponding to the state signal of the target function includes: When a state signal of a target function is detected, a mapping relationship between different state signals of different functions and associated shared context objects is obtained; The mapping relationship is queried according to the state signal of the target function to determine the target shared context object corresponding to the state signal of the target function.

5. The method according to claim 3, characterized in that The step of distributing the state signal of the target function to the target shared context object, and generating, by the target shared context object, a to-be-processed task corresponding to the target function based on the state signal of the target function, includes: detecting whether a data sharing context object exists in the target sharing context object; If the data sharing context object exists, determining whether the data resource associated with the target function has been loaded through the data sharing context object; If loaded, the status signal of the target function is distributed to other shared context objects in the target shared context object except the data shared context object, and the other shared context objects generate to-be-processed tasks corresponding to the target function based on the status signal of the target function.

6. The method according to claim 3, characterized in that The method further comprises: Obtaining a task execution record of a pending task corresponding to the target function; Acquire a target processing object in the task execution record and a resource type of a target processing resource associated with the target processing object; Based on the target processing objects and resource types of target processing resources associated with the target processing objects, configuration files of the target processing objects corresponding to different status signals of the target functions are generated.

7. The method according to any one of claims 1 to 6, characterized in that The executing the tasks to be processed according to the time sequence of the tasks to be processed in the task queue includes: Obtaining the current pending task according to the time sequence of the pending tasks in the task queue; Determine, based on the task operation type of the currently pending task, whether the currently pending task has an upstream dependent task; If there is an upstream dependent task, check whether the upstream dependent task is completed; If the upstream dependent task has been completed, the current pending task is executed.

8. The method according to claim 7, characterized in that After detecting whether the upstream dependent task is completed, the method further includes: If the upstream dependent task is not completed, suspend the current pending task; According to the time sequence of the tasks to be processed in the task queue, the next task to be processed is obtained as a new current task to be processed and the step of determining whether the new current task to be processed has an upstream dependent task and subsequent steps are performed; When it is detected that the upstream dependent task is completed, the current pending task is executed.

9. A vehicle-based task processing device, characterized in that: include: The file acquisition module is used to obtain the target configuration file corresponding to the processing object; a resource selection module, configured to select a target resource from a resource pool corresponding to the processing object using a pre-built shared context object corresponding to the processing object according to the target configuration file; A task generation module, configured to generate a to-be-processed task based on the target resource by using the shared context object corresponding to the processing object and add the to-be-processed task to a task queue; The task execution module is used to execute the tasks to be processed according to the time sequence of the tasks to be processed in the task queue.

10. An electronic device, characterized in that: include: processor and memory; The processor is configured to execute the vehicle-based task processing method according to any one of claims 1 to 8 by calling the program or instruction stored in the memory.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, which enables a computer to execute the vehicle-based task processing method according to any one of claims 1 to 8.

12. A vehicle, characterized in that: The method comprises the vehicle-based task processing device according to claim 9 , the electronic device according to claim 10 , or the computer-readable storage medium according to claim 11 .