Camera identification allocation method, device, storage medium, vehicle controller and vehicle

By establishing preset identification mapping relationship information between the on-board imaging system and the camera hardware abstraction layer, the problem of inconsistent identification of cameras of different models is solved, and the consistency of identification and simplified calling process of the application are achieved.

CN118972703BActive Publication Date: 2025-03-11BOSCH AUTOMOTIVE PRODUCTS (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411406495.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-03-11
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

Due to the differences in types and quantity of on-board cameras of different models, the camera logo assigned by the camera hardware abstraction layer is inconsistent, and the application cannot directly determine the type of camera, resulting in a complicated call process.

Method used

By establishing preset identification mapping relationship information between the on-board imaging system and the camera hardware abstraction layer, the identification of the target camera at the camera hardware abstraction layer is determined so that it is consistent with the identification of the on-board imaging system.

Benefits of technology

The consistency of camera logos assigned by the hardware abstraction layer of different models of cameras is achieved, allowing applications to directly determine the camera type based on the logo, simplifying the camera call process and reducing development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972703B_ABST
    Figure CN118972703B_ABST
Patent Text Reader

Abstract

The present invention proposes a camera identification allocation method, device, storage medium, vehicle controller and vehicle. According to the camera identification allocation method proposed by the present invention, when the on-board imaging system at the vehicle allocates a first identification to the target camera required to be carried by the vehicle, the camera hardware abstraction layer in the Android system carried by the vehicle can use the preset identification mapping relationship information as the second identification of the target camera at the camera hardware abstraction layer. The camera hardware abstraction layer of each vehicle model can simply and conveniently use the preset identification mapping relationship information to make the types of cameras identified by the same camera identification allocated by it consistent, so that the application programs carried by each vehicle model can directly determine the type of the corresponding camera according to the camera identification at the camera hardware abstraction layer, which is conducive to simplifying the camera calling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle-mounted camera control, and in particular to a camera identification allocation method, device, storage medium, vehicle controller and vehicle. Background Art

[0002] With the continuous development of image processing technology, people have begun to install cameras in vehicles to collect images of the inside and outside environment of the vehicle. By analyzing and processing the images of the inside and outside environment of the vehicle, functions such as driving records, assisted driving, and safety monitoring are realized, thereby improving the safety and convenience of the user's driving process. At present, vehicles usually deploy the Automotive Imaging System (AIS) framework in the QNX system and the Camera Hardware Abstraction Layer (HAL) framework in the Android system. Under this architecture, the HAL framework can share the camera driver of the AIS framework.

[0003] However, although the identification information assigned to each type of camera by the AIS framework in different car models can be kept consistent according to the configuration file, the HAL framework will dynamically assign identification information to each camera starting from 0 in an enumerated manner. Therefore, when the types and quantities of cameras installed in different car models differ, the types of cameras identified by the same camera identification in the HAL framework of different car models are often inconsistent, making it impossible for the application to directly determine the specific type of the camera identified by the camera identification in the HAL framework, thus causing trouble for the camera calling process.

[0004] Based on this, how to simply and conveniently enable the application to directly determine the type of the target camera based on the identification information assigned to the target camera by the camera hardware abstraction layer has become an urgent problem to be solved. Summary of the invention

[0005] Based on this, the present invention provides a camera identification allocation method, device, storage medium, vehicle controller and vehicle. By adopting the camera identification allocation method, the identification information allocated by the camera hardware abstraction layer of various vehicle models for the same type of camera can be simply and conveniently made consistent, so that the application can directly determine the type of the target camera according to the identification information allocated to the target camera by the camera hardware abstraction layer. This is not only conducive to simplifying the camera calling process, but also can reduce the development and maintenance costs for the application, and has good practicality.

[0006] In one aspect, the present invention provides a camera identification allocation method, the method comprising:

[0007] Utilizing the camera hardware abstraction layer in the Android system carried by the vehicle, the target camera information at the vehicle is obtained from the vehicle imaging system; the target camera information includes: a first identifier of the target camera required to be carried by the vehicle at the vehicle imaging system;

[0008] Acquire preset identification mapping relationship information; the preset identification mapping relationship information is used to reflect the preset correspondence between the first preset identification of each preset type of camera at the vehicle imaging system and the second preset identification at the camera hardware abstraction layer;

[0009] According to the target camera information and the preset identifier mapping relationship information, determine the second identifier of the target camera at the camera hardware abstraction layer; the second identifier is the second preset identifier in the preset identifier mapping relationship information that has the preset corresponding relationship with the first identifier.

[0010] Further, in some implementations, the use of a camera hardware abstraction layer in an Android system mounted on a vehicle to obtain target camera information at the vehicle from an onboard imaging system includes:

[0011] Using the camera hardware abstraction layer, calling a preset query interface at the vehicle-mounted imaging system, and obtaining target camera information at the vehicle; the target camera information also includes: first operating state information of the target camera currently determined by the vehicle-mounted imaging system;

[0012] After determining the second identifier of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identifier mapping relationship information, the method further includes:

[0013] According to the current first operating status information of the target camera, a preset association relationship between the second identifier of the target camera and the second operating status information reflecting whether the camera is available is established at the camera hardware abstraction layer.

[0014] Further, in some embodiments, the establishing, at the camera hardware abstraction layer, a preset association relationship between the second identifier of the target camera and the second operating status information for reflecting whether the camera is available according to the current first operating status information of the target camera includes:

[0015] According to the current first operating status information of the target camera, the second identifier of the target camera and the second operating status information reflecting whether the camera is available are associated and stored in the camera information structure of the interface layer at the camera hardware abstraction layer.

[0016] Further, in some implementations, according to the first operating state information of the target camera currently being located, in the camera information structure of the interface layer at the camera hardware abstraction layer, the second identifier of the target camera and the second operating state information used to reflect whether the camera is available are stored in association, including:

[0017] If the first operating status information is information reflecting whether a camera is available, setting the first operating status information as a variable value of a preset variable corresponding to the second identifier of the target camera in the camera information structure;

[0018] If the first operating state information is information used to reflect the initial state of the camera, then according to a preset strategy, based on the first operating state information currently in which the target camera is located, second operating state information of the target camera used to reflect whether the camera is available is determined;

[0019] The second operating status information is set as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure.

[0020] Further, in some implementations, determining the second operating state information of the target camera for reflecting whether the camera is available according to the first operating state information currently in the target camera according to the preset strategy includes:

[0021] If the first operating status information reflects that the target camera is in an unplugged state or an initialization failure state, information reflecting that the camera is unavailable is determined as the second operating status information of the target camera;

[0022] If the first operating status information reflects that the target camera is in a normal operating state, the information used to reflect the availability of the camera is determined as the second operating status information of the target camera.

[0023] Furthermore, in some embodiments, the above method further comprises:

[0024] Using the interface layer at the camera hardware abstraction layer, the total number of preset camera identifiers at the camera hardware abstraction layer is obtained; the total number of preset camera identifiers is the sum of a preset maximum value of the camera identifiers at the camera hardware abstraction layer and 1, and the camera identifiers at the camera hardware abstraction layer include integers in the range from 0 to the preset maximum value;

[0025] In the camera information structure of the interface layer at the camera hardware abstraction layer, other camera identifiers except the second identifier of the target camera at the camera hardware abstraction layer and second operating status information reflecting that the camera is unavailable are associated and stored.

[0026] Furthermore, in some embodiments, the target camera information further includes: a third identifier of a camera of a specified type that the vehicle does not need to carry at the vehicle imaging system, and third state information of the camera of the specified type currently determined by the vehicle imaging system;

[0027] The camera information structure of the interface layer at the camera hardware abstraction layer is associated with storing other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and second operating status information reflecting that the camera is unavailable, including:

[0028] Determine the second preset identifier in the preset identifier mapping relationship information that has the preset corresponding relationship with the third identifier as the fourth identifier of the camera of the specified type at the camera hardware abstraction layer;

[0029] According to the third state information of the specified type of camera currently in, in the camera information structure of the interface layer at the camera hardware abstraction layer, the fourth identifier of the specified type of camera and the second operating state information reflecting that the camera is unavailable are associated and stored.

[0030] Further, in some implementations, the camera information structure of the interface layer at the camera hardware abstraction layer stores other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and the second operating status information reflecting that the camera is unavailable, and further includes:

[0031] According to a preset maximum value of the camera identifier at the camera hardware abstraction layer, determine the camera identifiers at the camera hardware abstraction layer other than the second identifier of the target camera and the fourth identifier of the camera of the specified type, and obtain a fifth identifier of the virtual camera at the camera hardware abstraction layer;

[0032] In the camera information structure of the interface layer at the camera hardware abstraction layer, the fifth identifier of the virtual camera and the second operating status information reflecting that the camera is unavailable are stored in association.

[0033] Furthermore, in some embodiments, the above method further comprises:

[0034] An available camera identification record table is generated based on the data in the camera information structure; the available camera identification record table contains the second identification of the target camera stored in association with the second operating status information used to reflect the availability of the camera; the application at the vehicle is used to determine the available cameras at the vehicle based on the available camera identification record table.

[0035] Furthermore, in some implementations, generating an available camera identification record table according to the data in the camera information structure includes:

[0036] Using the preset variable in the camera information structure for recording the second running status information, the target array in the interface layer at the camera hardware abstraction layer for recording the camera running status information is updated to obtain an updated target array;

[0037] Data screening processing is performed on the updated target array to obtain the available camera identification record table.

[0038] On the other hand, the present invention also provides a camera identification allocation device, comprising:

[0039] A first acquisition module is used to obtain target camera information of the vehicle from the vehicle-mounted imaging system by using the camera hardware abstraction layer in the Android system carried by the vehicle; the target camera information includes: a first identifier of the target camera required to be carried by the vehicle in the vehicle-mounted imaging system;

[0040] A second acquisition module is used to acquire preset identification mapping relationship information; the preset identification mapping relationship information is used to reflect the preset correspondence between the first preset identification of each preset type of camera at the vehicle imaging system and the second preset identification at the camera hardware abstraction layer;

[0041] An identification determination module is used to determine the second identification of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identification mapping relationship information; the second identification is the second preset identification in the preset identification mapping relationship information that has the preset corresponding relationship with the first identification.

[0042] On the other hand, the present invention further provides a storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the steps of the above method.

[0043] On the other hand, the present invention further provides a vehicle controller, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the above method.

[0044] On the other hand, the present invention further provides a vehicle, comprising the above-mentioned camera identification allocation device or vehicle controller.

[0045] According to the camera identifier allocation method provided by the present invention, preset identifier mapping relationship information can be pre-generated to reflect the preset correspondence between the first preset identifier of each preset type of camera at the on-board imaging system and the second preset identifier at the camera hardware abstraction layer. After the on-board imaging system at the vehicle allocates the first identifier to the target camera required to be carried by the vehicle, the camera hardware abstraction layer in the Android system carried by the vehicle can use the second preset identifier having a preset correspondence with the first identifier of the target camera as the second identifier of the target camera at the camera hardware abstraction layer according to the preset identifier mapping relationship information, so that the camera hardware abstraction layer of each vehicle model can simply and conveniently use the preset identifier mapping relationship information to make the types of cameras identified by the same camera identifier allocated by it consistent, so that the application programs carried by each vehicle model can directly determine the type of the corresponding camera according to the camera identifier at the camera hardware abstraction layer, which is conducive to simplifying the camera calling process.

[0046] In addition, during the development and maintenance process of each application that needs to call a camera, it is only necessary to set the camera identifier at the camera hardware abstraction layer that needs to be called in the program code of the application according to the preset identifier mapping relationship information. This allows each application to directly call the required camera according to the camera identifier at the camera hardware abstraction layer, which is also beneficial in reducing the communication costs between the participants, as well as the program development costs and program maintenance costs, and is very practical.

[0047] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of a flow chart of a camera identification allocation method provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of the structure of a camera identification allocation device provided by an embodiment of the present invention;

[0050] Figure 3 A schematic structural diagram of a vehicle controller provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0052] In the description of one or more embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0053] At present, the QNX system can usually include an automotive imaging system (AIS) designed specifically for the cockpit camera function. During the operation of the vehicle, the AIS system can assign a fixed and unique camera ID to each preset type of camera according to the configuration file. For example, assume that the configuration file is used to indicate that the camera IDs to be assigned to the cabin occupant monitoring system (OMS) camera, the front side camera, the rear side camera, and the panoramic camera are: AIS Camera ID 0, AIS Camera ID 1, AIS Camera ID 2, and AIS Camera ID 3. If the vehicle only needs to be equipped with the OMS camera and the rear side camera, the camera IDs assigned to the two cameras by the AIS system can be AIS Camera ID 0 and AIS Camera ID 2, respectively. If the vehicle needs to be equipped with the front side camera, the rear side camera, and the panoramic camera, the camera IDs assigned to the three cameras by the AIS system can be: AIS Camera ID 1, AIS Camera ID 2, and AIS Camera ID 3, respectively.

