Pipeline creating method and related equipment
By determining the image output format and placeholder configuration of image shooting in the field of image processing, dynamically analyzing static configuration files and shooting environment information, and dynamically creating and connecting pipes, the problem of inflexible pipeline creation in traditional methods is solved, and the pipeline creation is improved efficiency and adaptability.
Patent Information
- Application Number
- CN202410314173.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-03-18
AI Technical Summary
Traditional pipeline creation methods cannot flexibly configure and create pipelines in the field of image processing, resulting in the need to update static configuration files in different scenarios, wasting computing resources and time-consuming.
By determining the image output format and corresponding placeholding configuration of the image shooting, analyzing the static configuration file to obtain the pipeline style, and dynamically determine the plug-in identification and location based on the shooting environment information, dynamically create and connect the pipeline, realizing flexible pipeline configuration and creation .
It realizes flexible configuration and creation of pipelines in different shooting environments and scenarios, improves the efficiency and adaptability of pipeline creation, and avoids the impact of frequent updates of static configuration files on other programs.
Smart Images

Figure CN119248364A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a pipeline creation method and related equipment. Background Art
[0002] Plugins enable software to enhance and expand the functionality of existing software in a modular way, and because plugins are independent of the main program, they are easier to update and maintain. A pipeline is a method of combining multiple processing steps to achieve complex workflows. Plugins can be used as part of a pipeline to help achieve more complex and diverse automation processes.
[0003] The traditional pipeline creation process can be roughly divided into: parsing the statically configured pipeline link, determining the required pipeline, creating all the plug-ins in the pipeline; connecting the created plug-ins; installing the entire pipeline. For example, the following pipelines are configured in the static configuration file: Pipeline A (plug-in 1-plug-in 2-plug-in 3); Pipeline B (plug-in 2-plug-in 4); Pipeline C (plug-in 2-plug-in 3-plug-in 4). If it is determined that the required pipeline is pipeline B, then plug-in 2 and plug-in 4 in pipeline B are created. Then plug-in 2 and plug-in 4 are connected to obtain the entire pipeline. However, this traditional pipeline creation method requires static configuration of multiple pipelines that may be used for scenarios in the field of image processing, and cannot flexibly configure and create pipelines. Summary of the invention
[0004] The present application provides a pipeline creation method and related devices, which can configure and create pipelines more flexibly.
[0005] In a first aspect, some embodiments of the present application provide a pipeline creation method. The pipeline creation method may include: determining a first output format of image capture, the first output format being the image format before dumping; determining a first placeholder configuration corresponding to the first output format, the first placeholder configuration being used to indicate the position of the placeholder and the type of the placeholder; obtaining a first pipeline style based on a parsed static configuration file and the first placeholder configuration, the static configuration file being used to configure the identifiers of multiple first plug-ins and the positions of multiple first plug-ins, the first pipeline style including the identifiers of multiple first plug-ins, the positions of multiple first plug-ins, the positions of placeholders, and the types of placeholders; determining the identifier of a second plug-in based on the type of placeholder in the first pipeline style and the first decision information; creating a first pipeline based on the identifiers of multiple first plug-ins, the positions of multiple first plug-ins, the identifier of a second plug-in, and the position of the second plug-in, the position of the second plug-in being determined based on the position of the placeholder.
[0006] In the above manner, when configuring the first pipeline style, based on the first output image format, a position is reserved in the pipeline for the plug-in corresponding to the first output image format; then based on the current shooting environment, the corresponding plug-in is inserted into the reserved position, and the inserted plug-in can be flexibly changed for different shooting environments, thereby realizing flexible configuration and creation of pipelines.
[0007] In a possible implementation, the identifier of the second plug-in is determined based on the type of the placeholder in the first pipeline style and the first decision information, specifically: based on the type of the placeholder in the first pipeline style, a first plug-in decision set is determined from a plurality of preset plug-in decision sets, the plug-in decision set includes at least one enable function, and the enable function is used to decide whether to enable the corresponding plug-in; based on the first decision information and the first plug-in decision set, the identifier of the second plug-in is determined.
[0008] In the above manner, a plug-in decision set of this type is determined based on the type of the placeholder, and then based on the current shooting environment, the identifier of the corresponding plug-in is accurately determined from the plug-in decision set of this type.
[0009] In a possible implementation, the second plug-in is a plug-in corresponding to the enabling function satisfied by the first decision information.
[0010] By means of the above method, the identifier of the plug-in to be inserted into the reserved position (the position of the placeholder) can be accurately determined based on the current shooting environment.
[0011] In a possible implementation, a first pipeline is created based on the identifiers of multiple first plug-ins, the positions of multiple first plug-ins, the identifier of the second plug-in, and the position of the second plug-in, specifically: based on the identifiers of multiple first plug-ins and the identifier of the second plug-in, multiple first plug-ins and second plug-ins are created; the position of the placeholder is determined as the position of the second plug-in; based on the positions of the multiple first plug-ins and the positions of the second plug-in, the multiple first plug-ins and the second plug-in are connected to obtain the first pipeline.
[0012] In the above manner, based on the plug-in identifier, the plug-in indicated by the plug-in identifier is accurately created, and based on the position of the plug-in, the plug-ins in the pipeline are accurately connected in sequence to obtain the first pipeline.
[0013] In a possible implementation, based on the positions of the multiple first plug-ins and the positions of the second plug-ins, the multiple first plug-ins are connected to obtain a first pipeline, specifically: if the number of second plug-ins is greater than one, the multiple second plug-ins are connected; based on the positions of the multiple first plug-ins and the positions of the second plug-ins, the connected multiple second plug-ins are connected with the multiple first plug-ins to obtain the first pipeline, and the positions of the connected multiple second plug-ins are the positions of the placeholders.
[0014] By the above method, when the determined second plug-in is a plurality of second plug-ins, the plurality of second plug-ins are first connected, and then the connected plurality of second plug-ins are inserted into the reserved position and connected with other first plug-ins, so that the order of the plug-ins of the obtained first pipeline is accurate.
[0015] In one possible implementation, a first pipeline style is obtained based on a parsed static configuration file and a first placeholder configuration, specifically: system data of the electronic device is determined, the system data includes the system's memory usage; if the system data meets a dump condition, a first pipeline style is obtained based on the parsed static configuration file and the first placeholder configuration, and the dump condition includes that the system's memory usage is less than a preset threshold.
[0016] Through the above method, when the memory resources of the electronic device are sufficient, the first pipeline style is configured and created to avoid the process of configuring and creating the first pipeline style affecting the operation of other programs.
[0017] In one possible implementation, determining a first output format of image shooting includes: determining the first output format of image shooting based on a shooting mode; determining a first placeholder configuration corresponding to the first output format, including: determining the first placeholder configuration corresponding to the first output format based on a mapping relationship between preset output formats and placeholder configurations.
[0018] In the above manner, different shooting modes may correspond to different image output formats, and based on the shooting mode currently used by the electronic device, the image output format of the shooting mode is determined, so that the placeholder configuration can be accurately determined.
[0019] In a possible implementation, if a change in shooting mode is detected, a second output image format is determined based on the changed shooting mode; if the first output image format is different from the second output image format, a second placeholder configuration corresponding to the second output image format is determined; based on the parsed static configuration file and the second placeholder configuration, a second pipeline style is obtained, the second pipeline style includes identifiers of multiple first plug-ins, positions of multiple first plug-ins, positions of placeholders, and types of placeholders; based on the type of placeholders in the second pipeline style and the second shooting environment information, an identifier of the second plug-in is determined; based on the identifiers of multiple first plug-ins, positions of multiple first plug-ins, an identifier of the second plug-in, and the position of the second plug-in, a second pipeline is created.
[0020] In the above manner, when the output format changes, the second pipeline style is re-determined, and based on the shooting environment information, the plug-in inserted into the reserved position is re-determined, so that the configured and created pipeline can be suitable for the output format.
[0021] In a second aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the pipeline creation method in any possible implementation of the first aspect.
[0022] In a third aspect, the present application provides a pipeline creation device, which may be an electronic device, or a device in an electronic device, or a device that can be used in combination with an electronic device; wherein the pipeline creation device may also be a chip system, and the pipeline creation device may execute the method executed by the electronic device in the first aspect. The functions of the pipeline creation device may be implemented by hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more units corresponding to the above functions. The unit may be software and / or hardware. The operations and beneficial effects performed by the pipeline creation device may refer to the methods and beneficial effects described in the first aspect above, and the repetitive parts will not be repeated.
[0023] In a fourth aspect, the present application provides a chip system, which includes a processor and an interface, and the processor and the interface are coupled; the interface is used to receive or output signals, and the processor is used to execute code instructions to execute the pipeline creation method in any possible implementation of the first aspect above.
[0024] In a fifth aspect, the present application provides a computer-readable storage medium storing a computer program / instruction. When the computer program product runs on a computer, the computer executes the pipeline creation method in any possible implementation of the first aspect.
[0025] In a sixth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the pipeline creation method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a flow chart of a traditional pipeline creation method provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0028] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0029] Figure 4A flowchart of a pipeline creation method based on a software structure provided in an embodiment of the present application;
[0030] Figure 5 A schematic diagram of a pipeline creation method provided in an embodiment of the present application;
[0031] Fig. 6A A schematic diagram of a first pipeline style provided in an embodiment of the present application;
[0032] Figure 6B A schematic diagram of a first pipeline created according to an embodiment of the present application;
[0033] Figure 6C Another schematic diagram of a first pipeline style provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of the structure of a pipeline creation device provided in an embodiment of the present application;
[0035] Figure 8 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0037] It should be understood that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0038] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0039] In order to facilitate understanding of the solution provided by the embodiment of the present application, the following introduces the relevant concepts involved in the embodiment of the present application:
[0040] Raw format: RAW format is an uncompressed image file format that retains all the data captured by the camera sensor. The advantage of RAW format is that it can record the details of the photo and retain more image information, including exposure, tone and style.
[0041] UnpackRaw format: UnpackRaw format generally refers to converting the RAW data of an image from a tightly packed format to a more easily processed unpacked format. UnpackRaw is a non-tightly packed format where the data of each pixel is stored independently, making it easier for the image processor to read and process it.
[0042] Yuv format: YUV format is a pixel format that represents brightness and chrominance components separately. It is mainly used in applications such as videos, pictures, and cameras. The YUV format contains three components: a brightness component (Y) and two chrominance components (U and V). Specifically: Brightness component (Y): represents brightness or grayscale value, that is, the information of black and white images. If only the Y component is displayed, the image will look like a black and white photo. Chroma components (U and V): describe the color and saturation of the image. The U component represents the information of the blue part after removing the brightness, and the V component represents the information of the red part after removing the brightness. These two components are used together to specify the color of the pixel.
[0043] Pipeline creation: Pipeline creation is mainly as follows Figure 1 As shown, it is divided into the following processes: parsing static configuration files, decision pipeline, creating plug-ins, connecting plug-ins, and installing pipeline. The following is an introduction to the above steps:
[0044] Parsing a static configuration file: The static configuration file includes multiple pre-configured pipeline styles. For example, the static configuration file includes the following three pipeline styles: pipeline A (plugin 1-plugin 2-plugin 3); pipeline B (plugin 2-plugin 4); pipeline C (plugin 2-plugin 3-plugin 4). By parsing the static configuration file, the above three pipeline styles can be obtained.
[0045] Decision pipeline: Based on the current scenario, determine the corresponding feature identifier, which is the feature identifier of the pipeline. The features of different pipelines can be the same, so different pipelines can correspond to the same feature identifier. For example, the feature identifiers corresponding to pipeline A and pipeline C can be the same, while the feature identifiers corresponding to pipeline A and pipeline B are different. The feature identifier can be determined based on the scenario in which the current pipeline is applied. For example, if the current scenario is a search query, the feature identifier is used to indicate the pipeline that can perform the search query. If pipeline A is the pipeline for the search query, the pipeline obtained by the feature identifier indication is pipeline A.
[0046] Create each plug-in: Based on the pipeline style indicated by the feature identifier, create each plug-in in the pipeline. For example, if the pipeline indicated by the feature identifier is pipeline A (plug-in 1-plug-in 2-plug-in 3), then create plug-in 1, plug-in 2, and plug-in 3.
[0047] Connect each plug-in: Connect each plug-in in the order of the pipeline style. For example, plug-in 1 is connected to plug-in 2, and plug-in 2 is connected to plug-in 3.
[0048] Install pipelines: If the feature identifier indicates multiple pipeline styles, after creating and connecting plug-ins for the multiple pipelines, install the multiple pipelines. For example, for pipeline A and pipeline B, first create and connect the three plug-ins in pipeline A (plug-in 1-plug-in 2-plug-in 3) and the two plug-ins in pipeline B (plug-in 2-plug-in 4), and then install pipeline A and pipeline B together to obtain the final pipeline.
[0049] The above-mentioned method of configuring and creating pipelines requires that all pipeline styles be pre-configured in the static configuration file. That is to say, for scenarios where there are multiple plug-in combinations and plug-in positions need to be flexibly changed, all combinations and positions need to be pre-listed and configured in the static configuration file. This method of configuring and creating pipelines requires re-parsing all pipeline styles in the static configuration file and traversing all pipeline styles to determine the pipeline style suitable for the current scene each time the scene changes and the pipeline needs to be updated. It is impossible to flexibly configure and create pipelines, which not only wastes computing resources, but is also time-consuming. In order to solve this problem, the present application provides a pipeline creation method and related equipment, which can configure and create pipelines more flexibly. The pipeline creation method is further introduced below.
[0050] The hardware structure of the electronic device 100 is introduced below. Figure 2 , Figure 2 It is a schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application.
[0051] The electronic device 100 may include a processor 110, 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, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0052] It is to be understood that the structure illustrated in the embodiment of the present invention 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 separate 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.
[0053] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0054] 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.
[0055] A memory may also be provided in the processor 110 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. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. The processor 110 calls the instructions or data stored in the memory, so that the electronic device 100 executes the shooting method executed by the electronic device in the following method embodiment.
[0056] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0057] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0058] 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. In some other embodiments, the power management module 141 can also be set in the processor 110.
[0059] 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.
[0060] 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.
[0061] 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, and process 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. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0062] The modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.
[0063] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), BLE broadcasting, 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 filters it, 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.
[0064] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The display screen 194 may be an outward folding screen, that is, a display screen that is folded outward.
[0065] The electronic device 100 can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor. The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture static images or videos. The camera 193 may include a front camera and a rear camera, the front camera is located in the display area of the screen, and the rear camera is located in the back area of the screen. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs.
[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 via the external memory interface 120 to implement a data storage function.
[0067] The internal memory 121 can be used to store computer executable program codes, which 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 may store an operating system, an application required for at least one function (such as a sound playback function), etc. The data storage area may store data (such as audio data) created during the use of the electronic device 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as a flash memory device, etc.
[0068] 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.
[0069] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input 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.
[0070] Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. Microphone 170C, also known as "microphone" and "microphone", is used to convert sound signals into electrical signals. Headphone interface 170D is used to connect wired headphones. Pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, pressure sensor 180A can be set on display screen 194. Gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. Air pressure sensor 180C is used to measure air pressure. Magnetic sensor 180D includes Hall sensor. Acceleration sensor 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). Distance sensor 180F is used to measure distance. Proximity light sensor 180G can include, for example, light emitting diode (LED) and light detector. Ambient light sensor 180L is used to sense ambient light brightness. Fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. 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 bone conduction sensor 180M can obtain vibration signals. The buttons 190 include a power button, a volume button, etc. The motor 191 can generate vibration prompts. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
[0071] Figure 3 A schematic diagram of the software structure of an electronic device 100 provided in an embodiment of the present application.
[0072] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the hardware abstraction layer (HAL).
[0073] The application layer can include a series of application packages. Figure 3 As shown, the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0074] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an operating system, and the like.
[0075] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0076] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0077] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0078] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0079] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the user terminal vibrates, the indicator light flashes, etc.
[0080] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0081] The operating system can provide memory information of the electronic device, including the memory usage of the electronic device, and can also provide temperature information, sleep wake-up information and application data of the electronic device. The sleep wake-up information includes whether the current electronic device is in the wake-up state or the sleep state, and the application data includes the application program currently running on the electronic device.
[0082] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0083] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0084] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0085] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0086] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0087] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0088] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0089] A 2D graphics engine is a drawing engine for 2D drawings.
[0090] The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and can provide a virtual hardware platform for the operating system. The hardware abstraction layer includes the perception engine, dump decision, session module (Session) and decision engine.
[0091] In order to better understand the pipeline creation method provided by this application, Figure 4 This section further introduces the pipeline creation method. Figure 4 As shown, Figure 4A pipeline creation method based on software architecture provided in an embodiment of the present application mainly involves the following five modules: operating system, perception engine, dump decision, session module (Session) and decision engine. The operating system is located in the application architecture layer, and the perception engine, dump decision, session module and decision engine are located in the hardware abstraction layer. Among them:
[0092] 401. The operating system sends operating system data to the perception engine.
[0093] The operating system data includes memory information, application data, and sleep wake-up information, etc. The memory information is the memory usage of the electronic device, or the free memory of the electronic device. For example, the memory information is 65% (memory usage of the electronic device), or the memory information is 35% (free memory of the electronic device). It should be noted that the memory information can also be in other forms, such as memory information of 900MB (memory usage of the electronic device).
[0094] The application data includes the currently running application, or may also include the priority of the currently running application (for example, the call application has the highest priority, the game application has the second highest priority, etc.), or may also include the memory usage of the currently running application, etc. For example, the application data is: Game Application 1-A-27%. Among them, Game Application 1 is the name of the currently running application, A is the priority of Game Application 1, and 27% is the memory usage of Game Application 1.
[0095] The sleep-wake-up information indicates whether the current state of the electronic device is a sleep state or a wake-up state. In a possible embodiment, when the electronic device is in a screen-off state, the electronic device can be considered to be in a sleep state, otherwise the electronic device is considered to be in a wake-up state.
[0096] It should be noted that the operating system may also include other data besides the above, such as power data of the electronic device, etc., and this application does not impose any limitation on this.
[0097] 402. The perception engine sends temperature information, memory information, sleep wake-up information, and application data to the dump decision.
[0098] The temperature information may be determined by a perception engine, which may include a temperature sensor. Optionally, the temperature information may be obtained by the operating system through a sensor and then sent to the perception engine. The temperature information is the current temperature of the electronic device.
[0099] Optionally, the perception engine may also send other data to the dump decision, such as power data of the electronic device, etc., which is not limited in this application.
[0100] 403. The dump decision is based on the temperature information, the memory information, the sleep and wake-up information, and the application data to determine whether a dump module needs to be added.
[0101] Whether to add a dump module can be determined based on whether various information meets the dump adding conditions, including temperature threshold, memory threshold, sleep and wake-up state condition, and application data condition.
[0102] In a possible embodiment, when the temperature information is lower than the temperature threshold, the memory information (memory usage of the electronic device) is lower than the memory threshold, or the memory information is higher than the memory threshold (memory free amount of the electronic device), the sleep wake-up information meets the sleep wake-up state condition, and the application data meets the application data condition, it is determined that a dump module needs to be added.
[0103] For example, the temperature threshold is 30 degrees Celsius, the memory threshold is 40%, the sleep wake-up state condition is the wake-up state, and the application data condition is that no high-priority applications (such as game applications, etc.) are running. If the temperature information is 25 degrees Celsius (lower than 30 degrees Celsius), the memory information is 30% (lower than 40%), the sleep wake-up information is the wake-up state, and the running applications do not include high-priority applications, it is determined that a dump module needs to be added.
[0104] Optionally, in addition to the above conditions, a power condition may also be included, and the information may also include the power of the electronic device. For example, if the power condition is that the power of the electronic device needs to be higher than 30%, if the current power of the electronic device is 40%, the power condition is met.
[0105] Optionally, in addition to the above conditions, more conditions may be included, which are not limited in this application.
[0106] 404. If a dump module needs to be added, the dump decision sets device environment information to the session module.
[0107] The environmental information includes the above-mentioned temperature information, memory information, sleep and wake-up information, application data, etc. The above-mentioned environmental information is recorded to provide a log to query the environmental information of the electronic device in each time period.
[0108] 405. The conversation module sends a decision instruction to the decision engine.
[0109] Among them, the decision instruction is used to instruct the decision engine to determine the feature identifier. The feature identifier can be found in the introduction in the previous text, and this application will not go into details here.
[0110] 406. The decision engine determines the feature information, and based on the feature information, determines a feature identifier.
[0111] The decision engine responds to the decision instruction sent by the conversation module and determines the feature information. The feature information is determined based on the current scenario. Different scenarios have different requirements and corresponding feature information. For example, in a shopping scenario, the feature may be a search query feature.
[0112] In a possible embodiment, if it is a shooting scene, the feature information may be the current shooting mode. For example, if the current shooting mode is a portrait mode, the feature information is determined based on the portrait mode; or if the current shooting mode is a moon shooting mode, the feature information is determined based on the moon shooting mode.
[0113] Among them, the feature information and the feature identifier may correspond one-to-one, or multiple feature information may correspond to the same feature identifier, or one feature information may correspond to multiple feature identifiers. For example, the feature identifier corresponding to the portrait mode and the high-definition mode may be the same feature identifier. The moon shooting mode may correspond to multiple feature identifiers, thereby determining multiple pipeline styles. In a possible implementation, the electronic device pre-stores a mapping relationship between the shooting mode and the feature identifier, and the corresponding feature identifier can be directly determined based on the shooting mode through the mapping relationship.
[0114] 407. The decision engine sends the feature identifier to the conversation module.
[0115] Among them, the feature identification can be found in the introduction of the above step 405, and this application will not elaborate on it here.
[0116] 408. The session module configures and creates a pipeline based on the feature identifier.
[0117] The process of configuring and creating a pipeline can be found in the following Figure 5 As shown, this application will not be repeated here.
[0118] The following is a further introduction to the pipeline creation method provided in the embodiment of the present application:
[0119] 501. The electronic device determines a first output image format of an image shot, where the first output image format is an image format before dumping.
[0120] The first output image format is the format of the image before dumping, and the format of the image before dumping is the format of the image to be dumped. The format of the image before dumping can be the format of the image obtained after the camera is shot. Alternatively, the first output image format can also be the image format before the image format is converted, for example, converting an image in the Yuv format to an image in the JPG format, and the Yuv is the first output image format. Alternatively, the first output image format can be the format of the first pipeline input.
[0121] In a possible embodiment, the electronic device determines the first output image format of the image shooting, specifically: the electronic device determines the first output image format of the image shooting based on the shooting mode. The shooting mode is the shooting mode currently used by the camera, and the electronic device has a preset mapping relationship between the camera mode and the first output image format, and the first output image format can be determined based on the camera mode and the mapping relationship.
[0122] Optionally, the electronic device determines the first output image format based on the shooting parameters selected by the user. For certain shooting modes (such as professional mode), the user can select shooting parameters (such as exposure parameters, focal length, etc.), and the first output image format is determined based on the respective shooting parameters selected by the user and the mapping relationship between the preset shooting parameters and the output image format mapping.
[0123] 502. The electronic device determines a first placeholder configuration corresponding to a first output image format, where the first placeholder configuration is used to indicate a position and a type of a placeholder.
[0124] The first placeholder configuration includes the position of the placeholder in the pipeline and the type of the placeholder. The position in the pipeline can be indicated in the following two ways: indicating the plug-in before the placeholder and the plug-in after the placeholder; or indicating the position of the placeholder in the pipeline. For example, Fig. 6A As shown, the position of the placeholder can be indicated by indicating that the plug-in before the placeholder is a resource plug-in and the plug-in after the placeholder is plug-in A; or the position of the placeholder can be indicated by indicating that the placeholder is located at the second position in the pipeline.
[0125] In a possible embodiment, the type of the placeholder is the first output image format, and the type of the placeholder includes the following three types: Unpack Raw format, Raw format and Yuv format. The above three types are output image formats, which can be specifically referred to in the above description, and this application will not be repeated here.
[0126] In a possible embodiment, the electronic device determines the first placeholder configuration based on the shooting mode. Different shooting modes correspond to different image output formats, and different image output formats correspond to different placeholder configurations. Therefore, the position of the placeholder can be determined directly based on the shooting mode.
[0127] In a possible embodiment, the electronic device determines the type of the placeholder based on the shooting mode. Different shooting modes correspond to different output image formats, and the output image format is the type of the placeholder. Therefore, the type of the placeholder can be directly determined based on the shooting mode.
[0128] In a possible embodiment, the electronic device determines the first placeholder configuration corresponding to the first output image format, specifically: the electronic device determines the first placeholder configuration corresponding to the first output image format based on a preset mapping relationship between the output image format and the placeholder configuration.
[0129] 503. The electronic device obtains a first pipeline style based on the parsed static configuration file and the first placeholder configuration, wherein the static configuration file is used to configure the identifiers of multiple first plug-ins and the positions of multiple first plug-ins, and the first pipeline style includes the identifiers of multiple first plug-ins, the positions of multiple first plug-ins, the positions of placeholders, and the types of placeholders.
[0130] The static configuration file includes a plurality of preset pipeline styles, the first pipeline style is different from the preset pipeline style, and the first pipeline style adds a placeholder compared to the preset pipeline style.
[0131] In a possible embodiment, the electronic device determines a feature identifier; the electronic device determines a default pipeline style based on the feature identifier; the electronic device obtains a first pipeline style based on the default pipeline style and the first placeholder configuration. The process of determining the feature identifier and the default pipeline style by the electronic device can be referred to in the above Figure 4 As shown, this application will not be repeated here.
[0132] For example, Fig. 6A As shown, the electronic device determines the default pipeline style as (resource plug-in-plug-in A-plug-in B-plug-in C-data pool plug-in) based on the feature identifier. After the electronic device parses the first placeholder configuration, it inserts the placeholder after the resource plug-in and before plug-in A. The first pipeline style is as shown in FIG. Fig. 6A shown.
[0133] In a possible embodiment, the electronic device obtains a first pipeline style based on a parsed static configuration file and a first placeholder configuration, specifically: the electronic device determines system data of the electronic device, and the system data includes the memory usage of the system; if the system data of the electronic device meets the dump condition, then based on the parsed static configuration file and the first placeholder configuration, the first pipeline style is obtained, and the dump condition includes that the memory usage of the system is less than a preset threshold.
[0134] Among them, it can be to determine the pipeline style and subsequent processes when the electronic device has sufficient memory. The data system and memory usage can be seen above Figure 4 The system data may include the amount of free memory in the system. In addition, the system data may also include other data, such as temperature information of the electronic device, sleep wake-up information, application data, etc., which are not described in detail in this application.
[0135] Through the above method, when the memory resources of the electronic device are sufficient, the first pipeline style is configured and created to avoid the process of configuring and creating the first pipeline style affecting the operation of other programs.
[0136] 504. The electronic device determines an identifier of the second plug-in based on the type of the placeholder in the first pipeline style and the first decision information, where the first decision information includes shooting environment information.
[0137] The second plug-in is a plug-in placed in the placeholder position, and the second plug-in may be one or more. The first decision information may be current environment information, such as the brightness of the environment, or the distance between the photographed object and the electronic device. For example, in the moon shooting mode, the first decision information is the distance between the photographed object and the electronic device. The first decision information may also be information other than shooting environment information, such as shooting parameters.
[0138] In a possible embodiment, the electronic device determines the identifier of the second plug-in based on the type of the placeholder in the first pipeline style and the first decision information, specifically: the electronic device determines a first plug-in decision set from a plurality of preset plug-in decision sets based on the type of the placeholder in the first pipeline style, the plug-in decision set including at least one enable function, and the enable function is used to decide whether to enable the corresponding plug-in; based on the first decision information and the first plug-in decision set, the identifier of the second plug-in is determined.
[0139] In the above manner, a plug-in decision set of this type is determined based on the type of the placeholder, and then based on the current shooting environment, the identifier of the corresponding plug-in is accurately determined from the plug-in decision set of this type.
[0140] In a possible embodiment, the second plug-in is a plug-in corresponding to the enabling function satisfied by the first decision information.
[0141] The plug-in decision set may include a mapping relationship between an enabling function and a plug-in identifier, and the representation of the plug-in corresponding to the enabling function satisfied by the first decision information is used as the identifier of the second plug-in. Figure 6B As shown, if the type of the placeholder in the first pipeline style is the Raw type, the first plug-in decision set is the Raw plug-in decision set, and if the first decision information satisfies the enabling function 2 in the Raw plug-in decision set, the determined identifier of the second plug-in is plug-in Raw2.
[0142] By means of the above method, the identifier of the plug-in to be inserted into the reserved position (the position of the placeholder) can be accurately determined based on the current shooting environment.
[0143] Optionally, if the first decision information satisfies multiple enabling functions, the determined second plug-in identifiers are also multiple. Figure 6B As shown, if the type of the placeholder in the first pipeline style is the UnpackRaw type, the first plug-in decision set is the UnpackRaw plug-in decision set, and if the first decision information satisfies the enable function 2 and enable function 3 in the Raw plug-in decision set, the determined second plug-in identifier is plug-in UnpackRaw2 and plug-in UnpackRaw3.
[0144] in, Figure 6B The same is true for the Yuv type in , which will not be described in detail in this application. Figure 6B This is just an example. The first pipeline style usually only includes Figure 6B A placeholder in the text box, but may also include multiple placeholders, which will not be described in detail in this application.
[0145] In a possible embodiment, the plug-in decision set does not include a mapping relationship between an enable function and a plug-in identifier, but only includes each enable function, and the output of the enable function is the plug-in identifier. For example, if the first decision information satisfies the enable function 1, and the output of the enable function 1 is the plug-in Raw2, then the identifier of the second plug-in is the plug-in Raw2.
[0146] 505. The electronic device creates a first pipeline based on the identifiers of the plurality of first plug-ins, the positions of the plurality of first plug-ins, the identifier of the second plug-in, and the position of the second plug-in, wherein the position of the second plug-in is determined based on the position of the placeholder.
[0147] The plug-ins in the first pipeline are plug-ins corresponding to the identifiers of the multiple first plug-ins in the first pipeline style, and plug-ins corresponding to the identifiers of the second plug-ins. The positions of the plug-ins in the first pipeline are the same as the positions of the plug-ins in the first pipeline style. The first pipeline can be used to dump images, specifically to store images in an album. The position of the second plug-in can be a placeholder position.
[0148] In a possible embodiment, the electronic device creates a first pipeline based on the identifiers of multiple first plug-ins, the positions of multiple first plug-ins, the identifier of the second plug-in, and the position of the second plug-in, including: the electronic device creates multiple first plug-ins and second plug-ins based on the identifiers of the multiple first plug-ins and the identifiers of the second plug-ins; the electronic device determines the position of the placeholder as the position of the second plug-in; the electronic device connects the multiple first plug-ins and the second plug-in based on the positions of the multiple first plug-ins and the positions of the second plug-in to obtain the first pipeline.
[0149] The connection is based on the position of each plug-in, and the position of each plug-in in the connected pipeline is the same as the position in the first pipeline style.
[0150] For example, Fig. 6A As shown, a resource plug-in, a second plug-in, plug-in A, plug-in B, plug-in C and a data pool plug-in are created. The position of the second plug-in is the position of the placeholder (after the resource plug-in and before plug-in A). According to the position of each plug-in, the resource plug-in is connected to the second plug-in, the second plug-in is connected to plug-in A, plug-in A is connected to plug-in B, plug-in B is connected to plug-in C, and plug-in C is connected to the data pool plug-in to obtain a first pipeline.
[0151] There may be multiple determined identifiers of the second plug-in. If there are multiple identifiers of the second plug-in, after multiple second plug-ins are created based on the identifiers of the multiple second plug-ins, the second plug-ins are first connected, and then the connected second plug-ins are connected to the remaining first plug-ins.
[0152] In the above manner, based on the plug-in identifier, the plug-in indicated by the plug-in identifier is accurately created, and based on the position of the plug-in, the plug-ins in the pipeline are accurately connected in sequence to obtain the first pipeline.
[0153] In a possible embodiment, the electronic device connects multiple first plug-ins and second plug-ins based on the positions of the multiple first plug-ins and the positions of the second plug-ins to obtain a first pipeline, including: if the number of second plug-ins is greater than one, the electronic device connects multiple second plug-ins; based on the positions of the multiple first plug-ins and the positions of the second plug-ins, the electronic device connects the connected multiple second plug-ins with the multiple first plug-ins to obtain the first pipeline, and the positions of the connected multiple second plug-ins are the positions of placeholders.
[0154] The positions of the plurality of second plug-ins are the positions of placeholders, for example Figure 6B As shown, if the type of the placeholder is the Unpack Raw type, the second plug-in identifiers determined are two: plug-in Unpack Raw2 and plug-in Unpack Raw3. After the plug-in Unpack Raw2 and plug-in Unpack Raw3 are created, the plug-in Unpack Raw2 and plug-in Unpack Raw3 are first connected, and then the connected plug-in Unpack Raw2 and plug-in Unpack Raw3 are connected to the resource plug-in and plug-in A. The positions of the connected plug-in Unpack Raw2 and plug-in Unpack Raw3 in the pipeline are the positions of the Unpack Raw placeholder in the pipeline.
[0155] By the above method, when the determined second plug-in is a plurality of second plug-ins, the plurality of second plug-ins are first connected, and then the connected plurality of second plug-ins are inserted into the reserved position and connected with other first plug-ins, so that the order of the plug-ins of the obtained first pipeline is accurate.
[0156] After the first pipeline is created, the first pipeline is applied to the scene. When the scene changes (for example, when the shooting mode changes), the pipeline needs to be updated to adapt to the new scene. The following is a further introduction to the pipeline update method:
[0157] In a possible embodiment, if the electronic device detects that a shooting mode has changed, it determines a second output image format based on the changed shooting mode; if the first output image format of the electronic device is different from the second output image format, it determines a second placeholder configuration corresponding to the second output image format; the electronic device obtains a second pipeline style based on the parsed static configuration file and the second placeholder configuration, the second pipeline style including identifiers of multiple first plug-ins, positions of multiple first plug-ins, positions of placeholders, and types of placeholders; the electronic device determines the identifier of the second plug-in based on the type of placeholder in the second pipeline style and the second shooting environment information; and creates a second pipeline based on the identifiers of multiple first plug-ins, positions of multiple first plug-ins, identifier of the second plug-in, and position of the second plug-in.
[0158] Among them, since different shooting modes may correspond to the same output image format, the second output image format and the second output image format may also be the same. The method for determining the second placeholder configuration corresponding to the second output image format can refer to the method for the first placeholder configuration corresponding to the first output image format in the above description; similarly, the method for obtaining the second pipeline style based on the parsed static configuration file and the second placeholder configuration can also refer to the method for obtaining the first pipeline style based on the parsed static configuration file and the first placeholder configuration; similarly, the subsequent creation of the second pipeline can also refer to the introduction of creating the first pipeline above.
[0159] In the above manner, when the output format changes, the second pipeline style is re-determined, and based on the shooting environment information, the plug-in inserted into the reserved position is re-determined, so that the configured and created pipeline can be suitable for the output format.
[0160] In a possible embodiment, the step of determining whether to update can be as follows: Figure 6C As shown, Figure 6C The bold steps are new steps added to the existing pipeline creation process. Figure 6C In the Unpack Raw insertion point configuration, Raw insertion point configuration, and Yuv insertion point configuration, only one of the three can be configured, which is determined by the parsed placeholder. Similarly, only one of the Unpack Raw plug-in, Raw plug-in, and Yuv plug-in can be created. This application does not limit this. The process of determining whether the pipeline needs to be updated can also be as follows Figure 6C As shown, after determining whether the plug-in is enabled.
[0161] See also Figure 7, Figure 7 A schematic diagram of the structure of a pipeline creation device 700 provided in an embodiment of the present application. Figure 7 The pipeline creation device shown may be an electronic device, or a device in an electronic device, or a device that can be used in conjunction with an electronic device. Figure 7 The pipeline creation training device shown may include a processing unit 701 and a parsing unit 702. Among them:
[0162] The processing unit 701 is used to determine a first output image format of the image shooting, where the first output image format is the image format before dumping;
[0163] The processing unit 701 is further configured to determine a first placeholder configuration corresponding to the first output image format, where the first placeholder configuration is used to indicate a position and a type of the placeholder;
[0164] A parsing unit 702 is used to obtain a first pipeline style based on the parsed static configuration file and the first placeholder configuration, the static configuration file is used to configure the identifiers of the plurality of first plug-ins and the positions of the plurality of first plug-ins, the first pipeline style includes the identifiers of the plurality of first plug-ins, the positions of the plurality of first plug-ins, the positions of the placeholders, and the types of the placeholders;
[0165] The processing unit 701 is further configured to determine an identifier of the second plug-in based on the type of the placeholder in the first pipeline style and the first decision information;
[0166] The processing unit 701 is further configured to create a first pipeline based on the identifiers of the plurality of first plug-ins, the positions of the plurality of first plug-ins, the identifier of the second plug-in, and the position of the second plug-in, wherein the position of the second plug-in is determined based on the position of the placeholder.
[0167] In a possible implementation, the processing unit 701 is further used to determine a first plug-in decision set from a plurality of preset plug-in decision sets based on the type of the placeholder in the first pipeline style, the plug-in decision set including at least one enable function, which is used to decide whether to enable the corresponding plug-in; and determine an identifier of the second plug-in based on the first decision information and the first plug-in decision set.
[0168] In a possible implementation manner, the second plug-in is a plug-in corresponding to the enabling function satisfied by the first decision information.
[0169] In a possible implementation, the processing unit 701 is further used to create multiple first plug-ins and second plug-ins based on the identifiers of the multiple first plug-ins and the identifiers of the second plug-ins; determine the position of the placeholder as the position of the second plug-in; and connect the multiple first plug-ins and the second plug-ins based on the positions of the multiple first plug-ins and the positions of the second plug-ins to obtain a first pipeline.
[0170] In a possible implementation, the processing unit 701 is further used to connect multiple second plug-ins if the number of second plug-ins is greater than one; based on the positions of the multiple first plug-ins and the positions of the second plug-ins, connect the connected multiple second plug-ins with the multiple first plug-ins to obtain a first pipeline, and the positions of the connected multiple second plug-ins are the positions of the placeholders.
[0171] In one possible implementation, the processing unit 701 is also used to determine system data of the electronic device, where the system data includes the system's memory usage; if the system data meets the dump condition, a first pipeline style is obtained based on the parsed static configuration file and the first placeholder configuration, and the dump condition includes that the system's memory usage is less than a preset threshold.
[0172] In a possible implementation, the processing unit 701 is further used to determine a first output format of the image shooting based on the shooting mode; and determine a first placeholder configuration corresponding to the first output format based on a mapping relationship between a preset output format and a placeholder configuration.
[0173] In a possible implementation, the processing unit 701 is further used to determine a second output image format based on the changed shooting mode if a change in shooting mode is detected; if the first output image format is different from the second output image format, determine a second placeholder configuration corresponding to the second output image format; obtain a second pipeline style based on the parsed static configuration file and the second placeholder configuration, the second pipeline style including identifiers of multiple first plug-ins, positions of multiple first plug-ins, positions of placeholders, and types of placeholders; determine an identifier of the second plug-in based on the type of placeholder in the second pipeline style and the second shooting environment information; and create a second pipeline based on the identifiers of multiple first plug-ins, positions of multiple first plug-ins, identifier of the second plug-in, and position of the second plug-in.
[0174] For the case where the pipeline creation device can be a chip or a chip system, see Figure 8 Schematic diagram of the chip structure shown. Figure 8 The chip 800 shown includes a processor 801 and an interface 802. Optionally, it may also include a memory 803. The number of the processor 801 may be one or more, and the number of the interface 802 may be multiple.
[0175] For the case where the chip is used to implement the electronic device in the embodiment of the present application:
[0176] The interface 802 is used to receive or output signals;
[0177] The processor 801 is used to execute data processing operations of the electronic device.
[0178] 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0179] It is understandable that some optional features in the embodiments of the present application may be implemented independently in certain scenarios without relying on other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects, or may be combined with other features according to needs in certain scenarios. Accordingly, the pipeline creation device provided in the embodiments of the present application may also implement these features or functions accordingly, which will not be described in detail here.
[0180] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0181] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0182] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed on an electronic device, the functions of any of the above method embodiments are implemented.
[0183] The present application also provides a computer program product. When the computer program product is executed on a computer, the computer can implement the functions of any of the above method embodiments.
[0184] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0185] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A pipeline creation method, characterized in that: The method comprises: Determine a first output image format of the image shooting, wherein the first output image format is the image format before dumping; Determine a first placeholder configuration corresponding to the first output format, where the first placeholder configuration is used to indicate a position of a placeholder and a type of the placeholder; Based on the parsed static configuration file and the first placeholder configuration, a first pipeline style is obtained, the static configuration file is used to configure the identifiers of the multiple first plug-ins and the positions of the multiple first plug-ins, the first pipeline style includes the identifiers of the multiple first plug-ins, the positions of the multiple first plug-ins, the positions of the placeholders, and the types of the placeholders; Determining an identifier of a second plug-in based on a type of the placeholder in the first pipeline style and first decision information, wherein the first decision information includes shooting environment information; A first pipeline is created based on the identifiers of the first plug-ins, the positions of the first plug-ins, the identifier of the second plug-in, and the position of the second plug-in, wherein the position of the second plug-in is determined based on the position of the placeholder.
2. The method according to claim 1, characterized in that The determining, based on the type of the placeholder in the first pipeline style and the first decision information, an identifier of the second plug-in includes: Based on the type of the placeholder in the first pipeline style, determine a first plug-in decision set from a plurality of preset plug-in decision sets, wherein the plug-in decision set includes at least one enabling function, and the enabling function is used to decide whether to enable a corresponding plug-in; Based on the first decision information and the first plug-in decision set, an identifier of the second plug-in is determined.
3. The method according to claim 2, characterized in that The second plug-in is a plug-in corresponding to the enabling function satisfied by the first decision information.
4. The method according to any one of claims 1 to 3, characterized in that: The creating a first pipeline based on the identifiers of the plurality of first plug-ins, the positions of the plurality of first plug-ins, the identifier of the second plug-in, and the position of the second plug-in includes: Based on the identifiers of the plurality of first plug-ins and the identifier of the second plug-in, create the plurality of first plug-ins and the second plug-in; Determine the position of the placeholder as the position of the second plug-in; Based on the positions of the plurality of first plug-ins and the position of the second plug-in, the plurality of first plug-ins and the second plug-in are connected to obtain a first pipeline.
5. The method according to claim 4, characterized in that The step of connecting the plurality of first plug-ins and the second plug-in based on the positions of the plurality of first plug-ins and the position of the second plug-in to obtain a first pipeline includes: If the number of the second plug-ins is greater than one, connecting multiple second plug-ins; Based on the positions of the multiple first plug-ins and the positions of the second plug-ins, the multiple second plug-ins are connected to the multiple first plug-ins to obtain a first pipeline, and the positions of the multiple second plug-ins are the positions of the placeholders.
6. The method according to any one of claims 1 to 5, characterized in that: The obtaining of a first pipeline style based on the parsed static configuration file and the first placeholder configuration includes: determining system data of the electronic device, the system data including memory usage of the system; If the system data meets the dump condition, a first pipeline style is obtained based on the parsed static configuration file and the first placeholder configuration, and the dump condition includes that the system memory usage is less than a preset threshold.
7. The method according to any one of claims 1 to 6, characterized in that: The step of determining a first output image format of the image shooting comprises: Based on the shooting mode, determining a first output image format of the image shooting; Determining a first placeholder configuration corresponding to the first output image format includes: Based on a preset mapping relationship between an image output format and a placeholder configuration, a first placeholder configuration corresponding to the first image output format is determined.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: If it is detected that the shooting mode has changed, a second output image format is determined based on the changed shooting mode; If the first image output format is different from the second image output format, determining a second placeholder configuration corresponding to the second image output format; Based on the parsed static configuration file and the second placeholder configuration, a second pipeline style is obtained, where the second pipeline style includes identifiers of the plurality of first plug-ins, positions of the plurality of first plug-ins, positions of the placeholders, and types of the placeholders; Determining an identifier of a second plug-in based on the type of the placeholder in the second pipeline style and the second shooting environment information; A second pipeline is created based on the identifiers of the first plug-ins, the locations of the first plug-ins, the identifier of the second plug-in, and the location of the second plug-in.
9. An electronic device, comprising one or more memories and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program so that the electronic device executes the method according to any one of claims 1 to 8.
10. A chip system, applied to electronic equipment, characterized in that: The chip system includes at least one processor and an interface, wherein the interface is used to receive instructions and transmit them to the at least one processor; the at least one processor executes the instructions so that the electronic device executes the method as described in any one of claims 1-8.
11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Image frame prediction method and electronic equipment
CN115398907A
Image processing method and device
CN117097983A
Photographing method and related device
CN117156293A
Resource management method and device, electronic equipment and readable storage medium
CN117555537A
Logging application pipeline orchestration
US20230342159A1
