WO2023160205A1 - 进程的控制方法、电子设备及可读存储介质 - Google Patents

进程的控制方法、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2023160205A1
WO2023160205A1 PCT/CN2022/141966 CN2022141966W WO2023160205A1 WO 2023160205 A1 WO2023160205 A1 WO 2023160205A1 CN 2022141966 W CN2022141966 W CN 2022141966W WO 2023160205 A1 WO2023160205 A1 WO 2023160205A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
image processing
service process
camera service
electronic device
Prior art date
Application number
PCT/CN2022/141966
Other languages
English (en)
French (fr)
Inventor
许集润
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP22919288.5A priority Critical patent/EP4266694A4/en
Publication of WO2023160205A1 publication Critical patent/WO2023160205A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/65Control of camera operation in relation to power supply
    • H04N23/651Control of camera operation in relation to power supply for reducing power consumption by affecting camera operations, e.g. sleep mode, hibernation mode or power off of selective parts of the camera
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00885Power supply means, e.g. arrangements for the control of power supply to the apparatus or components thereof
    • H04N1/00888Control thereof
    • H04N1/00896Control thereof using a low-power mode, e.g. standby
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of terminals, and in particular to a process control method, electronic equipment and a readable storage medium.
  • a user may use an electronic device to perform a camera operation through a camera application. After the camera application is triggered to perform a photographing operation, the electronic device generates a corresponding image through the underlying camera service process.
  • the user may immediately trigger the electronic device to turn off the screen.
  • the screen of the electronic device is off, the operating system of the electronic device enters sleep mode, so that the underlying camera service process of the electronic device is suspended before the image is generated, and when the screen is woken up again , it may be due to the problem that the camera service process crashes and restarts, resulting in image loss.
  • the present application provides a process control method, an electronic device and a readable storage medium, which can solve the problem in the related art that the operating system enters a sleep mode within a short time after taking a photo, which easily leads to image loss. Described technical scheme is as follows:
  • a method for controlling a process which is applied to an electronic device, and the method includes:
  • the camera application If the camera application is closed within the first duration threshold after taking a picture, control the camera service process to hold a wake lock, the camera service process is used to provide image processing services, and the image processing services are performed by the camera application A corresponding image is generated and called back after the photographing operation, and the wake lock is used to prevent the operating system of the electronic device from being in a dormant state;
  • the camera service process can run normally, after the electronic device is woken up again, when the camera application is opened again based on the memory function, it can communicate with the camera service process normally, that is, the camera application can be connected normally and will not appear in the short The problem of not being able to connect normally within a certain time.
  • the determining the image processing service status of the camera service process includes:
  • the image processing message queue is used to store image processing messages, and the image processing messages include the required information when the camera service process generates an image data;
  • determining the image processing service status can facilitate and effectively determine whether the camera service process has completed the image processing service.
  • an image processing module and an image processing management module run in the camera service process
  • the sending a camera off message to the camera service process through the camera application includes:
  • Adding the camera shutdown message to the image processing message queue through the camera service process includes:
  • Said querying the state value of the target flag bit in the case that only the camera off message exists in the image processing message queue includes:
  • the image processing module triggers the image management module to query the state value of the target flag
  • the determining the image processing service status of the camera service process according to the status value of the target flag bit includes:
  • the image processing service state of the camera service process is determined by the image processing module according to the state value of the target flag bit.
  • the image processing management module is triggered to detect the target flag, so as to determine the completion status of the image processing service according to the target flag, and realize the camera service process. Detection of image processing service status.
  • the determining the image processing service status of the camera service process according to the status value of the target flag bit includes:
  • the state value of the target flag bit is a first value, then determine that the camera service process has completed the image processing service; or,
  • the method also includes:
  • controlling the camera service process to release the wake lock includes:
  • timing duration of the timer reaches a second duration threshold and/or the camera service process has completed the image processing service, control the camera service process to release the wake lock, and the second duration threshold is greater than or It is equal to the target duration, and the target duration includes the total duration of the camera service process generating an image and completing the callback of the image.
  • the first duration threshold is greater than or equal to K and less than 2K, where K refers to the target duration, and the method further includes:
  • the generated image is called back;
  • the timer is controlled to restart timing.
  • the timing operation of the timer is executed synchronously with the state of the monitoring image processing service, so as to avoid that when the camera processing process needs to generate multiple images, the camera service process is triggered to release the wake-up lock due to the timing overtime of the timer, thereby causing the electronic device to enter the sleep mode , which in turn affects the operation of the camera processing process.
  • condition that triggers the camera service process to release the wake lock is that the camera service process has completed the image processing service, and before the control of the camera service process releases the wake lock, include:
  • the timer is controlled to cancel the timing operation.
  • the image processing management module can cancel the timing operation of the timer first, and then control the camera service process Release the wake lock. This prevents the timer from continuing to do useless work timing.
  • an electronic device including a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor implements the following when executing the computer program:
  • the camera application If the camera application is closed within the first duration threshold after taking a picture, control the camera service process to hold a wake lock, the camera service process is used to provide image processing services, and the image processing services are performed by the camera application A corresponding image is generated and called back after the photographing operation, and the wake lock is used to prevent the operating system of the electronic device from entering a dormant state;
  • the processor is used to:
  • the image processing message queue is used to store image processing messages, and the image processing messages include the required information when the camera service process generates an image data;
  • an image processing module and an image processing management module run in the camera service process; the processor is used for:
  • the image processing module triggers the image management module to query the state value of the target flag
  • the image processing service state of the camera service process is determined by the image processing module according to the state value of the target flag bit.
  • the processor is used to:
  • the state value of the target flag bit is a first value, then determine that the camera service process has completed the image processing service; or,
  • the processor is used to:
  • controlling the camera service process to release the wake lock includes:
  • timing duration of the timer reaches a second duration threshold and/or the camera service process has completed the image processing service, control the camera service process to release the wake lock, and the second duration threshold is greater than or It is equal to the target duration, and the target duration includes the total duration of the camera service process generating an image and completing the callback of the image.
  • the first duration threshold is greater than or equal to K and less than 2K, where K refers to the target duration, and the processor is configured to:
  • the generated image is called back;
  • the timer is controlled to restart timing.
  • the condition that triggers the camera service process to release the wake lock is that the camera service process has completed the image processing service, and the processor controls the camera service process to release the wake lock Previously, also used for:
  • the timer is controlled to cancel the timing operation.
  • a computer-readable storage medium where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer is made to execute the method described in the above-mentioned first aspect.
  • a computer program product including instructions is provided, and when it is run on a computer, it causes the computer to execute the method described in the first aspect above.
  • Fig. 1 is a schematic structural diagram of an electronic device according to an exemplary embodiment
  • Fig. 2 is a schematic diagram of a software architecture of an electronic device according to an exemplary embodiment
  • Fig. 3 is a schematic diagram of an application scenario according to an exemplary embodiment
  • Fig. 4 is a schematic diagram of a photo album according to an exemplary embodiment
  • Fig. 5 is a schematic diagram of a photo album according to another exemplary embodiment
  • Fig. 6 is a schematic flowchart of a process control method according to an exemplary embodiment
  • Fig. 7 is a schematic flowchart of a process control method according to another exemplary embodiment
  • Fig. 8 is a schematic flowchart of a process control method according to another exemplary embodiment
  • Fig. 9 is a schematic structural diagram of a device for controlling a process according to an exemplary embodiment.
  • references to "one embodiment” or “some embodiments” or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the embodiment of the present application provides a process control method, which can prevent the electronic device from entering the sleep state immediately after the sleep mode is triggered due to reasons such as the screen being off, so that the camera service process can continue to run after the electronic device is off the screen. , so as to avoid the problem of losing pictures or not being able to connect normally when the camera application is opened again.
  • the method provided in the embodiment of the present application can be executed by an electronic device, and the electronic device is configured with a camera, and the camera can realize a camera function.
  • an electronic device includes a camera application (or called: a camera application program), and a user can trigger the camera application so that the electronic device turns on a camera to take pictures through the camera.
  • the number of cameras may be one or more, and in addition, the cameras may include a front camera and/or a rear camera.
  • the electronic device may be a mobile phone, a tablet computer, a notebook computer, a foldable mobile phone, a foldable tablet computer, etc., which is not limited in this embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and an antenna 1.
  • Antenna 2 mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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 environmental Light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • 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 processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit, NPU
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly recalled from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces, such as an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • mobile industry processor interface mobile industry processor interface
  • MIPI mobile industry processor interface
  • general-purpose input and output general-purpose input/output
  • GPIO general-purpose input/output
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C interfaces.
  • the processor 110 may be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S interfaces.
  • the processor 110 may be coupled to the audio module 170 through an I2S interface to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the UART interface can be a bidirectional communication bus.
  • the UART interface can convert the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them.
  • the USB interface 130 can also be used to connect other terminals, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142, it can also provide power for the electronic device 100 through the power management module 141.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 may be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating 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. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith) satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is an integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is an integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as: image recognition, face recognition, speech recognition, text understanding, and the like.
  • 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 saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data (such as audio data, phonebook, etc.) created by the electronic device 100 during use.
  • 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 magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • 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 earphone interface 170D and the application processor.
  • audio functions such as music playing and recording
  • 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 signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation whose intensity is less than the pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation whose intensity is greater than or equal to the pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • the electronic device 100 sets features such as automatic unlocking of the flip cover according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100, and is applied to applications such as horizontal and vertical screen switching, pedometer, and the like.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, in a shooting scene, the electronic device 100 can use the distance sensor 180F for distance measurement to achieve fast focusing.
  • the proximity light sensor 180G may include a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, the electronic device 100 may determine that there is an object near the electronic device 100 . When insufficient reflected light is detected, it may be determined that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint features to unlock fingerprints, access application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K can be disposed 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 a touch operation on or near it.
  • the touch sensor 180K may transmit the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 can 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 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • Touch operations acting on different areas of the display screen 194 may also correspond to different vibration feedback effects.
  • Different application scenarios (such as: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is an integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the software system of the electronic device 100 is exemplarily described by taking an Android system with a layered architecture as an example.
  • FIG. 2 is a block diagram of a software system of an electronic device 100 provided by an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively an application program layer, an application program framework layer, a hardware abstract layer (hardware abstract layer, HAL) and a kernel layer from top to bottom.
  • HAL hardware abstract layer
  • the application layer can consist of a series of application packages. As shown in Figure 2, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer may include camera calling interface, window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • the camera calling interface is used for calling by the camera application when performing a photographing operation. That is, in the process of taking pictures, the camera application calls the camera call interface to interact with the bottom layer (HAL layer) through the camera call interface, so as to load the camera through the bottom layer, and then realize the photo taking function.
  • the camera application calls the camera call interface to interact with the bottom layer (HAL layer) through the camera call interface, so as to load the camera through the bottom layer, and then realize the photo taking function.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data, and make these data accessible to applications. These data can include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build the display interface of the application, and the display interface can be composed of one or more views, for example, including a view for displaying SMS notification icons, a view for displaying text, and a view for displaying pictures.
  • 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.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scrolling text, such as notifications for applications running in the background.
  • the notification manager can also be a notification that appears on the screen in the form of a dialog window, such as prompting text information in the status bar, making a prompt sound, vibrating the electronic device, and flashing an indicator light.
  • the HAL layer can also be called the extension layer.
  • the HAL layer generally includes some functional modules customized by technicians.
  • the HAL layer runs a camera service process.
  • the camera service process runs after the electronic device is turned on, and may be called a resident process.
  • the camera service process is used to provide an image processing service, and the image processing service refers to a service for generating a corresponding image after the camera application performs a photographing operation.
  • the camera application sends the camera opening command to the camera service process through the camera calling interface, and the camera service process controls the camera driver after receiving the camera opening command. After loading the camera, you can use the camera to collect viewfinder data according to the instructions of the camera application.
  • the camera service process When the camera service process acquires the viewing data collected by the camera, it performs an image processing operation based on the viewing data to generate a corresponding image. Then, the camera service process can feed back the generated image to the camera application through a callback, thereby completing the photo taking process. Further, if the camera application is closed, the camera application sends a camera shutdown message to the camera service process by calling the camera call interface. After the camera service process receives the camera shutdown message, on the one hand, it controls the camera to power off, and on the other hand, it obtains the wake lock from the kernel layer. The wake lock is used to wake up the electronic device, so that the operating system of the electronic device cannot enter a dormant state. If there is a process holding a wake lock in the electronic device, it can be said that there is a valid wake lock in the electronic device, that is, if there is a valid wake lock in the electronic device, the operating system cannot enter the sleep state.
  • an image processing module As an example of the present application, an image processing module, an image processing management module and a control module run in the camera service process.
  • the image processing module is used to load the camera, obtain the viewing data of the camera, and generate a corresponding image based on the viewing data.
  • the control module is used to obtain a wake lock.
  • the image processing management module is used to instruct the control module to hold or release the wake lock, and its specific implementation can refer to the following embodiments.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a wake lock mechanism (referred to as: wake lock), a display driver, a camera driver, an audio driver, and a sensor driver.
  • wake lock a wake lock mechanism
  • the camera driver is used to drive the camera loading of the hardware.
  • the workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with capturing and photographing scenes.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the original input event. Take the touch operation as a click operation, and the control corresponding to the click operation is the control of the camera application icon as an example.
  • the camera application calls the interface of the application framework layer to start the camera application, and then calls the kernel layer to start the camera driver. 193 Capture still images or video.
  • the electronic device is a mobile phone as an example for illustration.
  • the user uses the camera application in the mobile phone to perform a photographing operation, the user triggers the camera application of the mobile phone, and the mobile phone starts the camera application.
  • the photographing mode the user triggers the photographing option 30 to photograph the target A.
  • the mobile phone performs a camera operation.
  • the user after taking a photo, the user immediately presses the power off button of the mobile phone, and the mobile phone enters the off-screen mode.
  • the user puts the phone in the pocket and the phone enters the always-on mode.
  • the user can query the image of the target A taken before the screen of the mobile phone is turned off from the photo album of the mobile phone, as shown in FIG. 4 , for example.
  • the user triggers the photographing option 30 to photograph the target A.
  • the mobile phone performs a camera operation. After taking a picture, the user closes the camera application immediately, and triggers the mobile phone to enter the screen-off mode immediately after closing the camera application (such as pressing the power off button of the mobile phone).
  • the user can query the image of the target A taken before the screen of the mobile phone is turned off from the photo album of the mobile phone, as shown in FIG. 4 .
  • the user clicks the camera option 30 in the camera application multiple times (for example, twice) continuously and quickly, and within a short time after taking a picture, presses the power-off button of the mobile phone to make the mobile phone enter the screen-off mode, or Immediately put the phone in the pocket to put the phone into the always-on display mode.
  • the user can query the multiple images of the target A captured by the mobile phone in front of the off-screen from the camera of the mobile phone, as shown in FIG. 5 .
  • FIG. 6 is a schematic flowchart of a process control method according to an exemplary embodiment.
  • the method can be applied to the above-mentioned electronic device 100.
  • the electronic device 100 Using the internal module implementation as an example to illustrate, this method may include some or all of the following:
  • the camera application performs a photographing operation.
  • an application icon of the camera application is displayed on the display interface of the electronic device, and when the user wants to use the electronic device to take pictures, the user may click the application icon of the camera application.
  • the electronic device starts the camera application. After starting the camera application, the electronic device controls the camera driver through the camera service process to load the camera.
  • the display interface of the camera application provides a camera application option 30 , and in response to the user's trigger operation on the camera application option 30 , the camera application sends a camera service process a camera service process instruction.
  • the camera service process receives a photographing instruction through the image processing module. Every time the image processing module receives a shooting instruction, it will control the camera to obtain viewfinder data, and generate multiple image processing messages based on viewfinder data and processing configuration parameters.
  • the processing configuration parameters refer to configuration parameters related to processing viewfinder data. Examples include but are not limited to resolution, frame rate, and so on.
  • the image processing module adds the generated multiple image processing messages to the image processing message queue. In this way, the image processing module can process multiple image processing messages in the image processing message queue according to the principle of first in first out, so as to generate an image corresponding to the photographing instruction.
  • the camera service process in the process of generating each image, usually generates multiple image processing messages, and then processes each of the multiple image processing messages in sequence, and waits until the multiple image processing messages are all After processing, the image processing flow is completed, and an image corresponding to the shooting instruction is generated. That is, the generation of an image usually requires the processing of multiple image processing messages.
  • the camera application If the camera application is closed within the first duration threshold after taking a picture, the camera application sends a camera close message to the image processing module.
  • the first duration threshold can be set according to actual requirements, and is usually set to a very short value.
  • the camera application when the camera application is turned on, if the electronic device enters the off-screen state, the camera application will be closed, and under normal circumstances, the operating system will enter a sleep mode after the electronic device enters the off-screen state. In another example, if the camera application is closed after the photo is taken, if the electronic device enters the off-screen state at this time, the operating system will enter the sleep mode. For any of the above scenarios, if the operating system enters sleep mode within a short period of time after the camera application is closed, it is easy to cause the underlying camera service process to fail to complete the image processing service, and because the operating system enters sleep mode, the camera service process cannot work normally. Running, resulting in image loss problem.
  • a camera close message is sent to the image processing module, and the camera close message is used to indicate that the camera application enters a closed state.
  • the image processing module receives the camera off message, it performs the following step 603 on the one hand, and performs the following step 607 on the other hand.
  • the image processing module instructs the control module to obtain a wake lock, which is used to prevent the operating system of the electronic device from entering a sleep state.
  • the camera service process executes the image processing service in the background after the camera application takes a photo
  • the camera service process may not have completed the image processing service , and the camera service process is aborted due to the operating system entering sleep mode.
  • the camera service process notifies the control module after receiving the camera shutdown message through the image processing module, so that the control module acquires a wake-up lock from the kernel layer.
  • the control module acquires a wake lock.
  • the implementation of the control module acquiring the wake lock may include: the control module acquires a target system service, and then calls an interface of the target system service, thereby acquiring the wake lock.
  • the target system service refers to a system service with a wake lock, for example, the target system service is a system suspend service.
  • the camera service process holds a wake lock, that is, there is a valid wake lock in the electronic device, thereby preventing the operating system from entering a dormant state.
  • the image processing module adds a camera shutdown message to the image processing message queue.
  • the image processing message queue is used to store image processing messages, and the image processing messages include data required when the camera service process generates images.
  • the image processing module adds the camera off message to the end position in the image processing message queue, so that the camera off message is the last message processed by the image processing module.
  • the image processing module adds the camera off message to the image processing message queue in an asynchronous transmission manner.
  • image processing message queue as an example to store a plurality of image processing messages and camera off messages.
  • multiple image processing messages and camera off messages may also be stored in other manners that can indicate the order in which the messages are processed, which is not limited in this embodiment of the present application.
  • step 605 there is no strict execution sequence between step 605 and step 603, which is not limited in this embodiment of the present application.
  • the image processing module triggers the image processing management module to detect the state value of the target flag.
  • the target flag bit is used to indicate whether the camera service process has completed the image processing service.
  • the image processing module changes the state value of the target flag after executing the image processing process, so that the changed state value indicates that the camera service process has completed the image processing service.
  • the number of target flag bits includes a first value or a second value, wherein the first value is used to indicate that the camera service process has completed the image processing service, and the second value is used to indicate that the camera service process has not completed the image processing service .
  • the completed image processing service means that all image processing messages have been processed to generate corresponding images.
  • the first value may be set according to actual requirements, for example, the first value may be 1.
  • the second value can be set according to actual needs, for example, the second value can be 0.
  • the image processing module can trigger the image processing module to detect the state value of the target flag through an event trigger mechanism, so as to detect the completion status of the image processing pipeline.
  • the image processing management module determines the image processing service status of the camera service process according to the status value of the target flag.
  • Determining the image processing service status of the camera service process according to the status value of the target flag includes the following two situations: one is, if the status value of the target flag bit is the first value, it is determined that the camera service process has completed the image processing service. The other is that if the state value of the target flag bit is the second value, it is determined that the camera service process has not completed the image processing service.
  • the camera service process has not completed the image processing service, continue to detect the image processing service status of the camera service process; otherwise, if the camera service process has completed the image processing service, perform the following step 610 .
  • the image processing module sends a camera shutdown message to the image processing management module.
  • the image processing module after receiving the camera off message, the image processing module sends the camera off message to the image processing management module in a synchronous transmission manner.
  • step 608 there is no strict execution order between step 608 and the above step 603, which is not strictly limited in this embodiment of the present application.
  • the image processing management module starts a timer.
  • the target flag detected by the image processing management module is always the second value, so that the electronic device can never enter the sleep mode in the off-screen state, which leads to the consumption of the electronic device. power consumption.
  • the image processing module after the image processing module receives the camera off message, it sends the camera off message to the image processing management module, so that the image processing management module starts the timer and starts counting, so as to control the camera by timing overtime. The module releases the wake lock.
  • the image processing management module If the camera service process has completed the image processing service and/or the timing duration of the timer reaches a second duration threshold, the image processing management module notifies the control module to release the wake lock.
  • the second duration threshold may be set according to actual requirements. Usually, the duration of the second duration threshold is greater than or equal to the target duration, and the target duration includes the total duration of the camera service process generating an image and completing the callback of the image, which can be determined according to experience values. In this way, the image processing module is prevented from triggering the control module to release the wake-up lock due to the timeout of the timer when the image processing service has not been completed, thereby causing the electronic device to enter a sleep state, thereby affecting image generation.
  • the second duration threshold is greater than or equal to K and less than 2K, where K refers to the target duration, that is, only one image is supported for generation and callback within the second duration threshold.
  • the camera service process if the camera service process has completed the image processing service, it means that the camera service process has generated the image corresponding to the camera command, and there is no image loss at this time.
  • the module releases the wake lock.
  • the image processing management module will also trigger the control module to release the wake lock.
  • the camera service process may have completed the image processing service, and the timer duration reaches the second duration threshold.
  • the image processing management module triggers the control module to release the wake lock, so that the electronic device Enter hibernation mode.
  • the image processing management module controls the timer to cancel the timing operation.
  • the control module releases the wake lock.
  • the electronic device After the wake-up lock is released, there is no valid wake-up lock in the electronic device, and if the electronic device is still in the off-screen state, the electronic device enters the sleep mode.
  • the image processing management module can cancel the timing operation of the timer first, and then Control the camera service process to release the wake lock. This prevents the timer from continuing to do useless work timing.
  • the method further includes the following content:
  • 612 Call back the generated image through the image processing management module after the image processing module generates the image.
  • the image processing module sends the generated image to the image processing management module every time it generates an image corresponding to the photographing instruction, and the image processing management module sends the generated image to the camera application through a callback,
  • the camera app can store this image in a camera roll for easy viewing by the user.
  • the image processing management module controls the timer to start timing again.
  • the user may continuously and quickly trigger the camera application multiple times to perform a photographing operation.
  • the camera application in response to each trigger operation of the user, the camera application sends a photographing instruction to the camera service process multiple times in succession.
  • the camera service process receives shooting instructions sequentially through the image processing module.
  • the image processing module obtains viewfinder data through the camera according to each received shooting instruction, and generates multiple image processing messages based on the viewfinder data and processing configuration parameters obtained each time. Multiple image processing messages are added to the image processing message queue.
  • the image processing message queue includes multiple image processing messages corresponding to each of the multiple images to be generated.
  • the camera service process generates an image through the image processing module, there may also be image processing messages corresponding to other images to be generated in the image processing message queue. Therefore, if there is still an image processing message in the image processing message queue, it means that there is still an image to be generated, that is, the camera service process still needs to execute the image processing service.
  • the maximum timing duration of the timer is the second duration threshold, and the second duration threshold is greater than or equal to K and less than 2K, if the timer times out, it is easy to cause the camera service process to be too late to process other image processing messages. For this reason, the image processing management module controls the timer to restart counting, that is, initializes the timer.
  • the timing operation of the timer is executed synchronously with the state of the monitoring image processing service, so as to avoid that when the camera processing process needs to generate multiple images, the camera service process is triggered to release the wake-up lock due to the timing overtime of the timer, thereby causing the electronic device to enter the sleep mode , which in turn affects the operation of the camera processing process.
  • the camera application is used to perform the photographing operation. If the camera application is closed within a short period of time after the camera application takes a picture, in order to prevent the electronic device from entering sleep mode, control the camera service process to hold a wake lock, so that the operating system of the electronic device cannot enter sleep mode through the wake lock, thereby avoiding damage to the camera.
  • the execution of the image processing service by the application process is affected, that is, the camera application process can still continue to execute the image processing service. Afterwards, determine the image processing service status of the camera service process. If the camera service process has completed the image processing service, the operating system can be allowed to enter the sleep mode at this time.
  • the camera service process is controlled to release the wake-up lock, so that the operating system can enter normally. sleep mode.
  • the operating system cannot enter the sleep state in a short period of time, thereby avoiding the problem of image loss caused by the camera service process not running normally.
  • the camera service process is still running normally after the electronic device turns off the screen, after the electronic device is woken up again, when the camera application is opened again based on the memory function, it can communicate with the camera service process normally, that is, the camera application can be connected normally. , there will be no problem of being unable to connect normally in a short period of time.
  • FIG. 7 is a flowchart of a process control method according to another exemplary embodiment.
  • the method is applied to an electronic device 100.
  • the electronic device passes through multiple modules
  • the method can include the following:
  • the camera application performs a photographing operation.
  • step 601 in the embodiment shown in FIG. 6 refers to step 601 in the embodiment shown in FIG. 6 , which will not be repeated here.
  • the camera application If the camera application is closed within the first duration threshold after taking a picture, the camera application sends a camera close message to the image processing module.
  • the camera application when the camera application is turned on, if the electronic device enters the off-screen state, the camera application will be closed, and under normal circumstances, the operating system will enter a sleep mode after the electronic device enters the off-screen state.
  • the camera application if the camera application is closed within a short time after the camera application takes a picture, the camera application sends a camera close message to the image processing module, and the camera application closes.
  • the camera shutdown message is used to indicate that the camera application enters a shutdown state.
  • the image processing module instructs the control module to acquire a wake lock.
  • the camera service process executes the image processing service in the background after the camera application takes a photo
  • the camera service process may not have completed the image processing service , and the camera service process is aborted due to the operating system entering sleep mode.
  • the camera service process notifies the control module after receiving the camera shutdown message through the image processing module, so that the control module acquires a wake-up lock from the kernel layer.
  • the control module acquires a wake lock, which is used to prevent the operating system of the electronic device from entering a sleep state.
  • the implementation of the control module acquiring the wake lock may include: the control module acquires a target system service, and then calls an interface of the target system service, thereby acquiring the wake lock.
  • the target system service refers to a system service with a wake lock, for example, the target system service is a system suspend service.
  • the camera service process holds a wake lock, that is, there is a valid wake lock in the electronic device, thereby preventing the operating system from entering a dormant state.
  • the image processing module adds the camera shutdown message to the image processing message queue.
  • the image processing message queue is used to store image processing messages, and the image processing messages include data required when the camera service process generates images.
  • the image processing module adds the camera off message to the end position in the image processing message queue, so that the camera off message is the last message processed by the image processing module.
  • the image processing module adds the camera off message to the image processing message queue in an asynchronous transmission manner.
  • image processing message queue as an example to store a plurality of image processing messages and camera off messages.
  • multiple image processing messages and camera off messages may also be stored in other manners that can indicate the order in which the messages are processed, which is not limited in this embodiment of the present application.
  • step 703 there is no strict execution sequence between step 703 and step 705 .
  • the image processing module triggers the image processing management module to detect the state value of the target flag.
  • the target flag bit is used to indicate whether the camera service process has completed the image processing service.
  • the image processing module changes the state value of the target flag after executing the image processing process, so that the changed state value indicates that the camera service process has completed the image processing service.
  • the number of target flag bits includes a first value or a second value, wherein the first value is used to indicate that the camera service process has completed the image processing service, and the second value is used to indicate that the camera service process has not completed the image processing service .
  • the completed image processing service means that all the image processing messages have been processed, or it can be understood that the corresponding image has been generated.
  • the first value may be set according to actual requirements, for example, the first value may be 1.
  • the second value can be set according to actual needs, for example, the second value can be 0.
  • the image processing module can trigger the image processing module to detect the state value of the target flag through an event trigger mechanism, so as to detect the completion status of the image processing pipeline.
  • the image processing management module determines the image processing service status of the camera service process according to the status value of the target flag bit.
  • Determining the image processing service status of the camera service process according to the status value of the target flag includes the following two situations: one is, if the status value of the target flag bit is the first value, it is determined that the camera service process has completed the image processing service. The other is that if the state value of the target flag bit is the second value, it is determined that the camera service process has not completed the image processing service.
  • the camera service process has not completed the image processing service, continue to detect the image processing service status of the camera service process; otherwise, if the camera service process has completed the image processing service, perform the following step 708 .
  • the control control module releases the wake-up lock . After the wake-up lock is released, there is no effective wake-up lock in the electronic device. At this time, if the electronic device is still in the off-screen state, the electronic device enters the sleep mode.
  • the camera application is used to perform the photographing operation. If the camera application is closed within a short period of time after the camera application takes a picture, in order to prevent the electronic device from entering sleep mode, control the camera service process to hold a wake lock, so that the operating system of the electronic device cannot enter sleep mode through the wake lock, thereby avoiding damage to the camera.
  • the execution of the image processing service by the application process is affected, that is, the camera application process can still continue to execute the image processing service. Afterwards, determine the image processing service status of the camera service process. If the camera service process has completed the image processing service, the operating system can be allowed to enter the sleep mode at this time.
  • the camera service process is controlled to release the wake-up lock, so that the operating system can enter normally. sleep mode.
  • the operating system cannot enter the sleep state in a short period of time, thereby avoiding the problem of image loss caused by the camera service process not running normally.
  • the camera service process is still running normally after the electronic device turns off the screen, after the electronic device is woken up again, when the camera application is opened again based on the memory function, it can communicate with the camera service process normally, that is, the camera application can be connected normally. , there will be no problem of being unable to connect normally in a short period of time.
  • FIG. 8 is a flow chart of a method for controlling a process according to another embodiment.
  • the method is applied to an electronic device, and the method may include part or all of the following:
  • Step 801 Execute a photographing operation through a camera application.
  • step 601 in the embodiment shown in FIG. 6 above.
  • Step 802 If the camera application is closed within the first duration threshold after taking a photo, control the camera service process to hold a wake lock.
  • the camera service process is used to provide image processing services.
  • the image processing service is generated and called back after the camera application performs the photo taking operation.
  • a wake lock is used to prevent an operating system of an electronic device from entering a sleep state.
  • Step 803 Determine the image processing service status of the camera service process.
  • step 803 may include: sending a camera shutdown message to the camera service process through the camera application.
  • the camera shutdown message is added to the image processing message queue through the camera service process.
  • the image processing message queue is used to store image processing messages, and the image processing messages include data required when the camera service process generates images.
  • query the state value of the target flag bit, and the target flag bit is used to indicate whether the camera service process has completed the image processing service. Determine the image processing service status of the camera service process according to the status value of the target flag bit.
  • the camera application sends a camera off message to the image processing module in the camera service process, and the image processing module receives the camera off message.
  • the camera closing message is added to the image processing message queue through the image processing module.
  • the image processing module triggers the image management module to query the status value of the target flag.
  • the image processing service state of the camera service process is determined by the image processing module according to the state value of the target flag bit.
  • determining the image processing service status of the camera service process according to the status value of the target flag bit includes: if the status value of the target flag bit is the first value, determining that the camera service process has completed the image processing service. Or, if the state value of the target flag bit is the second value, it is determined that the camera service process has not completed the image processing service.
  • Step 804 If the camera service process has completed the image processing service, control the camera service process to release the wake lock.
  • the timer is started by the camera service process.
  • the implementation of step 804 includes: if the timing duration of the timer reaches the second duration threshold and/or the camera service process has completed the image processing service, then controlling the camera service process to release the wake lock, the second duration threshold is greater than or Equal to the target duration, the target duration includes the total duration of the camera service process generating an image and completing the callback of the image.
  • the first duration threshold is greater than or equal to K and less than 2K, and K refers to the target duration.
  • the condition for triggering the camera service process to release the wake lock is that the camera service process has completed the image processing service. Before the control camera service process releases the wake lock, it also includes: if the camera service process has completed the image processing service, if the timer If the timing duration does not reach the second duration threshold, the timer is controlled to cancel the timing operation.
  • the camera application is used to perform the photographing operation. If the camera application is closed within a short period of time after the camera application takes a picture, in order to prevent the electronic device from entering sleep mode, control the camera service process to hold a wake lock, so that the operating system of the electronic device cannot enter sleep mode through the wake lock, thereby avoiding damage to the camera.
  • the execution of the image processing service by the application process is affected, that is, the camera application process can still continue to execute the image processing service. Afterwards, determine the image processing service status of the camera service process. If the camera service process has completed the image processing service, the operating system can be allowed to enter the sleep mode at this time.
  • the camera service process is controlled to release the wake-up lock, so that the operating system can enter normally. sleep mode.
  • the operating system cannot enter the sleep state in a short period of time, thereby avoiding the problem of image loss caused by the camera service process not running normally.
  • Fig. 9 is a schematic structural diagram of a process control device provided by an embodiment of the present application.
  • the device can be implemented as part or all of an electronic device by software, hardware or a combination of the two.
  • the electronic device can be the one shown in Fig. 1 Electronic equipment.
  • the control device 9 of this process includes: a processor 910, a memory 920, and a computer program 930 stored in the memory and operable on the processor, when the processor 910 executes the computer program Implement the following:
  • the camera application If the camera application is closed within the first duration threshold after taking a picture, control the camera service process to hold a wake lock, the camera service process is used to provide image processing services, and the image processing services are performed by the camera application A corresponding image is generated and called back after the photographing operation, and the wake lock is used to prevent the operating system of the electronic device from entering a dormant state;
  • the processor 910 is configured to:
  • the image processing message queue is used to store image processing messages, and the image processing messages include the required information when the camera service process generates an image data;
  • an image processing module and an image processing management module run in the camera service process; the processor 910 is used for:
  • the image processing module triggers the image management module to query the state value of the target flag
  • the image processing service state of the camera service process is determined by the image processing module according to the state value of the target flag bit.
  • the processor 910 is configured to:
  • the state value of the target flag bit is a first value, then determine that the camera service process has completed the image processing service; or,
  • the processor 910 is configured to:
  • controlling the camera service process to release the wake lock includes:
  • timing duration of the timer reaches a second duration threshold and/or the camera service process has completed the image processing service, control the camera service process to release the wake lock, and the second duration threshold is greater than or It is equal to the target duration, and the target duration includes the total duration of the camera service process generating an image and completing the callback of the image.
  • the first duration threshold is greater than or equal to K and less than 2K, where K refers to the target duration, and the processor 910 is configured to:
  • the generated image is called back;
  • the timer is controlled to restart timing.
  • condition that triggers the camera service process to release the wake-up lock is that the camera service process has completed the image processing service, and the processor 910 is controlling the camera service process to release the wake-up lock.
  • Before lock also used for:
  • the timer is controlled to cancel the timing operation.
  • the camera application is used to perform the photographing operation. If the camera application is closed within a short period of time after the camera application takes a picture, in order to prevent the electronic device from entering sleep mode, control the camera service process to hold a wake lock, so that the operating system of the electronic device cannot enter sleep mode through the wake lock, thereby avoiding damage to the camera.
  • the execution of the image processing service by the application process is affected, that is, the camera application process can still continue to execute the image processing service. Afterwards, determine the image processing service status of the camera service process. If the camera service process has completed the image processing service, the operating system can be allowed to enter the sleep mode at this time.
  • the camera service process is controlled to release the wake-up lock, so that the operating system can enter normally. sleep mode.
  • the operating system cannot enter the sleep state in a short period of time, thereby avoiding the problem of image loss caused by the camera service process not running normally.
  • the functional units and modules in the above-mentioned embodiments can be integrated into one processing unit, or each unit can exist separately physically, or two or more units can be integrated into one unit, and the above-mentioned integrated units can use hardware It can also be implemented in the form of software functional units.
  • the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
  • all or part may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may 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 the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be accessed from a website, computer, server, or data center Transmission to another website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as: infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (Digital Versatile Disc, DVD)) or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)) wait.
  • a magnetic medium such as a floppy disk, a hard disk, a magnetic tape
  • an optical medium such as a digital versatile disc (Digital Versatile Disc, DVD)
  • a semiconductor medium such as a solid state disk (Solid State Disk, SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

本申请公开了一种进程的控制方法、电子设备及可读存储介质,属于终端技术领域。该方法包括:通过相机应用执行拍照操作。若在拍照后的第一时长阈值内相机应用关闭,则控制相机服务进程持有唤醒锁,相机服务进程用于提供图像处理服务,图像处理服务在相机应用执行拍照操作后生成并回调对应的图像,唤醒锁用于使得电子设备的操作系统无法进入休眠状态。确定相机服务进程的图像处理服务状态。若相机服务进程已完成图像处理服务,则控制相机服务进程释放唤醒锁。如此,通过控制相机服务进程持有唤醒锁,使得图像处理过程中操作系统无法进入休眠状态,从而可以避免相机服务进程无法正常运行导致丢图的问题。

Description

进程的控制方法、电子设备及可读存储介质
本申请要求于2022年2月28日提交到国家知识产权局、申请号为202210195142.2、申请名称为“进程的控制方法、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,特别涉及一种进程的控制方法、电子设备及可读存储介质。
背景技术
目前,诸如手机、平板电脑之类的电子设备中均配置有相机应用。用户可以使用电子设备,通过相机应用执行拍照操作。在相机应用被触发执行拍照操作后,电子设备通过底层的相机服务进程生成对应的图像。
在一些场景中,在相机应用执行拍照操作后,用户可能立即触发电子设备息屏。然而,在相机应用拍照后的短时间内,如果电子设备息屏,由于电子设备的操作系统进入休眠模式,所以使得电子设备底层的相机服务进程在未生成图像之前中止,而当再次唤醒屏幕后,可能由于相机服务进程崩溃重启的问题,导致出现丢图的现象。
发明内容
本申请提供了一种进程的控制方法、电子设备及可读存储介质,可以解决相关技术中在拍照后的短时间内操作系统进入休眠模式后容易导致丢图的问题。所述技术方案如下:
第一方面,提供了一种进程的控制方法,应用于电子设备,所述方法包括:
通过相机应用执行拍照操作;
若在拍照后的第一时长阈值内所述相机应用关闭,则控制相机服务进程持有唤醒锁,所述相机服务进程用于提供图像处理服务,所述图像处理服务在所述相机应用执行所述拍照操作后生成并回调对应的图像,所述唤醒锁用于使得所述电子设备的操作系统无法进程休眠状态;
确定所述相机服务进程的图像处理服务状态;
若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁。
如此,在相机应用关闭的情况下,通过控制相机服务进程获取唤醒锁,可以使得即使电子设备被触发进入休眠状态,操作系统也无法进入休眠状态,从而避免相机服务进程无法正常运行导致丢图的问题。另外,由于相机服务进程能够正常运行,所以,电子设备被再次唤醒后,基于记忆功能再次打开相机应用时,可以正常与相机服务进程进行通信,也即相机应用能够正常连接,不会出现在短时间内无法正常连接的问题。
作为本申请的一个示例,所述确定所述相机服务进程的图像处理服务状态,包括:
通过所述相机应用向所述相机服务进程发送相机关闭消息;
通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,所述图像处理消息队列用于存储图像处理消息,所述图像处理消息包括所述相机服务进程生成图像时所需的数据;
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,所述目标标志位用于指示所述相机服务进程是否已完成图像处理服务;
根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
如此,通过将相机关机消息添加至图像处理消息队列中,以根据图像处理消息队列中的消息处理情况下,判断是否已处理完所有的图像处理消息。在确定图像处理消息队列中的图像处理消息为空的情况下,确定图像处理服务状态,可以便于有效地确定相机服务进程是否已完成图像处理服务。
作为本申请的一个示例,所述相机服务进程中运行有图像处理模块和图像处理管理模块;
所述通过所述相机应用向所述相机服务进程发送相机关闭消息,包括:
通过所述相机应用向所述相机服务进程中的图像处理模块发送相机关闭消息;
通过所述图像处理模块接收所述相机关闭消息;
所述通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,包括:
通过所述图像处理模块将所述相机关闭消息添加至所述图像处理消息队列中;
所述在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,包括:
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,通过所述图像处理模块触发所述图像管理模块查询所述目标标志位的状态值;
所述根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态,包括:
通过所述图像处理模块根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
如此,当图像处理模块确定图像处理消息队列中不存在图像处理消息时,触发图像处理管理模块检测目标标志位,以根据目标标志位,确定图像处理服务的完成状态,实现了对相机服务进程的图像处理服务状态的检测。
作为本申请的一个示例,所述根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态,包括:
若所述目标标志位的状态值是第一数值,则确定所述相机服务进程已完成所述图像处理服务;或者,
若所述目标标志位的状态值是第二数值,则确定所述相机服务进程未完成所述图像处理服务。
作为本申请的一个示例,所述方法还包括:
通过所述相机服务进程启动计时器;
所述若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,包括:
若所述计时器的计时时长达到第二时长阈值和/或所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,所述第二时长阈值大于或等于目标时长,所述目标时长包括所述相机服务进程生成一张图像并完成所述图像的回调的总时长。
如此,通过启动计时器进行计时,可以避免因相机服务进程异常导致电子设备始终无法进入休眠模式,从而避免出现异常耗电的问题。
作为本申请的一个示例,所述第一时长阈值大于或等于K且小于2K,所述K是指所述目标时长,所述方法还包括:
在通过所述相机服务进程生成图像后,回调所生成的图像;
若所述图像处理消息队列中还存在图像处理消息,则控制所述计时器重新开始计时。
如此,使得计时器的计时操作与监控图像处理服务状态同步执行,避免在相机处理进程需要生成多张图像时,由于计时器的计时超时触发相机服务进程释放唤醒锁,从而使得电子设备进入休眠模式,进而影响相机处理进程的运行。
作为本申请的一个示例,触发所述相机服务进程释放所述唤醒锁的条件为所述相机服务进程已完成所述图像处理服务,所述控制所述相机服务进程释放所述唤醒锁之前,还包括:
若所述相机服务进程已完成所述图像处理服务,如果所述计时器的计时时长未达到所述第二时长阈值,则控制所述计时器取消计时操作。
如果相机服务进程已完成图像处理服务,但计时器的计时时长未超时,计时器的计时操作已经没有意义了,所以,图像处理管理模块可以先取消计时器的计时操作,然后再控制相机服务进程释放唤醒锁。如此可以避免计时器继续做无用功计时。
第二方面,提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下内容:
通过相机应用执行拍照操作;
若在拍照后的第一时长阈值内所述相机应用关闭,则控制相机服务进程持有唤醒锁,所述相机服务进程用于提供图像处理服务,所述图像处理服务在所述相机应用执行所述拍照操作后生成并回调对应的图像,所述唤醒锁用于使得所述电子设备的操作系统无法进入休眠状态;
确定所述相机服务进程的图像处理服务状态;
若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁。
作为本申请的一个示例,所述处理器用于:
通过所述相机应用向所述相机服务进程发送相机关闭消息;
通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,所述图像处理消息队列用于存储图像处理消息,所述图像处理消息包括所述相机服务进程生成图像时所需的数据;
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位 的状态值,所述目标标志位用于指示所述相机服务进程是否已完成图像处理服务;
根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
作为本申请的一个示例,所述相机服务进程中运行有图像处理模块和图像处理管理模块;所述处理器用于:
通过所述相机应用向所述相机服务进程中的图像处理模块发送相机关闭消息;
通过所述图像处理模块接收所述相机关闭消息;
通过所述图像处理模块将所述相机关闭消息添加至所述图像处理消息队列中;
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,通过所述图像处理模块触发所述图像管理模块查询所述目标标志位的状态值;
通过所述图像处理模块根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
作为本申请的一个示例,所述处理器用于:
若所述目标标志位的状态值是第一数值,则确定所述相机服务进程已完成所述图像处理服务;或者,
若所述目标标志位的状态值是第二数值,则确定所述相机服务进程未完成所述图像处理服务。
作为本申请的一个示例,所述处理器用于:
通过所述相机服务进程启动计时器;
所述若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,包括:
若所述计时器的计时时长达到第二时长阈值和/或所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,所述第二时长阈值大于或等于目标时长,所述目标时长包括所述相机服务进程生成一张图像并完成所述图像的回调的总时长。
作为本申请的一个示例,所述第一时长阈值大于或等于K且小于2K,所述K是指所述目标时长,所述处理器用于:
在通过所述相机服务进程生成图像后,回调所生成的图像;
若所述图像处理消息队列中还存在图像处理消息,则控制所述计时器重新开始计时。
作为本申请的一个示例,触发所述相机服务进程释放所述唤醒锁的条件为所述相机服务进程已完成所述图像处理服务,所述处理器在控制所述相机服务进程释放所述唤醒锁之前,还用于:
若所述相机服务进程已完成所述图像处理服务,如果所述计时器的计时时长未达到所述第二时长阈值,则控制所述计时器取消计时操作。
第三方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。
第四方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。
上述第二方面、第三方面和第四方面所获得的技术效果与上述第一方面中对应的 技术手段获得的技术效果近似,在这里不再赘述。
附图说明
图1是根据一示例性实施例示出的一种电子设备的结构示意图;
图2是根据一示例性实施例示出的一种电子设备的软件架构示意图;
图3是根据一示例性实施例示出的一种应用场景的示意图;
图4是根据一示例性实施例示出的一种相册的示意图;
图5是根据另一示例性实施例示出的一种相册的示意图;
图6是根据一示例性实施例示出的一种进程的控制方法的流程示意图;
图7是根据另一示例性实施例示出的一种进程的控制方法的流程示意图;
图8是根据另一示例性实施例示出的一种进程的控制方法的流程示意图;
图9是根据一示例性实施例示出的一种进程的控制装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。
应当理解的是,本申请提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,比如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,比如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
在相机应用拍照后的短时间内,如果电子设备因息屏等原因触发操作系统进入休眠模式,使得电子设备底层的相机服务进程在未生成图像之前中止,而当再次唤醒屏幕后,可能使得相机服务进程无法正常运行,从而导致丢图,也即息屏前一刻拍摄的图像容易丢失。另外,由于相机服务进程崩溃,所以导致当重新打开相机应用时,相机应用在短时间内无法正常连接。为此,本申请实施例提供了一种进程的控制方法,可以避免电子设备因息屏等原因使得休眠模式被触发后立即进入休眠状态,从而使得相机服务进程在电子设备息屏后能够继续运行,进而避免丢图或相机应用再次打开时无法正常连接的问题。
在对本申请实施例提供的进程的控制方法进行详细介绍之前,先对本申请实施例涉及的执行主体予以说明。
本申请实施例提供的方法可以由电子设备来执行,该电子设备配置有摄像头,通过摄像头可以实现拍照功能。譬如,电子设备中包括相机应用(或称:相机应用程序),用户可以触发相机应用,使得电子设备开启摄像头,以通过摄像头进行拍照。在一个实施例中,摄像头的数量可以是一个或者多个,另外,摄像头可以包括前置摄像头和/或后置摄像头。在一个实施例中,该电子设备可以为手机、平板电脑、笔记本电脑、折叠式手机、折叠式平板电脑等,本申请实施例对此不作限定。
图1是本申请实施例提供的一种电子设备的结构示意图。参见图1,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,比如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口,如可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C接口。处理器110可以通过不同的I2C接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。比如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S接口。处理器110可以通过I2S接口与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
UART接口是一种通用串行数据总线,用于异步通信。UART接口可以为双向通信总线。UART接口可以将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。比如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。USB接口130还可以用于连接其他终端,比如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池 142充电的同时,还可以通过电源管理模块141为电子设备100供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。比如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备 通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。比如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。比如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,比如:动 态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,比如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,比如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,比如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。比如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,计算机可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,来执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100在使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,比如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D以及应用处理器等实现音频功能,比如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如 电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。比如:当有触摸操作强度小于压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。电子设备100根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。加速度传感器180E还可以用于识别电子设备100的姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,在拍摄场景中,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括发光二极管(LED)和光检测器,比如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,电子设备100可以确定电子设备100附近有物体。当检测到不充分的反射光时,可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指 纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。比如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键,也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。比如,作用于不同应用(比如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,也可对应不同的振动反馈效果。不同的应用场景(比如:时间提醒,接收信息,闹钟,游戏等),也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
接下来对电子设备100的软件系统予以说明。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务 架构,或云架构。本申请实施例以分层架构的安卓(Android)系统为例,对电子设备100的软件系统进行示例性说明。
图2是本申请实施例提供的一种电子设备100的软件系统的框图。参见图2,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,硬件抽象层(hardware abstract layer,HAL)以及内核层。
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2所示,应用程序框架层可以包括相机调用接口,窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
在一个实施例中,相机调用接口用于供相机应用在执行拍照操作时调用。也即在拍照流程中,相机应用调用相机调用接口,以通过相机调用接口与底层(HAL层)交互,从而通过底层加载摄像头,进而实现拍照功能。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问,这些数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,比如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序的显示界面,显示界面可以由一个或多个视图组成,比如,包括显示短信通知图标的视图,包括显示文字的视图,以及包括显示图片的视图。电话管理器用于提供电子设备100的通信功能,比如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如,通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或滚动条文本形式出现在系统顶部状态栏的通知,比如后台运行的应用程序的通知。通知管理器还可以是以对话窗口形式出现在屏幕上的通知,比如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
HAL层又可称为扩展层。HAL层一般包括技术人员自定义的一些功能模块。在本申请实施例中,HAL层运行有相机服务进程,作为示例而非限定,相机服务进程在电子设备开机后运行,可以称为常驻进程。相机服务进程用于提供图像处理服务,图像处理服务是指在相机应用执行拍照操作后生成对应的图像的服务。在实施中,相机应用被触发(如被用户触发)执行拍照操作后,相机应用通过相机调用接口,向相机服务进程发送相机打开指令,相机服务进程在接收到该相机打开指令后,控制摄像头驱动加载摄像头,之后,可以根据相机应用的指示来使用摄像头采集取景数据。
相机服务进程在获取摄像头采集的取景数据的情况下,基于取景数据进行图像处理操作,以生成对应的图像。然后,相机服务进程可以通过回调的方式,将生成的图像反馈给相机应用,从而完成拍照流程。进一步地,若相机应用被关闭,则相机应用 通过调用相机调用接口,向相机服务进程发送相机关闭消息。相机服务进程在接收到相机关闭消息后,一方面控制摄像头下电,另一方面从内核层中获取唤醒锁。唤醒锁用于唤醒电子设备,使得电子设备的操作系统无法进入休眠状态。在电子设备中存在进程持有唤醒锁的情况下,可以称该电子设备中存在有效唤醒锁,也即在电子设备中存在有效唤醒锁的情况下,操作系统就无法进入休眠状态。
作为本申请的一个示例,相机服务进程中运行有图像处理模块、图像处理管理模块以及控制模块。图像处理模块用于加载摄像头,获取摄像头的取景数据,并基于取景数据生成对应的图像。控制模块用于获取唤醒锁。图像处理管理模块用于指示控制模块持有或释放唤醒锁,其具体实现可以参见下文实施例。
内核层是硬件和软件之间的层。内核层至少包含唤醒锁机制(简称:唤醒锁),显示驱动,摄像头驱动,音频驱动,传感器驱动。摄像头驱动用于驱动硬件的摄像头加载。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别原始输入事件所对应的控件。以该触摸操作是单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用程序框架层的接口,启动相机应用,再调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
在介绍完本申请实施例涉及的执行主体后,接下来对本申请实施例涉及的应用场景进行介绍。这里以电子设备是手机为例进行说明。
请参考图3,用户使用手机中的相机应用执行拍照操作,用户触发手机的相机应用,手机启动相机应用。在拍照模式下,用户触发拍照选项30以对目标A进行拍摄。响应于用户对拍照选项30的触发操作,手机执行拍照操作。在一种可能的情况下,在拍照后,用户立即按动手机的关机键,手机进入息屏模式。在另一种可能的情况下,在拍照后,用户立即将手机放入口袋里,手机进入息屏模式。在本申请实施例,当手机的屏幕再次被唤醒时,用户可以从手机的相册中查询到手机息屏前拍摄的目标A的图像,譬如如图4所示。
在一个实施例中,在拍照模式下,用户触发拍照选项30以对目标A进行拍摄。响应于用户对拍照选项30的触发操作,手机执行拍照操作。在拍照后,用户立即关闭相机应用,并在关闭相机应用后立即触发手机进入息屏模式(譬如按动手机的关机键)。在本申请实施例中,当手机的屏幕再次被唤醒时,用户可以从手机的相册中查询到手机息屏前拍摄的目标A的图像,譬如如图4所示。
在一个实施例中,用户连续、快速多次(譬如两次)点击相机应用中的拍照选项30,并在拍照后的短时间内,按动手机的关机键以使得手机进入息屏模式,或者将手机立即放入口袋里使得手机进入息屏模式。在本申请实施例中,在用户再次触发手机唤醒后,用户可以从手机的相机中查询到手机在息屏前拍摄的目标A的多张图像,譬如如图5所示。
在介绍完本申请实施例涉及的执行主体和应用场景后,接下来结合附图对本申请实施例提供的进程的控制方法进行详细介绍。请参考图6,图6是根据一示例性实施例示出的一种进程的控制方法的流程示意图,作为示例而非限定,该方法可以应用于上述电子设备100中,本实施例以电子设备100通过内部的模块实现为例进行说明,该方法可以包括如下部分或者全部内容:
601:相机应用执行拍照操作。
在一个实施例中,电子设备的显示界面中显示有相机应用的应用图标,当用户想要使用电子设备进行拍照时,可以点击相机应用的应用图标。响应于用户对相机应用的应用图标的触发操作,电子设备启动相机应用。电子设备启动相机应用后,通过相机服务进程控制摄像头驱动来加载摄像头。
请参考图3,相机应用的显示界面中提供有拍照选项30,响应于用户对拍照选项30的触发操作,相机应用向相机服务进程发送拍照指令。相应地,相机服务进程通过图像处理模块接收拍照指令。图像处理模块每接收到一次拍摄指令,就会通过控制摄像头来获取取景数据,并基于取景数据和处理配置参数,生成多条图像处理消息,处理配置参数是指与处理取景数据相关的配置参数,譬如包括但不限于分辨率、帧率等。图像处理模块将生成的多条图像处理消息添加至图像处理消息队列中。如此,图像处理模块即可按照先进先出的原则处理图像处理消息队列中的多条图像处理消息,以生成拍照指令对应的图像。
需要说明的是,相机服务进程在生成每张图像的过程中,通常会产生多条图像处理消息,然后依次处理多条图像处理消息中的每条图像处理消息,待该多条图像处理消息均处理完后,完成图像处理流程,并生成一个拍摄指令对应的图像。也即是,一张图像的生成通常需要处理多条图像处理消息。
602:若在拍照后的第一时长阈值内相机应用关闭,则相机应用向图像处理模块发送相机关闭消息。
第一时长阈值可以根据实际需求进行设置,且通常设置为一个很短的数值。
在一个示例中,在相机应用开启的情况下,如果电子设备进入息屏状态,则相机应用会被关闭,且在常规情况下,电子设备进入息屏状态后操作系统将进入休眠模式。在另一示例中,若在拍照后相机应用被关闭,此时如果电子设备进入息屏状态,则操作系统会进入休眠模式。针对上述任意一种场景,如果在相机应用关闭后的短时间内操作系统进入休眠模式,容易导致底层的相机服务进程未能完成图像处理服务,而因操作系统进入休眠模式,相机服务进程无法正常运行,从而导致丢图问题。
为此,在本申请实施例中,在相机应用执行拍照后的短时间内,如果相机应用关闭,则向图像处理模块发送相机关闭消息,该相机关闭消息用于指示相机应用进入关闭状态。相应地,图像处理模块接收到相机关闭消息后,一方面执行如下步骤603的操作,另一方面执行如下步骤607的操作。
需要说明的是,上述仅是以因息屏触发电子设备进入休眠模式为例进行说明,在另一实施例中,还可能通过其他条件触发电子设备进入休眠模式,本申请实施例对此不作限定。
603:图像处理模块指示控制模块获取唤醒锁,唤醒锁用于使得电子设备的操作系 统无法进入休眠状态。
如前文所述,由于相机服务进程在相机应用执行拍照操作后在后台执行图像处理服务,所以,如果在拍照后的短时间内电子设备进入休眠状态,则相机服务进程可能还尚未完成图像处理服务,而因操作系统进入休眠模式导致相机服务进程中止。为此,相机服务进程在通过图像处理模块接收相机关闭消息后,通知控制模块,使得控制模块从内核层中获取唤醒锁。
604:控制模块获取唤醒锁。
在一个示例中,控制模块获取唤醒锁的具体实现可以包括:控制模块获取目标系统服务,然后调用目标系统服务的接口,从而获取唤醒锁。其中,目标系统服务是指拥有唤醒锁的系统服务,示例性地,目标系统服务为systemsuspend服务。
如此,相机服务进程持有唤醒锁,也即电子设备中存在有效唤醒锁,从而可以避免操作系统进入休眠状态。
605:图像处理模块将相机关闭消息添加至图像处理消息队列中。
根据前文所述可知,图像处理消息队列用于存储图像处理消息,图像处理消息包括相机服务进程生成图像时所需的数据。
图像处理模块将相机关闭消息添加至图像处理消息队列中的末尾位置,以使得相机关闭消息是图像处理模块处理的最后一条消息。在一个实施例中,图像处理模块采用异步传输的方式将相机关闭消息添加至图像处理消息队列中。
需要说明的是,上述是以通过图像处理消息队列存储多条图像处理消息和相机关闭消息为例进行说明。在另一实施例中,还可以采用其他能够表明消息先后处理顺序的方式存储多条图像处理消息和相机关闭消息,本申请实施例对此不作限定。
需要说明的是,步骤605和步骤603之间没有严格的先后执行顺序,本申请实施例对此不作限定。
606:在图像处理消息队列中仅存在相机关闭消息的情况下,图像处理模块触发图像处理管理模块检测目标标志位的状态值。
其中,目标标志位用于指示相机服务进程是否已完成图像处理服务。在一个示例中,图像处理模块在执行完图像处理流程后,更改目标标志的状态值,以使得更改后的状态值指示相机服务进程已完成图像处理服务。
在一个示例中,目标标志位的数量包括第一数值或第二数值,其中,第一数值用于指示相机服务进程已经完成图像处理服务,第二数值用于指示相机服务进程未完成图像处理服务。已完成图像处理服务是指已处理完所有的图像处理消息生成对应的图像。
第一数值可以根据实际需求进行设置,示例性地,第一数值可以为1。同理,第二数值可以根据实际需求进行设置,示例性地,第二数值可以为0。
若图像处理消息队列中仅存在相机关闭消息,也即图像处理消息队列中不存在图像处理消息,说明不存在未处理的图像处理消息,从而说明图像处理模块可能已经处理完或者正在最后一条图像处理消息。该种情况下,图像处理模块可以通过事件触发机制,触发图像处理模块检测目标标志位的状态值,以检测图像处理pipeline完成状态。
607:图像处理管理模块根据目标标志位的状态值,确定相机服务进程的图像处理服务状态。
根据目标标志位的状态值确定相机服务进程的图像处理服务状态包括如下两种情况:一种是,若目标标志位的状态值是第一数值,则确定相机服务进程已完成图像处理服务。另一种是,若目标标志位的状态值是第二数值,则确定相机服务进程未完成图像处理服务。
如果相机服务进程未完成图像处理服务,则继续检测相机服务进程的图像处理服务状态;否则,如果相机服务进程已完成图像处理服务,则执行如下步骤610。
608:图像处理模块将相机关闭消息发送给图像处理管理模块。
在一个实施例中,图像处理模块在接收相机关闭消息后,采用同步传输的方式,将相机关闭消息发送给图像处理管理模块。
需要说明的是,步骤608和上述步骤603之间没有严格的先后执行顺序,本申请实施例对此不作严格的限定。
609:图像处理管理模块启动计时器。
在一种情况下,如果相机服务进程卡死,图像处理管理模块检测的目标标志位始终是第二数值,如此,使得电子设备在息屏状态下始终无法进入休眠模式,进而导致消耗电子设备的功耗。为了避免该种情况的发生,图像处理模块在接收到相机关闭消息后,将相机关闭消息发送给图像处理管理模块,使得图像处理管理模块启动计时器开始计时,以便于通过计时超时的方式控制控制模块释放唤醒锁。
610:若相机服务进程已完成图像处理服务和/或计时器的计时时长达到第二时长阈值,则图像处理管理模块通知控制模块释放唤醒锁。
第二时长阈值可以根据实际需求进行设置。通常情况下,第二时长阈值的时长大于或等于目标时长,目标时长包括相机服务进程生成一张图像并完成该图像的回调的总时长,具体可以根据经验值确定。如此,避免图像处理模块在未完成图像处理服务的情况下,因计时器计时超时触发控制模块释放唤醒锁,从而使得电子设备进入休眠状态,进而影响图像的生成。
在一个示例中,第二时长阈值大于或等于K且小于2K,其中K是指目标时长,也即在第二时长阈值内仅支持一张图像的生成和回调。
在一种情况下,如果相机服务进程已完成图像处理服务,说明相机服务进程已生成拍照指令对应的图像,此时不存在丢图现象,为了不影响系统进入休眠状态,图像处理管理模块通知控制模块释放唤醒锁。
在另一种情况下,如果计时器的计时时长达到第二时长阈值,说明计时超时了,该种情况下,图像处理管理模块也会触发控制模块释放唤醒锁。
在又一种情况下,可能相机服务进程已完成图像处理服务,并且,计时器的计时时长达到第二时长阈值,该种情况下,图像处理管理模块触发控制模块释放唤醒锁,以使得电子设备进入休眠模式。
在一个实施例中,在触发相机服务进程释放唤醒锁的条件是相机服务进程已完成图像处理服务的情况下,在控制相机服务进程释放唤醒锁之前,如果计时器的计时时长未达到第二时长阈值,则图像处理管理模块控制计时器取消计时操作。
611:控制模块释放唤醒锁。
在一个示例中,唤醒锁被释放后,电子设备中不存在有效唤醒锁,此时如果电子设备仍处于息屏状态,则电子设备进入休眠模式。
不难理解,如果相机服务进程已完成图像处理服务,但计时器的计时时长未超时,计时器的计时操作已经没有意义了,所以,图像处理管理模块可以先取消计时器的计时操作,然后再控制相机服务进程释放唤醒锁。如此可以避免计时器继续做无用功计时。
进一步地,在第二时长阈值大于或等于K且小于2K的情况下,该方法还包括如下内容:
612:在图像处理模块生成图像后,通过图像处理管理模块回调所生成的图像。
在一个示例中,图像处理模块每生成一个拍照指令对应的图像后,将所生成的图像发送给图像处理管理模块,由图像处理管理模块通过回调的方式,将所生成的图像发送给相机应用,相机应用可以将该图像存储至相册中,以便于用户查看。
613:若图像处理消息队列中还存在图像处理消息,则图像处理管理模块控制计时器重新开始计时。
在一种可能的场景下,用户可能连续、快速多次触发相机应用执行拍照操作,在该种情况下,响应于用户的每次触发操作,相机应用连续多次向相机服务进程发送拍摄指令。相机服务进程通过图像处理模块依次接收拍摄指令,图像处理模块根据每次接收到拍摄指令,通过摄像头获取取景数据,并基于每次获取的取景数据和处理配置参数,生成多条图像处理消息,将多条图像处理消息添加至图像处理消息队列中。如此,图像处理消息队列中包括多个待生成的图像中每个图像对应的多条图像处理消息。所以,若相机服务进程通过图像处理模块生成一张图像后,图像处理消息队列中还可能存在其他待生成的图像对应的图像处理消息。因此,如果图像处理消息队列中还存在图像处理消息,说明还有待生成的图像,也即相机服务进程还需要执行图像处理服务。该种情况下,由于计时器的最大计时时长为第二时长阈值,而第二时长阈值大于或等于K且小于2K,如果计时器计时超时,则容易导致相机服务进程来不及处理其他图像处理消息。为此,图像处理管理模块控制计时器重新开始计时,也即对计时器进行初始化。
如此,使得计时器的计时操作与监控图像处理服务状态同步执行,避免在相机处理进程需要生成多张图像时,由于计时器的计时超时触发相机服务进程释放唤醒锁,从而使得电子设备进入休眠模式,进而影响相机处理进程的运行。
在本申请实施例中,通过相机应用执行拍照操作。如果在相机应用拍照后的短时间内相机应用关闭,为了避免电子设备进入休眠模式,控制相机服务进程持有唤醒锁,以通过唤醒锁使得电子设备的操作系统无法进入休眠模式,从而避免对相机应用进程执行图像处理服务造成影响,也即使得相机应用进程仍能够继续执行图像处理服务。之后,确定相机服务进程的图像处理服务状态,若相机服务进程已完成图像处理服务,此时可以允许操作系统进入休眠模式,为此,控制相机服务进程释放唤醒锁,以使得操作系统能够正常进入休眠模式。如此,在相机应用关闭后通过控制相机服务进程获取和释放唤醒锁,使得操作系统在短时间内无法进入休眠状态,从而可以避免相机服 务进程无法正常运行导致丢图的问题。
另外,由于相机服务进程在电子设备息屏后仍正常运行,所以,电子设备被再次唤醒后,基于记忆功能再次打开相机应用时,可以正常与相机服务进程进行通信,也即相机应用能够正常连接,不会出现在短时间内无法正常连接的问题。
请参考图7,图7是根据另一示例性实施例示出的一种进程的控制方法的流程图,作为示例而非限定,该方法应用于电子设备100中,这里以电子设备通过多个模块的交互实现为例进行说明。该方法可以包括如下内容:
701:相机应用执行拍照操作。
其具体实现可以参见图6所示实施例中的步骤601,这里不再重复赘述。
702:若在拍照后的第一时长阈值内相机应用关闭,则相机应用向图像处理模块发送相机关闭消息。
在一个示例中,在相机应用开启的情况下,如果电子设备进入息屏状态,则相机应用会被关闭,且在常规情况下,电子设备进入息屏状态后操作系统将进入休眠模式。在本申请实施例,在相机应用拍照后的短时间内如果相机应用关闭,则相机应用向图像处理模块发送相机关闭消息,并且相机应用关闭。其中该相机关闭消息用于指示相机应用进入关闭状态。
703:图像处理模块指示控制模块获取唤醒锁。
如前文所述,由于相机服务进程在相机应用执行拍照操作后在后台执行图像处理服务,所以,如果在拍照后的短时间内电子设备进入休眠状态,则相机服务进程可能还尚未完成图像处理服务,而因操作系统进入休眠模式导致相机服务进程中止。为此,相机服务进程在通过图像处理模块接收相机关闭消息后,通知控制模块,使得控制模块从内核层中获取唤醒锁。
704:控制模块获取唤醒锁,唤醒锁用于使得电子设备的操作系统无法进入休眠状态。
在一个示例中,控制模块获取唤醒锁的具体实现可以包括:控制模块获取目标系统服务,然后调用目标系统服务的接口,从而获取唤醒锁。其中,目标系统服务是指拥有唤醒锁的系统服务,示例性地,目标系统服务为systemsuspend服务。
如此,相机服务进程持有唤醒锁,也即电子设备中存在有效唤醒锁,从而可以避免操作系统进入休眠状态。
705:图像处理模块将相机关闭消息添加至图像处理消息队列中。
根据前文所述可知,图像处理消息队列用于存储图像处理消息,图像处理消息包括相机服务进程生成图像时所需的数据。
图像处理模块将相机关闭消息添加至图像处理消息队列中的末尾位置,以使得相机关闭消息是图像处理模块处理的最后一条消息。在一个实施例中,图像处理模块采用异步传输的方式将相机关闭消息添加至图像处理消息队列中。
需要说明的是,上述是以通过图像处理消息队列存储多条图像处理消息和相机关闭消息为例进行说明。在另一实施例中,还可以采用其他能够表明消息先后处理顺序的方式存储多条图像处理消息和相机关闭消息,本申请实施例对此不作限定。
需要说明的是,步骤703和步骤705之间没有严格的先后执行顺序。
706:在图像处理消息队列中仅存在相机关闭消息的情况下,图像处理模块触发图像处理管理模块检测目标标志位的状态值。
其中,目标标志位用于指示相机服务进程是否已完成图像处理服务。在一个示例中,图像处理模块在执行完图像处理流程后,更改目标标志的状态值,以使得更改后的状态值指示相机服务进程已完成图像处理服务。
在一个示例中,目标标志位的数量包括第一数值或第二数值,其中,第一数值用于指示相机服务进程已经完成图像处理服务,第二数值用于指示相机服务进程未完成图像处理服务。已完成图像处理服务是指已处理完所有的图像处理消息,或者可以理解为已生成对应的图像。
第一数值可以根据实际需求进行设置,示例性地,第一数值可以为1。同理,第二数值可以根据实际需求进行设置,示例性地,第二数值可以为0。
若图像处理消息队列中仅存在相机关闭消息,也即图像处理消息队列中不存在图像处理消息,说明不存在未处理的图像处理消息,从而说明图像处理模块可能已经处理完或者正在最后一条图像处理消息。该种情况下,图像处理模块可以通过事件触发机制,触发图像处理模块检测目标标志位的状态值,以检测图像处理pipeline完成状态。
707:图像处理管理模块根据目标标志位的状态值,确定相机服务进程的图像处理服务状态。
根据目标标志位的状态值确定相机服务进程的图像处理服务状态包括如下两种情况:一种是,若目标标志位的状态值是第一数值,则确定相机服务进程已完成图像处理服务。另一种是,若目标标志位的状态值是第二数值,则确定相机服务进程未完成图像处理服务。
如果相机服务进程未完成图像处理服务,则继续检测相机服务进程的图像处理服务状态;否则,如果相机服务进程已完成图像处理服务,则执行如下步骤708。
708:若相机服务进程已完成图像处理服务,则图像处理管理模块通知控制模块。
709:控制模块释放唤醒锁。
在一种情况下,如果相机服务进程已完成图像处理服务,说明相机服务进程已生成拍照指令对应的图像,此时不存在丢图现象,为了不影响系统进入休眠状态,控制控制模块释放唤醒锁。唤醒锁被释放后,电子设备中不存在有效唤醒锁,此时如果电子设备仍处于息屏状态,则电子设备进入休眠模式。
在本申请实施例中,通过相机应用执行拍照操作。如果在相机应用拍照后的短时间内相机应用关闭,为了避免电子设备进入休眠模式,控制相机服务进程持有唤醒锁,以通过唤醒锁使得电子设备的操作系统无法进入休眠模式,从而避免对相机应用进程执行图像处理服务造成影响,也即使得相机应用进程仍能够继续执行图像处理服务。之后,确定相机服务进程的图像处理服务状态,若相机服务进程已完成图像处理服务,此时可以允许操作系统进入休眠模式,为此,控制相机服务进程释放唤醒锁,以使得操作系统能够正常进入休眠模式。如此,在相机应用关闭后通过控制相机服务进程获取和释放唤醒锁,使得操作系统在短时间内无法进入休眠状态,从而可以避免相机服 务进程无法正常运行导致丢图的问题。
另外,由于相机服务进程在电子设备息屏后仍正常运行,所以,电子设备被再次唤醒后,基于记忆功能再次打开相机应用时,可以正常与相机服务进程进行通信,也即相机应用能够正常连接,不会出现在短时间内无法正常连接的问题。
请参考图8,图8是根据另一实施例示出的一种进程的控制方法的流程图,作为示例而非限定,该方法应用于电子设备中,该方法可以包括如下部分或者全部内容:
步骤801:通过相机应用执行拍照操作。
其具体实现可以参见上述图6所示实施例中的步骤601。
步骤802:若在拍照后的第一时长阈值内相机应用关闭,则控制相机服务进程持有唤醒锁,相机服务进程用于提供图像处理服务,图像处理服务在相机应用执行拍照操作后生成并回调对应的图像,唤醒锁用于使得电子设备的操作系统无法进入休眠状态。
步骤803:确定相机服务进程的图像处理服务状态。
在一个示例中,步骤803的具体实现可以包括:通过相机应用向相机服务进程发送相机关闭消息。通过相机服务进程将相机关闭消息添加至图像处理消息队列中,图像处理消息队列用于存储图像处理消息,图像处理消息包括相机服务进程生成图像时所需的数据。在图像处理消息队列中仅存在相机关闭消息的情况下,查询目标标志位的状态值,目标标志位用于指示相机服务进程是否已完成图像处理服务。根据目标标志位的状态值,确定相机服务进程的图像处理服务状态。
具体地,通过相机应用向相机服务进程中的图像处理模块发送相机关闭消息,通过图像处理模块接收相机关闭消息。通过图像处理模块将相机关闭消息添加至图像处理消息队列中。在图像处理消息队列中仅存在相机关闭消息的情况下,通过图像处理模块触发图像管理模块查询目标标志位的状态值。通过图像处理模块根据目标标志位的状态值,确定相机服务进程的图像处理服务状态。
在一个示例中,根据目标标志位的状态值,确定相机服务进程的图像处理服务状态包括:若目标标志位的状态值是第一数值,则确定相机服务进程已完成图像处理服务。或者,若目标标志位的状态值是第二数值,则确定相机服务进程未完成图像处理服务。
步骤804:若相机服务进程已完成图像处理服务,则控制相机服务进程释放唤醒锁。
在一个实施例中,通过相机服务进程启动计时器。在该种情况下,步骤804的实现包括:若计时器的计时时长达到第二时长阈值和/或相机服务进程已完成图像处理服务,则控制相机服务进程释放唤醒锁,第二时长阈值大于或等于目标时长,目标时长包括相机服务进程生成一张图像并完成该图像的回调的总时长。
在一个实施例中,第一时长阈值大于或等于K且小于2K,K是指目标时长,此时,在通过相机服务进程生成图像后,回调所生成的图像。若图像处理消息队列中还存在图像处理消息,则控制计时器重新开始计时。
在一个实施例中,触发相机服务进程释放唤醒锁的条件为相机服务进程已完成图 像处理服务,控制相机服务进程释放唤醒锁之前,还包括:若相机服务进程已完成图像处理服务,如果计时器的计时时长未达到第二时长阈值,则控制计时器取消计时操作。
在本申请实施例中,通过相机应用执行拍照操作。如果在相机应用拍照后的短时间内相机应用关闭,为了避免电子设备进入休眠模式,控制相机服务进程持有唤醒锁,以通过唤醒锁使得电子设备的操作系统无法进入休眠模式,从而避免对相机应用进程执行图像处理服务造成影响,也即使得相机应用进程仍能够继续执行图像处理服务。之后,确定相机服务进程的图像处理服务状态,若相机服务进程已完成图像处理服务,此时可以允许操作系统进入休眠模式,为此,控制相机服务进程释放唤醒锁,以使得操作系统能够正常进入休眠模式。如此,在相机应用关闭后通过控制相机服务进程获取和释放唤醒锁,使得操作系统在短时间内无法进入休眠状态,从而可以避免相机服务进程无法正常运行导致丢图的问题。
图9是本申请实施例提供的一种进程的控制装置的结构示意图,该装置可以由软件、硬件或者两者的结合实现成为电子设备的部分或者全部,该电子设备可以为图1所示的电子设备。参见图9,该进程的控制装置9包括:处理器910、存储器920以及存储在所述存储器中并可在所述处理器上运行的计算机程序930,所述处理器910执行所述计算机程序时实现如下内容:
通过相机应用执行拍照操作;
若在拍照后的第一时长阈值内所述相机应用关闭,则控制相机服务进程持有唤醒锁,所述相机服务进程用于提供图像处理服务,所述图像处理服务在所述相机应用执行所述拍照操作后生成并回调对应的图像,所述唤醒锁用于使得所述电子设备的操作系统无法进入休眠状态;
确定所述相机服务进程的图像处理服务状态;
若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁。
作为本申请的一个示例,所述处理器910用于:
通过所述相机应用向所述相机服务进程发送相机关闭消息;
通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,所述图像处理消息队列用于存储图像处理消息,所述图像处理消息包括所述相机服务进程生成图像时所需的数据;
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,所述目标标志位用于指示所述相机服务进程是否已完成图像处理服务;
根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
作为本申请的一个示例,所述相机服务进程中运行有图像处理模块和图像处理管理模块;所述处理器910用于:
通过所述相机应用向所述相机服务进程中的图像处理模块发送相机关闭消息;
通过所述图像处理模块接收所述相机关闭消息;
通过所述图像处理模块将所述相机关闭消息添加至所述图像处理消息队列中;
在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,通过所述图像处理模块触发所述图像管理模块查询所述目标标志位的状态值;
通过所述图像处理模块根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
作为本申请的一个示例,所述处理器910用于:
若所述目标标志位的状态值是第一数值,则确定所述相机服务进程已完成所述图像处理服务;或者,
若所述目标标志位的状态值是第二数值,则确定所述相机服务进程未完成所述图像处理服务。
作为本申请的一个示例,所述处理器910用于:
通过所述相机服务进程启动计时器;
所述若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,包括:
若所述计时器的计时时长达到第二时长阈值和/或所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,所述第二时长阈值大于或等于目标时长,所述目标时长包括所述相机服务进程生成一张图像并完成所述图像的回调的总时长。
作为本申请的一个示例,所述第一时长阈值大于或等于K且小于2K,所述K是指所述目标时长,所述处理器910用于:
在通过所述相机服务进程生成图像后,回调所生成的图像;
若所述图像处理消息队列中还存在图像处理消息,则控制所述计时器重新开始计时。
作为本申请的一个示例,触发所述相机服务进程释放所述唤醒锁的条件为所述相机服务进程已完成所述图像处理服务,所述处理器910在控制所述相机服务进程释放所述唤醒锁之前,还用于:
若所述相机服务进程已完成所述图像处理服务,如果所述计时器的计时时长未达到所述第二时长阈值,则控制所述计时器取消计时操作。
在本申请实施例中,通过相机应用执行拍照操作。如果在相机应用拍照后的短时间内相机应用关闭,为了避免电子设备进入休眠模式,控制相机服务进程持有唤醒锁,以通过唤醒锁使得电子设备的操作系统无法进入休眠模式,从而避免对相机应用进程执行图像处理服务造成影响,也即使得相机应用进程仍能够继续执行图像处理服务。之后,确定相机服务进程的图像处理服务状态,若相机服务进程已完成图像处理服务,此时可以允许操作系统进入休眠模式,为此,控制相机服务进程释放唤醒锁,以使得操作系统能够正常进入休眠模式。如此,在相机应用关闭后通过控制相机服务进程获取和释放唤醒锁,使得操作系统在短时间内无法进入休眠状态,从而可以避免相机服务进程无法正常运行导致丢图的问题。
需要说明的是:上述实施例提供的进程的控制装置在执行进程的控制方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上 描述的全部或者部分功能。
上述实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。
上述实施例提供的进程的控制装置与进程的控制方法实施例属于同一构思,上述实施例中单元、模块的具体工作过程及带来的技术效果,可参见方法实施例部分,此处不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,比如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(比如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(比如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(比如:软盘、硬盘、磁带)、光介质(比如:数字通用光盘(Digital Versatile Disc,DVD))或半导体介质(比如:固态硬盘(Solid State Disk,SSD))等。
以上所述为本申请提供的可选实施例,并不用以限制本申请,凡在本申请的揭露的技术范围之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (11)

  1. 一种进程的控制方法,其特征在于,应用于电子设备,所述方法包括:
    通过相机应用执行拍照操作;
    若在拍照后的第一时长阈值内所述相机应用关闭,则控制相机服务进程持有唤醒锁,所述相机服务进程用于提供图像处理服务,所述图像处理服务在所述相机应用执行所述拍照操作后生成并回调对应的图像,所述唤醒锁用于使得所述电子设备的操作系统无法进入休眠状态;
    确定所述相机服务进程的图像处理服务状态;
    若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁。
  2. 如权利要求1所述的方法,其特征在于,所述确定所述相机服务进程的图像处理服务状态,包括:
    通过所述相机应用向所述相机服务进程发送相机关闭消息;
    通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,所述图像处理消息队列用于存储图像处理消息,所述图像处理消息包括所述相机服务进程生成图像时所需的数据;
    在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,所述目标标志位用于指示所述相机服务进程是否已完成图像处理服务;
    根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
  3. 如权利要求2所述的方法,其特征在于,所述相机服务进程中运行有图像处理模块和图像处理管理模块;
    所述通过所述相机应用向所述相机服务进程发送相机关闭消息,包括:
    通过所述相机应用向所述相机服务进程中的图像处理模块发送相机关闭消息;
    通过所述图像处理模块接收所述相机关闭消息;
    所述通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,包括:
    通过所述图像处理模块将所述相机关闭消息添加至所述图像处理消息队列中;
    所述在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,包括:
    在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,通过所述图像处理模块触发所述图像管理模块查询所述目标标志位的状态值;
    所述根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态,包括:
    通过所述图像处理模块根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
  4. 如权利要求2所述的方法,其特征在于,所述根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态,包括:
    若所述目标标志位的状态值是第一数值,则确定所述相机服务进程已完成所述图 像处理服务;或者,
    若所述目标标志位的状态值是第二数值,则确定所述相机服务进程未完成所述图像处理服务。
  5. 如权利要求2-4任一项所述的方法,其特征在于,所述方法还包括:
    通过所述相机服务进程启动计时器;
    所述若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,包括:
    若所述计时器的计时时长达到第二时长阈值和/或所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,所述第二时长阈值大于或等于目标时长,所述目标时长包括所述相机服务进程生成一张图像并完成所述图像的回调的总时长。
  6. 如权利要求5所述的方法,其特征在于,所述第一时长阈值大于或等于K且小于2K,所述K是指所述目标时长,所述方法还包括:
    在通过所述相机服务进程生成图像后,回调所生成的图像;
    若所述图像处理消息队列中还存在图像处理消息,则控制所述计时器重新开始计时。
  7. 如权利要求5或6所述的方法,其特征在于,触发所述相机服务进程释放所述唤醒锁的条件为所述相机服务进程已完成所述图像处理服务,所述控制所述相机服务进程释放所述唤醒锁之前,还包括:
    若所述相机服务进程已完成所述图像处理服务,如果所述计时器的计时时长未达到所述第二时长阈值,则控制所述计时器取消计时操作。
  8. 一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如下内容:
    通过相机应用执行拍照操作;
    若在拍照后的第一时长阈值内所述相机应用关闭,则控制相机服务进程持有唤醒锁,所述相机服务进程用于提供图像处理服务,所述图像处理服务在所述相机应用执行所述拍照操作后生成并回调对应的图像,所述唤醒锁用于使得所述电子设备的操作系统无法进入休眠状态;
    确定所述相机服务进程的图像处理服务状态;
    若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁。
  9. 如权利要求8所述的电子设备,其特征在于,所述处理器用于:
    通过所述相机应用向所述相机服务进程发送相机关闭消息;
    通过所述相机服务进程将所述相机关闭消息添加至图像处理消息队列中,所述图像处理消息队列用于存储图像处理消息,所述图像处理消息包括所述相机服务进程生成图像时所需的数据;
    在所述图像处理消息队列中仅存在所述相机关闭消息的情况下,查询目标标志位的状态值,所述目标标志位用于指示所述相机服务进程是否已完成图像处理服务;
    根据所述目标标志位的状态值,确定所述相机服务进程的图像处理服务状态。
  10. 如权利要求8或9所述的电子设备,其特征在于,所述处理器还用于:
    通过所述相机服务进程启动计时器;
    所述若所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,包括:
    若所述计时器的计时时长达到第二时长阈值和/或所述相机服务进程已完成所述图像处理服务,则控制所述相机服务进程释放所述唤醒锁,所述第二时长阈值大于或等于目标时长,所述目标时长包括所述相机服务进程生成一张图像并完成所述图像的回调的总时长。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-7任意一项所述的方法。
PCT/CN2022/141966 2022-02-28 2022-12-26 进程的控制方法、电子设备及可读存储介质 WO2023160205A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22919288.5A EP4266694A4 (en) 2022-02-28 2022-12-26 METHOD FOR CONTROLLING A PROCESS AND ELECTRONIC DEVICE AND READABLE STORAGE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210195142.2 2022-02-28
CN202210195142.2A CN116723384B (zh) 2022-02-28 2022-02-28 进程的控制方法、电子设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2023160205A1 true WO2023160205A1 (zh) 2023-08-31

Family

ID=87764647

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141966 WO2023160205A1 (zh) 2022-02-28 2022-12-26 进程的控制方法、电子设备及可读存储介质

Country Status (3)

Country Link
EP (1) EP4266694A4 (zh)
CN (1) CN116723384B (zh)
WO (1) WO2023160205A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959604A (zh) * 2016-05-26 2016-09-21 北京小米移动软件有限公司 录像方法、装置和移动设备
CN109947484A (zh) * 2019-02-25 2019-06-28 努比亚技术有限公司 一种唤醒锁的控制方法、终端及计算机可读存储介质
CN110572866A (zh) * 2019-07-26 2019-12-13 华为技术有限公司 一种唤醒锁的管理方法及电子设备
CN111225151A (zh) * 2020-01-20 2020-06-02 深圳传音控股股份有限公司 智能终端、拍摄控制方法及计算机可读存储介质
US20200371892A1 (en) * 2017-10-13 2020-11-26 Huawei Technologies Co., Ltd. System and method for cloud-device collaborative real-time user experience and performance abnormality detection

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3644388B2 (ja) * 2001-01-17 2005-04-27 株式会社デンソー 携帯端末およびプログラム
JP4072162B2 (ja) * 2005-01-17 2008-04-09 オリンパス株式会社 カメラ
WO2007007758A1 (ja) * 2005-07-11 2007-01-18 Nikon Corporation 電子カメラ
US20110103643A1 (en) * 2009-11-02 2011-05-05 Kenneth Edward Salsman Imaging system with integrated image preprocessing capabilities
JP6011555B2 (ja) * 2014-01-28 2016-10-19 カシオ計算機株式会社 撮像装置、撮像方法及びプログラム
US10785458B2 (en) * 2017-03-24 2020-09-22 Blackberry Limited Method and system for distributed camera network
KR20200073733A (ko) * 2018-12-14 2020-06-24 삼성전자주식회사 전자 장치의 기능 실행 방법 및 이를 사용하는 전자 장치
US10594856B1 (en) * 2019-06-27 2020-03-17 Shenzhen GOODIX Technology Co., Ltd. Immediate-mode camera for portable personal electronic devices
KR20210011146A (ko) * 2019-07-22 2021-02-01 이동욱 비음성 웨이크업 신호에 기반한 서비스 제공 장치 및 그 방법
CN113965642A (zh) * 2020-07-01 2022-01-21 华为技术有限公司 一种显示方法及电子设备
CN113625881A (zh) * 2021-08-20 2021-11-09 Oppo广东移动通信有限公司 显示控制方法、装置、存储介质及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959604A (zh) * 2016-05-26 2016-09-21 北京小米移动软件有限公司 录像方法、装置和移动设备
US20200371892A1 (en) * 2017-10-13 2020-11-26 Huawei Technologies Co., Ltd. System and method for cloud-device collaborative real-time user experience and performance abnormality detection
CN109947484A (zh) * 2019-02-25 2019-06-28 努比亚技术有限公司 一种唤醒锁的控制方法、终端及计算机可读存储介质
CN110572866A (zh) * 2019-07-26 2019-12-13 华为技术有限公司 一种唤醒锁的管理方法及电子设备
CN111225151A (zh) * 2020-01-20 2020-06-02 深圳传音控股股份有限公司 智能终端、拍摄控制方法及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4266694A4

Also Published As

Publication number Publication date
EP4266694A4 (en) 2024-07-24
EP4266694A1 (en) 2023-10-25
CN116723384B (zh) 2024-04-19
CN116723384A (zh) 2023-09-08

Similar Documents

Publication Publication Date Title
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2021169337A1 (zh) 屏下指纹显示方法及电子设备
WO2021017889A1 (zh) 一种应用于电子设备的视频通话的显示方法及相关装置
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
CN112492193B (zh) 一种回调流的处理方法及设备
WO2021036785A1 (zh) 一种消息提醒方法及电子设备
WO2021043046A1 (zh) 一种资源管控方法及设备
WO2021052410A1 (zh) 一种应用管理方法及装置
WO2023056795A1 (zh) 快速拍照方法、电子设备及计算机可读存储介质
WO2021052139A1 (zh) 手势输入方法及电子设备
WO2022033320A1 (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
WO2022037726A1 (zh) 分屏显示方法和电子设备
US20230262065A1 (en) Atomic Ability Invoking Method and Terminal Device
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
WO2023005282A1 (zh) 一种消息推送方法及装置
CN114189846B (zh) 避免漏接电话的方法、系统、电子设备及存储介质
WO2022017474A1 (zh) 任务处理方法及相关装置
WO2022170856A1 (zh) 建立连接的方法与电子设备
WO2021143391A1 (zh) 基于视频通话的共享屏幕方法及移动设备
CN113805797A (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
WO2022252972A1 (zh) 一种窗口显示方法和电子设备
WO2022170854A1 (zh) 视频通话的方法与相关设备
WO2022037725A1 (zh) 一种系统服务恢复方法、装置和电子设备
WO2022242412A1 (zh) 杀应用的方法及相关设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022919288

Country of ref document: EP

Effective date: 20230720