[0054] During vehicle operation, the Camera Hardware Abstraction Layer (HAL) in the Android system usually dynamically assigns camera IDs to each camera starting from 0 in an enumerated manner. For example, when the vehicle only needs to be equipped with an OMS camera and a rear camera, the camera IDs assigned to these two cameras by the HAL layer can be HAL Camera ID 0 and HAL Camera ID 1, respectively. When the vehicle needs to be equipped with a front camera, a rear camera, and a panoramic camera, the camera IDs assigned to these three cameras by the HAL layer can be: HAL Camera ID 0, HAL Camera ID 1, and HAL Camera ID 2, respectively.

[0055] From the above content, it can be seen that when there are differences in the types and quantities of cameras required to be installed in different car models, the types of cameras corresponding to the same camera identification HAL Camera ID assigned by the HAL layer at different car models are often inconsistent, so that the Android application cannot directly determine the specific type of the camera identified by it according to the HAL Camera ID assigned by the HAL layer. As a result, before turning on the camera, the Android application needs to identify the current model of the vehicle according to the vehicle configuration word, and then infer the HALCamera ID corresponding to different types of cameras according to the vehicle model, so as to call the required camera according to the inference result. Alternatively, the Metadata parameters corresponding to the HAL CameraID can be used in advance to record the type of camera identified by it, so that the Android application can pre-query the Metadata parameters of each HAL Camera ID before turning on the camera to identify whether it belongs to the camera it needs to use. This makes the camera calling process more complicated, which brings trouble to the camera calling process.

