CN112217990A - Task scheduling method, task scheduling device, and storage medium - Google Patents

Task scheduling method, task scheduling device, and storage medium Download PDF

Info

Publication number
CN112217990A
CN112217990A CN202011033786.9A CN202011033786A CN112217990A CN 112217990 A CN112217990 A CN 112217990A CN 202011033786 A CN202011033786 A CN 202011033786A CN 112217990 A CN112217990 A CN 112217990A
Authority
CN
China
Prior art keywords
task
thread pool
thread
scheduling
pool
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202011033786.9A
Other languages
Chinese (zh)
Other versions
CN112217990B (en
Inventor
张墅潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202011033786.9A priority Critical patent/CN112217990B/en
Publication of CN112217990A publication Critical patent/CN112217990A/en
Application granted granted Critical
Publication of CN112217990B publication Critical patent/CN112217990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4818Priority circuits therefor
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)

Abstract

The present disclosure relates to a task scheduling method, a task scheduling apparatus, and a storage medium. The task scheduling method is applied to a terminal, the terminal comprises a camera device, and the task scheduling method comprises the following steps: determining a preview image task and a shot image task operated by the camera device, putting the preview image task thread into a first thread pool, and putting the shot image task thread into a second thread pool, wherein the scheduling priority of the first thread pool is different from the scheduling priority of the second thread pool; and differentially scheduling the preview image task thread in the first thread pool and the shooting image task thread in the second thread pool according to the scheduling priority sequence of the first thread pool and the second thread pool. By the method and the device, when the camera device runs, timeliness of image preview and image shooting processing can be guaranteed, and real-time smoothness of a preview image interface is guaranteed.

Description

