CN113518183A - Camera calling method and device and electronic equipment - Google Patents
Camera calling method and device and electronic equipment Download PDFInfo
- Publication number
- CN113518183A CN113518183A CN202110836378.5A CN202110836378A CN113518183A CN 113518183 A CN113518183 A CN 113518183A CN 202110836378 A CN202110836378 A CN 202110836378A CN 113518183 A CN113518183 A CN 113518183A
- Authority
- CN
- China
- Prior art keywords
- service module
- camera
- priority
- calling
- call
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/617—Upgrading or updating of programs or applications for camera control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the disclosure discloses a camera calling method and device and electronic equipment. One embodiment of the method comprises: receiving a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field representing the target calling priority of the first service module; determining whether to switch and call the service module of the camera by comparing the target call priority of the first service module and the target call priority of the second service module which calls the camera currently; and responding to the service module which is determined to be switched and called to the camera, and switching the camera to be called by the first service module. The implementation method can improve the flexibility of calling the camera by different service modules.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a camera calling method and device and electronic equipment.
Background
In general, a wide variety of service modules may be run on the device. Moreover, different service modules can realize different functions. Thus, a user can use the service module running on the device to complete various functions.
In some scenarios, some service modules running on the device implement their functions by calling the camera. At this time, one service module calls the camera for a long time, which may cause that other service modules cannot successfully call the camera in a short time.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a camera calling method, a camera calling device and electronic equipment, which can improve the flexibility of calling cameras by different service modules.
In a first aspect, an embodiment of the present disclosure provides a camera calling method, where the method includes: receiving a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field representing the target calling priority of the first service module; determining whether to switch and call the service module of the camera by comparing the target call priority of the first service module and the target call priority of the second service module which calls the camera currently; and responding to the service module which is determined to be switched and called to the camera, and switching the camera to be called by the first service module.
In a second aspect, an embodiment of the present disclosure provides a camera calling device, including: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a camera calling request sent by a first service module, and the camera calling request comprises a priority field for representing the target calling priority of the first service module; the determining unit is used for determining whether to switch and call the service module of the camera by comparing the target calling priority of the first service module with the target calling priority of the second service module which calls the camera at present; and the switching unit is used for responding to the service module which determines to switch and call the camera, and switching the camera to be called by the first service module.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the camera call method according to the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the camera calling method according to the first aspect.
The camera calling method, the camera calling device and the electronic equipment provided by the embodiment of the disclosure can receive a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field for representing a target calling priority of the first service module, and further determine whether to switch and call the service module of the camera by comparing the target calling priorities of the first service module and a second service module which calls the camera at present, so that the camera is switched to be called by the first service module in response to the determination of switching and calling the service module of the camera. Therefore, the camera can be prevented from being called by other service modules (for example, the first service module) after the camera is called by one service module (for example, the second service module). Therefore, the problem that the camera cannot be called by other service modules for a long time due to the fact that the same service module calls the camera for too long time can be avoided, and flexibility of calling the camera by different service modules is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flow diagram of some embodiments of a camera invocation method of the present disclosure;
FIG. 2 is a flow diagram of a camera invocation method of the present disclosure in some embodiments determining whether to switch invocation of a business module of a camera;
FIG. 3A is a flow diagram of a camera invocation method of the present disclosure in determining target priority in some embodiments;
FIG. 3B is a flow chart of a camera call method of the present disclosure in some embodiments to determine a target call priority based on a call priority preset by the system;
FIG. 4 is a schematic block diagram of some embodiments of a camera recall device of the present disclosure;
FIG. 5 is an exemplary system architecture to which the camera call method of some embodiments of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided by some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow diagram of some embodiments of a camera invocation method in accordance with the present disclosure is shown. As shown in fig. 1, the camera calling method includes the following steps:
In this embodiment, if the camera needs to be called, the service module may send a camera call request to an execution main body (for example, the terminal device 501 shown in fig. 5) of the camera call method.
A business module may be a module included in an application to implement a certain function. In general, a plurality of service modules may be included in one application.
In this embodiment, the execution main body may receive a camera call request sent by the first service module. The camera call request comprises a priority field for representing the target call priority of the first service module.
The calling priority is the priority of the service module calling the camera.
And 102, determining whether to switch and call the service module of the camera or not by comparing the target call priorities of the first service module and the second service module which calls the camera currently.
In this embodiment, the execution main body may determine whether to switch and call the service module of the camera by comparing target call priorities of a first service module and a second service module that calls the camera currently.
It is easy to find that the second service module is a service module which calls the camera at present.
And 103, responding to the service module which determines to switch and call the camera, and switching the camera to be called by the first service module.
In this embodiment, in response to determining to switch to call the service module of the camera, the execution main body may switch the camera to be called by the first service module.
The fact that the first service module calls the camera can be easily found by switching and calling the service modules of the camera. After the switching, the second service module cannot call the camera.
In the related art, after one service module calls the camera, another service module can call the camera. Therefore, the time for calling the camera by the same service module is too long, so that other service modules cannot call the camera for a long time. Further, the flexibility of calling the camera by different service modules may be low.
In this embodiment, in the process of calling the camera by the second service module, if a camera calling request sent by the first service module is received, whether to switch and call the service module of the camera is determined by comparing the target calling priorities of the first service module and the second service module. Further, in response to determining to switch and call the service module of the camera, the camera is switched to be called by the first service module. Therefore, the camera can be prevented from being called by other service modules (for example, the first service module) after the camera is called by one service module (for example, the second service module). Therefore, the problem that the camera cannot be called by other service modules for a long time due to the fact that the same service module calls the camera for too long time can be avoided, and flexibility of calling the camera by different service modules is improved.
In some embodiments, the execution subject may also execute step 104 in the flow shown in fig. 1.
And 104, responding to the refusal of switching and calling the service module of the camera, and sending a calling failure notice to the first service module.
Therefore, when the first service module fails to apply for calling the camera, the first service module can be notified that the camera is not called by sending a calling failure notification.
It can be understood that after the first service module fails to call the camera, the second service module continues to call the camera.
In some embodiments, the execution subject may switch the camera to be called by the first service module in the following manner.
Specifically, a camera release notification is sent to the second service module, so that the second service module releases the camera, and the first service module calls the camera.
Therefore, the second service module releases the camera by sending a camera release notification to the second service module.
In some embodiments, the first service module and the second service module are from different applications.
It can be understood that the second service module calls the camera, that is, the application including the second service module calls the camera. The first service module applies for calling the camera, namely the application comprising the first service module calls the camera.
Therefore, after one application (for example, the application comprising the second service module) calls the camera, other applications (for example, the application comprising the first service module) can be prevented from calling the camera. Therefore, the problem that the camera cannot be called by other applications for a long time due to the fact that the same application calls the camera for a long time can be avoided.
In some embodiments, the executing entity may determine whether to switch and call the service module of the camera according to the flow shown in fig. 2.
As can be seen, even if the service module (e.g., the second service module) currently calling the camera does not end the call of the camera, the service module (e.g., the first service module) having the same or higher call priority may successfully call the camera.
It can be seen that if the service module (e.g., the first service module) applying for calling the camera has a lower calling priority, the camera cannot be successfully called.
In some embodiments, the service module may send a camera call request to the execution main body in the following manner.
Firstly, determining the target calling priority of a service module.
And secondly, sending a camera calling request comprising a priority field for representing the target priority.
In some scenarios, the service module may apply for a call priority from the execution subject. Further, the service module may use the call priority approved by the execution subject as a target call priority. Thus, the service module may send a camera call request to the execution body, including a priority field characterizing a target call priority.
It can be seen that, if the service module needs to call the camera, a camera call request including the priority field may be sent, so as to determine the target call priority of the service module based on the priority field subsequently.
In some embodiments, the call priority customized by the developer for the business module includes any one of a first call priority, a second call priority, and a third call priority. And the priorities of the first calling priority, the second calling priority and the third calling priority are sequentially reduced.
If the service module has the calling priority with higher priority, the probability of successfully calling the camera in a short time is higher. Accordingly, if the service module has a lower priority for calling, the probability of successfully calling the camera in a shorter time is lower.
In some embodiments, the service module may determine its target call priority according to the flow illustrated in fig. 3A.
The developer can customize the corresponding calling priority for the business module. Generally, a developer can customize the calling priority of the service module according to the importance degree of the service module calling the function realized by the camera.
In some scenarios, a developer may customize a lower priority call priority (e.g., a second call priority or a third call priority) for a business module running in the foreground. Therefore, if the importance degree of the function realized by calling the camera by the service module operated in the foreground is lower, the condition that the camera is occupied by the service module operated in the foreground for a long time can be avoided by the calling priority with lower custom priority.
In some scenarios, the developer may also customize a higher priority call priority (e.g., the first call priority) for the background running business module. Therefore, if the function realized by calling the camera by the service module running in the background is more important, the camera can be successfully called by the service module running in the background in a shorter time by customizing the calling priority with higher priority.
It should be noted that, if the application includes a plurality of service modules, the developer may customize corresponding call priorities for each service module.
Therefore, if the developer customizes the calling priority of the service module, the calling priority customized by the developer is used as the calling priority of the service module. And if the developer does not self-define the calling priority of the service module, determining the calling priority of the service module based on the calling priority preset by the system.
In some embodiments, the service module may determine its target call priority based on the call priority preset by the system according to the flow shown in fig. 3B.
The system may preset a call priority for the traffic module.
Therefore, if the developer does not self-define the calling priority of the service module, the target calling priority of the service module can be determined based on the fact that the service module runs in the foreground or the background. Moreover, the service module running in the foreground has higher target calling priority, and the service module running in the background has lower target calling priority. Therefore, the service module operated in the foreground can be ensured to successfully call the camera in a short time as far as possible.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a camera invocation device, which correspond to the method embodiment shown in fig. 1, and which can be specifically applied to various electronic devices.
As shown in fig. 4, the camera call device of the present embodiment includes: receiving section 401, determining section 402, and switching section 403. The receiving unit 401 is configured to: and receiving a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field representing the target calling priority of the first service module. The determining unit 402 is configured to: and determining whether to switch and call the service module of the camera or not by comparing the target call priorities of the first service module and the second service module which calls the camera currently. The switching unit 403 is configured to: and responding to the service module which is determined to be switched and called to the camera, and switching the camera to be called by the first service module.
In this embodiment, specific processing of the receiving unit 401, the determining unit 402, and the switching unit 403 of the camera invoking device and technical effects thereof may refer to related descriptions of step 101, step 102, and step 103 in the corresponding embodiment of fig. 1, which are not described herein again.
In some embodiments, the determining unit 402 is used for at least one of: determining to switch and call the service module of the camera in response to the target calling priority of the first service module being higher than or equal to the target calling priority of the second service module; and refusing to switch and call the service module of the camera in response to the fact that the target call priority of the first service module is lower than the target call priority of the second service module.
In some embodiments, the camera call request is sent by the service module by: determining the target calling priority of a service module; and sending a camera calling request comprising a priority field for representing the target priority.
In some embodiments, the determining the target call priority of the service module includes at least one of: responding to the service module with the calling priority customized by the developer, and taking the calling priority customized by the developer for the service module as a target calling priority; and determining a target calling priority based on the calling priority preset by the system in response to the fact that the service module does not have the calling priority customized by the developer.
In some embodiments, the determining the target call priority based on the call priority preset by the system includes at least one of: responding to the operation of a service module on the foreground, and taking a first calling priority preset by the system aiming at the service module operating on the foreground as a target calling priority; and responding to the background running of the service module, and taking a second calling priority preset by the system for the background running service module as a target calling priority.
In some embodiments, the call priority customized for the business module by the developer includes any one of a first call priority, a second call priority, and a third call priority, wherein the priorities of the first call priority, the second call priority, and the third call priority are sequentially decreased.
In some embodiments, the switching unit 403 is further configured to: and sending a camera release notice to the second service module so that the second service module releases the camera, and the first service module calls the camera.
In some embodiments, the camera calling device may further include a sending unit (not shown in the figure). The sending unit is used for: and responding to the refusal of switching to call the service module of the camera, and sending a call failure notice to the first service module.
In some embodiments, the first service module and the second service module are from different applications.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture to which the camera call methods of some embodiments of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include a terminal device 501, wherein the terminal device 501 is installed with a camera 5012, and a first service module 5011 and a second service module 5013 are run on the terminal device 501. The second service module 5013 is a service module currently calling the camera 5012, and the first service module 5011 is a service module applying for calling the camera 5012.
Various applications (e.g., shopping-type applications, search-type applications, news-information-type applications, etc.) may be installed on the terminal device 501. In general, an application installed on the terminal device 501 may include a plurality of service modules, wherein different service modules may implement different functions. In some scenarios, the first and second service modules 5011 and 5013 may be service modules included by different applications.
In some scenarios, in the process of calling the camera 5012 by the second service module 5013, if a camera calling request sent by the first service module 5011 is received, the terminal device 501 may determine whether to switch the service module calling the camera 5012 by comparing the target calling priorities of the first service module 5011 and the second service module 5013. Further, in response to determining to switch to invoke the service module of the camera 5012, the terminal device 501 may switch the camera 5012 to be invoked by the first service module 5011.
The terminal device 501 may be hardware or software. When the terminal device 501 is hardware, it may be various electronic devices that are installed with a camera and support camera invocation, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the terminal device 501 is software, it may be installed in the electronic devices listed above, and may be implemented as multiple pieces of software or software modules, or may be implemented as a single piece of software or software modules, which is not limited herein.
In some scenarios, the terminal device 501 shown in fig. 5 may also be replaced with a server. At this time, the camera 5012 may be a camera mounted on a server. The first and second service modules 5011 and 5013 may be service modules running on a server.
It should be noted that the camera calling method provided by the embodiment of the present disclosure may be executed by the terminal device 501, and accordingly, the camera calling device may be disposed in the terminal device 501.
It should be understood that the number of terminal devices, cameras and service modules in fig. 5 is merely illustrative. Any number of terminal devices, cameras and service modules may be provided according to implementation needs.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., the terminal device shown in fig. 5) suitable for use in implementing some embodiments of the present disclosure. The terminal device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be included in the electronic device or may exist separately without being incorporated in the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field representing the target calling priority of the first service module; determining whether to switch and call the service module of the camera by comparing the target call priority of the first service module and the target call priority of the second service module which calls the camera currently; and responding to the service module which is determined to be switched and called to the camera, and switching the camera to be called by the first service module.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. Where the names of these elements do not in some cases constitute a limitation on the elements themselves, for example, a switch element may also be described as an element that "calls a service module of a camera in response to determining to switch that camera to be called by a first service module".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the present disclosure is not limited to the particular combination of the above-described features, but also encompasses other embodiments in which any combination of the above-described features or their equivalents is possible without departing from the scope of the present disclosure. For example, the above features may be interchanged with other features disclosed in this disclosure (but not limited to) those having similar functions.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (12)
1. A camera calling method, comprising:
receiving a camera calling request sent by a first service module, wherein the camera calling request comprises a priority field representing a target calling priority of the first service module;
determining whether to switch and call the service module of the camera by comparing the target call priorities of the first service module and a second service module which calls the camera currently;
and responding to the service module which is determined to be switched and called to the camera, and switching the camera to be called by the first service module.
2. The method of claim 1, wherein the determining whether to switch the service module calling the camera by comparing the target calling priorities of the first service module and a second service module currently calling the camera comprises at least one of:
determining to switch and call the service module of the camera in response to that the target call priority of the first service module is higher than or equal to that of the second service module;
and refusing to switch and call the service module of the camera in response to the target call priority of the first service module being lower than the target call priority of the second service module.
3. The method of claim 1, wherein the camera invocation request is sent by the service module by:
determining the target calling priority of a service module;
and sending a camera calling request comprising a priority field for representing the target priority.
4. The method of claim 3, wherein determining the target invocation priority for the traffic module comprises at least one of:
responding to the service module with the calling priority customized by the developer, and taking the calling priority customized by the developer for the service module as a target calling priority;
and determining a target calling priority based on the calling priority preset by the system in response to the fact that the service module does not have the calling priority customized by the developer.
5. The method of claim 4, wherein determining the target call priority based on the call priority preset by the system comprises at least one of:
responding to the operation of a service module on the foreground, and taking a first calling priority preset by the system aiming at the service module operating on the foreground as a target calling priority;
and responding to the background running of the service module, and taking a second calling priority preset by the system for the background running service module as a target calling priority.
6. The method of claim 4, wherein the call priority customized for the business module by the developer comprises any one of a first call priority, a second call priority and a third call priority, wherein the first call priority, the second call priority and the third call priority are sequentially lower in priority.
7. The method of claim 1, wherein switching the camera to be invoked by the first service module comprises:
and sending a camera release notice to the second service module so that the second service module releases the camera, and the first service module calls the camera.
8. The method of claim 1, further comprising:
and responding to the refusal of switching to call the service module of the camera, and sending a call failure notice to the first service module.
9. The method of any of claims 1-8, wherein the first service module and the second service module are from different applications.
10. A camera calling device, the method comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a camera calling request sent by a first service module, and the camera calling request comprises a priority field for representing the target calling priority of the first service module;
the determining unit is used for determining whether to switch and call the service module of the camera by comparing the target calling priorities of the first service module and the second service module which calls the camera currently;
and the switching unit is used for responding to the service module which determines to switch and call the camera, and switching the camera to be called by the first service module.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110836378.5A CN113518183B (en) | 2021-07-23 | 2021-07-23 | Camera calling method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110836378.5A CN113518183B (en) | 2021-07-23 | 2021-07-23 | Camera calling method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113518183A true CN113518183A (en) | 2021-10-19 |
CN113518183B CN113518183B (en) | 2023-06-27 |
Family
ID=78067719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110836378.5A Active CN113518183B (en) | 2021-07-23 | 2021-07-23 | Camera calling method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113518183B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114697572A (en) * | 2022-04-15 | 2022-07-01 | 北京国基科技股份有限公司 | Video scheduling method and device |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102510412A (en) * | 2011-12-31 | 2012-06-20 | 河南辉煌科技股份有限公司 | Pan-tilt and lens invoking method |
CN103257939A (en) * | 2013-04-02 | 2013-08-21 | 北京小米科技有限责任公司 | Method, device and equipment for acquiring images |
CN103677848A (en) * | 2013-12-27 | 2014-03-26 | 厦门雅迅网络股份有限公司 | Camera control method based on Android |
CN104104620A (en) * | 2013-04-15 | 2014-10-15 | 国际商业机器公司 | Virtual enhanced transmission selection (VETS) for lossless ethernet |
US20180165008A1 (en) * | 2016-12-13 | 2018-06-14 | International Business Machines Corporation | Memory transaction prioritization |
CN108429879A (en) * | 2018-02-13 | 2018-08-21 | 广东欧珀移动通信有限公司 | Electronic equipment, camera control method and Related product |
CN109144728A (en) * | 2018-08-22 | 2019-01-04 | Oppo广东移动通信有限公司 | The occupancy control method and device of camera applications |
CN110505390A (en) * | 2019-09-24 | 2019-11-26 | 深圳创维-Rgb电子有限公司 | Television set and its camera call method, control device and readable storage medium storing program for executing |
US20200076922A1 (en) * | 2018-09-04 | 2020-03-05 | International Business Machines Corporation | Application data access priority for remote storage systems |
CN112399232A (en) * | 2019-08-18 | 2021-02-23 | 海信视像科技股份有限公司 | Display equipment, camera priority use control method and device |
-
2021
- 2021-07-23 CN CN202110836378.5A patent/CN113518183B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102510412A (en) * | 2011-12-31 | 2012-06-20 | 河南辉煌科技股份有限公司 | Pan-tilt and lens invoking method |
CN103257939A (en) * | 2013-04-02 | 2013-08-21 | 北京小米科技有限责任公司 | Method, device and equipment for acquiring images |
CN104104620A (en) * | 2013-04-15 | 2014-10-15 | 国际商业机器公司 | Virtual enhanced transmission selection (VETS) for lossless ethernet |
CN103677848A (en) * | 2013-12-27 | 2014-03-26 | 厦门雅迅网络股份有限公司 | Camera control method based on Android |
US20180165008A1 (en) * | 2016-12-13 | 2018-06-14 | International Business Machines Corporation | Memory transaction prioritization |
CN108429879A (en) * | 2018-02-13 | 2018-08-21 | 广东欧珀移动通信有限公司 | Electronic equipment, camera control method and Related product |
CN109144728A (en) * | 2018-08-22 | 2019-01-04 | Oppo广东移动通信有限公司 | The occupancy control method and device of camera applications |
US20200076922A1 (en) * | 2018-09-04 | 2020-03-05 | International Business Machines Corporation | Application data access priority for remote storage systems |
CN112399232A (en) * | 2019-08-18 | 2021-02-23 | 海信视像科技股份有限公司 | Display equipment, camera priority use control method and device |
CN110505390A (en) * | 2019-09-24 | 2019-11-26 | 深圳创维-Rgb电子有限公司 | Television set and its camera call method, control device and readable storage medium storing program for executing |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114697572A (en) * | 2022-04-15 | 2022-07-01 | 北京国基科技股份有限公司 | Video scheduling method and device |
CN114697572B (en) * | 2022-04-15 | 2023-09-22 | 北京国基科技股份有限公司 | Video scheduling method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113518183B (en) | 2023-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111240834B (en) | Task execution method, device, electronic equipment and storage medium | |
CN110300165B (en) | Method, device and equipment for calling functional program and storage medium | |
CN111432001B (en) | Method, apparatus, electronic device and computer readable medium for jumping scenes | |
CN111209306A (en) | Business logic judgment method and device, electronic equipment and storage medium | |
CN111596991A (en) | Interactive operation execution method and device and electronic equipment | |
CN112256231A (en) | Volume control method, device, terminal and storage medium | |
CN111400068B (en) | Interface control method and device, readable medium and electronic equipment | |
CN113596328B (en) | Camera calling method and device and electronic equipment | |
CN111596992B (en) | Navigation bar display method and device and electronic equipment | |
CN113518183B (en) | Camera calling method and device and electronic equipment | |
CN112306685A (en) | Task isolation method and device, electronic equipment and computer readable medium | |
CN113391860A (en) | Service request processing method and device, electronic equipment and computer storage medium | |
CN111324387A (en) | Application task control method, device, terminal and system | |
CN113079550B (en) | Mobile terminal control method and device and electronic equipment | |
CN111756833B (en) | Node processing method, node processing device, electronic equipment and computer readable medium | |
CN111444457B (en) | Data release method and device, storage medium and electronic equipment | |
CN114089891A (en) | Display control method and device and electronic equipment | |
CN113778566A (en) | Native application calling method and device, electronic equipment and computer readable medium | |
CN112306317A (en) | Unread message notification method and device and electronic equipment | |
CN111694679B (en) | Message processing method and device and electronic equipment | |
CN111241443A (en) | Method and device for pushing information and electronic equipment | |
CN118158082B (en) | Method, device, equipment and medium for updating communication resource message of intelligent household equipment | |
CN111399730A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN111538717A (en) | Data processing method and device, electronic equipment and computer readable medium | |
CN111626787B (en) | Resource issuing method, device, medium and equipment |
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 |