[0056] In addition, in order to deal with the situation that the same camera ID HAL Camera ID at the HAL layer of different models corresponds to different camera types, when developing and maintaining applications that need to call the camera at the vehicle, it is often necessary for the staff of the automobile manufacturer, service provider and other participants to communicate and collaborate, which makes the manual communication cost high. And when a new model is added or when the camera type of an existing model is changed, the cost of developing and maintaining applications that need to call the camera at the vehicle is also high.

[0057] Based on this, how to simply and conveniently make the identification information assigned by the camera hardware abstraction layer of various car models to the same type of camera consistent, so that the application can directly determine the type of the target camera based on the identification information assigned to the target camera by the camera hardware abstraction layer, has become an urgent problem that needs to be solved.

[0058] See also Figure 1 , which is a flow chart of a camera identification allocation method provided by an embodiment of the present invention. From a program perspective, the execution subject of the process can be an application of the camera hardware abstraction layer in the Android system of the vehicle. Alternatively, the execution subject of the process can also be a vehicle control device or a vehicle equipped with an application of the camera hardware abstraction layer in the Android system, which is not specifically limited.

[0059] The following is for Figure 1 The process shown is described in detail, and the camera identification allocation method may specifically include the following steps:

[0060] Step S102, using the camera hardware abstraction layer in the Android system installed in the vehicle, obtain the target camera information of the vehicle from the vehicle-mounted imaging system; the target camera information includes: the first identifier of the target camera required to be installed by the vehicle in the vehicle-mounted imaging system.

[0061] In the embodiment of the present invention, the vehicle may be equipped with the Camera Hardware Abstraction Layer (HAL) in the Android system and the Automotive Imaging System (AIS) in the QNX system. Usually, the AIS system may first assign a first identifier (i.e., AIS Camera ID) to the target camera that the vehicle needs to carry, and then the HAL layer may assign a second identifier (i.e., HAL Camera ID) to the target camera based on the assigned AIS Camera ID. Based on this, the HAL layer performs Figure 1 When using the camera identification allocation scheme in the embodiment, the target camera information including the first identification of the target camera required to be carried by the vehicle at the AIS system can be first obtained from the AIS system.

[0062] In the embodiment of the present invention, the target camera required to be installed on the vehicle may refer to various types of cameras that the vehicle should be equipped with theoretically at present. In practical applications, the vehicle configuration word of the vehicle may be read by the vehicle-mounted imaging system to determine the type of target camera required to be installed on the vehicle. In practical applications, the type of the target camera may be set according to actual needs, and the types of target cameras at different vehicle models may be consistent or inconsistent, and no specific limitation is made to this.

[0063] Step S104, obtaining preset identification mapping relationship information; the preset identification mapping relationship information is used to reflect the preset corresponding relationship between the first preset identification of each preset type of camera at the vehicle-mounted imaging system and the second preset identification at the camera hardware abstraction layer.

[0064] In an embodiment of the present invention, the types of cameras required to be installed in multiple vehicle models can be sorted out in advance, and all types of cameras included in the multiple vehicle models can be used as preset types of cameras. Based on this, a preset correspondence between a first preset identifier of each preset type of camera at the AIS system and a second preset identifier at the HAL layer is set to obtain preset identifier mapping relationship information.

[0065] In practical applications, any first preset identifier at the AIS system can establish a preset correspondence with a second preset identifier at the HAL layer. Alternatively, any first preset identifier at the AIS system can also establish a preset correspondence with multiple second preset identifiers at the HAL layer, so that the multiple second preset identifiers at the HAL layer can be allocated to different applications for use, so that multiple applications can simultaneously call the data at the same camera at the vehicle, which is flexible.

[0066] In practical applications, the preset identification mapping relationship information can be stored in advance in the implementation layer at the HAL layer, or can also be stored in other systems or vehicle controllers at the vehicle, so that the HAL layer can obtain the preset identification mapping relationship information. In addition, the target camera mentioned in step S102 usually belongs to the above-mentioned preset type of camera, so that the second identification of the target camera at the HAL layer can be set based on the preset identification mapping relationship information.

[0067] Step S106, determining the second identifier of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identifier mapping relationship information; the second identifier is the second preset identifier in the preset identifier mapping relationship information that has the preset corresponding relationship with the first identifier.

[0068] In the embodiment of the present invention, the second preset identifier (HAL Camera ID) having a preset corresponding relationship with the first identifier (AIS Camera ID) of the target camera at the AIS system in the preset identifier mapping relationship information can be used as the second identifier (HAL Camera ID) of the target camera at the HAL layer. In addition, it is also possible to prohibit other camera identifiers at the HAL layer from being used as the second identifier of the target camera at the HAL layer to ensure the correct and stable operation of the solution.

[0069] Figure 1 In the method, since the AIS system at each vehicle model can conveniently assign the same AIS Camera ID to the same type of camera according to the same configuration file, and the HAL layer at each vehicle model can assign a consistent HAL Camera ID to the same AIS Camera ID according to the same preset identification mapping relationship information, the types of cameras identified by the same HAL Camera ID at different vehicle models can be consistent, so that the Android application at each vehicle model can directly determine the type of the camera identified by the HAL Camera ID, without the need for the application to infer and identify the camera it needs to call according to the vehicle model configuration word or the Metadata parameter corresponding to the HAL Camera ID, which is conducive to simplifying the camera calling process.