Task scheduling method, task scheduling device, and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a task scheduling method, a task scheduling apparatus, and a storage medium.
Background
With the development of mobile terminal technology, the photographing experience of the terminal has become a core competition point for mobile terminal manufacturers. In order to improve the market share of the mobile terminal, no mobile terminal manufacturer can improve the use experience of the camera without making the whole mind.
However, with the upgrading of the mobile terminal camera device, the pixels are larger and larger, the number of cameras is larger and larger, the image processing algorithm is also increased at the geometric level, and more challenges are brought to the experience optimization of the camera device system. For example, when a user previews an image through a camera device in a mobile terminal, phenomena such as unsmooth preview interface display, frame loss due to jamming and the like often occur, and user experience is poor.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a task scheduling method, a task scheduling apparatus, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a task scheduling method, which is applied to a terminal, where the terminal includes an image pickup device, and the task scheduling method includes: determining a preview image task and a shot image task operated by the camera device, putting the preview image task thread into a first thread pool, and putting the shot image task thread into a second thread pool, wherein the scheduling priority of the first thread pool is different from the scheduling priority of the second thread pool; and differentially scheduling the preview image task thread in the first thread pool and the shooting image task thread in the second thread pool according to the scheduling priority sequence of the first thread pool and the second thread pool.
In an example, the task scheduling method further includes: and establishing the first thread pool and/or the second thread pool in response to the starting of the camera device.
In an example, the task scheduling method further includes: in response to receiving a shooting instruction, setting a scheduling priority of the first thread pool to be higher than a scheduling priority of the second thread pool.
In one example, the setting of the scheduling priority of the first thread pool to be higher than the scheduling priority of the second thread pool comprises: and setting the scheduling priority of the first thread pool to be the highest, and keeping the default scheduling priority of the second thread pool unchanged.
In one example, the second thread pool further includes other task threads different from the preview image task thread and the capture image task thread, and the method further includes: and differentially scheduling the preview image task thread in the first thread pool and the shot image task thread and other task threads in the second thread pool according to the scheduling priority of the first thread pool and the scheduling priority of the second thread pool.
According to a second aspect of the embodiments of the present disclosure, there is provided a task scheduling apparatus, which is applied to a terminal, where the terminal includes an image pickup apparatus, and the task scheduling apparatus includes: the determining unit is configured to determine a preview image task and a shot image task which are operated by the camera device, put the preview image task thread into a first thread pool, and put a shot image task thread into a second thread pool, wherein the scheduling priority of the first thread pool is different from that of the second thread pool; the scheduling unit is configured to differentially schedule the preview image task thread in the first thread pool and the shooting image task thread in the second thread pool according to the scheduling priority order of the first thread pool and the second thread pool.
In one example, the task scheduling apparatus further includes: a creating unit configured to establish the first thread pool and/or the second thread pool in response to the camera starting.
In one example, the task scheduling apparatus further includes: a setting unit configured to set a scheduling priority of the first thread pool to be higher than a scheduling priority of the second thread pool in response to receiving a photographing instruction.
In one example, the setting unit sets the scheduling priority of the first thread pool to be higher than the scheduling priority of the second thread pool as follows: and setting the scheduling priority of the first thread pool to be the highest, and keeping the default scheduling priority of the second thread pool unchanged.
In an example, the second thread pool further includes other task threads different from the preview image task thread and the capture image task thread, and the scheduling unit is further configured to: and differentially scheduling the preview image task thread in the first thread pool and the shot image task thread and other task threads in the second thread pool according to the scheduling priority of the first thread pool and the scheduling priority of the second thread pool.
According to a third aspect of the present disclosure, there is provided a task scheduling device, including: a memory configured to store instructions. And a processor configured to invoke the instructions to perform the task scheduling method in the foregoing first aspect or any example of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a processor, perform the method of task scheduling of the foregoing first aspect or any one of the examples of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the terminal camera device is in operation, the preview image task thread and the shot image task thread are placed in the thread pools with different priorities, when the processor needs to schedule the task threads in the thread pools, the preview image task thread and the shot image task thread can be differentially scheduled according to the priorities of the thread pools, so that the timeliness of processing the preview image and the shot image is ensured when the camera device operates, and the real-time smoothness of a preview image interface is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flowchart illustrating a method of task scheduling in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method of task scheduling in accordance with an exemplary embodiment.
Fig. 3 is a comparison diagram illustrating a task processing effect of a preview image according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating a task scheduler in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The technical scheme of the exemplary embodiment of the disclosure can be applied to an application scene for scheduling the preview image task after the terminal starts the camera device. In the exemplary embodiments described below, a terminal is sometimes also referred to as an intelligent terminal device, where the terminal may be a Mobile terminal, and may also be referred to as a User Equipment (UE), a Mobile Station (MS), and the like. A terminal is a device that provides voice and/or data connection to a user, or a chip disposed in the device, such as a handheld device, a vehicle-mounted device, etc. having a wireless connection function. Examples of terminals may include, for example: the Mobile terminal comprises a Mobile phone, a tablet computer, a notebook computer, a palm computer, Mobile Internet Devices (MID), a wearable device, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in remote operation, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home and the like.
Along with the upgrading of a terminal camera device, pixels are higher and higher, cameras are more and more, image processing algorithms are increased in a geometric level mode, and more challenges are brought to the experience optimization of a camera device system. For example, when a user previews an image through a camera device in a mobile terminal, phenomena such as unsmooth preview interface display, frame loss due to jamming and the like often occur, and user experience is poor.
Generally, when a processor of a terminal processes an application running on the terminal, a task thread to be processed is placed in a thread pool established by default in a terminal system, the task threads in the thread pool are sequentially scheduled according to the sequence of the task threads queued in the thread pool, however, with the upgrade of a camera device, more and more cameras and higher pixels are provided, an image processing algorithm is also increased in geometric level, and a preview image task and a shooting image task and other task threads in the running of the camera device are still executed according to the sequence of the tasks queued in the thread pool, so that the timeliness of the processing of the processor in the running of the camera device cannot be guaranteed, and phenomena such as unsmooth display of a preview interface, frame loss due to jamming and the like occur.
Therefore, the task scheduling method provided by the disclosure can be used for differentially scheduling the preview image task thread and the shot image task thread according to the priority of the thread pool when the processor needs to schedule the task thread in the thread pool by placing the preview image task thread and the shot image task thread in the thread pools with different priorities when the terminal camera device is in operation, so that the timeliness of image preview and shot image processing is ensured and the real-time smoothness of an image interface is previewed when the camera device is in operation.
Fig. 1 is a flowchart illustrating a task scheduling method according to an exemplary embodiment, where the task scheduling method is used in a terminal, the terminal includes an image pickup device, and the task scheduling method includes the following steps.
In step S11, a preview image task and a captured image task that are executed by the image capturing apparatus are determined, the preview image task thread is placed in a first thread pool, and the captured image task thread is placed in a second thread pool, wherein the scheduling priority of the first thread pool is different from the scheduling priority of the second thread pool.
With the continuous upgrading of the terminal camera device, the processing time of the image previewing task and the image shooting task of the camera device during running is longer and longer, and in order to ensure that the image previewing task and the image shooting task can be processed in time during the running process of the camera device, the image previewing task and the image shooting task are respectively placed into two thread pools with different priorities when the camera device is determined to be in running.
Thus, for example, when image preview is required to be smoother, a preview image task thread can be put into a thread pool with a high priority, and a shooting image task thread can be put into a thread pool with a low priority.
In order to distinguish thread pools storing a preview image task and a shot image task, the thread pool storing the preview image task is called a first thread pool, and the thread pool storing the shot image task is called a second thread pool.
In step S12, the preview image task thread in the first thread pool and the capture image task thread in the second thread pool are differentially scheduled according to the scheduling priority order of the first thread pool and the second thread pool.
Because the priority of the thread pool for storing the preview image task is different from that of the thread pool for storing the shot image task, when the processor schedules the threads in the thread pool for processing, the processor can schedule the threads in the thread pool with high priority for processing according to the priority sequence of the thread pool.
For example, the thread pool for storing the preview image task has higher priority, and when the processor needs to schedule the threads in the thread pool for processing, the thread for storing the preview image task in the thread pool for previewing the image task can be scheduled preferentially, so that the preview image task can be processed in time, and the real-time smoothness of a preview image interface is ensured.
In the exemplary embodiment of the disclosure, when the terminal camera device is in operation, by placing the preview image task thread and the shot image task thread in the thread pools with different priorities, when the processor needs to schedule the task threads in the thread pools, the preview image task thread and the shot image task thread can be differentially scheduled according to the priorities of the thread pools, so that the timeliness of processing of the preview image and the shot image during the operation of the terminal camera device is ensured, and the real-time smoothness of a preview image interface is ensured.
Fig. 2 is a flowchart illustrating a task scheduling method according to an exemplary embodiment, where the task scheduling method is used in a terminal, the terminal includes an image pickup device, and the task scheduling method includes the following steps, as shown in fig. 2.
In step S21, in response to the camera starting, a first thread pool and/or a second thread pool is established.
In order to ensure timeliness of image preview and image shooting processing when the camera device runs, in the disclosure, after the camera device is started, a thread pool, namely a first thread pool, which is specially used for scheduling a preview image task thread can be established for a camera application. Or a thread pool, namely a first thread pool, specially used for scheduling the image preview task thread is established, and a thread pool, namely a second thread pool, specially used for scheduling the image shooting task thread is established.
In addition, a thread pool is independently established for the shooting task, so that the limitation of the number of threads stored in the default thread pool of the terminal system can be made up, and the situation that shooting and previewing are not enough can be avoided.
In step S22, a preview image task and a captured image task that are executed by the image capturing apparatus are determined, the preview image task thread is placed in a first thread pool, and the captured image task thread is placed in a second thread pool, wherein the scheduling priority of the first thread pool is different from the scheduling priority of the second thread pool.
In order to prevent the phenomenon that when the camera device runs, a preview image task cannot be processed by the processor in time, the preview interface is displayed unsmoothly, and frames are jammed and lost, in one embodiment, after a shooting instruction is received, the scheduling priority of the first thread pool can be set to be higher than that of the second thread pool.
For example, when a thread pool, namely a first thread pool, dedicated to scheduling a preview image task thread is established, the preview image task thread is put into the first thread pool, and the capture image task thread is put into a second thread pool including other task threads different from the preview image task thread and the capture image task thread.
The second thread pool may be a default thread pool of the terminal system, the second thread pool is used for storing all task threads to be scheduled in the terminal, and in the second thread pool, all task threads schedule task threads in the thread pool in sequence according to the sequence in which the task threads are queued in the thread pool. When the scheduling priority of the first thread pool is set to be higher than the scheduling priority of the second thread pool, for example, the scheduling priority of the first thread pool may be set to be the highest, and the default scheduling priority of the second thread pool is kept unchanged.
For example, when a thread pool, which is a first thread pool, dedicated to scheduling a preview image task thread is established, and a thread pool, which is a second thread pool, dedicated to scheduling a photographing image task thread is established, the preview image task thread is placed in the first thread pool, and the photographing image task thread is placed in the second thread pool dedicated to scheduling a photographing image task thread. When the scheduling priority of the first thread pool is set to be higher than that of the second thread pool, for example, the scheduling priority of the first thread pool may be set to be the highest, the priority of the second thread pool may be set to be the middle, and the priorities of the thread pools of the other task threads except the preview image task thread and the shooting image task thread may be the lowest. Or the scheduling priority of the first thread pool can be set to be the highest, and the priorities of the second thread pool and the thread pools of other task threads except the image previewing task thread and the image shooting task thread are the same.
In step S23, the preview image task thread in the first thread pool and the capture image task thread in the second thread pool are differentially scheduled according to the scheduling priority order of the first thread pool and the second thread pool.
According to the method, a thread pool which is specially used for scheduling the preview image task thread is established, namely a first thread pool, the preview image task thread is placed in the first thread pool, the shot image task thread is placed in a second thread pool which is default in a terminal system, and when the task thread needing to be scheduled is processed by a processor, the preview image task thread in the first thread pool is called preferentially to be processed according to the priority of the first thread pool and the priority of the second thread pool, so that the preview algorithm processing is guaranteed to be completed within a specified time, and the preview of a viewfinder is guaranteed to be smooth in real time.
Aiming at establishing a thread pool, namely a first thread pool, specially used for scheduling a preview image task thread, and establishing a thread pool, namely a second thread pool, specially used for scheduling a shooting image task thread, when the task thread to be scheduled is processed by a processor, if the scheduling priority of the first thread pool is set to be the highest and the priority of the second thread pool is in the middle, the priority of the thread pools except the preview image task thread and the shooting image task thread are the lowest, the task threads in the first thread pool, the second thread pool and the thread pools storing other task threads are sequentially called according to the priorities of the first thread pool, the second thread pool and the thread pools storing other task threads, so as to ensure the timeliness of image preview and shooting image processing, and real-time fluency of the preview image interface is ensured. If the scheduling priority of the first thread pool is set to be the highest, the priorities of the second thread pool and the thread pools of other task threads except the preview image task thread and the shooting image task thread are the same, the preview image task thread in the first thread pool is called preferentially to be processed according to the priority sequence of the first thread pool and the second thread pool, the preview algorithm processing is guaranteed to be completed within the specified time, and the preview of the viewfinder is guaranteed to be real-time and smooth.
In the exemplary embodiment of the disclosure, after the camera device is started, a thread pool, which is a first thread pool, dedicated to scheduling a preview image task thread may be established for a camera application, or a thread pool, which is a first thread pool, dedicated to scheduling a preview image task thread may be established, and a thread pool, which is a second thread pool, dedicated to scheduling a shooting image task thread may be established, so that timeliness of image preview and image shooting processing during operation of the camera device is ensured, and by establishing a thread pool for a shooting task separately, a limitation on the number of threads stored in a default thread pool of a terminal system may be made up, so that shooting and previewing are not enough.
The following description of the present disclosure describes the processing effect of a preview image task after applying the task scheduling method of the present disclosure.
Fig. 3 is a comparison diagram illustrating a task processing effect of a preview image according to an exemplary embodiment.
In fig. 3, the vertical direction represents the time interval (in milliseconds) between image frames, and the horizontal direction represents the image frames of the preview image acquired and output by the sensor, the image frame of the preview image without applying the method of the present disclosure, and the image frame of the preview image applying the method of the present disclosure.
As can be seen from fig. 3, the image frames of the preview image collected and output by the sensor are relatively stable and have almost no jitter, when the method disclosed by the present disclosure is not applied, the jitter between the image frames of the preview image is relatively high after the preview image task is scheduled, processed and output by the processor, and when the method disclosed by the present disclosure is applied, the jitter between the image frames of the preview image is reduced after the preview image task is scheduled, processed and output by the processor, and experiments prove that after the application is disclosed, the frame rate of the image output from the camera device is increased from 29.1 frames to 30 frames, so that the preview algorithm processing is completed within a specified time, and the preview of the viewfinder is ensured to be smooth in real time.
Based on the same conception, the embodiment of the disclosure also provides a task scheduling device.
It is understood that, in order to implement the above functions, the task scheduling device provided in the embodiments of the present disclosure includes a hardware structure and/or a software module for performing each function. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
FIG. 4 is a block diagram illustrating a task scheduler in accordance with an exemplary embodiment. Referring to fig. 4, the apparatus is applied to a terminal including an image pickup apparatus, and the task scheduling apparatus 400 includes a determination unit 401 and a scheduling unit 402.
The determining unit 401 is configured to determine a preview image task and a shot image task operated by the image capturing apparatus, place the preview image task thread into a first thread pool, and place the shot image task thread into a second thread pool, where a scheduling priority of the first thread pool is different from a scheduling priority of the second thread pool; a scheduling unit 402 configured to differentially schedule the preview image task thread in the first thread pool and the capture image task thread in the second thread pool according to the scheduling priority order of the first thread pool and the second thread pool.
In one example, the task scheduling apparatus further includes: a creating unit 403 configured to establish the first thread pool and/or the second thread pool in response to the camera starting.
In one example, the task scheduling apparatus further includes: a setting unit 404 configured to set a scheduling priority of the first thread pool to be higher than a scheduling priority of the second thread pool in response to receiving a shooting instruction.
In an example, the setting unit 404 sets the scheduling priority of the first thread pool to be higher than the scheduling priority of the second thread pool as follows: and setting the scheduling priority of the first thread pool to be the highest, and keeping the default scheduling priority of the second thread pool unchanged.
In an example, the second thread pool further includes other task threads different from the preview image task thread and the capture image task thread, and the scheduling unit 402 is further configured to: and differentially scheduling the preview image task thread in the first thread pool and the shot image task thread and other task threads in the second thread pool according to the scheduling priority of the first thread pool and the scheduling priority of the second thread pool.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 5 is a block diagram illustrating an apparatus 500 for task scheduling in accordance with an example embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 506 provides power to the various components of device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It is understood that "a plurality" in this disclosure means two or more, and other words are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that, unless otherwise specified, "connected" includes direct connections between the two without the presence of other elements, as well as indirect connections between the two with the presence of other elements.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A task scheduling method is applied to a terminal, the terminal comprises a camera device, and the method comprises the following steps:
determining a preview image task and a shot image task operated by the camera device, putting the preview image task thread into a first thread pool, and putting the shot image task thread into a second thread pool, wherein the scheduling priority of the first thread pool is different from the scheduling priority of the second thread pool;
and differentially scheduling the preview image task thread in the first thread pool and the shooting image task thread in the second thread pool according to the scheduling priority sequence of the first thread pool and the second thread pool.
2. The method of task scheduling according to claim 1, wherein the method further comprises:
and establishing the first thread pool and/or the second thread pool in response to the starting of the camera device.
3. A task scheduling method according to claim 1 or 2, characterized in that the method further comprises:
in response to receiving a shooting instruction, setting a scheduling priority of the first thread pool to be higher than a scheduling priority of the second thread pool.
4. The task scheduling method according to claim 3, wherein the setting of the scheduling priority of the first thread pool higher than the scheduling priority of the second thread pool comprises:
and setting the scheduling priority of the first thread pool to be the highest, and keeping the default scheduling priority of the second thread pool unchanged.
5. The task scheduling method according to claim 1, wherein the second thread pool further includes other task threads different from the preview image task thread and the capture image task thread, and the method further includes:
and differentially scheduling the preview image task thread in the first thread pool and the shot image task thread and other task threads in the second thread pool according to the scheduling priority of the first thread pool and the scheduling priority of the second thread pool.
6. A task scheduling device, applied to a terminal including a camera device, the device comprising:
the determining unit is configured to determine a preview image task and a shot image task which are operated by the camera device, put the preview image task thread into a first thread pool, and put a shot image task thread into a second thread pool, wherein the scheduling priority of the first thread pool is different from that of the second thread pool;
the scheduling unit is configured to differentially schedule the preview image task thread in the first thread pool and the shooting image task thread in the second thread pool according to the scheduling priority order of the first thread pool and the second thread pool.
7. The task scheduler of claim 6, characterized in that the device further comprises:
a creating unit configured to establish the first thread pool and/or the second thread pool in response to the camera starting.
8. A task scheduling device according to claim 6 or 7, characterized in that the device further comprises:
a setting unit configured to set a scheduling priority of the first thread pool to be higher than a scheduling priority of the second thread pool in response to receiving a photographing instruction.
9. The task scheduling device according to claim 8, wherein the setting unit sets the scheduling priority of the first thread pool to be higher than the scheduling priority of the second thread pool in the following manner:
and setting the scheduling priority of the first thread pool to be the highest, and keeping the default scheduling priority of the second thread pool unchanged.
10. The task scheduler of claim 6, further comprising other task threads different from the preview image task thread and the capture image task thread in the second thread pool, the scheduler unit being further configured to:
and differentially scheduling the preview image task thread in the first thread pool and the shot image task thread and other task threads in the second thread pool according to the scheduling priority of the first thread pool and the scheduling priority of the second thread pool.
11. A task scheduling apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the task scheduling method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the task scheduling method of any one of claims 1-5.
CN202011033786.9A 2020-09-27 2020-09-27 Task scheduling method, task scheduling device and storage medium Active CN112217990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011033786.9A CN112217990B (en) 2020-09-27 2020-09-27 Task scheduling method, task scheduling device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011033786.9A CN112217990B (en) 2020-09-27 2020-09-27 Task scheduling method, task scheduling device and storage medium

