Streaming media characteristic architecture, processing method, electronic device and readable storage medium
By designing the streaming media feature architecture and using the decoupling design of the docking module and processing engine, the problem of differences between different chip platforms has been solved, the cross-platform reuse of streaming media functions has been achieved, and development efficiency and flexibility have been improved.
Patent Information
- Application Number
- CN202210193100.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-02-28
AI Technical Summary
Differences between different chip platforms require electronic equipment manufacturers to develop multiple image processing systems, resulting in low development efficiency and difficulty in reusing common functions on multiple chip platforms.
Design a streaming media feature architecture, including a docking module and a processing engine. The docking module is docked with the chip platform, and the data processing related to the chip platform is separated from the data processing unrelated to the chip platform. It is set in the processing engine to achieve decoupling from the chip platform, and through the hardware The interface utilizes the hardware resources of the chip platform to provide cross-platform reusable interfaces and algorithms.
It improves development efficiency, realizes the reuse of streaming media functions on multiple chip platforms, reduces the need for adaptation to different chip platforms, and improves development efficiency and flexibility.
Smart Images

Figure CN116701288B
Abstract
Description
Technical Field
[0001] The present application relates to the field of streaming media, and in particular to a streaming media feature architecture, a processing method, an electronic device, and a readable storage medium. Background Art
[0002] With the development of technology, the chip platforms available for electronic devices are becoming more diverse. Since electronic devices target different customer groups, the chip platforms used by electronic devices may also be different, which means that different types or models of electronic devices under a device manufacturer may use different chip platforms.
[0003] There may be differences between chip platforms of different manufacturers or different models of chip platforms of the same manufacturer, which will result in some common functions of electronic devices (such as camera photo and video functions, etc.) being unable to be reused on multiple chip platforms. Electronic device manufacturers need to develop image processing systems (systems for implementing camera functions) that are adapted to different chip platforms for electronic devices using different chip platforms, which leads to low development efficiency. Summary of the invention
[0004] The present application provides a streaming media feature architecture, a processing method, an electronic device and a readable storage medium, which can improve development efficiency.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a streaming media feature architecture, which is applied to a chip platform, and the architecture includes:
[0007] A docking module, used to dock with the chip platform to obtain streaming media data related to the chip platform and send processed streaming media data to the chip platform;
[0008] The processing engine is provided with a characteristic algorithm that is independent of the chip platform, and the characteristic algorithm is used to process the streaming media data obtained by the docking module to obtain the processed streaming media data.
[0009] In this application, the streaming feature architecture divides the data related to the streaming feature into two parts, one part is related to the chip platform, and the other part is unrelated to the chip platform; the architecture connects the data related to the chip platform with the chip platform through a docking module; the architecture sets the parts unrelated to the chip platform, such as software algorithms for image processing, memory management mechanisms, etc., in the processing engine of the architecture; this architecture realizes data docking with the chip platform through a docking module, and the processing of data is concentrated in the processing engine where there is no direct interaction with the chip platform, thereby realizing decoupling from the chip platform; if the docking module can be reused across chip platforms, the architecture can be ported to other chip platforms. If the docking module cannot be reused across chip platforms, a docking module that can be docked with other chip platforms is developed to improve development efficiency.
[0010] As an implementation of the first aspect, the docking module includes:
[0011] An input interface, used to interface with the chip platform to obtain the streaming media data from the chip platform;
[0012] A scene interface, used to connect to the chip platform to obtain the collection scene of the streaming media data from the chip platform;
[0013] An output interface is used to connect to the chip platform to send the processed streaming media data to the chip platform.
[0014] In the present application, the docking module can also be separated into three independent sub-interfaces according to the functions of the docking module, providing a variety of implementation methods.
[0015] As an implementation method of the first aspect, the processing engine is provided with a characteristic algorithm corresponding to each acquisition scene, and is also used to process the streaming media data corresponding to the acquisition scene through the characteristic algorithm corresponding to the acquisition scene to obtain the processed streaming media data corresponding to the acquisition scene.
[0016] In this application, the streaming media feature architecture can realize multiple scene functions of the camera in the electronic device, different feature algorithms can be set for different scenes, and the streaming media collected in different scenes adopts different feature algorithms. One streaming media feature architecture can be used to realize all the functions of the camera.
[0017] As an implementation of the first aspect, the streaming media feature architecture further includes:
[0018] A hardware interface, used to interface with hardware resources on the chip platform;
[0019] The processing engine is also used to complete the processing of the streaming media data by using the hardware resources on the chip platform through the hardware interface.
[0020] In this application, a hardware interface can also be set up, which is connected to the hardware resources on the chip platform. If the hardware interface can be reused across chip platforms, the architecture can be ported to other chip platforms. If the hardware interface cannot be reused across chip platforms, a hardware interface that can be connected to other chip platforms is developed to improve development efficiency.
[0021] As an implementation of the first aspect, the hardware interface includes:
[0022] A first hardware interface, used to interface with a hardware computing unit on the chip platform;
[0023] The processing engine is further used to complete the processing of the streaming media data using the hardware computing unit on the chip platform through the first hardware interface.
[0024] In the case that some chip platforms provide hardware computing units, the hardware computing resources of the chip platform can be used through hardware interfaces, that is, the computing resources of the chip platform itself can be used, and redevelopment of software resources with the same functions can be avoided, thereby improving development efficiency.
[0025] As an implementation of the first aspect, the hardware interface further includes:
[0026] A second hardware interface, used for connecting to a sensor driver on the chip platform;
[0027] The processing engine is further configured to obtain data collected by the sensor corresponding to the sensor driver through the second hardware interface, and process the streaming media data based on the data collected by the sensor.
[0028] In this application, the data collected by the sensor can also be obtained through the hardware interface, so that the resources of the chip platform can be used when the data collected by the sensor is required to participate in data processing, which also provides a basis for cross-platform reuse.
[0029] As an implementation of the first aspect, the processing engine is further used for:
[0030] The data collected by the sensor corresponding to the sensor driver is obtained through the second hardware interface, the data collected by the sensor is processed to obtain control information, and the control information is sent to the sensor driver on the chip platform, and the control information is used to control the sensor.
[0031] As an implementation manner of the first aspect, the docking module is applicable to multiple types of chip platforms.
[0032] In a second aspect, the present application provides a streaming media processing method, which is applied to an electronic device, wherein the electronic device comprises: a docking module docked with a chip platform of the electronic device and a processing engine provided with a characteristic algorithm independent of the chip platform, wherein the method comprises:
[0033] The docking module obtains the streaming media data collected by the camera of the electronic device from the chip platform of the electronic device;
[0034] The processing engine processes the streaming media data through the characteristic algorithm to obtain processed streaming media data;
[0035] The docking module sends the processed streaming media data to the chip platform of the electronic device.
[0036] As an implementation of the second aspect, the method further includes:
[0037] The docking module obtains, from the chip platform of the electronic device, a collection scene when the camera of the electronic device collects the streaming media data;
[0038] The processing engine determines a characteristic algorithm corresponding to the acquisition scenario;
[0039] Accordingly, the processing engine processes the streaming media data through the characteristic algorithm to obtain the processed streaming media data, including:
[0040] The processing engine processes the streaming media data based on a characteristic algorithm corresponding to the acquisition scenario to obtain the processed streaming media data.
[0041] As an implementation of the second aspect, the electronic device further includes a first hardware interface and a second hardware interface connected to hardware resources on the chip platform; and the method further includes:
[0042] The processing engine processes the streaming media data using a hardware computing unit on the chip platform through the first hardware interface;
[0043] And / or, the processing engine obtains data collected by a sensor corresponding to the sensor driver on the chip platform through the second hardware interface, and processes the streaming media data based on the data collected by the sensor;
[0044] And / or, the processing engine obtains data collected by the sensor corresponding to the sensor driver through the second hardware interface, processes the data collected by the sensor to obtain control information, and sends the control information to the sensor driver on the chip platform, and the control information is used to control the sensor.
[0045] In a third aspect, an electronic device is provided, including a chip platform, on which the streaming media feature architecture of any one of the first aspect of the present application is provided.
[0046] In a fourth aspect, a chip system is provided, including a chip platform, wherein the chip platform is coupled to a memory, and the chip platform is provided with a streaming media feature architecture according to any one of the first aspects of the present application.
[0047] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method of any one of the second aspects of the present application is implemented.
[0048] In a sixth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any method of the second aspect of the present application.
[0049] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of the structure of an image processing system provided in an embodiment of the present application;
[0052] Figure 3 A structural diagram of a streaming media feature architecture provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of the structure of an image processing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0056] It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0057] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0058] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0059] The streaming media feature architecture and streaming media processing method provided in the embodiments of the present application can be applied to an electronic device provided with a camera. The electronic device can be a tablet computer, a mobile phone, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and other electronic devices. The electronic device can also be an electronic device other than the above examples. The embodiments of the present application do not limit the specific type of the electronic device.
[0060] Figure 1The schematic diagram of the structure of an electronic device is shown. The electronic device 100 may include a processor 110 (chip platform), an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.
[0061] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the streaming media feature architecture provided in the embodiment of the present application is set on the processor 110, and the streaming media processing method in the embodiment of the present application can be executed.
[0063] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0064] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0065] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device.
[0066] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0067] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).
[0068] In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0069] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
[0070] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0071] In some other embodiments, the power management module 141 may also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.
[0072] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0073] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0074] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
[0075] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0076] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0077] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0078] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0079] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0080] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0081] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only monitor voice information but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and realization of directional recording function, etc.
[0082] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0083] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
[0084] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0085] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0086] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
[0087] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0088] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
[0089] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0090] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0091] The embodiments of the present application do not specifically limit the specific structure of the electronic device that can be set with the streaming media feature architecture, nor do they limit the specific structure of the execution subject of a streaming media processing method, as long as the code of a streaming media processing method of the embodiments of the present application can be recorded by running, and the streaming media processing method provided by the embodiments of the present application can be processed according to the streaming media processing method. For example, the execution subject of a streaming media processing method provided by the embodiments of the present application can be a functional module in an electronic device that can call and execute a program, or a processing device applied to an electronic device, such as a chip platform.
[0092] The embodiment of the present application provides a streaming media feature architecture which can be applied to an image processing system on a chip platform.
[0093] At present, some algorithms are usually set on the chip platform, such as feature point recognition, anti-shake algorithm, motion compensation, distortion algorithm, etc. When an electronic device adopts a chip platform with these algorithms, these algorithms set on the chip platform can be directly used to implement some image processing functions of the camera, thereby outputting images or videos processed by the above algorithms.
[0094] However, in actual applications, in order to meet specific user needs or to improve the camera's photo or video recording effects, equipment manufacturers may develop other better algorithms A2 (A2 and A1 achieve the same function) when using chip platform A (with algorithm A1).
[0095] As an example, chip platform A is equipped with an anti-shake algorithm A1. In order to achieve a better anti-shake effect during video recording, the device manufacturer may develop another anti-shake algorithm A2 that is different from the one on chip platform A. The newly developed anti-shake algorithm A2 may need to be linked with the original algorithm on the chip platform (other algorithms A3 related to the implementation of the anti-shake function). Therefore, when developing the new anti-shake algorithm A2, the device manufacturer's developers need to consider the adaptation of the newly developed anti-shake algorithm A2 to the chip platform A, and even need to consider how to link with some of the original algorithms A3 on the chip platform A.
[0096] This means that when the device manufacturer uses another chip platform B, because the architecture of the other chip platform B is different from that of the previous chip platform A, the integrated anti-shake algorithm B1 is also different from the anti-shake algorithm A1 on the chip platform A. The device manufacturer needs to develop an anti-shake algorithm B2 that is compatible with the chip platform B according to the architecture of the chip platform B and the algorithm integrated in the chip platform B. During the development process, it is also necessary to consider the linkage between the newly developed anti-shake algorithm B2 and some existing algorithms B3 on the chip platform B, resulting in low development efficiency.
[0097] In addition, as the R&D capabilities of equipment manufacturers become stronger and stronger, when equipment manufacturers adopt chip platform A, they may need to redevelop multiple algorithms with better effects (A3, A4, A5...), so equipment manufacturers need to consider the compatibility with chip platform A and the linkage with other algorithms on chip platform A when developing each algorithm. As more and more newly developed algorithms are developed, when these algorithms are transplanted to other chip platforms, they need to reconsider the compatibility with other chip platforms and other algorithms in other chip platforms, which is equivalent to redeveloping multiple sets of algorithms, resulting in very low development efficiency.
[0098] In order to solve the above problems, the embodiment of the present application provides a streaming media feature architecture. When the streaming media feature architecture is applied to the image processing system on the chip platform, while realizing the streaming media functions (for example, taking pictures, recording videos, etc.), it can also be decoupled from the chip platform. Therefore, the streaming media feature architecture provided by the embodiment of the present application can be reused on multiple chip platforms, for example, Qualcomm chip platform, MediaTek chip platform, etc. Thereby realizing the development of a set of streaming media feature architecture, which can be applied in the image processing system on the electronic device using different chip platforms to realize the camera function of the electronic device.
[0099] In a specific implementation, the streaming media feature architecture assists the image processing system in realizing the camera function of the electronic device. The required information can be separated into two parts, one of which is information related to the chip platform and the other is information unrelated to the chip platform.
[0100] Information related to the chip platform may include: the acquisition and transmission of information collected by devices such as cameras, gyroscopes, and optical image stabilization, and may also include hardware computing units that provide hardware support when processing the above information (the hardware computing units are set on the chip platform). Information unrelated to the chip platform may include: memory management mechanisms when processing the above information, characteristic algorithms when processing images, etc.
[0101] Among them, information that is not related to the chip platform can be set inside the streaming media feature architecture. For example, a memory management mechanism can be set inside the streaming media feature architecture, and a feature algorithm library can be set, which includes multiple feature algorithms for implementing camera functions. Of course, in order to implement a specific function (for example, a beauty function), multiple feature algorithms in the feature algorithm library may need to participate, which requires multiple feature algorithms to cooperate with each other. For details, please refer to the relevant description of the following embodiments.
[0102] The information related to the chip platform can be acquired and transmitted by setting a related interface on the streaming media feature architecture. The data structure of the related interface is a universally defined data structure, so that the streaming media feature architecture can achieve data docking with different chip platforms, thereby realizing the reuse of the streaming media feature architecture on multiple chip platforms.
[0103] As an example of an interface, a streaming feature architecture that can be reused across chip platforms is provided with an input interface and an output interface. The input interface is used to obtain source data (for example, frame data and synchronized metadata, etc.) required by the streaming feature architecture from the chip platform. After the streaming feature architecture performs feature processing on the source data to obtain a processing result, the processing result is output to the chip platform through the output interface.
[0104] In practical applications, the input interface and the output interface may exist as two independent interfaces, or may be used as an independent interface to implement input and output functions.
[0105] As another example of an interface, the streaming media feature architecture that can be reused across chip platforms is also provided with a hardware interface, which is used to call the hardware computing unit of the chip platform to assist in processing the source data through the hardware computing unit of the chip platform. The hardware interface can be an interface in the client-to-server (Client+Server, CS) mode, and the streaming media feature architecture calls the hardware computing unit on the chip platform through the CS interface.
[0106] For example, an AI algorithm (face recognition) is integrated in the hardware computing unit of the chip platform. Therefore, in the process of the streaming media feature architecture processing the frame data sequence, taking beauty as an example, it is necessary to call the hardware computing unit of the chip platform through hardware interface 1. After the hardware computing unit processes the frame data to obtain the face recognition result, the face recognition result is returned to the streaming media feature architecture through hardware interface 1. The streaming media feature architecture continues to beautify the face in the image frame based on the face recognition result.
[0107] As another example of an interface, when the streaming feature architecture processes source data, it needs to assist in the processing based on information collected by other sensors. In this case, the streaming feature architecture can obtain relevant information from the sensor driver on the chip platform through the hardware interface. In addition, when the streaming feature architecture assists the image processing system in implementing certain functions, it may be necessary to process the obtained data to control certain sensors. In this case, the streaming feature architecture can pass the control information to the driver of the relevant sensor on the chip platform through the hardware interface.
[0108] For example, in optical image stabilization, the streaming feature architecture can obtain the jitter method and displacement of the lens from the gyroscope on the chip platform (the gyroscope inside the camera) through the hardware interface. The streaming feature architecture uses a matching feature algorithm to process the obtained jitter method and displacement, thereby obtaining compensation information of the lens group in the camera, and transmits the compensation information to the camera driver through the hardware interface to compensate for the lens group inside the camera, thereby overcoming image blur caused by vibration of the electronic device and achieving the anti-shake function.
[0109] In actual applications, the hardware interface may implement the calling function for an independent interface, or may implement the above function for multiple independent interfaces.
[0110] As an example, the hardware interface can be divided into hardware interface 1 and hardware interface 2, wherein hardware interface 1 is used to interact with a hardware computing unit on the chip platform, and hardware interface 2 is used to start interaction with a sensor on the chip platform.
[0111] Since the camera of an electronic device may have multiple functions (for example, taking photos, recording videos, beautifying the face, etc.), in order to meet the requirements of multiple scenarios, the streaming feature architecture may also include a scene interface, which is used to obtain the scene selection when the user uses the camera function from the chip platform.
[0112] Of course, in actual applications, the scene interface can exist as an independent interface, and the independent interface is used to receive the user's scene selection.
[0113] The scene interface may also exist as an independent interface together with the input interface, and the independent interface is used to receive the scene selection of the user and receive the source data.
[0114] The scene interface may also exist as an independent interface together with the input interface and the output interface, and the independent interface is used to receive the scene selection of the user, receive the source data and output the processing result.
[0115] Of course, when an interface has multiple functions, it needs to support multiple data paths. The embodiment of the present application does not limit the form of the interface.
[0116] Since the streaming feature architecture can be decoupled from the chip platform, most of the functions that can be implemented depend on the internal feature algorithms. Therefore, the streaming feature structure can configure different feature algorithms or feature algorithm groups (including multiple feature algorithms with associated relationships) according to different scenarios.
[0117] As some examples of characteristic algorithms, the characteristic algorithms may include a data conversion algorithm, an optical image stabilization algorithm, an electronic image stabilization algorithm, a beauty algorithm, and the like.
[0118] The data conversion algorithm converts the data into a data format recognizable by the chip platform within the streaming feature architecture to achieve data docking with the hardware computing unit on the chip platform.
[0119] The optical image stabilization algorithm can obtain the data collected by the gyroscope inside the camera from the sensor driver of the chip platform through the hardware interface. After processing the data, the compensation information is transmitted to the sensor driver through the hardware interface, so that the camera can collect stable frame data and obtain stable video output.
[0120] The electronic image stabilization algorithm can process the source data within the streaming media feature architecture to obtain a stable video output.
[0121] The beautification algorithm can beautify the preview image captured by the camera within the streaming media feature architecture. If the beautification algorithm does not require the support of the hardware computing unit of the chip platform, the beautification processing of the preview image can be implemented within the streaming media feature architecture and output to the chip platform after processing, thereby obtaining the beautified preview image.
[0122] Of course, in actual applications, more feature algorithms can be set inside the streaming media feature architecture to match the image processing-related functions provided by the electronic device where the streaming media feature architecture is located.
[0123] In order to more clearly understand the streaming media feature architecture provided by the embodiment of the present application, the image processing system applied by the streaming media feature architecture is first introduced.
[0124] See also Figure 2 , is an image processing system with a streaming media feature architecture provided in an embodiment of the present application. The image processing system includes a scene selection module, a data acquisition module, a streaming media feature architecture, a photo output module, a video output module, a hardware computing unit and a sensor driving module.
[0125] Among them, the scene selection module is used to receive the scene selected by the user when using the camera function of the electronic device, as an example, the photo scene, the video scene, the portrait mode, the night scene mode, the normal aperture, the large aperture, etc. Of course, in actual applications, other scene examples can also be included, and this application will not give examples one by one. Of course, the user may select multiple scenes at a time, for example, the user chooses to take a photo, and selects the night scene mode and the large aperture.
[0126] The data acquisition module is used to obtain the image frames captured by the camera and the metadata synchronized with the image frames, and send the image frames and the synchronized metadata to the streaming feature architecture.
[0127] The photo output module is used to output and display the processing results of the streaming media feature architecture in the photo scene.
[0128] The video output module is used to output and display the processing results of the streaming media feature architecture in the video recording scene.
[0129] The hardware computing unit is used to provide hardware computing support for the streaming feature architecture.
[0130] The sensor driver is used to provide the streaming feature architecture with sensor data collected by the sensor or to receive processing results (for example, compensation information of the sensor) of the streaming feature architecture.
[0131] The streaming media feature architecture receives the scene information sent by the scene selection module through a universal scene interface; receives frame data and metadata synchronized with the frame data through a universal input interface; then processes the frame data through a feature algorithm (or feature algorithm group) that matches the scene information, and sends the processing result to the corresponding photo output module or video output module through an output interface. In the process of processing data, when the chip platform needs to provide hardware computing support, the hardware computing unit of the chip platform is called through the hardware interface to assist in completing the data processing process; when it is necessary to obtain data collected by the sensor of the electronic device, the sensor driver of the chip platform is called through the hardware interface to obtain the data collected by the sensor; when it is necessary to control the sensor of the electronic device, the control information is transmitted to the sensor driver on the chip platform through the hardware interface.
[0132] Although Figure 2 In the example, the scene interface, input interface and output interface are three independent interfaces. In actual applications, the above three interfaces can be combined into one interface or two interfaces.
[0133] After understanding the position and connection relationship of the streaming feature architecture in the image processing system, the following is a schematic diagram of the streaming feature architecture.
[0134] See also Figure 3, is a schematic diagram of a streaming media feature architecture provided in an embodiment of the present application. The streaming media feature architecture can be applied to an image processing system on a chip platform.
[0135] As mentioned above, the streaming media feature architecture is provided with an input interface, an output interface, a scene interface and a hardware interface (hardware interface 1 and hardware interface 2). In addition, the streaming media feature architecture also includes a processing engine.
[0136] The input interface is used to adapt to the chip platform to receive source data input by the acquisition module on the chip platform.
[0137] The processing engine module is provided with a characteristic algorithm library, and the characteristic algorithm library is provided with a plurality of characteristic algorithms. The processing engine module is used to process the received image data (photo input) or video data (video input) through the characteristic algorithm.
[0138] As another example of the processing engine, the processing engine is divided into a photographing path and a video recording path. The photographing path receives the image frames and corresponding metadata of the photographing input through the input interface, and processes the image frames of the photographing input through the relevant characteristic algorithm to obtain the image processing result, and then sends the image processing result as the photographing output to the chip platform through the output interface. The video recording path receives the image frame sequence and corresponding metadata of the video recording input through the input interface, and processes the image frame sequence of the photographing input through the relevant characteristic algorithm to obtain the video recording processing result, and then sends the video recording processing result as the video recording output to the chip platform through the output interface.
[0139] The output interface is used to adapt to the chip platform to output the processed image data (photo output) or video data (video output) to the upper-level application in the image processing system of the chip platform.
[0140] The hardware interface 1 is used to adapt the hardware computing unit on the chip platform so that when the processing engine module processes the image data or video data, the hardware computing unit on the chip platform is called to assist in completing the data processing process.
[0141] Hardware interface 2 is used to adapt the sensor driver on the chip platform to obtain the information collected by the sensor to assist in completing the corresponding data processing process or assist in realizing certain functions.
[0142] The scene interface can determine the scene when the camera of the electronic device captures images or videos, so as to determine which feature algorithm or algorithms to use.
[0143] The following will use a scenario example to introduce how to implement the streaming media processing method provided in the embodiment of the present application when the streaming media feature architecture provided in the embodiment of the present application is applied in an image processing system, for example, how to connect with the chip platform, how to implement the recording function, etc.
[0144] See also Figure 4 Taking the video stabilization scenario as an example, the user can set whether to turn on the video stabilization during the recording process, or the system can set it internally to turn on the video stabilization function as long as the recording function is turned on; of course, it can also be set to turn on the video stabilization function when a moving object is detected in the video.
[0145] For example, if the user can set the video stabilization function to be turned on during the recording process, the scene selection module will determine that the current scene is the video stabilization scene. The scene selection module sends the information indicating the video stabilization scene to the scene interface of the streaming media feature architecture.
[0146] The scene interface can directly send the information representing the video stabilization scene to the processing engine or convert the information representing the video stabilization scene into a format and then send it to the processing engine. The processing engine selects a characteristic algorithm matching the information representing the video stabilization scene from the characteristic algorithm library.
[0147] In a specific implementation, the information indicating the video stabilization scene may be a unique identifier used to indicate the video stabilization scene.
[0148] As an example, multiple scenes supported by the electronic device can be set with a unique identifier corresponding to each scene. The current scene unique identifier is determined based on the scene selection made by the user when taking photos or recording videos. Of course, the user can select multiple scenes (for example, large aperture, anti-shake, beauty, etc.) during the photo or video recording process. The set of unique identifiers corresponding to the multiple scenes will form a unique identifier group, which can correspond to one or more feature algorithms in the feature algorithm library.
[0149] After the user starts recording, the data acquisition module can obtain the frame data sequence collected by the camera and the metadata synchronized with each frame data in the frame data sequence.
[0150] The data acquisition module sends the frame data sequence and metadata synchronized with each frame data in the frame data sequence to an input interface of the streaming media feature architecture.
[0151] The input interface sends the frame data sequence and metadata synchronized with each frame data in the frame data sequence to the video input channel.
[0152] It should be noted that in a video recording scenario, the acquired data may include a preview stream and a video recording stream. The preview stream and the video recording stream may use different characteristic algorithms or may use the same characteristic algorithms.
[0153] The feature algorithm (or feature algorithm group) pre-determined according to the scene unique identifier (or scene unique identifier group) in the streaming media feature architecture processes the frame data sequence received by the video input channel.
[0154] In the embodiment of the present application, if used in a high-end electronic device (for example, electronic device A), a combination of optical image stabilization and electronic image stabilization can be adopted. Accordingly, the electronic device adopts a high-end chip platform (for example, chip platform A).
[0155] As a principle of optical image stabilization, an image sensor is mounted on a freely floating bracket, and a gyroscope can be provided on the electronic device. The gyroscope can sense the shaking direction and amplitude of the electronic device. The characteristic algorithm corresponding to the optical image stabilization provided in the embodiment of the present application can calculate the displacement compensation of the image sensor according to the data collected by the gyroscope, and the displacement compensation can be transmitted to the image sensor again to control the image sensor to float based on the displacement compensation.
[0156] As a principle of electronic image stabilization, the images collected by the camera are analyzed and processed through software algorithms. When the image is blurred, the edge image can be used to compensate for the blurred part in the middle, thereby achieving image stabilization. This image stabilization technology requires processing of frame data.
[0157] It can be understood from the above examples that the characteristic algorithm in electronic device A needs to process the data uploaded by the gyroscope and pass the processing result to the image sensor. In actual applications, the streaming characteristic architecture can obtain the data uploaded by the gyroscope through hardware interface 2, and then process the data uploaded by the gyroscope through the characteristic algorithm to obtain displacement compensation, and then send the displacement compensation to the image sensor driver through hardware interface 2. The image sensor driver can control the image sensor to float based on the displacement compensation.
[0158] In order to further obtain a better anti-shake effect, the characteristic algorithm in the electronic device A also includes a characteristic algorithm corresponding to the electronic anti-shake, which can analyze and process the frame data collected by the image sensor to compensate and obtain a further compensated anti-shake image.
[0159] In the process of analyzing and processing the frame data by the characteristic algorithm corresponding to the electronic image stabilization, if the AI algorithm provided by the chip platform in hardware can identify the blurriness of the image, then after receiving the image frame, the processing engine can use the data format conversion algorithm to process the image frame to obtain the image format that can be recognized by the hardware computing unit on the chip platform, and then call the hardware interface 1 to enable the hardware computing unit on the chip platform to identify the blurriness of the image. After the hardware computing unit on the chip platform obtains the recognition result, it returns the recognition result to the processing engine. The processing engine processes the image frame after obtaining the recognition result through the corresponding characteristic algorithm. For example, in the case of a blurry image, the image frame is compensated by the characteristic algorithm to obtain an anti-shake image, and the anti-shake image is sent to the output interface; in the case of a clear image, the clear image frame is cut and output to the output interface. In this way, a stable anti-shake video stream can be obtained.
[0160] The output interface sends the image frame sequence and the corresponding metadata to the video output, which can upload the image frames to the upper layer application, and the user can get the video file after optical image stabilization and electronic image stabilization.
[0161] If, during the application process, due to the need for product renewal and upgrading, the electronic device needs to use chip platform B, or the electronic device manufacturer develops another high-end electronic device B, and the high-end electronic device B needs to use chip platform B due to special needs. The camera of the electronic device B and the camera of the electronic device A use cameras of the same manufacturer and model. Then the video anti-shake algorithm on the electronic device B can reuse the video anti-shake algorithm on the electronic device A. In this case, the streaming media feature architecture used in the electronic device A can be reused in the electronic device B, because the various interfaces of the streaming media feature architecture that interact with the chip platform are all interfaces of a universal language structure. There is no need to develop a video anti-shake function adapted to the chip platform B for the chip platform, nor is there any need to develop other functions of the camera adapted to the chip platform B.
[0162] If in the process of application, in order to meet the needs of different groups, the equipment manufacturer needs to develop a relatively low-end electronic device C, and in order to save costs, the chip platform C is used. At the same time, in order to reduce costs, a camera that cannot achieve body sensor anti-shake is used. In this case, the developer only needs to modify the correspondence between the internally stored scene unique identifier and the characteristic algorithm. For example, the unique identifier of the video anti-shake in the electronic device A corresponds to the characteristic algorithm A (optical anti-shake algorithm) and the characteristic algorithm B (electronic anti-shake), and the unique identifier of the video anti-shake scene in the electronic device C corresponds to the characteristic algorithm B, and there is no need to delete the characteristic algorithm A. Of course, in actual applications, developers can also delete the characteristic algorithm A in the streaming media characteristic architecture for the electronic device C, and this application does not limit the specific implementation method. It can be understood from here that when developers develop electronic devices with general functions, the development efficiency is greatly improved.
[0163] The embodiment of the present application uses the anti-shake algorithm as an example to describe that the streaming media feature architecture provided by the embodiment of the present application in the image processing system can be applied to multiple chip platforms and can be reused on multiple chip platforms. In practical applications, the image processing system that implements the various functions of the camera of the electronic device can set the feature algorithms corresponding to the various functions of the camera in the feature algorithm library in the processing engine.
[0164] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0165] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0166] The embodiment of the present application also provides a computer program product. When the computer program product is executed on a first device, the first device can implement the steps in the above-mentioned method embodiments.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0168] The embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0170] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A streaming media feature architecture, It is characterized in that Applied to the chip platform, the streaming media feature architecture includes: A docking module, used to dock with the chip platform to obtain streaming media data related to the chip platform, obtain a collection scene of the streaming media data, and send processed streaming media data to the chip platform; A first hardware interface, used to connect to a hardware computing unit on the chip platform, wherein the hardware computing unit is used to process the streaming media data; A second hardware interface is used to connect to a sensor driver on the chip platform, wherein the sensor driver includes a gyroscope driver and an image sensor driver; and is also used to obtain data collected by a gyroscope from the gyroscope driver, wherein the data collected by the gyroscope is used to generate control information of the image sensor and assist the processing engine in completing streaming media data processing, and is also used to send the control information to the image sensor driver; A processing engine is provided with a characteristic algorithm that is independent of the chip platform and corresponds to each acquisition scenario, wherein the characteristic algorithm is used to process the streaming media data acquired by the docking module through the characteristic algorithm corresponding to the acquisition scenario to obtain the processed streaming media data corresponding to the acquisition scenario; the processing engine is also used to complete the processing of the streaming media data using the hardware computing unit on the chip platform through the first hardware interface; the processing engine is also used to acquire the data acquired by the gyroscope through the second hardware interface, and process the streaming media data based on the data acquired by the gyroscope; obtain control information of the image sensor based on the data acquired by the gyroscope, and send the control information to the image sensor driver on the chip platform through the second hardware interface, and the control information is used to control the image sensor.
2. The streaming media feature architecture as claimed in claim 1, It is characterized in that The docking module comprises: An input interface, used to interface with the chip platform to obtain the streaming media data from the chip platform; A scene interface, used to connect to the chip platform to obtain the collection scene of the streaming media data from the chip platform; An output interface is used to connect to the chip platform to send the processed streaming media data to the chip platform.
3. According to the streaming media feature architecture as described in any one of claims 1 to 2, the docking module is applicable to multiple types of chip platforms.
4. A streaming media processing method, It is characterized in that Applied to an electronic device, the electronic device comprises: a docking module docking with a chip platform of the electronic device and a processing engine provided with a characteristic algorithm that is independent of the chip platform and corresponds to each acquisition scenario, the electronic device also comprises a first hardware interface and a second hardware interface docking with hardware resources on the chip platform; the method comprises: The docking module obtains the streaming media data collected by the camera of the electronic device and the collection scene of the streaming media data from the chip platform of the electronic device; The processing engine processes the streaming media data by using the characteristic algorithm corresponding to the acquisition scenario to obtain processed streaming media data; The docking module sends the processed streaming media data to the chip platform of the electronic device; The method further comprises: The processing engine processes the streaming media data using a hardware computing unit on the chip platform through the first hardware interface; The processing engine obtains data collected by the gyroscope on the chip platform through the second hardware interface, generates control information of the image sensor based on the data collected by the gyroscope, and processes the streaming media data; The processing engine sends the control information to the image sensor driver on the chip platform through the second hardware interface, and the control information is used to control the image sensor.
5. An electronic device, It is characterized in that The electronic device comprises a chip platform, and the streaming media characteristic architecture as claimed in any one of claims 1 to 3 is provided on the chip platform.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which implements the method according to claim 4 when executed on a processor.