[0070] In addition, when a new model is added or the type of camera included in an existing model changes, it is only necessary to set the camera identifier at the camera hardware abstraction layer that needs to be called in the program code of the application according to the preset identifier mapping relationship information. This allows each application to directly call the required camera according to the camera identifier at the camera hardware abstraction layer, which is beneficial for reducing the communication costs between the participants, as well as the program development costs and program maintenance costs, and is very practical.

[0071] At present, after assigning the HAL Camera ID of each camera, the camera hardware abstraction layer in the Android system usually sets the camera operation status information corresponding to each HAL Camera ID to the available state (PRESENT state) by default. However, since some target cameras at the vehicle may be unavailable due to initialization failure, poor line connection, etc., the camera operation status information corresponding to each HAL Camera ID can also be set according to the actual situation, which is conducive to improving the convenience and reliability of subsequent applications calling cameras based on HAL Camera ID.

[0072] Based on this, in a feasible implementation manner, the use of the camera hardware abstraction layer in the Android system carried by the vehicle to obtain the target camera information of the vehicle from the vehicle imaging system may include:

[0073] The camera hardware abstraction layer is used to call a preset query interface at the vehicle-mounted imaging system to obtain target camera information at the vehicle; the target camera information also includes: first operating state information of the target camera currently determined by the vehicle-mounted imaging system.

[0074] Correspondingly, after determining the second identifier of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identifier mapping relationship information, the method may further include:

[0075] According to the current first operating status information of the target camera, a preset association relationship between the second identifier of the target camera and the second operating status information reflecting whether the camera is available is established at the camera hardware abstraction layer.

[0076] In an embodiment of the present invention, the vehicle-mounted imaging system can usually determine whether the vehicle needs to be equipped with various preset types of cameras based on the vehicle configuration characters. If a certain type of camera is required, this type of camera can be further used as a target camera and its current specific operating status can be identified to obtain accurate and reliable first operating status information of the target camera.

[0077] The implementation layer (Implementation Layer) at the camera hardware abstraction layer can obtain the first operating status information of the target camera by calling the preset query interface at the vehicle-mounted imaging system, and determine and store the second operating status information corresponding to the target camera for reflecting whether the camera is available based on the first operating status information of the target camera.

[0078] Subsequently, when the interface layer (Interface Layer) at the camera hardware abstraction layer allocates and registers the second identifier (HAL Camera ID) of each target camera, it can also establish a preset association relationship between the second identifier of the target camera and the corresponding second operating status information, so as to accurately and conveniently determine whether the target camera corresponding to the second identifier is available based on the preset association relationship.

[0079] In a feasible implementation manner, establishing, at the camera hardware abstraction layer, a preset association relationship between the second identifier of the target camera and the second operating status information for reflecting whether the camera is available according to the current first operating status information of the target camera may include:

[0080] According to the current first operating status information of the target camera, the second identifier of the target camera and the second operating status information reflecting whether the camera is available are associated and stored in the camera information structure of the interface layer at the camera hardware abstraction layer.

[0081] In the embodiment of the present invention, the info structure may be a structured data type for storing specific information, and is usually used to organize and store related data fields in a program. The info structure is a user-defined data type that allows different data types to be combined into a single composite type, which is convenient to use and flexible.

[0082] The interface layer at the camera hardware abstraction layer can create a camera information structure (for example, a camera_info structure), and make it include at least a target field for storing a camera identifier (HAL Camera ID) and a preset field for storing the second operating status information. Therefore, when a camera identifier (HAL Camera ID) is assigned to a target camera, the second identifier of the target camera and the second operating status information reflecting whether the camera is available can be stored in the target field and the preset field in the same camera information structure (i.e., the camera_info structure), thereby establishing a preset association relationship between the two, which is convenient and quick.

[0083] In a feasible implementation manner, according to the first operating state information of the target camera currently being located, in the camera information structure of the interface layer at the camera hardware abstraction layer, the second identifier of the target camera and the second operating state information used to reflect whether the camera is available are stored in association, which may include:

[0084] If the first operating status information is information reflecting whether the camera is available, the first operating status information is set as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure.

[0085] If the first operating status information is information used to reflect the initial status of the camera, then according to a preset strategy, based on the first operating status information currently in which the target camera is located, the second operating status information of the target camera used to reflect whether the camera is available is determined.

[0086] The second operating status information is set as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure.

[0087] In the embodiment of the present invention, the AIS system can directly generate information reflecting whether the camera is available according to the actual operation status of the target camera as the first operation status information of the target camera. At this time, the first operation status information obtained by the implementation layer of the HAL layer is consistent with the second operation status information in the preset field in the camera information structure (i.e., the camera_info structure) that it needs to store. Therefore, the implementation layer of the HAL layer can directly store the first operation status of the target camera, so that the interface layer of the HAL layer can set the first operation status of the target camera stored at the implementation layer to the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure, which is convenient and quick.

[0088] Of course, the first operating status information generated by the AIS system can also reflect the initial state of the target camera (for example, normal working state, unplugged state, initialization failure state, etc.), but cannot directly indicate whether the camera is available. At this time, after the implementation layer of the HAL layer obtains the first operating status information of the target camera, it can further generate and store the second operating status information that can reflect whether the camera is available based on the first operating status information of the target camera according to the preset strategy. So that the interface layer of the HAL layer can set the second operating status information of the target camera stored at the implementation layer as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure, which has good flexibility.

[0089] In a feasible implementation manner, determining the second operating state information of the target camera for reflecting whether the camera is available according to the first operating state information currently in the target camera according to the preset strategy may include:

[0090] If the first operating status information reflects that the target camera is in an unplugged state or an initialization failure state, the information reflecting that the camera is unavailable is determined as the second operating status information of the target camera.

[0091] If the first operating status information reflects that the target camera is in a normal operating state, the information used to reflect the availability of the camera is determined as the second operating status information of the target camera.

[0092] In an embodiment of the present invention, there may be multiple first operating status information of the target camera required to be carried by the vehicle. For example, when the first operating status information reflects that the target camera is in an unplugged state, it may indicate that the target camera has failed to establish a connection with the vehicle through a wire, a hardware interface, etc. Therefore, the second operating status information of the target camera may be set to reflect that the camera is unavailable. When the first operating status information reflects that the target camera is in an initialization failure state, it may indicate that the target camera has established a connection with the vehicle through a line, a hardware interface, etc., but has failed to successfully complete the initialization process, and thus may not be able to drive the target camera to work normally. Therefore, the second operating status information of the target camera may be set to reflect that the camera is unavailable. If the first operating status information reflects that the target camera is in a normal operating state, the second operating status information of the target camera may be set to reflect that the camera is available.

[0093] It is understandable that the first operating status information of the target camera may also include other types of information, and the preset strategy may be configured according to actual conditions so that the generated second operating status information of the target camera can meet actual conditions and requirements, and no specific limitation is made to this.