Publications (2)

Publication Number Publication Date
CN112217990A true CN112217990A (en) 2021-01-12
CN112217990B CN112217990B (en) 2024-04-09

Family

ID=74051949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011033786.9A Active CN112217990B (en) 2020-09-27 2020-09-27 Task scheduling method, task scheduling device and storage medium

Country Status (1)

Country Link
CN (1) CN112217990B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979466A (en) * 2022-04-22 2022-08-30 西安广和通无线通信有限公司 Shooting processing method and device and wireless communication module
CN116055857A (en) * 2022-08-24 2023-05-02 荣耀终端有限公司 Photographing method and electronic equipment
CN116916148A (en) * 2023-05-15 2023-10-20 荣耀终端有限公司 Image processing method and electronic equipment
CN117729426A (en) * 2023-07-05 2024-03-19 荣耀终端有限公司 Mode switching method, electronic device and storage medium
CN117729420A (en) * 2023-05-16 2024-03-19 荣耀终端有限公司 Continuous shooting method and electronic equipment

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541653A (en) * 2010-12-24 2012-07-04 新奥特(北京)视频技术有限公司 Method and system for scheduling multitasking thread pools
CN103428416A (en) * 2012-05-18 2013-12-04 华为终端有限公司 Automatic terminal focusing mode switching method and terminal
CN104063279A (en) * 2013-03-20 2014-09-24 腾讯科技(深圳)有限公司 Task scheduling method and device and terminal
CN104521227A (en) * 2012-08-03 2015-04-15 三星电子株式会社 Image processing method and apparatus
US20150135183A1 (en) * 2013-11-12 2015-05-14 Oxide Interactive, LLC Method and system of a hierarchical task scheduler for a multi-thread system
CN105376494A (en) * 2015-11-30 2016-03-02 诚迈科技(南京)股份有限公司 Method for supporting plurality of paths of universal serial bus (USB) cameras based on Android system
CN108184054A (en) * 2017-12-28 2018-06-19 上海传英信息技术有限公司 A kind of preprocess method and pretreatment unit for intelligent terminal shooting image
WO2018192390A1 (en) * 2017-04-21 2018-10-25 维沃移动通信有限公司 Photographing method of mobile terminal, and mobile terminal
CN109474784A (en) * 2018-11-21 2019-03-15 维沃移动通信有限公司 A kind of preview image processing method and terminal device
CN109640056A (en) * 2018-12-27 2019-04-16 深圳市有方科技股份有限公司 A kind of USB camera monitoring system and its method based on Android platform
CN110046038A (en) * 2019-03-12 2019-07-23 平安普惠企业管理有限公司 A kind of task processing method and device based on thread pool
CN110278373A (en) * 2019-06-26 2019-09-24 Oppo广东移动通信有限公司 Image processor, image processing method, filming apparatus and electronic equipment
CN110377412A (en) * 2019-07-24 2019-10-25 湖南快乐阳光互动娱乐传媒有限公司 A kind of method for scheduling task and system
CN110620951A (en) * 2019-10-10 2019-12-27 东软集团股份有限公司 Video caching method and device, storage medium and processor
CN110837401A (en) * 2018-08-16 2020-02-25 苏宁易购集团股份有限公司 Hierarchical processing method and device for java thread pool
CN111209099A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541653A (en) * 2010-12-24 2012-07-04 新奥特(北京)视频技术有限公司 Method and system for scheduling multitasking thread pools
CN103428416A (en) * 2012-05-18 2013-12-04 华为终端有限公司 Automatic terminal focusing mode switching method and terminal
CN104521227A (en) * 2012-08-03 2015-04-15 三星电子株式会社 Image processing method and apparatus
CN104063279A (en) * 2013-03-20 2014-09-24 腾讯科技(深圳)有限公司 Task scheduling method and device and terminal
US20150135183A1 (en) * 2013-11-12 2015-05-14 Oxide Interactive, LLC Method and system of a hierarchical task scheduler for a multi-thread system
CN105376494A (en) * 2015-11-30 2016-03-02 诚迈科技(南京)股份有限公司 Method for supporting plurality of paths of universal serial bus (USB) cameras based on Android system
WO2018192390A1 (en) * 2017-04-21 2018-10-25 维沃移动通信有限公司 Photographing method of mobile terminal, and mobile terminal
CN108184054A (en) * 2017-12-28 2018-06-19 上海传英信息技术有限公司 A kind of preprocess method and pretreatment unit for intelligent terminal shooting image
CN110837401A (en) * 2018-08-16 2020-02-25 苏宁易购集团股份有限公司 Hierarchical processing method and device for java thread pool
CN109474784A (en) * 2018-11-21 2019-03-15 维沃移动通信有限公司 A kind of preview image processing method and terminal device
CN109640056A (en) * 2018-12-27 2019-04-16 深圳市有方科技股份有限公司 A kind of USB camera monitoring system and its method based on Android platform
CN110046038A (en) * 2019-03-12 2019-07-23 平安普惠企业管理有限公司 A kind of task processing method and device based on thread pool
CN110278373A (en) * 2019-06-26 2019-09-24 Oppo广东移动通信有限公司 Image processor, image processing method, filming apparatus and electronic equipment
CN110377412A (en) * 2019-07-24 2019-10-25 湖南快乐阳光互动娱乐传媒有限公司 A kind of method for scheduling task and system
CN110620951A (en) * 2019-10-10 2019-12-27 东软集团股份有限公司 Video caching method and device, storage medium and processor
CN111209099A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙丽娟: "基于Android的物联网数据采集监测***开发", 《 南京理工大学》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979466A (en) * 2022-04-22 2022-08-30 西安广和通无线通信有限公司 Shooting processing method and device and wireless communication module
CN114979466B (en) * 2022-04-22 2023-12-08 西安广和通无线通信有限公司 Shooting processing method and device and wireless communication module
CN116055857A (en) * 2022-08-24 2023-05-02 荣耀终端有限公司 Photographing method and electronic equipment
CN116055857B (en) * 2022-08-24 2023-11-24 荣耀终端有限公司 Photographing method and electronic equipment
WO2024040990A1 (en) * 2022-08-24 2024-02-29 荣耀终端有限公司 Photographing method and electronic device
CN116916148A (en) * 2023-05-15 2023-10-20 荣耀终端有限公司 Image processing method and electronic equipment
CN116916148B (en) * 2023-05-15 2024-04-16 荣耀终端有限公司 Image processing method, electronic equipment and readable storage medium
CN117729420A (en) * 2023-05-16 2024-03-19 荣耀终端有限公司 Continuous shooting method and electronic equipment
CN117729426A (en) * 2023-07-05 2024-03-19 荣耀终端有限公司 Mode switching method, electronic device and storage medium

