CN113518183B - Camera calling method and device and electronic equipment - Google Patents

Camera calling method and device and electronic equipment Download PDF

Info

Publication number
CN113518183B
CN113518183B CN202110836378.5A CN202110836378A CN113518183B CN 113518183 B CN113518183 B CN 113518183B CN 202110836378 A CN202110836378 A CN 202110836378A CN 113518183 B CN113518183 B CN 113518183B
Authority
CN
China
Prior art keywords
service module
camera
call
priority
target
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.)
Active
Application number
CN202110836378.5A
Other languages
Chinese (zh)
Other versions
CN113518183A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110836378.5A priority Critical patent/CN113518183B/en
Publication of CN113518183A publication Critical patent/CN113518183A/en
Application granted granted Critical
Publication of CN113518183B publication Critical patent/CN113518183B/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/617Upgrading or updating of programs or applications for camera control
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Abstract

The embodiment of the invention discloses a camera calling method, a camera calling device and electronic equipment. One embodiment of the method comprises the following steps: receiving a camera call request sent by a first service module, wherein the camera call request comprises a priority field for representing a target call 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 of the camera; and switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera. According to the embodiment, the flexibility of calling the camera by different service modules can be improved.

Description

Camera calling method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a camera calling method, a camera calling device and electronic equipment.
Background
In general, a wide variety of business modules may be run on a device. And, different business modules can realize different functions. Thus, the user can use the business module running on the device to complete various functions.
In some scenarios, some business modules running on the device implement their functions by invoking cameras. At this time, one service module calls the camera for a long time, which may cause that other service modules cannot call the camera successfully in a short time.
Disclosure of Invention
This disclosure is provided in part 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 invoking method, including: receiving a camera call request sent by a first service module, wherein the camera call request comprises a priority field for representing a target call 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 of the camera; and switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera.
In a second aspect, embodiments of the present disclosure provide a camera recall device, the device comprising: the receiving unit is used for receiving a camera calling request sent by the 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 is used for 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 of the camera; and the switching unit is used for switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the camera invoking method as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the camera invoking method as described in the first aspect.
The camera calling method, the 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 representing a target calling priority of the first service module, and further, 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 a second service module of the camera currently, so that the camera is switched to be called by the first service module in response to determining to switch and call the service module of the camera. Thus, it can be avoided that after one service module (e.g., the second service module) calls the camera, the other service module (e.g., the first service module) can call the camera. Therefore, the problem that the camera cannot be called by other service modules for a long time due to overlong time of calling the camera by the same service module can be avoided, and the flexibility of calling the camera by different service modules is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of some embodiments of a camera invocation method of the present disclosure;
FIG. 2 is a flow chart of a camera invocation method of the present disclosure in some embodiments determining whether to switch a business module that invokes a camera;
FIG. 3A is a flow chart of a camera invocation method of the present disclosure determining target priority in some embodiments;
FIG. 3B is a flow chart of a camera invocation method of the present disclosure in some embodiments determining a target invocation priority based on a system preset invocation priority;
FIG. 4 is a schematic structural diagram of some embodiments of a camera recall device of the present disclosure;
FIG. 5 is an exemplary system architecture in which camera invocation methods 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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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. Furthermore, 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Referring to fig. 1, a flow of some embodiments of a camera recall method according to the present disclosure is shown. As shown in fig. 1, the camera invoking method includes the following steps:
step 101, a camera call request sent by a first service module is received.
In this embodiment, if the camera needs to be called, the service module may send a camera call request to an execution body of the camera call method (for example, the terminal device 501 shown in fig. 5).
The service module may be a module included in an application for implementing a certain function. In general, multiple business modules may be included in an application.
In this embodiment, the executing 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.
Step 102, determining whether to switch the service module for calling the camera by comparing the target calling priority of the first service module and the target calling priority of the second service module for calling the camera.
In this embodiment, the executing body may determine whether to switch the service module for calling the camera by comparing the target call priorities of the first service module and the second service module for currently calling the camera.
It is not difficult to find that the second service module is the service module currently calling the camera.
And step 103, switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera.
In this embodiment, in response to determining to switch the service module that invokes the camera, the executing entity may switch the camera to be invoked by the first service module.
It is not difficult to find that the first service module can call the camera by switching the service module for calling the camera. After the switching, the second service module cannot call the camera.
In the related art, after one service module calls the camera, the other service module can call the camera. Therefore, the same service module can call the camera for too long, so that other service modules can not 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 call request sent by the first service module is received, it is determined whether to switch the service module calling the camera by comparing the target call priorities of the first service module and the second service module. Further, in response to determining to switch the service module of the camera, the camera is switched to be called by the first service module. Thus, it can be avoided that after one service module (e.g., the second service module) calls the camera, the other service module (e.g., the first service module) can call the camera. Therefore, the problem that the camera cannot be called by other service modules for a long time due to overlong time of calling the camera by the same service module can be avoided, and the flexibility of calling the camera by different service modules is improved.
In some embodiments, the execution body may further execute step 104 in the flowchart shown in fig. 1.
And 104, responding to the service module refusing to switch the call of the camera, and sending a call failure notification to the first service module.
Therefore, when the first service module applies for calling the camera to fail, the first service module can be notified that the camera is not called by sending a call failure notification.
It can be appreciated that after the first service module fails to call the camera, the second service module still continues to call the camera.
In some embodiments, the executing entity may switch the camera to be invoked 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 camera is released by the second service module in a mode of sending the camera release notification to the second service module.
In some embodiments, the first business module and the second business module are from different applications.
It will be appreciated that the second service module invokes the camera, i.e. the application comprising the second service module invokes the camera. The first service module applies for calling the camera, namely, the application comprising the first service module calls the camera.
Thus, it may be avoided that after one application (e.g., an application comprising the second business module) invokes the camera, the other application (e.g., an application comprising the first business module) can invoke the camera. Therefore, the situation that the camera is called by the same application for too long time, so that the camera cannot be called by other applications for a long time can be avoided.
In some embodiments, the executing entity may determine whether to switch the service module that calls the camera according to the flow shown in fig. 2.
In step 201, in response to the target call priority of the first service module being higher than or equal to the target call priority of the second service module, determining to switch and call the service module of the camera.
It can be seen that a business module (e.g., a first business module) with the same or higher call priority can successfully call a camera even if the current call of the business module (e.g., a second business module) of the camera does not end the call of the camera.
Step 202, 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.
It can be seen that if the service module (e.g., the first service module) that applies to call the camera has a lower call priority, the camera cannot be successfully called.
In some embodiments, the service module may send a camera call request to the execution body in the following manner.
First, determining the target calling priority of the service module.
And secondly, sending a camera call request comprising a priority field representing the target priority.
In some scenarios, the business module may apply for call priorities to the execution bodies described above. Further, the service module may take the call priority approved by the execution body as the target call priority. Thus, the business module may send a camera invocation request to the execution body including a priority field characterizing the target invocation priority.
It can be seen that if the service module needs to call the camera, a camera call request including a priority field can be sent, so as to determine the target call priority of the service module based on the priority field.
In some embodiments, the call priority that the developer customizes for the business module includes any one of a first call priority, a second call priority, and a third call priority. The priorities of the first call priority, the second call priority and the third call priority are sequentially reduced.
If the service module has a higher call priority, the probability of successfully calling the camera in a shorter time is higher. Accordingly, if the service module has a call priority with a lower priority, the probability of successfully calling the camera in a shorter time is lower.
In some embodiments, the business module may determine its own target call priority according to the flow illustrated in fig. 3A.
In step 301, in response to the service module having the call priority customized by the developer, the call priority customized by the developer for the service module is taken as the target call priority.
The developer can customize the corresponding call priority for the business module. In general, a developer can customize the call priority of the service module according to the importance level of the service module to call the functions implemented 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 the camera is low when the business module operated by the foreground calls the camera, the business module operated by the foreground can be prevented from occupying the camera for a long time by customizing the call priority with low priority.
In some scenarios, a developer may also customize a higher priority call priority (e.g., a first call priority) for a business module running in the background. Therefore, if the function of calling the camera by the service module running in the background is important, the camera can be successfully called in a short time by customizing the calling priority with higher priority.
It should be noted that, if the application includes a plurality of service modules, a developer may customize a corresponding call priority for each service module.
In step 302, in response to the service module not having the developer-defined call priority, the target call priority is determined based on the call priority preset by the system.
It can be seen that if the developer self-defines the call priority of the service module, the call priority self-defined by the developer is used as the call priority of the service module. If the developer does not customize the call priority of the service module, determining the call priority of the service module based on the call priority preset by the system.
In some embodiments, the service module may determine its own target call priority based on the call priority preset by the system according to the flow shown in fig. 3B.
In step 3021, in response to the service module running in the foreground, the first call priority preset by the system for the service module running in the foreground is taken as the target call priority.
The system may preset call priorities for the traffic modules.
And 3022, responding to the operation of the service module in the background, and taking the second call priority preset by the system for the operation of the service module in the background as the target call priority.
It can be seen that if the developer does not customize the call priority of the business module, the target call priority of the business module can be determined based on whether the business module is running in the foreground or the background. And 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 running 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 method shown in the foregoing figures, the present disclosure provides some embodiments of a camera recall device, where the embodiments of the device correspond to the method embodiments shown in fig. 1, and the device may be specifically applied to various electronic devices.
As shown in fig. 4, the camera invoking device of the present embodiment includes: a receiving unit 401, a determining unit 402, and a switching unit 403. The receiving unit 401 is configured to: and receiving a camera call request sent by the first service module, wherein the camera call request comprises a priority field representing the target call 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 by comparing the target call priority of the first service module and the target call priority of the second service module of the camera. The switching unit 403 is configured to: and switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera.
In this embodiment, the specific processing and the technical effects brought by the receiving unit 401, the determining unit 402, and the switching unit 403 of the camera calling device may refer to the descriptions related to step 101, step 102, and step 103 in the corresponding embodiment of fig. 1, and are not repeated here.
In some embodiments, the determining unit 402 is for at least one of: determining to switch and call the service module of the camera in response to the target call priority of the first service module being higher than or equal to the target call priority 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.
In some embodiments, the camera invocation request is sent by the business module by: determining a target calling priority of a service module; a camera call request including a priority field characterizing a target priority is sent.
In some embodiments, determining the target call priority of the service module includes at least one of: responding to the service module with the call priority customized by the developer, and taking the call priority customized by the developer aiming at the service module as a target call priority; and determining the target call priority based on the call priority preset by the system in response to the fact that the service module does not have the call priority defined 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 the service module in the foreground, and taking a first call priority preset by the system for the operation of the service module in the foreground as a target call priority; and responding to the operation of the service module in the background, and taking the second call priority preset by the system aiming at the operation of the service module in the background as the target call priority.
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, wherein the priorities of the first call priority, the second call priority, and the third call priority decrease in sequence.
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 invoking device may further comprise a sending unit (not shown in the figure). The transmitting unit is used for: and responding to the service module refusing to switch the call of the camera, and sending a call failure notification to the first service module.
In some embodiments, the first business module and the second business module are from different applications.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture in which camera invocation 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, where the terminal device 501 is installed with a camera 5012, and a first service module 5011 and a second service module 5013 are running on the terminal device 501. The second service module 5013 is a service module that currently calls the camera 5012, and the first service module 5011 is a service module that applies to call 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 traffic module 5011 and the second traffic module 5013 may be traffic modules comprised by different applications.
In some scenarios, in the process of invoking the camera 5012 at the second service module 5013, if a camera invocation request sent by the first service module 5011 is received, the terminal device 501 may determine whether to switch the service module invoking the camera 5012 by comparing the target invocation priorities of the first service module 5011 and the second service module 5013. Further, in response to determining to switch the traffic module invoking the camera 5012, the terminal apparatus 501 may switch the camera 5012 to be invoked by the first traffic module 5011.
The terminal device 501 may be hardware or software. When the terminal device 501 is hardware, it may be a variety of electronic devices that are camera-mounted and support camera calls, including but not limited to smartphones, tablet computers, laptop and desktop computers, and the like. When the terminal device 501 is software, it may be installed in the above-listed electronic device, and may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly 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 traffic module 5011 and the second traffic module 5013 may be traffic modules running on a server.
It should be noted that, the camera invoking method provided by the embodiments of the present disclosure may be executed by the terminal device 501, and accordingly, the camera invoking apparatus may be set 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. There may be any number of terminal devices, cameras and business modules, as desired for implementation.
Referring now to fig. 6, a schematic diagram of a configuration of an electronic device (e.g., the terminal device shown in fig. 5) suitable for use in implementing some embodiments of the present disclosure is shown. Terminal devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments. The electronic device shown in fig. 6 is merely an example and should not impose any limitations on the functionality and scope of use of 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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic 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 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium according to 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 present 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, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication 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 networks.
The computer readable medium may be included in the electronic device or may exist alone without being incorporated into 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 call request sent by a first service module, wherein the camera call request comprises a priority field for representing a target call 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 of the camera; and switching the camera to be called by the first service module in response to determining to switch the service module for calling the camera.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 means of software, or may be implemented by means of hardware. The names of these units do not in some cases limit the unit itself, for example, the switching unit may also be described as a unit that "switches the camera to the one called by the first service module in response to determining to switch the service module that calls the camera".
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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 of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the disclosure is not limited to the specific combination of features described above, but encompasses other technical solutions formed by any combination of features described above or their equivalents without departing from the spirit of the disclosure. Such as those described above, are provided in the present disclosure in place of, but not limited to, features having similar functions.
Moreover, although 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. In 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 limiting the scope of the present 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 example forms of implementing the claims.

Claims (10)

1. A camera recall method, the method comprising:
receiving a camera call request sent by a first service module, wherein the camera call request comprises a priority field for representing a target call 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 of the camera;
switching the camera to be called by the first service module in response to determining to switch the service module of the camera;
the camera call request is sent by the service module through the following modes:
determining a target calling priority of a service module;
transmitting a camera call request comprising a priority field characterizing a target priority;
the first service module and the second service module belong to the same application.
2. The method of claim 1, wherein the determining whether to switch the service module that invokes the camera by comparing the target invocation priorities of the first service module and the second service module that currently invokes the camera comprises at least one of:
determining to switch and call the service module of the camera in response to the target call priority of the first service module being higher than or equal to the target call priority 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 determining the target call priority of the business module comprises at least one of:
responding to the service module with the call priority customized by the developer, and taking the call priority customized by the developer aiming at the service module as a target call priority;
and determining the target call priority based on the call priority preset by the system in response to the fact that the service module does not have the call priority defined by the developer.
4. The method of claim 3, wherein the determining the target call priority based on the call priority preset by the system comprises at least one of:
responding to the operation of the service module in the foreground, and taking a first call priority preset by the system for the operation of the service module in the foreground as a target call priority;
and responding to the operation of the service module in the background, and taking the second call priority preset by the system aiming at the operation of the service module in the background as the target call priority.
5. The method of claim 3, wherein the call priority customized by the developer for the business module comprises 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 decrease in sequence.
6. The method of claim 1, wherein the switching the camera to be invoked by the first business module comprises:
and sending a camera release notification to the second service module so that the second service module releases the camera, and the first service module calls the camera.
7. The method according to claim 1, wherein the method further comprises:
and responding to the service module refusing to switch and call the camera, and sending a call failure notification to the first service module.
8. A camera recall device, the device comprising:
the device comprises a receiving unit, a first service module and a second service module, wherein the receiving unit is used for receiving a camera calling request sent by the 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 call priority of the first service module and the target call priority of the second service module of the camera;
the switching unit is used for switching the camera to be called by the first service module in response to determining to switch the service module of the camera;
the camera call request is sent by the service module through the following modes:
determining a target calling priority of a service module;
transmitting a camera call request comprising a priority field characterizing a target priority;
the first service module and the second service module belong to the same application.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202110836378.5A 2021-07-23 2021-07-23 Camera calling method and device and electronic equipment Active CN113518183B (en)

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 CN113518183A (en) 2021-10-19
CN113518183B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697572B (en) * 2022-04-15 2023-09-22 北京国基科技股份有限公司 Video scheduling method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104620A (en) * 2013-04-15 2014-10-15 国际商业机器公司 Virtual enhanced transmission selection (VETS) for lossless ethernet
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

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510412A (en) * 2011-12-31 2012-06-20 河南辉煌科技股份有限公司 Pan-tilt and lens invoking method
CN103257939B (en) * 2013-04-02 2016-08-10 小米科技有限责任公司 A kind of obtain the method for image, device and equipment
CN103677848B (en) * 2013-12-27 2018-11-16 厦门雅迅网络股份有限公司 A kind of camera control method based on Android
US10073629B2 (en) * 2016-12-13 2018-09-11 International Business Machines Corporation Memory transaction prioritization
US11196843B2 (en) * 2018-09-04 2021-12-07 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
CN110505390B (en) * 2019-09-24 2021-02-05 深圳创维-Rgb电子有限公司 Television, camera calling method thereof, control device and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104620A (en) * 2013-04-15 2014-10-15 国际商业机器公司 Virtual enhanced transmission selection (VETS) for lossless ethernet
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

Also Published As

Publication number Publication date
CN113518183A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN110795022A (en) Terminal testing method, system and storage medium
CN111240834B (en) Task execution method, device, electronic equipment and storage medium
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN114217707B (en) Sharing method, sharing device, electronic equipment and storage medium
CN112256231B (en) Volume control method, device, terminal and storage medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
EP4164216A1 (en) Method and apparatus for establishing multimedia call, and electronic device
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN113835992A (en) Memory leak processing method and device, electronic equipment and computer storage medium
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN113518183B (en) Camera calling method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN113886105B (en) Cross-process calling method and device, storage medium and electronic equipment
CN113596328B (en) Camera calling method and device and electronic equipment
CN111756833B (en) Node processing method, node processing device, electronic equipment and computer readable medium
CN111459893B (en) File processing method and device and electronic equipment
CN111444457B (en) Data release method and device, storage medium and electronic equipment
CN111694679B (en) Message processing method and device and electronic equipment
CN112306317A (en) Unread message notification method and device and electronic equipment
CN111241443A (en) Method and device for pushing information and electronic equipment
CN111324387A (en) Application task control method, device, terminal and system
CN113079550B (en) Mobile terminal control method and device and electronic equipment
CN112486826B (en) Test method, test device, electronic equipment and computer readable medium
CN113157365B (en) Program running method, program running 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