[0094] At present, since the HAL layer will dynamically assign identification information to each camera starting from 0 in an enumerated manner, the total number of camera identifications that the HAL layer needs to assign can be preset as the total number of preset camera identifications, and the total number of preset camera identifications can be the sum of the preset maximum value of the camera identification (HAL Camera ID) at the HAL layer and 1. On this basis, in addition to assigning a second identification to the target camera, the HAL layer also needs to assign the remaining camera identifications within the range of 0 to the preset maximum value of the HAL Camera ID to other cameras that are in an unavailable state to meet actual needs.

[0095] Based on this, Figure 1 The method may further include:

[0096] Utilizing the interface layer at the camera hardware abstraction layer, the total number of preset camera identifiers at the camera hardware abstraction layer is obtained; the total number of preset camera identifiers is the sum of a preset maximum value of the camera identifier at the camera hardware abstraction layer and 1, and the camera identifier at the camera hardware abstraction layer includes integers in the range from 0 to the preset maximum value.

[0097] Based on the total number of preset camera identifiers, in the camera information structure of the interface layer at the camera hardware abstraction layer, other camera identifiers except the second identifier of the target camera at the camera hardware abstraction layer and the second operating status information reflecting that the camera is unavailable are associated and stored.

[0098] In an embodiment of the present invention, the total number of preset camera identifiers at the camera hardware abstraction layer will usually be greater than or equal to the number of second preset identifiers at the camera hardware abstraction layer recorded in the preset identifier mapping relationship information, so that several HAL Camera IDs that have not established a preset correspondence with the AIS Camera ID can be reserved. When each vehicle model has a new type of camera, or a new application that needs to call a certain camera, it is convenient to establish a preset correspondence between these reserved HAL Camera IDs and the AIS Camera ID of the new type of camera, or to establish a preset correspondence between these reserved HAL Camera IDs and the AISCamera ID of the camera that needs to be called by the new type of application, thereby meeting actual needs, having good flexibility and scalability, and low implementation cost.

[0099] In actual applications, the total number of preset camera identifiers at the camera hardware abstraction layer can be stored in the vehicle-mounted imaging system, or in the interface layer or implementation layer of the camera hardware abstraction layer. Of course, it can also be stored in other systems or vehicle controllers in the vehicle, and there is no specific limitation on this.

[0100] In an embodiment of the present invention, the HAL Camera IDs within the range of [0, preset maximum value of HAL Camera ID] can be roughly divided into three types; the first type may be the second identifier assigned to the target camera; the second type may refer to the HAL Camera ID that needs to be assigned to a specified type of camera that the vehicle does not currently need to carry, that is, the second preset identifier in the preset identifier mapping relationship information except the above-mentioned second identifier; the third type may refer to the HALCamera ID that needs to be assigned to the virtual camera, that is, the HALCamera ID that has not established a preset corresponding relationship with the first preset identifier in the preset identifier mapping relationship information.

[0101] Since the vehicle currently does not actually install the cameras corresponding to the second and third HAL Camera IDs, the second status information corresponding to the second and third HAL Camera IDs are usually used to reflect that the camera is unavailable. In addition, since the second and third HAL Camera IDs are other camera identifiers at the HAL layer except the second identifier of the target camera, the interface layer at the HAL layer can also associate and store the second and third HAL Camera IDs and the second operating status information reflecting the unavailability of the camera in the camera information structure (i.e., the camera_info structure), which is conducive to ensuring the normal operation of the solution.

[0102] In a feasible implementation, the target camera information may also include: a third identifier of a camera of a specified type that the vehicle does not need to carry at the on-board imaging system, and third state information of the camera of the specified type determined by the on-board imaging system.

[0103] Correspondingly, in the camera information structure of the interface layer at the camera hardware abstraction layer, other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and the second operating status information reflecting that the camera is unavailable are associated and stored, which may include:

[0104] The second preset identifier in the preset identifier mapping relationship information, which has the preset corresponding relationship with the third identifier, is determined as the fourth identifier of the camera of the specified type at the camera hardware abstraction layer.

[0105] According to the third state information of the specified type of camera currently in, in the camera information structure of the interface layer at the camera hardware abstraction layer, the fourth identifier of the specified type of camera and the second operating state information reflecting that the camera is unavailable are associated and stored.

[0106] In the embodiment of the present invention, the AIS system can determine the camera operation status information corresponding to each first preset identifier (AIS Camera ID) in the preset identifier mapping relationship information, which can specifically include: the first operation status information of the target camera required to be carried by the vehicle, and the third operation status information of the specified type of camera that the vehicle does not need to carry, and all of them are fed back to the implementation layer at the HAL layer. Among them, the third operation status information can indicate that the specified type of camera is in a state where the vehicle does not need to carry it, or it can directly indicate that the camera is in an unavailable state, and there is no specific limitation on this.

[0107] In actual applications, after the interface layer of the HAL layer obtains the third identifier (AIS Camera ID) of the specified type of camera at the AIS system, on the one hand, it can determine the fourth identifier (HAL Camera ID) of the specified type of camera at the HAL layer according to the preset identifier mapping relationship information; on the other hand, it can also set the second operating status information indicating that the camera is unavailable as the field value of the preset field corresponding to the fourth identifier in the camera information structure (i.e., the camera_info structure) according to the third status information, thereby completing the allocation and registration of the fourth identifier, which is convenient and quick.

[0108] In a feasible implementation manner, in the camera information structure of the interface layer at the camera hardware abstraction layer, other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and the second operating status information reflecting that the camera is unavailable are associated and stored, and may also include:

[0109] According to the preset maximum value of the camera identifier at the camera hardware abstraction layer, the camera identifiers other than the second identifier of the target camera and the fourth identifier of the specified type of camera at the camera hardware abstraction layer are determined to obtain the fifth identifier of the virtual camera at the camera hardware abstraction layer.

[0110] In the camera information structure of the interface layer at the camera hardware abstraction layer, the fifth identifier of the virtual camera and the second operating status information reflecting that the camera is unavailable are stored in association.

[0111] In an embodiment of the present invention, the fifth identifier of the virtual camera at the HAL layer is usually within the range of [0, the preset maximum value of the HAL Camera ID], and is a HAL Camera ID that has not yet established a preset corresponding relationship with the first preset identifier (AIS CameraID) in the preset identifier mapping relationship information. Therefore, the fifth identifier does not correspond to the preset type of camera that each vehicle model may actually be equipped with, but corresponds to an unusable virtual camera, so the second status information corresponding to the fifth identifier must indicate that the camera is unavailable. Based on this, the interface layer of the HAL layer can be used to set the second operating status information used to indicate that the camera is unavailable as the field value of the preset field corresponding to the fifth identifier in the camera information structure (i.e., the camera_info structure), thereby completing the allocation and registration of the fifth identifier, which is convenient and quick.

[0112] To facilitate understanding of the HAL Camera ID allocation and registration principles, an example is given here.

[0113] Assume that AIS Camera ID 0-AIS Camera ID 3 represent: in-cabin occupant monitoring camera, front camera, rear camera and panoramic camera respectively. And, the target cameras required to be installed at the vehicle are the front camera, rear camera and panoramic camera. Among them, the front camera and panoramic camera at the vehicle can be in normal working state, while the rear camera can be in an unplugged state or an initialization failure state. When the preset identification mapping relationship information is as shown in the camera related information table below, the AIS Camera ID assigned and registered by the AIS system at the vehicle, the HAL Camera ID assigned and registered by the HAL layer, and the second operating status information corresponding to each HAL Camera ID are also as shown in the camera related information table below.

[0114] Camera related information table

[0115]

[0116] Specifically, since the vehicle currently does not need to be equipped with an in-cabin occupant monitoring camera, but needs to be equipped with a front camera, a rear camera and a panoramic camera, the AIS Camera ID assigned and registered by the AIS system may not include AISCamera ID 0, but should include AIS Camera ID 1-3.

[0117] When the HAL layer allocates and registers the HAL Camera ID, it can first use the implementation layer to obtain the target camera information containing each AIS Camera ID and the corresponding camera operation status information from the AIS system; then, the interface layer is used to determine the total number of preset camera identifiers at the HAL layer (for example, it can be 8, in which case the preset maximum value of the HAL Camera ID is 7), and obtain the preset identifier mapping relationship information. Thus, the interface layer can allocate and register HAL Camera ID 0-HAL Camera ID 7 by executing the FOR loop statement.

[0118] Specifically, when allocating and registering HAL Camera ID 0, the interface layer of the HAL layer can determine, based on the target camera information and the preset identifier mapping relationship information, that HAL Camera ID 0 needs to be allocated to an in-cabin occupant monitoring camera that is not currently needed on the vehicle. Therefore, the second operating status information corresponding to HAL Camera ID 0 in the camera information structure can be set to information indicating that the camera is unavailable.

[0119] When allocating and registering HAL Camera ID 1, the interface layer of the HAL layer can determine that HAL Camera ID 1 needs to be allocated to the virtual camera at the vehicle. Therefore, the second operating status information corresponding to HAL Camera ID 1 in the camera information structure can be set to information indicating that the camera is unavailable.

[0120] When allocating and registering HAL Camera ID 2, the interface layer of the HAL layer can determine that HAL Camera ID2 needs to be allocated to the front camera at the vehicle; and because the front camera is currently in normal working state, the second operating status information corresponding to HAL Camera ID 2 in the camera information structure can be set to information indicating that the camera is available.

[0121] When allocating and registering HAL Camera ID 3, the interface layer of the HAL layer can determine that HAL Camera ID3 needs to be allocated to the virtual camera at the vehicle. Therefore, the second operating status information corresponding to HAL Camera ID 3 in the camera information structure can be set to information indicating that the camera is unavailable.

[0122] When allocating and registering HAL Camera ID 4, the interface layer of the HAL layer can determine that HAL Camera ID 4 needs to be allocated to the rear camera at the vehicle. And because the rear camera is currently in an unplugged state or an initialization failure state, the second operating state information corresponding to HAL Camera ID 4 in the camera information structure can be set to information indicating that the camera is unavailable.

[0123] When allocating and registering HAL Camera ID 5, the interface layer of the HAL layer can determine that HAL Camera ID5 needs to be allocated to the virtual camera at the vehicle. Therefore, the second operating status information corresponding to HAL Camera ID 5 in the camera information structure can be set to information indicating that the camera is unavailable.

[0124] When the interface layer of the HAL layer sequentially allocates and registers HAL Camera ID 6 and HAL Camera ID 7, it can be determined that HAL Camera ID 6 and HAL Camera ID 7 need to be allocated to the panoramic camera at the vehicle. And because the panoramic camera is currently in a normal working state, the second operating state information corresponding to HAL Camera ID 6 and HAL Camera ID 7 in the camera information structure can be set to information indicating that the camera is available.

[0125] In actual applications, HAL Camera ID 6 and HAL Camera ID 7 can be pre-allocated to different applications for use, so that multiple applications at the vehicle can simultaneously call the data at the panoramic camera, which is conducive to improving the operating efficiency of the application and the flexibility of camera calling.

[0126] In the embodiments of the present specification, since each HAL Camera ID allocated and registered by the HAL layer may correspond to a camera that can be used normally or a camera that cannot be used normally (for example, a virtual camera, a specified type of camera that the vehicle does not need to be equipped with, and a target camera that is not inserted or initialized successfully, etc.), in order to further improve the success rate of camera calls, only the HALCamera ID corresponding to the camera in the available state can be stored in the available camera identification record table, and the application can call the camera that is currently in the available state by accessing the available camera identification record table.

[0127] Based on this, Figure 1 The method may further include:

[0128] An available camera identification record table is generated according to the data in the camera information structure. The available camera identification record table contains the second identification of the target camera stored in association with the second operating state information reflecting that the camera is available; and the application at the vehicle is used to determine the available cameras at the vehicle according to the available camera identification record table.

[0129] For ease of understanding, an example is given for the available camera identification record table. Referring to the above camera related information table, since the second operating state information corresponding to HAL Camera ID 2, HAL Camera ID 6, and HAL Camera ID 7 indicates that the camera is available, the available camera identification record table may include HAL Camera ID 2, HALCamera ID 6, and HAL Camera ID 7, but not other HAL Camera IDs.

[0130] In the embodiments of the present specification, by making the available camera identification record table only include the camera identification of the target camera in the available state at the HAL layer, the Android application at the vehicle can use the available camera identification record table to conveniently and accurately call the available cameras instead of calling the cameras that cannot be opened, which is beneficial to improving the reliability and stability of the camera calling function.

[0131] In a feasible implementation manner, generating an available camera identification record table according to the data in the camera information structure may include:

[0132] The preset variable for recording the second operating status information in the camera information structure is used to update the target array for recording the camera operating status information in the interface layer at the camera hardware abstraction layer to obtain an updated target array.

[0133] Data screening processing is performed on the updated target array to obtain the available camera identification record table.

[0134] Among them, the target array for recording the camera operation status information in the interface layer of the camera hardware abstraction layer can be the mCameraStatusMap[cameraIdStr] array, or it can be other arrays specified according to actual needs, and there is no specific limitation on this.