Also Published As

Publication number Publication date
CN112217990B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
CN106572299B (en) Camera opening method and device
EP3010226B1 (en) Method and apparatus for obtaining photograph
CN112217990B (en) Task scheduling method, task scheduling device and storage medium
EP3099042A1 (en) Methods and devices for sending cloud card
EP3136793A1 (en) Method and apparatus for awakening electronic device
CN107426502B (en) Shooting method and device, electronic equipment and storage medium
EP3945494A1 (en) Video processing method, apparatus and storage medium
EP3322227A1 (en) Methods and apparatuses for controlling wireless connection, computer program and recording medium
CN112217987B (en) Shooting control method and device and storage medium
CN112423092A (en) Video recording method and video recording device
CN114125528B (en) Video special effect processing method and device, electronic equipment and storage medium
EP3905660A1 (en) Method and device for shooting image, and storage medium
CN114339019B (en) Focusing method, focusing device and storage medium
CN113315904B (en) Shooting method, shooting device and storage medium
CN113315903B (en) Image acquisition method and device, electronic equipment and storage medium
CN112286692A (en) Memory recovery method, memory recovery device and storage medium
CN108769513B (en) Camera photographing method and device
CN110955328B (en) Control method and device of electronic equipment and storage medium
EP3945717A1 (en) Take-off capture method and electronic device, and storage medium
WO2023230860A1 (en) Zooming method, zooming device, electronic equipment, and storage medium
CN115134512A (en) Shooting method and device
CN118093069A (en) View drawing method, view drawing device and storage medium
CN118200720A (en) Zoom control method, device and storage medium
CN112784107A (en) Method, device and storage medium for extracting picture from video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant