Camera data sharing method, device, equipment and storage medium between multiple systems
By loading the camera acquisition driver in the first system domain of the system-level chip and using the serializer for data copy and multi-channel output, the real-time and resource occupation problems of camera data sharing between multiple systems are solved, and the data transmission quality and User experience.
Patent Information
- Application Number
- CN202410765725.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-14
AI Technical Summary
When sharing camera data between multiple operating systems running on a system-level chip, the existing technology has problems with poor real-time data sharing and high resource usage, resulting in reduced system resource utilization and poor user experience.
By loading the camera acquisition driver in the first system domain of the system-level chip, and using the serializer for data copying and multi-channel output, the camera data is directly transmitted to the target system to avoid master-slave relationship deployment and performance degradation during the data copy process. Loss and delay.
It improves the quality and real-time performance of camera data transmission, improves the fluency and real-time performance of data display in applications within each system, saves system resources, and reduces the risk of unstable data transmission.
Smart Images

Figure CN118338121B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for sharing camera data among multiple systems. Background Art
[0002] At present, hardware isolation can be used to enable the system-level chip to run multiple operating systems at the same time, thereby improving the integration of the system-level chip. However, after the system-level chip is hardware isolated, how to share data between multiple operating systems running on the system-level chip has become a technical problem that needs to be solved urgently.
[0003] For example, assuming that two operating systems can run simultaneously in the system-level chip, and both operating systems need the camera data collected by camera A, then the camera data collected by camera A needs to be shared between the two operating systems.
[0004] In a possible implementation, two operating systems running simultaneously in the system-level chip can be deployed in a master-slave relationship, so that the master operating system can monopolize camera A and obtain camera data collected by camera A. Afterwards, the master operating system can copy the camera data collected by camera A and send the copied camera data to the slave operating system, thereby realizing the sharing of camera data by the two operating systems.
[0005] This camera data sharing method requires the deployment of a master-slave relationship between multiple systems running on the system-level chip, which is logically complex; and it requires the use of system resources of the main operating system to copy camera data, thereby reducing the utilization rate of system resources. In addition, the camera data is first copied in the main operating system, and then transmitted to the slave operating system, which causes a certain delay in the slave operating system obtaining the camera data. Moreover, in the case of unstable data transmission, it also affects the effect of the slave operating system using the camera data, affecting the user experience. Summary of the invention
[0006] The present application provides a method, device, equipment and storage medium for sharing camera data among multiple systems, so as to solve the technical problems in the prior art that when sharing camera data among multiple systems, the real-time performance of camera data sharing is poor and additional system resources are consumed.
[0007] In a first aspect, the present application provides a method for sharing camera data between multiple systems, which is applied to a system-level chip running multiple systems, including:
[0008] Loading a first camera acquisition driver in a domain where a first system running on a system-on-chip is located;
[0009] In response to a camera opening request initiated by an application in a target system running on the system-on-chip, sending the camera opening request to the first camera acquisition driver;
[0010] After opening the target camera that matches the camera opening request based on the first camera acquisition driver, the camera data collected by the target camera is transmitted to the data transmission interfaces corresponding to each of the target systems based on the configured serializer, and the camera data is transmitted to the corresponding target system through the corresponding data transmission interface.
[0011] In one example, the target system indicates a second system other than the first system run by the system-level chip; in response to a camera opening request initiated by an application in the target system run by the system-level chip, sending the camera opening request to the first camera acquisition driver includes:
[0012] In response to a camera opening request initiated by an application in the second system, loading a second camera acquisition driver in the domain where the second system is located;
[0013] Based on the second camera acquisition driver, the camera opening request is sent to the first camera acquisition driver through the remote processor message transmission component.
[0014] In one example, the number of the target systems is multiple; the configuration-based serializer transmits the camera data collected by the target camera to the data transmission interfaces corresponding to each of the target systems, including:
[0015] Copying the acquired camera data based on the number of the target systems and the configured serializer to obtain copied camera data;
[0016] The acquired camera data and the copied camera data are transmitted to the data transmission interfaces corresponding to the target systems respectively.
[0017] In one example, after loading the first camera acquisition driver in the domain where the first system running on the system-level chip is located, the method further includes:
[0018] A serializer configuration file is obtained, and a serializer is configured based on the serializer configuration file to obtain the configured serializer; wherein the serializer configuration file is used to configure the serializer to copy and process camera data and output it in multiple channels.
[0019] In one example, after transmitting the camera data to the corresponding target system through the corresponding data transmission interface, the method further includes:
[0020] In response to a camera closing request initiated by an application in the target system, sending the camera closing request to the first camera acquisition driver;
[0021] If it is determined that the first camera acquisition driver receives a camera closing request for the target camera sent by each of the target systems, the target camera is closed based on the first camera acquisition driver.
[0022] In one example, the target system indicates a second system other than the first system run by the system-level chip; sending the camera shutdown request to the first camera acquisition driver includes:
[0023] Based on the second camera acquisition driver loaded in the domain where the second system is located and the remote processor message transmission component, the camera shutdown request is sent to the first camera acquisition driver.
[0024] In one example, the method further includes:
[0025] In response to a power-on operation on the system-on-chip, starting a Boot program;
[0026] After the Boot program is started, various systems that can be run in the system-on-chip are loaded, so that the various systems can run in the system-on-chip.
[0027] In a second aspect, the present application provides a camera data sharing device between multiple systems, which is applied to a system-level chip running multiple systems, including:
[0028] A loading unit, used for loading a first camera acquisition driver in a domain where a first system running on the system-level chip is located;
[0029] a response unit, configured to respond to a camera opening request initiated by an application in a target system running on the system-on-chip, and send the camera opening request to the first camera acquisition driver;
[0030] A transmission unit is used to open a target camera that matches the camera opening request based on the first camera acquisition driver, and then transmit the camera data collected by the target camera to the data transmission interfaces corresponding to each of the target systems based on the configured serializer, and transmit the camera data to the corresponding target system through the corresponding data transmission interface.
[0031] In one example, the target system indicates a second system other than the first system run by the system-on-chip; in this case, the response unit is used to:
[0032] In response to a camera opening request initiated by an application in the second system, loading a second camera acquisition driver in the domain where the second system is located;
[0033] Based on the second camera acquisition driver, the camera opening request is sent to the first camera acquisition driver through the remote processor message transmission component.
[0034] In one example, there are multiple target systems; in this case, the transmission unit is used to:
[0035] Copying the acquired camera data based on the number of the target systems and the configured serializer to obtain copied camera data;
[0036] The acquired camera data and the copied camera data are transmitted to the data transmission interfaces corresponding to the target systems respectively.
[0037] In one example, the device further includes an initialization unit, configured to:
[0038] After loading the first camera acquisition driver in the domain where the first system running on the system-level chip is located, obtaining a serializer configuration file, and configuring the serializer based on the serializer configuration file to obtain the configured serializer; wherein the serializer configuration file is used to configure the serializer to copy and process the camera data and output it in multiple channels.
[0039] In one example, the device further includes a closing unit, configured to:
[0040] After transmitting the camera data to the corresponding target system through the corresponding data transmission interface, in response to a camera closing request initiated by an application in the target system, sending the camera closing request to the first camera acquisition driver;
[0041] If it is determined that the first camera acquisition driver receives a camera closing request for the target camera sent by each of the target systems, the target camera is closed based on the first camera acquisition driver.
[0042] In one example, the target system indicates a second system other than the first system run by the system-level chip; in this case, the shutdown unit is used to:
[0043] Based on the second camera acquisition driver loaded in the domain where the second system is located and the remote processor message transmission component, the camera shutdown request is sent to the first camera acquisition driver.
[0044] In one example, the device further includes a starting unit, configured to:
[0045] In response to a power-on operation on the system-on-chip, starting a Boot program;
[0046] After the Boot program is started, various systems that can be run in the system-on-chip are loaded, so that the various systems can run in the system-on-chip.
[0047] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0048] The memory stores computer-executable instructions;
[0049] The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0051] In a fifth aspect, the present application provides a computer program product, comprising: computer execution instructions, the computer execution instructions are stored in a readable storage medium, at least one processor of an electronic device can read the computer execution instructions from the readable storage medium, and the at least one processor executes the computer execution instructions so that the electronic device executes the method described in the first aspect.
[0052] The camera data sharing method, device, equipment and storage medium between multiple systems provided in the embodiment of the present application can load the first camera acquisition driver in the domain where the first system running on the system-level chip is located, so as to load the first camera acquisition driver in the domain where the faster system is started in the system-level chip to improve the loading speed of the first camera acquisition driver, thereby improving the speed of obtaining camera data. After loading the first camera acquisition driver, the camera opening request initiated by the application in the target system running on the system-level chip can be responded to, and the camera opening request can be sent to the first camera acquisition driver, so that the target camera matching the camera opening request can be opened based on the first camera acquisition driver. Afterwards, the camera data collected by the target camera can be transmitted to the data transmission interface corresponding to each target system based on the configured serializer, and the camera data can be transmitted to the corresponding target system through the corresponding data transmission interface. In this implementation mode, the camera data can be copied first and then transmitted to different systems at the same time through the copy function of the serializer, so as to realize the sharing of camera data between multiple systems. At this time, the performance loss, data transmission delay, and data transmission instability that occur when copying the camera data from the main operating system and then transmitting it to the slave operating system can be avoided, thereby improving the quality of camera data transmission and making the display of camera data in applications within each system more real-time and smoother. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0054] Figure 1 A schematic diagram of an application scenario of a method for sharing camera data between multiple systems provided in an embodiment of the present application;
[0055] Figure 2 A flowchart of a method for sharing camera data between multiple systems provided in an embodiment of the present application;
[0056] Figure 3 A flowchart of another method for sharing camera data between multiple systems provided in an embodiment of the present application;
[0057] Figure 4 A flow chart of a configuration-based serializer provided in an embodiment of the present application transmitting camera data collected by a target camera to data transmission interfaces corresponding to each target system;
[0058] Figure 5 A schematic diagram of an implementation flow of a method for sharing camera data between multiple systems provided in an embodiment of the present application;
[0059] Figure 6 A schematic diagram of the structure of a camera data sharing device between multiple systems provided in an embodiment of the present application;
[0060] Figure 7 A schematic diagram of the structure of another device for sharing camera data between multiple systems provided in an embodiment of the present application;
[0061] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0062] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0065] At present, hardware isolation can be used to enable the system-level chip to run multiple operating systems at the same time, thereby improving the integration of the system-level chip. However, after the hardware isolation of the system-level chip, how to share data between the multiple systems running on the system-level chip has become a technical problem that needs to be solved urgently.
[0066] The following example uses the sharing of camera data between multiple operating systems running on a system-level chip as an example. Figure 1 , Figure 1 A schematic diagram of an application scenario of a method for sharing camera data between multiple systems provided in an embodiment of the present application. Figure 1As shown, the application scenario may include a system-level chip, a camera and a serializer; wherein the camera data collected by the camera may be transmitted to the system-level chip via the serializer.
[0067] Among them, the system-level chip can be hardware isolated to obtain multiple domains (see Figure 1 In the example shown in FIG. 1 , domain 1, domain 2, ..., domain n), one system can be run in each domain, or multiple systems can be run in one domain based on virtualization technology. Here, one system can be run in each domain as an example.
[0068] When multiple systems are running in a system-level chip and the multiple systems need to share camera data collected by the camera, the existing technical solution needs to arrange master-slave logic in each system of the system-level chip to determine the main operating system from the multiple systems that need to share camera data. Figure 1 The IIC bus (Inter-Integrated Circuit) shown controls the camera and transmits camera data through a data transmission interface, thereby transmitting the camera data collected by the camera to the main operating system. After that, the main operating system copies the acquired camera data and sends it to the slave operating system to complete the sharing of the camera data.
[0069] In an example, assume that the system-level chip is isolated into three parts: CP domain, AP domain, and RP domain. Among them, the RP domain can independently run a secure operating system (such as Safety OS), the CP domain can independently run a Linux system, and the AP domain can independently run an Android system. In this case, it is possible to run multiple systems simultaneously in the system-level chip. At this time, assume that the camera data needs to be used in both the Linux system and the Android system at the same time, then a method for sharing camera data between the Linux system and the Android system is required.
[0070] In the related art, when sharing camera data between Linux system and Android system, it is necessary to determine the master operating system and the slave operating system from the Linux system and the Android system. Then, the camera data is first sent to the master operating system, and then the camera data obtained by the master operating system is copied and processed and sent to the slave operating system, thereby realizing the sharing of camera data between Linux system and Android system.
[0071] Assume that the main operating system is determined to be the Linux system in the CP domain, and the slave operating system is the Android system in the AP domain. Then, the Linux system in the CP domain can communicate with the camera through the IIC bus in the CP domain, thereby monopolizing the camera, and obtain the camera data collected by the camera through the serializer and the first transmission interface. Afterwards, the obtained camera data can be copied in the Linux system in the CP domain, and the copied camera data can be sent from the Linux system in the CP domain to the Android system in the AP domain. For another example, the main operating system is determined to be the Android system in the AP domain, and the slave operating system is the Linux system in the CP domain. Then, the Android system in the AP domain can communicate with the camera through the IIC bus in the AP domain, thereby monopolizing the camera, and obtain the camera data collected by the camera through the serializer and the second transmission interface. Afterwards, the obtained camera data can be copied in the Android system in the AP domain, and the copied camera data can be sent from the Android system in the AP domain to the Linux system in the CP domain.
[0072] This camera data sharing method requires the deployment of a master-slave relationship between multiple systems running on the system-level chip, which has complex logic; and it needs to occupy the system resources of the main operating system to copy the camera data, thereby reducing the utilization rate of system resources. In addition, the camera data is first copied in the main operating system, and then transmitted to the slave operating system, which causes a certain delay in the acquisition of camera data by the slave operating system, resulting in poor real-time performance of the camera data obtained from the slave operating system. Moreover, in the case of unstable data transmission, the camera data obtained from the slave operating system will also be stuck, which in turn affects the effect of the slave operating system using the camera data and affects the user experience.
[0073] The camera data sharing method between multiple systems provided in this application is intended to solve the above technical problems of the prior art.
[0074] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0075] Figure 2 A schematic flow chart of a method for sharing camera data between multiple systems provided in an embodiment of the present application is provided. The method can be applied to a system-level chip running multiple systems, such as Figure 2 As shown, the method includes:
[0076] S201. Load a first camera acquisition driver in a domain where a first system running on a system-on-chip is located.
[0077] In one example, the system-level chip involved in the embodiments of the present application can be applied to a vehicle-mounted system.
[0078] In one example, the first system can be understood as the system with a faster startup speed among the systems run by the system-level chip. For example, as described above, the Linux system runs in the CP domain and the Android system runs in the AP domain. Then, the first system can be understood as the Linux system, and the domain where the first system is located can be understood as the CP domain. At this time, since the startup of the CP domain is faster than that of the AP domain, loading the first camera acquisition driver in the CP domain can load the first camera driver faster and earlier, thereby improving the speed of obtaining camera data to meet the needs of various systems in the system-level chip to obtain camera data.
[0079] At this time, the first system may be a Linux system or other types of systems. The type of the first system is not limited here and is based on meeting actual needs.
[0080] In one example, the first camera acquisition driver is used to manage the camera that communicates data with the system-level chip, so that the system-level chip can accurately obtain the camera data collected by the camera. At this time, the first camera acquisition driver is used to configure a serializer that transmits camera data. In an embodiment of the present application, the serializer can be configured to a multi-channel output mode (for example, when two systems request to obtain camera data at the same time, then the multi-channel output mode is a dual-channel output mode). At this time, the serializer can copy the camera data inside the serializer when multiple systems request to transmit camera data at the same time, and transmit the camera data to the data transmission interface corresponding to each system respectively. On the other hand, the first camera acquisition driver is also used to configure a data transmission interface for data transmission with each domain included in the system-level chip, so that the data transmission interface can transmit camera data.
[0081] S202: In response to a camera opening request initiated by an application program in a target system running on the system-on-chip, send the camera opening request to a first camera acquisition driver.
[0082] In one example, the number of target systems may be one or more, and the target system may include the first system or may not include the first system. In this case, the target system may include the first system described above, and / or at least one second system other than the first system running in the system-level chip. The number and type of target systems are not limited here, and are subject to meeting actual needs.
[0083] In one example, the application in the target system can be understood as any application that needs to obtain camera data, and the type of the application is not limited here.
[0084] In one example, a camera opening request may be used to request opening a target camera. In this case, the number of target cameras requested to be opened by the camera opening request may be one or more.
[0085] S203, after opening the target camera that matches the camera opening request based on the first camera acquisition driver, the camera data collected by the target camera is transmitted to the data transmission interfaces corresponding to each target system based on the configured serializer, and the camera data is transmitted to the corresponding target system through the corresponding data transmission interface.
[0086] In one example, the configured serializer can copy and process the camera data collected by the target camera as needed, and after the copying, output the camera data in multiple channels to the data transmission interface corresponding to each target system, thereby transmitting the camera data to each target system at the same time.
[0087] It can be known from the above description that in the embodiment of the present application, the first camera acquisition driver can be loaded in the domain where the first system running on the system-level chip is located, so as to load the first camera acquisition driver in the domain where the faster system is started in the system-level chip to improve the loading speed of the first camera acquisition driver, thereby improving the speed of obtaining camera data. After loading the first camera acquisition driver, the camera opening request initiated by the application in the target system running on the system-level chip can be responded to, and the camera opening request can be sent to the first camera acquisition driver, so that the target camera matching the camera opening request can be opened based on the first camera acquisition driver. Afterwards, the camera data collected by the target camera can be transmitted to the data transmission interface corresponding to each target system based on the configured serializer, and the camera data can be transmitted to the corresponding target system through the corresponding data transmission interface. In this implementation mode, the camera data can be copied first and then transmitted to different systems at the same time through the copy function of the serializer, so as to realize the sharing of camera data between multiple systems. At this time, the performance loss, data transmission delay, and data transmission instability that occur when copying the camera data from the main operating system and then transmitting it to the slave operating system can be avoided, thereby improving the quality of camera data transmission and making the display of camera data in applications within each system more real-time and smoother.
[0088] Figure 3 A flowchart of another method for sharing camera data between multiple systems provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method includes:
[0089] S301 : In response to a power-on operation on a system-level chip, a Boot program is started.
[0090] In one example, the Boot program can be understood as a boot program or a startup program of the system-on-chip, which is used to start the system-on-chip.
[0091] S302: After the Boot program is started, various systems that can be run in the system-on-chip are loaded, so that each system runs in the system-on-chip.
[0092] In one example, a Linux system can be loaded in the CP domain of the SoC, an Android system can be loaded in the AP domain, and a secure operating system (such as Safety OS) can be loaded in the RP domain. After the operating systems in each domain of the SoC are loaded, multiple operating systems can be run simultaneously in the SoC.
[0093] S303: Load a first camera acquisition driver in a domain where a first system running on the system-on-chip is located.
[0094] In an example, this step can refer to the content described in the above S201, and will not be repeated here in detail.
[0095] S304 , obtaining a serializer configuration file, and configuring the serializer based on the serializer configuration file to obtain a configured serializer.
[0096] The serializer configuration file is used to configure the serializer to copy and process the camera data and output it in multiple channels.
[0097] This implementation method can copy data and transmit it in multiple routes through an external serializer, which can improve the real-time performance of each system running on the system-level chip in obtaining camera data, and eliminates additional overhead for each system, thereby saving system resources and improving system performance.
[0098] S305 . In response to a camera opening request initiated by an application program in a target system running on the system-on-chip, send the camera opening request to a first camera acquisition driver.
[0099] In one example, if the target system indicates the first system mentioned above, then the camera opening request initiated by the application in the first system can be directly sent to the first camera acquisition driver.
[0100] In one example, if the target system indicates a second system other than the first system run by the system-level chip, then in response to a camera opening request initiated by an application in the second system, a second camera acquisition driver can be loaded in the domain where the second system is located; and based on the second camera acquisition driver, the camera opening request is sent to the first camera acquisition driver through the remote processor messaging component.
[0101] In one example, the remote processor messaging component can be understood as an RPMSG component.
[0102] In this implementation, since the camera is controlled to collect camera data through the first camera acquisition driver in the domain where the first system run by the system-level chip is located, the second system other than the first system run by the system-level chip cannot directly send the camera opening request to the first camera acquisition driver. Therefore, in the embodiment of the present application, the second camera acquisition driver can be loaded in the domain where the second system is located, and the camera opening request initiated by the application in the second system can be sent to the first camera acquisition driver through the second camera acquisition driver and the remote processor message component, thereby realizing data sharing between different systems.
[0103] S306. After opening the target camera that matches the camera opening request based on the first camera acquisition driver, the camera data collected by the target camera is transmitted to the data transmission interfaces corresponding to each target system based on the configured serializer, and the camera data is transmitted to the corresponding target system through the corresponding data transmission interface.
[0104] In one example, when there are multiple target systems, the acquired camera data can be copied based on the number of target systems and the configured serializers to obtain the copied camera data. Then, the acquired camera data and the copied camera data are transmitted to the data transmission interfaces corresponding to each target system.
[0105] For an example, see Figure 4 , Figure 4 A flow chart of a configuration-based serializer provided in an embodiment of the present application transmitting camera data collected by a target camera to data transmission interfaces corresponding to each target system. Figure 4 As shown, the system-level chip can be divided into an RP domain, a CP domain, and an AP domain. Assume that the domain where the first system running on the system-level chip is located is the CP domain. At this time, the first camera acquisition driver can be loaded in the CP domain. The serializer is configured according to the first camera acquisition driver so that the serializer can support the functions of copying and splitting output, thereby obtaining a configured serializer.
[0106] Afterwards, assuming that a camera opening request initiated by application 1 in the target system running in the CP domain and application 2 in the target system running in the AP domain is received (wherein the camera opening request initiated by application 1 is the same as the camera opening request initiated by application 2, that is, application 1 and application 2 share camera data), then the second camera acquisition driver can be loaded in the AP domain, and the camera opening request initiated by application 2 in the target system running in the AP domain is sent to the first camera acquisition driver through the second camera acquisition driver via the remote processor message passing component.
[0107] Next, the target camera matching the camera opening request can be opened based on the first camera acquisition driver. At this time, after the configured serializer receives the camera data acquired by the camera, the camera data can be copied to obtain the copied camera data. At this time, the received camera data and the copied camera data can be transmitted to the application 1 in the CP domain through the path 1 and the first transmission interface, and transmitted to the application 2 in the AP domain through the path 2 and the second transmission interface.
[0108] In one example, after the camera data is transmitted to the corresponding target system through the corresponding data transmission interface, the embodiment of the present application can also receive a camera shutdown request initiated by an application in the target system running by the system-level chip to stop obtaining the camera data. Please refer to the steps described below for details.
[0109] S307: In response to a camera closing request initiated by an application in the target system, the camera closing request is sent to a first camera acquisition driver.
[0110] S308: If it is determined that the first camera acquisition driver receives a camera closing request for a target camera sent by each target system, the target camera is closed based on the first camera acquisition driver.
[0111] In one example, when the number of target cameras is one, after receiving a camera shutdown request for the target camera sent by each target system, the target camera is shut down based on the first camera acquisition driver.
[0112] In another example, when there are multiple target cameras, after receiving a camera shutdown request for one or more of the target cameras sent by each target system, the one or more cameras are shut down based on the first camera acquisition driver. For example, when there are four target cameras, namely target camera 1, target camera 2, target camera 3 and target camera 4, at this time, after receiving a camera shutdown request for target camera 1 and target camera 2 from each target system, target camera 1 and target camera 2 are shut down based on the first camera acquisition driver. If a camera shutdown request for target camera 1 and target camera 2 is received from some target systems, target camera 1 and target camera 2 are not shut down.
[0113] In summary, Figure 4 Taking the system-level chip shown as an example, the logic of the first camera acquisition driver controlling the camera is: if all applications in the CP domain / AP domain in the system-level chip request to turn off the camera, then turn off the camera; if any one of the applications in the CP domain / AP domain in the system-level chip needs the camera, or both parties need the camera, then turn on the camera, thereby ensuring that the camera can be used solely by applications in the CP domain, can be used solely by applications in the AP domain, or can be used by applications in both the CP domain and the AP domain, thereby meeting the actual needs of the system-level chip to use the camera.
[0114] In one example, when the target system indicates a second system other than the first system run by the system-level chip, when a camera shutdown request is sent to the first camera acquisition driver, the camera shutdown request can be sent to the first camera acquisition driver based on the second camera acquisition driver loaded in the domain where the second system is located and the remote processor messaging component.
[0115] In one example, the remote processor messaging component is the same as the remote processor messaging component for transmitting the camera opening request described above, for example, the remote processor messaging component may be an RPMSG component.
[0116] See also Figure 5 , Figure 5 The following is a schematic diagram of an implementation flow of a method for sharing camera data between multiple systems provided in an embodiment of the present application. Assume that the method for sharing camera data between multiple systems can be applied to a system-level chip running a secure operating system in the RP domain, a Linux system in the CP domain, and an Android system in the AP domain, such as Figure 4 shown.
[0117] At this time, if Figure 5As shown, after detecting the power-on operation of the system-level chip, the system-level chip is powered on and the Boot program is started. After the Boot program is started, various systems that can run in the system-level chip are loaded. For example, a secure operating system can be loaded in the RP domain, a Linux system can be loaded in the CP domain, and an Android system can be loaded in the AP domain.
[0118] At this time, the first camera acquisition driver can be loaded in the CP domain where the Linux system is located. At this time, upon receiving the application program in the Linux system (such as Figure 4 The application shown in 1) and the application within the Android system (such as Figure 4 After the camera opening request is initiated by the application 2) shown in the figure, the camera opening request initiated by the application in the Linux system can be sent directly to the first camera acquisition driver, and the camera opening request initiated by the application in the Android system can be sent to the first camera acquisition driver through the second camera acquisition driver loaded in the AP domain and the remote processor messaging component.
[0119] Afterwards, the target camera matching the camera opening request can be opened according to the first camera acquisition driver, so that the application in the CP domain can access the first transmission interface (such as Figure 4 The first transmission interface shown in FIG. 1 obtains the camera data, and the application in the AP domain obtains the camera data through the second transmission interface (such as Figure 4 The second transmission interface shown in the figure) obtains the camera data.
[0120] Afterwards, if a camera shutdown request is received, if a camera shutdown request is initiated by an application in the Linux system, it will be sent directly to the first camera acquisition driver, and if a camera shutdown request is received initiated by an application in the Android system, it will be sent to the first camera acquisition driver through the second camera acquisition driver loaded in the AP domain and the remote processor message passing component.
[0121] At this time, it can be determined whether both the application in the Linux system and the application in the Android system request to close the target camera. If so, the target camera is closed.
[0122] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0123] Figure 6 A schematic diagram of a camera data sharing device between multiple systems provided in an embodiment of the present application is shown in FIG. Figure 6As shown, the camera data sharing device 600 between multiple systems includes:
[0124] The loading unit 601 is used to load a first camera acquisition driver in a domain where a first system running on the system-level chip is located.
[0125] The responding unit 602 is used to respond to a camera opening request initiated by an application in a target system running on the system-on-chip, and send the camera opening request to the first camera acquisition driver.
[0126] The transmission unit 603 is used to open the target camera that matches the camera opening request based on the first camera acquisition driver, and then transmit the camera data collected by the target camera to the data transmission interfaces corresponding to each target system based on the configured serializer, and transmit the camera data to the corresponding target system through the corresponding data transmission interface.
[0127] Figure 7 A schematic diagram of the structure of another camera data sharing device between multiple systems provided in an embodiment of the present application, such as Figure 7 As shown, the camera data sharing device 700 between multiple systems includes:
[0128] The loading unit 701 is used to load a first camera acquisition driver in a domain where a first system running on the system-level chip is located.
[0129] The responding unit 702 is used to respond to a camera opening request initiated by an application in a target system running on the system-on-chip, and send the camera opening request to the first camera acquisition driver.
[0130] The transmission unit 703 is used to open the target camera that matches the camera opening request based on the first camera acquisition driver, and then transmit the camera data collected by the target camera to the data transmission interfaces corresponding to each target system based on the configured serializer, and transmit the camera data to the corresponding target system through the corresponding data transmission interface.
[0131] In one example, the target system indicates a second system other than the first system run by the system-level chip; in this case, the response unit 702 is used to:
[0132] In response to a camera opening request initiated by an application in the second system, loading a second camera acquisition driver in the domain where the second system is located;
[0133] Based on the second camera acquisition driver, the camera opening request is sent to the first camera acquisition driver through the remote processor message transmission component.
[0134] In one example, there are multiple target systems. In this case, the transmission unit 703 is used to:
[0135] The acquired camera data is copied based on the number of target systems and the configured serializer to obtain the copied camera data;
[0136] The acquired camera data and the copied camera data are transmitted to the data transmission interfaces corresponding to each target system.
[0137] In one example, the apparatus further includes an initialization unit 704, configured to:
[0138] After loading the first camera acquisition driver in the domain where the first system running on the system-level chip is located, a serializer configuration file is obtained, and the serializer is configured based on the serializer configuration file to obtain a configured serializer; wherein the serializer configuration file is used to configure the serializer to copy and process the camera data and output it in multiple channels.
[0139] In one example, the device further includes a closing unit 705, configured to:
[0140] After the camera data is transmitted to the corresponding target system through the corresponding data transmission interface, in response to a camera closing request initiated by an application in the target system, the camera closing request is sent to the first camera acquisition driver;
[0141] If it is determined that the first camera acquisition driver receives a camera closing request for a target camera sent by each target system, the target camera is closed based on the first camera acquisition driver.
[0142] In one example, the target system indicates a second system other than the first system run by the system-level chip; in this case, the closing unit 705 is used to:
[0143] Based on the second camera acquisition driver loaded in the domain where the second system is located and the remote processor message transmission component, a camera closing request is sent to the first camera acquisition driver.
[0144] In one example, the apparatus further includes a starting unit 706, configured to:
[0145] In response to a power-on operation on the system-level chip, starting a Boot program;
[0146] After the Boot program is started, each system that can be run in the system-on-chip is loaded to enable each system to run in the system-on-chip.
[0147] The specific implementation process of the camera data sharing device between multiple systems provided in the present application refers to the above-mentioned method embodiment, which will not be repeated here.
[0148] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the electronic device 800 includes: a memory 801 and a processor 802 .
[0149] Memory 801 is a memory used to store computer-executable instructions executable by processor 802 .
[0150] The processor 802 is configured to execute computer-executable instructions to implement the method provided in the above embodiment.
[0151] The electronic device further includes a receiver 803 and a transmitter 804. The receiver 803 is used to receive instructions and data sent by an external device, and the transmitter 804 is used to send instructions and data to the external device.
[0152] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided in the various embodiments described above.
[0153] Among them, the computer-readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of computer-executable instructions from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a computer-readable storage medium is coupled to a processor so that the processor can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can be located in an application-specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the computer-readable storage medium can also exist in a communication device as discrete components.
[0154] Specifically, the computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium may be any available medium that can be accessed by a general or special-purpose computer.
[0155] The present application also provides a computer program product, which includes computer-executable instructions, which are stored in a computer-readable storage medium. At least one processor of the device can read the computer-executable instructions from the computer-readable storage medium, and at least one processor executes the computer-executable instructions so that the device implements the methods provided in the various embodiments described above.
[0156] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0157] Among them, each module can be physically separated, for example, installed in different locations of a device, or installed on different devices, or distributed on multiple network units, or distributed on multiple processors. Each module can also be integrated together, for example, installed in the same device, or integrated in a set of codes. Each module can exist in the form of hardware, or can also exist in the form of software, or can also be implemented in the form of software plus hardware. The present application can select some or all of the modules according to actual needs to achieve the purpose of the present embodiment.
[0158] When each module is implemented as an integrated module in the form of a software function module, it can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application.
[0159] It should be understood that, although the various steps in the flowcharts in the above-described embodiments are sequentially displayed according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily to be carried out sequentially, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0160] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0161] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A camera data sharing method among multiple systems, characterized in that: Applied to a system-on-chip running multiple operating systems, the method comprises: Loading a first camera acquisition driver in a domain where a first operating system running on the system-level chip is located; wherein the first operating system indicates an operating system with a faster startup speed among various operating systems running on the system-level chip; In response to a camera opening request initiated by an application program in a target operating system running on the system-on-chip, sending the camera opening request to the first camera acquisition driver; After opening the target camera matching the camera opening request based on the first camera acquisition driver, transmitting the camera data acquired by the target camera to the data transmission interfaces corresponding to each of the target operating systems based on the configured serializer, and transmitting the camera data to the corresponding target operating system through the corresponding data transmission interface; Wherein, the number of the target operating systems is multiple; the configuration-based serializer transmits the camera data collected by the target camera to the data transmission interface corresponding to each of the target operating systems, including: Copying the acquired camera data based on the number of the target operating systems and the configured serializer to obtain copied camera data; The acquired camera data and the copied camera data are simultaneously transmitted to the data transmission interfaces corresponding to the target operating systems respectively; Wherein, after loading the first camera acquisition driver in the domain where the first operating system running on the system-level chip is located, the method further includes: A serializer configuration file is obtained, and a serializer is configured based on the serializer configuration file to obtain the configured serializer; wherein the serializer configuration file is used to configure the serializer to copy and process camera data and output it in multiple channels.
2. The method according to claim 1, characterized in that The target operating system indicates a second operating system other than the first operating system run by the system-level chip; the response to a camera opening request initiated by an application in the target operating system run by the system-level chip, sending the camera opening request to the first camera acquisition driver, includes: In response to a camera opening request initiated by an application in the second operating system, loading a second camera acquisition driver in the domain where the second operating system is located; Based on the second camera acquisition driver, the camera opening request is sent to the first camera acquisition driver through the remote processor message transmission component.
3. The method according to claim 1, characterized in that After transmitting the camera data to the corresponding target operating system through the corresponding data transmission interface, the method further includes: In response to a camera closing request initiated by an application in the target operating system, sending the camera closing request to the first camera acquisition driver; If it is determined that the first camera acquisition driver receives a camera closing request for the target camera sent by each of the target operating systems, the target camera is closed based on the first camera acquisition driver.
4. The method according to claim 3, characterized in that The target operating system indicates a second operating system other than the first operating system run by the system-on-chip; Sending the camera closing request to the first camera acquisition driver includes: Based on the second camera acquisition driver loaded in the domain where the second operating system is located and the remote processor message transmission component, the camera shutdown request is sent to the first camera acquisition driver.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to a power-on operation on the system-on-chip, starting a Boot program; After the Boot program is started, various operating systems that can be run in the system-on-chip are loaded, so that the various operating systems can run in the system-on-chip.
6. A camera data sharing device among multiple systems, characterized in that: Applicable to SoCs running multiple operating systems, including: A loading unit, used to load a first camera acquisition driver in a domain where a first operating system running on the system-level chip is located; wherein the first operating system indicates an operating system with a faster startup speed among various operating systems running on the system-level chip; a response unit, configured to respond to a camera opening request initiated by an application program in a target operating system running on the system-level chip, and send the camera opening request to the first camera acquisition driver; A transmission unit, configured to, after opening a target camera matching the camera opening request based on the first camera acquisition driver, transmit the camera data acquired by the target camera to data transmission interfaces corresponding to each of the target operating systems based on a configured serializer, and transmit the camera data to the corresponding target operating system through the corresponding data transmission interface; Wherein, the number of the target operating systems is multiple; the configuration-based serializer transmits the camera data collected by the target camera to the data transmission interface corresponding to each of the target operating systems, including: Copying the acquired camera data based on the number of the target operating systems and the configured serializer to obtain copied camera data; The acquired camera data and the copied camera data are simultaneously transmitted to the data transmission interfaces corresponding to the target operating systems respectively; An initialization unit is used to obtain a serializer configuration file after loading a first camera acquisition driver in a domain where a first operating system running on a system-level chip is located, and configure the serializer based on the serializer configuration file to obtain the configured serializer; wherein the serializer configuration file is used to configure the serializer to copy and process camera data and output it in multiple channels.
7. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the camera data sharing method among multiple systems as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the camera data sharing method among multiple systems as described in any one of claims 1 to 5.