[0135] See also Figure 2 , is a schematic diagram of the structure of a camera identification allocation device provided by an embodiment of the present invention. Figure 2 As shown, the camera identification allocation device 01 can be implemented as all or part of the vehicle controller through software, hardware or a combination of both. According to some embodiments, the camera identification allocation device 01 may include a first acquisition module 11, a second acquisition module 12, and an identification determination module 13, specifically including:

[0136] The first acquisition module 11 is used to obtain the target camera information of the vehicle from the vehicle-mounted imaging system by utilizing the camera hardware abstraction layer in the Android system installed in the vehicle; the target camera information includes: the first identifier of the target camera required to be installed in the vehicle in the vehicle-mounted imaging system.

[0137] The second acquisition module 12 is used to obtain preset identifier mapping relationship information; the preset identifier mapping relationship information is used to reflect the preset correspondence between the first preset identifier of each preset type of camera at the vehicle-mounted imaging system and the second preset identifier at the camera hardware abstraction layer.

[0138] The identification determination module 13 is used to determine the second identification of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identification mapping relationship information; the second identification is the second preset identification in the preset identification mapping relationship information that has the preset corresponding relationship with the first identification.

[0139] Optionally, the first acquisition module may include:

[0140] An interface calling unit is used to utilize the camera hardware abstraction layer to call a preset query interface at the vehicle-mounted imaging system to obtain target camera information at the vehicle; the target camera information also includes: the first operating state information of the target camera currently determined by the vehicle-mounted imaging system.

[0141] Figure 2 The device may also include:

[0142] A preset association relationship establishment module is used to establish a preset association relationship between the second identifier of the target camera and the second operating status information reflecting whether the camera is available at the camera hardware abstraction layer according to the first operating status information currently in which the target camera is located.

[0143] Optionally, the preset association relationship establishing module may include:

[0144] A first associated storage unit is used to associate and store the second identifier of the target camera and the second operating status information reflecting whether the camera is available in a camera information structure of the interface layer at the camera hardware abstraction layer according to the first operating status information of the target camera.

[0145] Optionally, the first association storage unit may include:

[0146] The first setting subunit is used to set the first running status information to the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure if the first running status information is information reflecting whether the camera is available.

[0147] An operating status determination subunit is used to determine, if the first operating status information is information used to reflect the initial status of the camera, the second operating status information of the target camera used to reflect whether the camera is available according to the preset strategy and based on the first operating status information currently in which the target camera is located.

[0148] The second setting subunit is used to set the second operating status information as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure.

[0149] Optionally, the running status determination subunit may be specifically used for:

[0150] If the first operating status information reflects that the target camera is in an unplugged state or an initialization failure state, the information reflecting that the camera is unavailable is determined as the second operating status information of the target camera.

[0151] If the first operating status information reflects that the target camera is in a normal operating state, the information used to reflect the availability of the camera is determined as the second operating status information of the target camera.

[0152] Optional, Figure 2 The device may also include:

[0153] A total quantity acquisition module is used to use the interface layer at the camera hardware abstraction layer to obtain the total number of preset camera identifiers at the camera hardware abstraction layer; the total number of preset camera identifiers is the sum of a preset maximum value of the camera identifier at the camera hardware abstraction layer and 1, and the camera identifier at the camera hardware abstraction layer includes integers within the range of 0 to the preset maximum value.

[0154] An associated storage module is used to associate and store other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and second operating status information reflecting that the camera is unavailable in the camera information structure of the interface layer at the camera hardware abstraction layer based on the total number of preset camera identifiers.

[0155] Optionally, the target camera information also includes: a third identifier of a camera of a specified type that the vehicle does not need to carry at the on-board imaging system, and third state information of the camera of the specified type determined by the on-board imaging system.

[0156] The associated storage module may include:

[0157] The first identifier determining unit is used to determine the second preset identifier having the preset corresponding relationship with the third identifier in the preset identifier mapping relationship information as the fourth identifier of the camera of the specified type at the camera hardware abstraction layer.

[0158] A second associated storage unit is used to associate and store the fourth identifier of the specified type of camera and the second operating status information reflecting that the camera is unavailable in a camera information structure of the interface layer at the camera hardware abstraction layer according to the third status information of the specified type of camera currently in.

[0159] Optionally, the associated storage module may further include:

[0160] A second identification determination unit is used to determine the camera identification at the camera hardware abstraction layer except the second identification of the target camera and the fourth identification of the camera of the specified type according to a preset maximum value of the camera identification at the camera hardware abstraction layer, and obtain the fifth identification of the virtual camera at the camera hardware abstraction layer.

[0161] The third associated storage unit is used to associate and store the fifth identifier of the virtual camera and the second operating status information reflecting that the camera is unavailable in the camera information structure of the interface layer at the camera hardware abstraction layer.

[0162] Optional, Figure 2 The device may also include:

[0163] A record table generation module is used to generate an available camera identification record table based on the data in the camera information structure; the available camera identification record table contains the second identification of the target camera stored in association with the second operating status information used to reflect the availability of the camera; the application at the vehicle is used to determine the available cameras at the vehicle based on the available camera identification record table.

[0164] Optionally, the record table generating module may include:

[0165] The array updating unit is used to update the target array for recording the camera operation status information in the interface layer at the camera hardware abstraction layer by using the preset variables for recording the second operation status information in the camera information structure to obtain an updated target array.

[0166] The screening unit is used to perform data screening processing on the updated target array to obtain the available camera identification record table.

[0167] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0168] The present invention also provides a storage medium, which can store a computer program. When the computer program is executed by a processor, it can implement the camera identification allocation method as described in the above embodiments. The specific execution process can be found in the specific descriptions of the above embodiments, which will not be repeated here.

[0169] In one embodiment, the present invention also provides Figure 3 The structural diagram of the vehicle controller is shown in FIG. Figure 3At the hardware level, the vehicle controller may include a processor 21 and a memory 25, and may also include an internal bus 22, a network interface 23, a memory 24, and other hardware required for other services. The vehicle controller may be arranged in a vehicle, wherein the processor 21 may read the corresponding computer-readable instructions from the memory 25 into the memory and then run them to implement the above-mentioned camera identification allocation method. The specific execution process may refer to the specific descriptions in the above-mentioned embodiments, and will not be described in detail here.

[0170] In one embodiment, the present invention also provides a vehicle, which may include a camera identification allocation device or a vehicle controller as described above, so as to execute the steps of the camera identification allocation method through the camera identification allocation device or the vehicle controller. The specific execution process can be referred to the specific descriptions in the above embodiments, which will not be repeated here.

[0171] Finally, the various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium, vehicle controller, and vehicle embodiments, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0172] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A camera identification allocation method, comprising: Using the camera hardware abstraction layer in the Android system installed in the vehicle, the target camera information of the vehicle is obtained from the vehicle imaging system; The target camera information includes: a first identifier of the target camera required to be carried by the vehicle at the vehicle-mounted imaging system; Acquire preset identification mapping relationship information; the preset identification mapping relationship information is used to reflect the preset corresponding relationship between the first identification of each preset type of camera at the vehicle imaging system and the second preset identification at the camera hardware abstraction layer; According to the target camera information and the preset identifier mapping relationship information, determine the second identifier of the target camera at the camera hardware abstraction layer; the second identifier is the second preset identifier in the preset identifier mapping relationship information that has the preset corresponding relationship with the first identifier of the target camera.

2. According to the method of claim 1, the step of using the camera hardware abstraction layer in the Android system carried by the vehicle to obtain the target camera information of the vehicle from the vehicle imaging system comprises: Using the camera hardware abstraction layer, calling a preset query interface at the vehicle-mounted imaging system to obtain target camera information at the vehicle; The target camera information also includes: the first operating state information of the target camera currently determined by the vehicle-mounted imaging system; After determining the second identifier of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identifier mapping relationship information, the method further includes: According to the first operating status information of the target camera currently, a preset association relationship between the second identifier of the target camera and the second operating status information reflecting whether the camera is available is established at the camera hardware abstraction layer.

3. The method according to claim 2, wherein the step of establishing, at the camera hardware abstraction layer, a preset association relationship between the second identifier of the target camera and the second operating status information for reflecting whether the camera is available according to the current first operating status information of the target camera comprises: According to the current first operating status information of the target camera, the second identifier of the target camera and the second operating status information reflecting whether the camera is available are associated and stored in the camera information structure of the interface layer at the camera hardware abstraction layer.

4. The method according to claim 3, wherein according to the first operating state information of the target camera currently being located, in the camera information structure of the interface layer at the camera hardware abstraction layer, the second identifier of the target camera and the second operating state information used to reflect whether the camera is available are stored in association, comprising: If the first operating status information is information reflecting whether a camera is available, the first operating status information is set as a variable value of a preset variable corresponding to the second identifier of the target camera in the camera information structure; If the first operating state information is information used to reflect the initial state of the camera, then according to a preset strategy, based on the first operating state information currently in which the target camera is located, second operating state information of the target camera used to reflect whether the camera is available is determined; The second operating status information is set as the variable value of the preset variable corresponding to the second identifier of the target camera in the camera information structure.

5. The method according to claim 4, wherein determining the second operating state information of the target camera for reflecting whether the camera is available according to the first operating state information currently in the target camera according to the preset strategy comprises: If the first operating status information reflects that the target camera is in an unplugged state or an initialization failure state, information reflecting that the camera is unavailable is determined as the second operating status information of the target camera; If the first operating status information reflects that the target camera is in a normal operating state, the information used to reflect the availability of the camera is determined as the second operating status information of the target camera.

6. The method according to claim 3, further comprising: Using the interface layer at the camera hardware abstraction layer, obtaining the total number of preset camera identifiers at the camera hardware abstraction layer; The total number of preset camera identifiers is the sum of a preset maximum value of the camera identifiers at the camera hardware abstraction layer and 1, and the camera identifiers at the camera hardware abstraction layer include integers ranging from 0 to the preset maximum value; Based on the total number of preset camera identifiers, in the camera information structure of the interface layer at the camera hardware abstraction layer, other camera identifiers except the second identifier of the target camera at the camera hardware abstraction layer and the second operating status information reflecting that the camera is unavailable are associated and stored.

7. The method according to claim 6, wherein the target camera information further comprises: A third identifier of a camera of a specified type that the vehicle does not need to carry at the vehicle imaging system, and third state information of the camera of the specified type currently determined by the vehicle imaging system; The camera information structure of the interface layer at the camera hardware abstraction layer is associated with storing other camera identifiers other than the second identifier of the target camera at the camera hardware abstraction layer and second operating status information reflecting that the camera is unavailable, including: Determine the second preset identifier in the preset identifier mapping relationship information that has the preset corresponding relationship with the third identifier as the fourth identifier of the camera of the specified type at the camera hardware abstraction layer; According to the third state information of the specified type of camera currently in, in the camera information structure of the interface layer at the camera hardware abstraction layer, the fourth identifier of the specified type of camera and the second operating state information reflecting that the camera is unavailable are associated and stored.

8. The method according to claim 7, wherein the camera information structure of the interface layer at the camera hardware abstraction layer stores other camera identifiers at the camera hardware abstraction layer except the second identifier of the target camera and the second operating status information reflecting that the camera is unavailable, in association with each other, further comprising: According to a preset maximum value of the camera identifier at the camera hardware abstraction layer, determine the camera identifiers at the camera hardware abstraction layer other than the second identifier of the target camera and the fourth identifier of the camera of the specified type, and obtain a fifth identifier of the virtual camera at the camera hardware abstraction layer; In the camera information structure of the interface layer at the camera hardware abstraction layer, the fifth identifier of the virtual camera and the second operating status information reflecting that the camera is unavailable are stored in association.

9. The method according to any one of claims 3 to 8, further comprising: Generate an available camera identification record table according to the data in the camera information structure; The available camera identification record table includes the second identification of the target camera stored in association with the second operating state information reflecting that the camera is available; The application program at the vehicle is used to determine the available cameras at the vehicle according to the available camera identification record table.

10. The method according to claim 9, wherein generating an available camera identification record table according to the data in the camera information structure comprises: Using the preset variable in the camera information structure for recording the second running status information, the target array in the interface layer at the camera hardware abstraction layer for recording the camera running status information is updated to obtain an updated target array; Data screening processing is performed on the updated target array to obtain the available camera identification record table.

11. A camera identification allocation device, comprising: A first acquisition module is used to obtain target camera information at the vehicle from the vehicle imaging system by using a camera hardware abstraction layer in an Android system carried by the vehicle; The target camera information includes: a first identifier of the target camera required to be carried by the vehicle at the vehicle-mounted imaging system; A second acquisition module is used to acquire preset identification mapping relationship information; the preset identification mapping relationship information is used to reflect the preset corresponding relationship between the first identification of each preset type of camera at the vehicle imaging system and the second preset identification at the camera hardware abstraction layer; An identification determination module is used to determine the second identification of the target camera at the camera hardware abstraction layer according to the target camera information and the preset identification mapping relationship information; the second identification is the second preset identification in the preset identification mapping relationship information that has the preset corresponding relationship with the first identification of the target camera.

12. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.

13. A vehicle controller, comprising: A processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 10.

14. A vehicle, comprising the camera identification allocation device according to claim 11 or the vehicle controller according to claim 13.

Citation Information

Patent Citations

  • Calibration board device, vehicle-mounted camera calibrating method and device and system

    CN106780630A

  • Vehicle-mounted camera calling method and device

    CN112363767A