CN111259441A - Device control method, device, storage medium and electronic device - Google Patents

Device control method, device, storage medium and electronic device Download PDF

Info

Publication number
CN111259441A
CN111259441A CN202010038921.2A CN202010038921A CN111259441A CN 111259441 A CN111259441 A CN 111259441A CN 202010038921 A CN202010038921 A CN 202010038921A CN 111259441 A CN111259441 A CN 111259441A
Authority
CN
China
Prior art keywords
control information
application
electronic device
authority
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010038921.2A
Other languages
Chinese (zh)
Other versions
CN111259441B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010038921.2A priority Critical patent/CN111259441B/en
Publication of CN111259441A publication Critical patent/CN111259441A/en
Application granted granted Critical
Publication of CN111259441B publication Critical patent/CN111259441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/629Protecting access to data via a platform, e.g. using keys or access control rules to features or functions of an application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a device control method, a device control apparatus, a storage medium and an electronic device. The device control method can be applied to electronic equipment, the electronic equipment is provided with a first application program, and the application program in the electronic equipment can call a shooting function of a camera application of the electronic equipment through the first application program. The equipment control method comprises the following steps: receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through the first application program; detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request; and if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.

Description

Device control method, device, storage medium and electronic device
Technical Field
The present application belongs to the technical field of electronic devices, and in particular, to a device control method, apparatus, storage medium, and electronic device.
Background
As camera shooting functions in electronic devices become more powerful, users often use camera applications to take pictures, preview, and record videos, etc. However, in the related art, an application program in an electronic device, such as a third-party application, cannot call a shooting function that a camera application of the electronic device has. That is, an application program in an electronic device, such as a third-party application, cannot call a shooting function, such as an HDR shooting function, a beauty function, a night view shooting function, and the like, that a native camera application carried by the electronic device itself has.
Disclosure of Invention
The embodiment of the application provides an equipment control method and device, a storage medium and electronic equipment, and the ability of the electronic equipment for performing fine management on a shooting function of an application program calling camera application can be improved.
The embodiment of the application provides a device control method, which is applied to electronic equipment, wherein the electronic equipment is provided with a first application program, and the application program in the electronic equipment can call a shooting function of a camera application of the electronic equipment through the first application program, and the method comprises the following steps:
receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through the first application program;
detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.
An embodiment of the present application provides an apparatus control device, which is applied to an electronic device, where the electronic device is configured with a first application program, and through the first application program, an application program in the electronic device may call a shooting function that a camera application of the electronic device has, where the apparatus includes:
the receiving module is used for receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment through a second application program by the first application program;
the detection module is used for detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and the response module is used for allowing the second application program to call the shooting function of the camera application of the electronic equipment if the second application program has the authority.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute a flow in an apparatus control method provided in an embodiment of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the process in the device control method provided in the embodiment of the present application by calling the computer program stored in the memory.
In the embodiment of the application, when the second application program requests to call the shooting function of the camera application of the electronic device, the electronic device may detect whether the second application program has a corresponding call authority. If the second application program has corresponding calling authority, the electronic device can allow the second application program to call the shooting function of the camera application of the electronic device. Because the electronic equipment in the embodiment of the application can perform authority control on the shooting function of the camera application called by the application program, the embodiment of the application can improve the capability of the electronic equipment for performing fine management on the shooting function of the camera application called by the application program.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a schematic flowchart of an apparatus control method provided in an embodiment of the present application.
Fig. 2 is another schematic flow chart of the device control method according to the embodiment of the present application.
Fig. 3 is a schematic diagram illustrating that a camera x component in the related art uses an interface to implement a call to a shooting function of a camera application according to an embodiment of the present application.
Fig. 4 to fig. 6 are schematic diagrams illustrating an implementation of a device control method provided in an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an apparatus control device according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a schematic flow chart of an apparatus control method according to an embodiment of the present disclosure. The device control method may be applied to an electronic device configured with a first application program by which an application program in the electronic device can call a shooting function that a camera application of the electronic device has. It should be noted that the shooting function of the camera application of the electronic device may refer to a shooting function of the camera application of the electronic device, such as an HDR shooting function, a night scene shooting function, a beauty function, and the like.
The flow of the device control method may include:
101. and receiving a call request, wherein the call request is a request of a second application program for calling a shooting function of a camera application of the electronic equipment through the first application program.
As camera shooting functions in electronic devices become more powerful, users often use camera applications to take pictures, preview, and record videos, etc. However, in the related art, an application program in an electronic device, such as a third-party application, cannot call a shooting function that a camera application of the electronic device has. That is, an application program in an electronic device, such as a third-party application, cannot call a shooting function, such as an HDR shooting function, a beauty function, a night view shooting function, and the like, that a native camera application carried by the electronic device itself has. For example, in a chat interface of an instant messaging application, a user may call a camera of an electronic device to take a picture, but the instant messaging application cannot call an HDR taking function or a beauty function, etc., into a native camera application carried by the electronic device itself in the process of taking the picture.
In the embodiment of the present application, the electronic device may be configured with a first application program, and through the first application program, an application program (e.g., a third-party application) in the electronic device may call a shooting function, such as HDR shooting, night view shooting, beauty, and the like, of a camera application carried by the electronic device. For example, the electronic device may receive a call request from a second application program, where the call request is a request for the second application program to call a shooting function provided by a camera application of the electronic device through the first application program. The second application may be an application already installed in the electronic device.
102. And detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request.
For example, after receiving the call request from the second application program, the electronic device may detect whether the second application program has the authority to call the shooting function of the camera application of the electronic device.
If it is detected that the second application has the right to invoke the shooting function that the camera application of the electronic device has, then proceed to 103.
103. And if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.
For example, if the electronic device detects that the second application program has the authority to call the shooting function of the camera application of the electronic device, the electronic device may allow the second application program to call the shooting function of the camera application of the electronic device. For example, the electronic device may allow the second application to call an HDR function in a camera application to capture an image with a high dynamic range effect.
If the electronic device detects that the second application program does not have the authority to call the shooting function of the camera application of the electronic device, the electronic device can reject the call request of the second application program, namely reject the second application program from calling the shooting function of the camera application of the electronic device. For example, the electronic device may refuse the second application to invoke an HDR capture function in the camera application.
It can be understood that, in the embodiment of the present application, when a second application requests to invoke a shooting function that a camera application of an electronic device has, the electronic device may detect whether the second application has a corresponding invoking right. If the second application program has corresponding calling authority, the electronic device can allow the second application program to call the shooting function of the camera application of the electronic device. Because the electronic equipment in the embodiment of the application can perform authority control on the shooting function of the camera application called by the application program, the embodiment of the application can improve the capability of the electronic equipment for performing fine management on the shooting function of the camera application called by the application program.
Referring to fig. 2, fig. 2 is another schematic flow chart of an apparatus control method according to an embodiment of the present disclosure. The device control method may be applied to an electronic device on which a first application may be configured. Through the first application program, the application program in the electronic equipment can call a shooting function of a camera application of the electronic equipment. For example, the electronic device uses an Android operating system, and the first application is a CameraX component.
It should be noted that CameraX is a Google Android Jetpack component, which provides a higher-level Camera API based on Android Camera2 API (Application Programming Interface). With the CameraX API, it would be simpler for application developers to develop Camera applications.
An Extension function module of the camera component provides an Extension API, and an application program (e.g., a third-party application) can call a shooting function (e.g., an HDR shooting function, a night view shooting function, a beauty function, etc.) of a camera application of the electronic device through the Extension API. For the Extension function module, the camera x component provides a corresponding API for an application program to call a shooting function of the camera application, and defines an IMPL interface that needs to be implemented by an electronic device vendor downward, where the IMPL interface is specifically implemented by the electronic device vendor. Only with a device in which an Extension function is realized by an electronic device manufacturer, an application program can call a shooting function that a camera application has through a camera x Extension API.
The CameraX component in the embodiment of the present application may include an Extension module (Extension module) and a rights control module. Through an Extension module (Extension module), the electronic device may allow an application program (such as a third party application) to call a shooting function that a camera application of the electronic device has. It should be noted that the shooting function of the camera application of the electronic device may refer to a function such as an HDR shooting function, a night scene shooting function, a beauty function, and the like.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a camera x component using an interface to call a shooting function of a camera application in the related art. As shown in fig. 3, in an implementation framework of a camera x component, an equipment Manufacturer (OEM) adds an image processing algorithm into an interface function of the camera x by rewriting (override) the interface function, and implements processing on an image by using the image processing algorithm, thereby implementing a shooting function of a camera application. For example, a device manufacturer realizes the HDR photography function by accessing the HDR photography algorithm within the interface function of the hdrcaptureextendermimpl interface.
When the application program needs to call a shooting function of the camera application, the camera x Core Module may collect image data first. After acquiring the image data, the camera x Core Module may transmit the image data to a camera x Extension Module (Extension Module). The CameraX Extension Module then transfers the image data to a CameraX interface, such as the hdrpreviewextensderimpl interface, which may implement HDR preview functionality. The electronic equipment acquires the image data through the interface, performs corresponding processing, and feeds back the processed image data to the CameraX component through the corresponding interface. And the CameraX component can perform preview display after receiving the processed image data, or perform coding to generate an image in a JPEG format, and output and store the image.
For example, when a third-party application needs to call an HDR preview (HdrPreview) function, the third-party application may send a call request to the CameraX component, and after receiving the call request of the third-party application, the electronic device may collect image data by using a CameraX Core Module. The electronic device may then transmit the captured image data to a camera x Extension Module, and then to the hdrpreviewextensderimpl interface via the camera x Extension Module. After the electronic device acquires the image data through the hdrpreviewextendermipl interface, the image data can be processed by using an HDR algorithm in the interface to obtain processed image data. Then, the electronic device may feed back the processed image data to the CameraX component through a corresponding interface, and then feed back the processed image data to the third-party application through the CameraX component. The third party application can perform preview display after receiving the processed image data.
For another example, when a third-party application needs to call a beauty photography (beautycapure) function, the third-party application may send a call request to the CameraX component, and the CameraX component may collect image data by using the CameraX Core Module after receiving the call request of the third-party application. Then, the image data that the electronic device can collect is transmitted to a camera x Extension Module, and then transmitted to the BeautyCapture Extension impalpl interface through the camera x Extension Module. After the electronic device acquires the image data through the BeautyCapture ExtenderImpl interface, the image data can be processed by using a beauty algorithm (beauty algorithm) in the interface, so that the processed image data is obtained. Then, the electronic device may feed back the processed image data to the CameraX component through a corresponding interface, and then feed back the processed image data to the third-party application through the CameraX component. The third party application can encode the processed image data to generate a JPEG-formatted photo after receiving the processed image data, and output the photo to a display screen for display.
The flow of the device control method provided in this embodiment may include:
201. the electronic equipment receives a call request, wherein the call request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through a first application program.
For example, the third party application a needs to call an HDR photographing function among photographing functions possessed by a camera application of the electronic device. Then, the third party application a may send a call request to the CameraX component, where the call request is a request to call the HDR photographing function that the camera application has. That is, the electronic device may receive the invocation request from the third-party application a.
202. According to the calling request, the electronic device obtains first authority control information stored locally, the first authority control information is the authority control information which is obtained by the electronic device from the cloud device last time, the authority control information is information which records whether different application programs have authority for calling a shooting function of a camera application of the electronic device, the cloud device is a device for maintaining the authority control information, and the electronic device corresponds to the cloud device in communication connection.
For example, after receiving a call request for requesting to call the HDR photographing function from the third-party application a through the CameraX component, the electronic device may first obtain, according to the call request, the first right control information stored locally in the electronic device. The first authority control information is acquired by the electronic device from the cloud device last time. The authority control information is information in which whether or not each of the different application programs has an authority to call a shooting function that the camera application of the electronic device has is recorded. That is, which application programs have an authority to call the HDR photographing function among the photographing functions that the camera application of the electronic device has, and which application programs do not have an authority to call the HDR photographing function among the photographing functions that the camera application of the electronic device has are recorded in the first authority control information. The electronic equipment corresponds to the cloud equipment in communication connection. For example, the electronic device is a smartphone, and the cloud device is a server. The server is used for maintaining the authority control information, and when the electronic device needs to acquire the latest authority control information, the electronic device can acquire the latest authority control information from the server.
After the first permission control information stored locally is acquired, the electronic device may detect whether the first permission control information includes permission information of the third-party application a.
If the first authority control information includes authority information of the third party application a, the process proceeds to 203.
If the first authority control information does not describe the authority information of the third-party application A, 204 is entered.
203. If the first permission control information is detected to contain the permission information of the second application program, the electronic equipment detects whether the second application program has the permission for calling the shooting function of the camera application of the electronic equipment or not according to the first permission control information.
For example, if the electronic device detects that the first permission control information includes permission information of the third party application a, the electronic device may detect whether the third party application a has permission to call the HDR photographing function in the photographing functions of the camera application according to the first permission control information.
If it is detected that the third party application a has the right to invoke the HDR photographing function among the photographing functions that the camera application has, then 206 is entered.
If it is detected that the third party application a does not have the authority to invoke the HDR photographing function among the photographing functions possessed by the camera application, then step 207 is entered.
204. If the first permission control information is detected not to contain permission information of the second application program, the electronic device obtains second permission control information stored in the cloud device, and the second permission control information is latest permission control information stored in the cloud device.
205. And according to the second authority control information, the electronic equipment detects whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment.
For example, 204 and 205 may include:
the electronic device detects that the first permission control information does not contain permission information of the third-party application A, and then the electronic device can obtain second permission control information stored on the cloud device corresponding to the electronic device, wherein the second permission control information is the latest permission control information stored in the cloud device. That is, the second permission control information is latest information in which applications have permission to call the HDR photographing function among the photographing functions possessed by the camera application and which applications do not have permission to call the HDR photographing function among the photographing functions possessed by the camera application are recorded.
After the second permission control information is acquired, the electronic device may detect whether the third-party application a has permission to call the HDR photographing function.
If it is detected that the third party application A has the right to invoke the HDR photographing function, then 206 may be entered.
If it is detected that the third party application a does not have the right to invoke the HDR photographing function, or the right information of the third party application a is not described in the second right control information at all, then 207 may be entered.
206. If the second application program has the authority, the electronic device allows the second application program to call a shooting function of a camera application of the electronic device.
For example, the electronic device detects that the third-party application a has the right to invoke the HDR photographing function, the electronic device may allow the third-party application a to invoke the HDR photographing function through the camera x component.
207. And if the application does not have the authority, the electronic equipment refuses the calling request.
For example, if the electronic device detects that the third-party application a does not have the right to invoke the HDR photographing function, the electronic device may reject the invocation request of the third-party application a.
In an implementation manner, the embodiment of the present application may further include the following process:
and the electronic equipment updates the first authority control information according to the second authority control information.
For example, after the electronic device acquires the second permission control information, the electronic device may update the first permission control information according to the second permission control information.
In this embodiment, the second permission control information stored in the cloud device may be permission control information maintained by a manufacturer of the electronic device, and thus the second permission control information may be latest permission information in which latest permission information of each application program is recorded. The first permission control information stored locally may have a certain hysteresis, and therefore when the electronic device detects that permission information about the third-party application a is not recorded in the first permission control information stored locally, the electronic device may acquire the second permission control information stored in the cloud device again, and detect whether the third-party application a has permission to invoke the shooting function of the camera application according to the second permission control information.
After detecting whether the third-party application A has the authority of calling the shooting function of the camera application, the electronic device can update the first authority control information according to the second authority control information, so that the latest authority control information stored in the cloud device is updated to the local synchronously.
In another implementation, this embodiment may further include the following process:
according to a preset updating opportunity, the electronic equipment acquires authority control information stored in the cloud equipment;
and according to the acquired authority control information stored in the cloud equipment, the electronic equipment updates the authority control information stored in the electronic equipment.
For example, as described above, the latest authority control information is stored in the cloud device, so that the electronic device can obtain the authority control information stored in the cloud device according to a preset update time, and update the authority control information stored locally according to the obtained authority control information stored in the cloud device, thereby updating the latest authority control information stored in the cloud device to the local.
In an embodiment, the obtaining of the permission control information stored in the cloud device according to the preset update time may include:
when the electronic equipment is detected to be idle, the electronic equipment acquires the authority control information stored in the cloud equipment.
For example, when it is detected that the electronic device is in an idle state, the electronic device may acquire the permission control information stored in the cloud device, and update the permission control information stored locally according to the acquired permission control information stored in the cloud device. Namely, the preset update time is when the electronic device is idle.
It should be noted that the idle state may refer to a state in which the electronic device does not run an application in the foreground and does not receive information input by the user through an input device (e.g., a touch screen or a keyboard). Alternatively, the idle state may be a case where a CPU utilization of the electronic device is lower than a certain threshold, or a ratio of the remaining operating memory capacity to the total operating memory capacity is lower than a certain ratio threshold.
Or, in another embodiment, the obtaining of the authority control information stored in the cloud according to the preset update time may include:
when the electronic equipment is detected to be started, the electronic equipment acquires the authority control information stored in the cloud equipment.
For example, when it is detected that the electronic device has just been powered on, the electronic device may acquire the permission control information stored in the cloud device, and update the permission control information stored locally according to the acquired permission control information stored in the cloud device. Namely, the preset time is when the electronic device is powered on.
In another embodiment, the obtaining the authority control information stored in the cloud according to the preset update time may include:
when an update request is received, the electronic device acquires the authority control information stored in the cloud device, wherein the update request is a request sent by the cloud device to update the authority control information stored in the electronic device.
For example, since the latest authority control information is maintained in the cloud device, the cloud device may also actively send an update request to the electronic device after updating the latest authority control information, so as to request to update the authority control information in the electronic device. After receiving the update request, the electronic device may obtain the latest authorization control information from the cloud device, and update the authorization control information in the electronic device accordingly, so that the latest authorization control information is stored in the electronic device.
It can be understood that, in the above manner, in order to enable the electronic device to control the call of the third-party application to the shooting function of the camera application of the electronic device according to the latest authority control information in the subsequent use process, the third-party application is provided with the shooting function.
Referring to fig. 4 to 6, fig. 4 to 6 are schematic diagrams illustrating an implementation of an apparatus control method according to an embodiment of the present application.
For example, an android operating system is used by an electronic device on which a CameraX component is installed. The camera x component may include an Extension module (i.e., Extension module). Through an Extension module (Extension module), a third-party application can call a shooting function that a camera application of the electronic device has. The shooting function of the camera application of the electronic device may refer to a camera shooting function that is developed by a manufacturer of the electronic device, such as an HDR shooting function, a night view shooting function, a beauty function, and the like.
On the one hand, as shown in fig. 3, in the implementation framework of the CameraX component, a device manufacturer adds an image processing algorithm in an interface function by rewriting (override) the interface function of CameraX, and implements processing on an image by using the image processing algorithm. On the other hand, as shown in fig. 4, the camera x component provides an interface camera x Extension API for calling the photographing function of the camera application to the third party application, and the third party application can call the photographing function of the camera application by accessing the interface camera x Extension API.
In this embodiment, the camera x component may further include an Access Controller (Access Controller), and the Access Controller may be configured to control use of a shooting function that a camera application of the electronic device has by a third-party application.
As shown in fig. 5, when a third party application a calls a shooting function (e.g., an HDR shooting function) of a camera application of an electronic device through an Extension module of a camera component, the electronic device may first call an authority control module at a vendor implementation module (oemimempment), and detect whether the third party application a has an authority to call the shooting function of the camera application through the authority control module. If it is detected that the third party application a has the authority to invoke the photographing function that the camera application of the electronic device has, the electronic device may allow the third party application a to invoke the corresponding photographing function. If it is detected that the third party application a does not have the authority to invoke the photographing function that the camera application has, the electronic device may reject the invocation of the corresponding photographing function by the third party application a.
In one embodiment, referring to fig. 5, when a third party application a requests to call a shooting function of a camera application of an electronic device through a camera component, the third party application a may first call an isoextensionavailable function in a vendor Implementation module oemimplementation through an isoextensionavailable interface provided by the camera component. If the isExtensionAvailable function returns a tube value, it indicates that the camera application of the electronic device has a shooting function that has been implemented by the vendor and is accessible. If the isExtensionAvailable function returns a false value, it indicates that the camera application of the electronic device has a shooting function that is not implemented or accessible by the vendor.
In this embodiment, for example, the isExtensionAvailable function returns a tube value. In this case, the vendor Implementation module oemimplementation may utilize the Access Controller to detect whether the third-party application a has the authority to call the shooting function of the camera application by calling the interface provided by the Access Controller.
As shown in fig. 6, through the Access Controller, the electronic device may first obtain the first local authorization control information from the local database, and detect whether the first authorization control information records the authorization information of the third-party application a.
If the authority information of the third-party application a is recorded in the first authority control information, the electronic device may determine whether to allow the third-party application a to call a shooting function of a camera application of the electronic device according to the authority information of the third-party application a recorded in the first authority control information. For example, if the first permission control information describes that the third-party application a has permission to call the shooting function of the camera application, the electronic device may allow the third-party application a to call the shooting function of the camera application. Or, the first permission control information describes that the third party application a does not have permission to call the shooting function of the camera application, and then the electronic device may refuse the third party application a to call the shooting function of the camera application.
If the first permission control information does not record whether the third-party application A has permission to call the shooting function of the camera application, the electronic device can also acquire second permission control information stored in the cloud from the cloud database, and detect whether the second permission control information records permission information of the third-party application A.
If the second permission control information records permission information of the third-party application a, the electronic device may determine whether to allow the third-party application a to call a shooting function of a camera application of the electronic device according to the permission information of the third-party application a recorded in the second permission control information. For example, the second permission control information describes that the third party application a has permission to call the shooting function of the camera application, and then the electronic device may allow the third party application a to call the shooting function of the camera application. Or the second permission control information describes that the third party application a does not have permission to call the shooting function of the camera application, and then the electronic device may refuse the third party application a to call the shooting function of the camera application.
If the second permission control information does not record the permission information of the third-party application a, the electronic device may refuse the third-party application a to call the shooting function of the camera application.
Or, in another embodiment, the electronic device may also directly upload application information (such as information of an application package name of the third-party application a) of the third-party application a to the cloud device without acquiring the second permission control information from the cloud device, and the cloud device queries whether the third-party application a has permission to call a shooting function of a camera application of the electronic device in the permission control information stored in the cloud according to the application information of the third-party application a, and feeds back a query result to the electronic device. The electronic device may determine whether to allow the third party application a to call a photographing function that the camera application of the electronic device has according to the feedback result.
It can be understood that, in the embodiment of the application, the shooting function of the camera application of the electronic device is called by the third-party application for authority control, on one hand, the shooting function of the camera application is guaranteed to be opened for the third-party application to use through the camera application, on the other hand, the electronic device manufacturer can dynamically control the calling authority of the shooting function of the camera application called by the third-party application, the authority is opened for the high-quality third-party application, and the inferior third-party application is prohibited to use, so that negative effects caused by misuse of the shooting function of the camera application by the inferior third-party application are avoided, and the overall use experience of the camera application is improved.
On the other hand, the authority control information of the camera application called by the third-party application can be stored in the electronic device locally or in the cloud device, so that the requirement on the efficiency of authority inquiry can be met, and dynamic authority modification (such as authority addition and deletion) and the like can be conveniently carried out.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an apparatus control device according to an embodiment of the present disclosure. The device control apparatus can be applied to an electronic device, the electronic device is provided with a first application program, and the application program in the electronic device can call a shooting function of a camera application of the electronic device through the first application program. The device control apparatus 300 may include: a receiving module 301, a detecting module 302 and a responding module 303.
A receiving module 301, configured to receive a call request, where the call request is a request for a second application to call a shooting function of a camera application of the electronic device through the first application.
A detecting module 302, configured to detect, according to the call request, whether the second application program has a right to call a shooting function of a camera application of the electronic device.
A response module 303, configured to allow the second application program to call a shooting function of a camera application of the electronic device if the second application program has the authority.
In one embodiment, the detection module 302 may be configured to:
acquiring first authority control information stored in the electronic device, wherein the first authority control information is authority control information which is acquired by the electronic device from a cloud device at the last time, the authority control information is information which records whether different application programs have authority for calling a shooting function of a camera application of the electronic device, the cloud device is a device for maintaining the authority control information, and the electronic device corresponds to the cloud device in communication connection;
if the first permission control information is detected to contain the permission information of the second application program, whether the second application program has the permission for calling the shooting function of the camera application of the electronic equipment is detected according to the first permission control information.
In one embodiment, the detection module 302 may be further configured to:
if the first permission control information is detected not to contain the permission information of the second application program, acquiring second permission control information stored in the cloud end equipment, wherein the second permission control information is the latest permission control information stored in the cloud end equipment;
and detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the second authority control information.
In one embodiment, the detection module 302 may be further configured to:
and updating the first authority control information according to the second authority control information.
In one embodiment, the detection module 302 may be further configured to:
acquiring authority control information stored in the cloud equipment according to a preset updating opportunity;
and updating the authority control information stored in the electronic equipment according to the acquired authority control information stored in the cloud equipment.
In one embodiment, the detection module 302 may be configured to:
and when the electronic equipment is detected to be idle, acquiring the authority control information stored in the cloud equipment.
In one embodiment, the detection module 302 may be configured to:
and when the electronic equipment is detected to be started, acquiring the authority control information stored in the cloud equipment.
In one embodiment, the detection module 302 may be configured to:
when an update request is received, acquiring the authority control information stored in the cloud device, wherein the update request is a request sent by the cloud device for updating the authority control information stored in the electronic device.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute a flow in an apparatus control method provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the flow in the device control method provided in this embodiment by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 400 may include a camera module 401, a memory 402, a processor 403, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The camera module 401 may include components such as a camera lens, an image sensor, and the like. The camera module 401 may be used to capture images.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
Furthermore, the electronic device is provided with a first application program by which the application program in the electronic device can call a shooting function that the camera application of the electronic device has
In this embodiment, the processor 403 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, so as to execute:
receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through the first application program;
detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.
Referring to fig. 9, the electronic device 400 may include a camera module 401, a memory 402, a processor 403, an input unit 404, an output unit 405, a power supply module 406, and the like.
The camera module 401 may include components such as a camera lens, an image sensor, and the like. The camera module 401 may be used to capture images.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
The input unit 404 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 405 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The power module 406 may supply power to various modules of the electronic device.
Furthermore, the electronic device is provided with a first application program, and the application program in the electronic device can call the shooting function of the camera application of the electronic device through the first application program.
In this embodiment, the processor 403 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, so as to execute:
receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through the first application program;
detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.
In one embodiment, when the processor 401 performs the detecting whether the second application program has the right to call the shooting function of the camera application of the electronic device, the following steps may be performed:
acquiring first authority control information stored in the electronic device, wherein the first authority control information is authority control information which is acquired by the electronic device from a cloud device at the last time, the authority control information is information which records whether different application programs have authority for calling a shooting function of a camera application of the electronic device, the cloud device is a device for maintaining the authority control information, and the electronic device corresponds to the cloud device in communication connection;
if the first permission control information is detected to contain the permission information of the second application program, whether the second application program has the permission for calling the shooting function of the camera application of the electronic equipment is detected according to the first permission control information.
In one embodiment, processor 401 may further perform:
if the first permission control information is detected not to contain the permission information of the second application program, acquiring second permission control information stored in the cloud end equipment, wherein the second permission control information is the latest permission control information stored in the cloud end equipment;
and detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the second authority control information.
In one embodiment, processor 401 may further perform:
and updating the first authority control information according to the second authority control information.
In one embodiment, processor 401 may further perform:
acquiring authority control information stored in the cloud equipment according to a preset updating opportunity;
and updating the authority control information stored in the electronic equipment according to the acquired authority control information stored in the cloud equipment.
In an embodiment, when the processor 401 executes to acquire the authority control information stored in the cloud device according to a preset update time, the following steps may be executed: and when the electronic equipment is detected to be idle, acquiring the authority control information stored in the cloud equipment.
In an embodiment, when the processor 401 executes to acquire the authority control information stored in the cloud device according to a preset update time, the following steps may be executed: and when the electronic equipment is detected to be started, acquiring the authority control information stored in the cloud equipment.
In an embodiment, when the processor 401 executes to acquire the authority control information stored in the cloud device according to a preset update time, the following steps may be executed: when an update request is received, acquiring the authority control information stored in the cloud device, wherein the update request is a request sent by the cloud device for updating the authority control information stored in the electronic device.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the device control method, and are not described herein again.
The device control apparatus provided in the embodiment of the present application and the device control method in the above embodiments belong to the same concept, and any method provided in the device control method embodiment may be run on the device control apparatus, and a specific implementation process thereof is described in the device control method embodiment in detail, and is not described herein again.
It should be noted that, for the apparatus control method described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process of implementing the apparatus control method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the apparatus control method can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the device control apparatus according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The above detailed description is provided for a device control method, apparatus, storage medium, and electronic device provided in the embodiments of the present application, and specific examples are applied herein to explain the principles and implementations of the present application, and the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A device control method is applied to an electronic device, and is characterized in that the electronic device is provided with a first application program, and an application program in the electronic device can call a shooting function of a camera application of the electronic device through the first application program, and the method comprises the following steps:
receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment by a second application program through the first application program;
detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and if the second application program has the authority, allowing the second application program to call the shooting function of the camera application of the electronic equipment.
2. The device control method according to claim 1, wherein the detecting whether the second application program has an authority to call a shooting function that a camera application of the electronic device has includes:
acquiring first authority control information stored in the electronic device, wherein the first authority control information is authority control information which is acquired by the electronic device from a cloud device at the last time, the authority control information is information which records whether different application programs have authority for calling a shooting function of a camera application of the electronic device, the cloud device is a device for maintaining the authority control information, and the electronic device corresponds to the cloud device in communication connection;
if the first permission control information is detected to contain the permission information of the second application program, whether the second application program has the permission for calling the shooting function of the camera application of the electronic equipment is detected according to the first permission control information.
3. The apparatus control method according to claim 2, characterized in that the method further comprises:
if the first permission control information is detected not to contain the permission information of the second application program, acquiring second permission control information stored in the cloud end equipment, wherein the second permission control information is the latest permission control information stored in the cloud end equipment;
and detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the second authority control information.
4. The apparatus control method according to claim 3, characterized in that the method further comprises:
and updating the first authority control information according to the second authority control information.
5. The apparatus control method according to claim 3, characterized in that the method further comprises:
acquiring authority control information stored in the cloud equipment according to a preset updating opportunity;
and updating the authority control information stored in the electronic equipment according to the acquired authority control information stored in the cloud equipment.
6. The device control method according to claim 5, wherein acquiring the authority control information stored in the cloud device according to a preset update time includes:
and when the electronic equipment is detected to be idle, acquiring the authority control information stored in the cloud equipment.
7. The device control method according to claim 5, wherein acquiring the authority control information stored in the cloud device according to a preset update time includes:
and when the electronic equipment is detected to be started, acquiring the authority control information stored in the cloud equipment.
8. The device control method according to claim 5, wherein acquiring the authority control information stored in the cloud device according to a preset update time includes:
when an update request is received, acquiring the authority control information stored in the cloud device, wherein the update request is a request sent by the cloud device for updating the authority control information stored in the electronic device.
9. An apparatus control device applied to an electronic device, wherein the electronic device is configured with a first application program by which an application program in the electronic device can call a shooting function that a camera application of the electronic device has, the apparatus comprising:
the receiving module is used for receiving a calling request, wherein the calling request is a request for calling a shooting function of a camera application of the electronic equipment through a second application program by the first application program;
the detection module is used for detecting whether the second application program has the authority of calling the shooting function of the camera application of the electronic equipment or not according to the calling request;
and the response module is used for allowing the second application program to call the shooting function of the camera application of the electronic equipment if the second application program has the authority.
10. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1 to 8.
11. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any one of claims 1 to 8 by invoking a computer program stored in the memory.
CN202010038921.2A 2020-01-14 2020-01-14 Device control method, device, storage medium and electronic device Active CN111259441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010038921.2A CN111259441B (en) 2020-01-14 2020-01-14 Device control method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010038921.2A CN111259441B (en) 2020-01-14 2020-01-14 Device control method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111259441A true CN111259441A (en) 2020-06-09
CN111259441B CN111259441B (en) 2023-02-28

Family

ID=70945278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010038921.2A Active CN111259441B (en) 2020-01-14 2020-01-14 Device control method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111259441B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882481A (en) * 2021-04-28 2021-06-01 北京邮电大学 Mobile multi-mode interactive navigation robot system based on SLAM
CN113194074A (en) * 2021-04-08 2021-07-30 北京达佳互联信息技术有限公司 Service access control system, method, device, equipment and storage medium
CN113900839A (en) * 2021-10-27 2022-01-07 Oppo广东移动通信有限公司 Database calling method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943531A (en) * 2017-11-03 2018-04-20 珠海市君天电子科技有限公司 A kind of authority control method, user terminal, electronic equipment and storage medium
CN109068059A (en) * 2018-08-27 2018-12-21 Oppo广东移动通信有限公司 A kind of method, mobile terminal and storage medium calling camera
CN109697359A (en) * 2018-12-19 2019-04-30 惠州Tcl移动通信有限公司 A kind of message prompt method, device, storage medium and electronic equipment
CN110113483A (en) * 2019-04-19 2019-08-09 华为技术有限公司 Use the powerful method of the increasing of electronic equipment and relevant apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943531A (en) * 2017-11-03 2018-04-20 珠海市君天电子科技有限公司 A kind of authority control method, user terminal, electronic equipment and storage medium
CN109068059A (en) * 2018-08-27 2018-12-21 Oppo广东移动通信有限公司 A kind of method, mobile terminal and storage medium calling camera
CN109697359A (en) * 2018-12-19 2019-04-30 惠州Tcl移动通信有限公司 A kind of message prompt method, device, storage medium and electronic equipment
CN110113483A (en) * 2019-04-19 2019-08-09 华为技术有限公司 Use the powerful method of the increasing of electronic equipment and relevant apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194074A (en) * 2021-04-08 2021-07-30 北京达佳互联信息技术有限公司 Service access control system, method, device, equipment and storage medium
CN113194074B (en) * 2021-04-08 2023-02-17 北京达佳互联信息技术有限公司 Service access control system, method, device, equipment and storage medium
CN112882481A (en) * 2021-04-28 2021-06-01 北京邮电大学 Mobile multi-mode interactive navigation robot system based on SLAM
CN113900839A (en) * 2021-10-27 2022-01-07 Oppo广东移动通信有限公司 Database calling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111259441B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
KR102008355B1 (en) Method and device for displaying content on same screen, and terminal device
CN111259441B (en) Device control method, device, storage medium and electronic device
KR101806426B1 (en) Above-lock camera access
US10423527B2 (en) Memory management and image display for mobile devices
JP2018088272A (en) Entry points to image-related applications in mobile device
CN111491102B (en) Detection method and system for photographing scene, mobile terminal and storage medium
RU2652452C2 (en) Device and method for network status information representation
US10931755B2 (en) Method and apparatus for managing a shared storage system
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
WO2022156766A1 (en) Picture-photographing method and apparatus, and electronic device
CN109033393B (en) Sticker processing method, device, storage medium and electronic equipment
CN113727035A (en) Image processing method, system, electronic device and storage medium
CN111314606B (en) Photographing method and device, electronic equipment and storage medium
WO2022089479A1 (en) Photographing method and apparatus, and electronic device
CN111246272A (en) Method and device for displaying video cover picture
CN113821806A (en) Third party access to end user device assets
CN113014804A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN111182223B (en) Image processing method, image processing device, storage medium and electronic equipment
WO2023160230A1 (en) Photographing method and related device
JP6347636B2 (en) Image processing system, data management method, and program
CN113642010B (en) Method for acquiring data of extended storage device and mobile terminal
KR20230086770A (en) Shooting method, shooting device, electronic device and readable storage medium
CN114157626A (en) Method, system, storage medium and computer equipment for transmitting photos by photographing
CN113037996A (en) Image processing method and device and electronic equipment
CN115981576B (en) Method for sharing data, electronic device and storage medium

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