CN114357476A - Authorization method, authorization device, electronic equipment and storage medium - Google Patents

Authorization method, authorization device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114357476A
CN114357476A CN202111556434.6A CN202111556434A CN114357476A CN 114357476 A CN114357476 A CN 114357476A CN 202111556434 A CN202111556434 A CN 202111556434A CN 114357476 A CN114357476 A CN 114357476A
Authority
CN
China
Prior art keywords
service
authorization
operating system
information
registration
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.)
Pending
Application number
CN202111556434.6A
Other languages
Chinese (zh)
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.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech 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 Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN202111556434.6A priority Critical patent/CN114357476A/en
Publication of CN114357476A publication Critical patent/CN114357476A/en
Pending legal-status Critical Current

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/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Landscapes

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

Abstract

The application is applicable to the technical field of communication, and provides an authorization method, an authorization device, electronic equipment and a storage medium. The authorization method comprises the following steps: when the authorization information of the first service of the first operating system needs to be inquired, inquiring whether the registration information of the authorization service exists in a service registration manager or not, wherein the service registration manager is used for increasing the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, calling the authorization service corresponding to the registration information if the registration information of the authorization service exists in the service registration manager, and starting the authorization service of the first operating system and calling to acquire the authorization information returned by the authorization service if the registration information of the authorization service does not exist in the service registration manager. Therefore, one operating system starts the authorization service, and can be called by other operating systems to inquire the authorization information, so that the authorization information does not need to be inquired on each operating system, and the running efficiency of the equipment is improved.

Description

Authorization method, authorization device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to an authorization method, an authorization apparatus, an electronic device, and a storage medium.
Background
At present, intelligent devices such as robots and mobile phones are applied in more and more fields, and accordingly, the types and functions of application software installed on the intelligent devices are more and more. Some services of the application software are not provided to the user for free based on the development cost and the commercial value, and authentication of the authorization information is required for the device on which the application software is installed when the user uses some services of the application software. Existing authentication schemes for authorization information are generally directed to devices of a single operating system. For a software system with multiple operating systems assisting in running, authentication of authorization information needs to be performed on each operating system, so that the running efficiency of the device is affected.
Disclosure of Invention
In view of this, embodiments of the present application provide an authorization method, an authorization apparatus, an electronic device, and a storage medium, which can solve the problem that the operation efficiency of the device is affected when the authorization information is verified on each operating system.
A first aspect of an embodiment of the present application provides an authorization method, which is applied to an electronic device, where the electronic device includes a first operating system, and the first operating system shares a file with at least one second operating system, and the method includes:
when determining that authorization information of a first service of the first operating system needs to be queried, querying whether registration information of the authorization service exists in a service registration manager, wherein the service registration manager is used for adding the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, and the authorization information indicates whether the electronic device is authorized to use the first service;
if the registration information of the authorization service exists in the service registration manager, invoking the authorization service corresponding to the registration information, wherein the authorization service is used for inquiring the authorization information of the first service after being invoked;
if the registration information of the authorization service does not exist in the service registration manager, starting the authorization service of the first operating system and calling the authorization service of the first operating system;
and acquiring the authorization information returned by the authorization service.
In one possible implementation manner, before querying whether registration information of an authorized service exists in a service registration manager when it is determined that authorization information of a first service of the first operating system needs to be queried, the method further includes:
when the call request of the first service is detected, determining that the authorization information of the first service needs to be inquired.
In a possible implementation manner, the call request of the first service is sent by the second operating system, and the second operating system is configured to determine that the first operating system has started the first service according to registration information of the first service in the service registration manager.
In a possible implementation manner, after obtaining the authorization information returned by the authorization service, the method further includes:
and if the authorization information is authorized, responding to the call request of the second operating system.
In one possible implementation manner, invoking an authorization service corresponding to the registration information includes:
and calling the authorization service corresponding to the registration information according to the calling interface recorded in the service registration manager.
In one possible implementation manner, the authorization service is used to query authorization information of the first service from a server after being called, and after the authorization service of the first operating system is called, the method further includes:
and storing the authorization information.
In one possible implementation, after storing the authorization information, the method further includes:
and acquiring updated authorization information returned by the authorization service according to a set period.
A second aspect of the embodiments of the present application provides an authorization apparatus, applied to an electronic device, where the electronic device includes a first operating system, and the first operating system shares a file with at least one second operating system, and the apparatus includes:
the query module is used for querying whether registration information of the authorization service exists in a service registration manager when the authorization information of the first service of the first operating system needs to be queried, the service registration manager is used for adding the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, and the authorization information represents whether the electronic equipment is authorized to use the first service;
a first calling module, configured to call an authorization service corresponding to registration information if the registration information of the authorization service exists in the service registration manager, where the authorization service is used to query the authorization information of the first service after being called;
the second calling module is used for starting the authorization service of the first operating system and calling the authorization service of the first operating system if the registration information of the authorization service does not exist in the service registration manager;
and the acquisition module is used for acquiring the authorization information returned by the authorization service.
A third aspect of embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the authorization method according to the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the authorization method according to the first aspect.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on an electronic device, causes the electronic device to perform the authorization method of any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: when the authorization information of the first service of the first operating system needs to be inquired, inquiring whether the registration information of the authorization service exists in the service registration manager, if the registration information of the authorization service exists in the service registration manager, the first operating system or the second operating system starts the authorization service, directly calling the authorization service, if the registration information of the authorization service does not exist in the service registration manager, the first operating system or the second operating system does not start the authorization service, starting the authorization service of the first operating system and calling, and after the authorization service is called, inquiring the authorization information of the first service. Therefore, any one of the first operating system and the second operating system starts the authorization service and can be called to inquire the authorization information, so that the authorization information does not need to be inquired on each operating system, and the running efficiency of the equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of an implementation of an authorization method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario of an authorization method provided in an embodiment of the present application;
fig. 3 is a schematic diagram of another application scenario of an authorization method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of an authorization device provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
For software systems where multiple operating systems assist in running, the services on each operating system need to be validated for authorization information at the operating system on which it is located when it is invoked. For example, the software system runs on an Android system and an IOS system, services of the software system in the Android system include a voice service, and services in the IOS system include a navigation service. When the voice service is called, the authorization service needs to be started in the Android system to inquire the authorization information of the voice service. When the navigation service is called, an authorization service needs to be started in the IOS system to inquire the authorization information of the navigation service. The start and operation of each authorization service consumes the energy consumption of the electronic device where the operating system is located, thereby affecting the operating efficiency of the electronic device.
Therefore, an authorization method is provided in an embodiment of the present application, and when it is determined that authorization information of a first service of a first operating system needs to be queried, it is determined whether an already-started authorization service exists in the first operating system and a second operating system according to whether registration information of the authorization service exists in a registration manager, if the already-started authorization service exists, the authorization service of the first operating system and the second operating system is not started, and if the already-started authorization service does not exist, the authorization service of the first operating system and the at least one second operating system are started, so that only one running authorization service exists in the first operating system and the at least one second operating system, thereby completing querying of the authorization information, avoiding an influence on energy consumption of an electronic device when multiple authorization services run simultaneously, and improving operation efficiency of the electronic device.
The authorization methods provided in the present application are exemplified below.
The authorization method provided by the embodiment of the application is applied to electronic equipment, and the electronic equipment can be a robot, a mobile phone, a tablet personal computer, intelligent wearable equipment and the like. The electronic equipment is provided with a first operating system, the first operating system and at least one second operating system share files, namely software systems run on the first operating system and the at least one second operating system, and the first operating system and the at least one second operating system respectively provide different services of the software systems. The second operating system and the first operating system can be simultaneously operated on the same electronic device, and can also be operated on different electronic devices.
Referring to fig. 1, an authorization method provided in an embodiment of the present application includes:
s101: when determining that the authorization information of the first service of the first operating system needs to be inquired, inquiring whether the registration information of the authorization service exists in a service registration manager, wherein the service registration manager is used for adding the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, and the authorization information indicates whether the electronic equipment is authorized to use the first service.
Specifically, after the authorization service is started, the first operating system or the second operating system sends a registration request to the service registration manager, and the service registration manager records registration information of the authorization service, where the registration information may be an identifier of the authorization service or an already registered identifier corresponding to the authorization service. The service registration manager may run on the first operating system or any of the second operating systems, or may run on the server. The first operating system or the second operating system may determine whether there is an authorized service that has been launched by querying the service registration manager. The authorization service, upon startup, may query the first operating system or the second operating system for authorization information for the service. The authorization information for any service includes one of authorized and unauthorized.
The electronic device may query the authorization information of the first service through the first operating system when the first service is called, or query the authorization information of the first service when the component corresponding to the first service is installed. The first service may be any service on the first operating system, such as a voice service, a navigation service, a photo service, and the like.
In an embodiment, on an operation interface of a first operating system, when a call request of a user to a first service is detected, it is determined that authorization information of the first service needs to be queried. The verification of the authorization information is carried out before the first service is called, so that the function of the first service can be managed and controlled, and software is prevented from being stolen by others. The first operating system may query the authorization information of the first service each time the call request of the first service is detected, may query the authorization information of the first service when the call request of the first service is detected for the first time after the first operating system is started, and may query the authorization information of the first service when the call request of the first service is detected for the first time on the electronic device.
In another embodiment, if a call request of any second operating system to the first service is detected on the first operating system, it is determined that authorization information of the first service needs to be queried, so that cross-system call of the first service can be realized. Meanwhile, when the first service is called, only the authorization information of the first service is inquired on the first operating system, and the authorization information is not inquired again on the second operating system additionally. If the authorization service corresponding to the registration information is the authorization service of the second operating system, the second operating system initiating the call request and the second operating system starting the authorization service may or may not be the same operating system. Specifically, when starting any service, the first operating system and the second operating system both send registration requests to the service registration manager, and the service registration manager records registration information of the corresponding service, so that the first operating system and the second operating system can query all services started by each operating system through the service registration manager, that is, query services already started in the software system. Therefore, the second operating system can determine that the first service is started on the first operating system by querying the service registration manager, so that the first service can be called from the first operating system.
S102: if the registration information of the authorization service exists in the service registration manager, the authorization service corresponding to the registration information is called, and the authorization service is used for inquiring the authorization information of the first service after being called.
Specifically, if the registration information of the authorization service exists in the service registration manager, it indicates that one of the first operating system and the second operating system has started the authorization service. If the first operating system starts the authorization service, the first operating system calls the authorization service of the first operating system, and if the second operating system starts the authorization service, the first operating system calls the authorization service of the second operating system in a cross-process mode.
In an embodiment, the service registration manager records a call interface corresponding to the authorization service, and the first operating system can call the authorization service through the call interface, so as to improve the call efficiency. In other embodiments, the service registration manager may also store an operating system corresponding to the authorization service, and the first operating system calls the authorization service by accessing the corresponding operating system according to the operating system corresponding to the authorization service.
S103: if the registration information of the authorization service does not exist in the service registration manager, the authorization service of the first operating system is started and called.
Specifically, if the registration information of the authorization service does not exist in the service registration manager, which indicates that neither the first operating system nor the second operating system starts the authorization service, the authorization service of the first operating system is started, and the authorization information of the first service is inquired by calling the authorization service.
After the authorization service of the first operating system is started, the first operating system sends a registration request to the service registration manager, and the service registration manager records the registration information of the authorization service. Any of the second operating systems may determine that there is an authorized service initiated by querying the service registration manager and invoke the authorized service of the first operating system.
S104: and acquiring the authorization information returned by the authorization service.
In one embodiment, the authorization information is stored in the server, and after the authorization service is called, the identification information of the electronic device is sent to the server to obtain the authorization information returned by the server. The identification information of the electronic device may be a serial number of the electronic device or an identity of a user associated with the electronic device. If the first operating system calls the authorization service of the first operating system, the authorization information is stored after the authorization information returned by the server is received, so that the authorization information can be inquired locally when the authorization service is called next time, and the inquiry efficiency is improved. In an embodiment, after the electronic device stores the authorization information, the first operating system calls the authorization service according to a set period, the updated authorization information is inquired from the server, and the electronic device obtains and stores the updated authorization information returned by the authorization service, so that the real-time performance of the authorization information is improved, and the inquiry accuracy is ensured. Similarly, if the first operating system calls the authorization service of the second operating system, the second operating system stores the authorization information after the authorization service queries the authorization information of the first service. And simultaneously, the second operating system calls the authorization service according to the set period and acquires the updated authorization information from the server.
In another embodiment, the authorization information may also be directly stored locally, and after the authorization service is invoked, the authorization information of the first service may be determined according to the identification information of the electronic device.
In an embodiment, if a user initiates a request for calling a first service in a first operating system, after receiving authorization information returned by an authorization service, the first operating system responds to the request for calling the first service and executes a function of the first service if the authorization information is determined to be authorized. If the first operating system receives a call request sent by the second operating system, after the first operating system receives authorization information returned by the authorization service, if the authorization information is determined to be authorized, the first operating system responds to the call request of the second operating system and provides the first service for the second operating system.
In the above embodiment, when it is determined that the authorization information of the first service of the first operating system needs to be queried, querying whether registration information of the authorization service exists in the service registration manager, if the registration information of the authorization service exists in the service registration manager, it is determined that the first operating system or the second operating system has already started the authorization service, directly invoking the authorization service, if the registration information of the authorization service does not exist in the service registration manager, it is determined that neither the first operating system nor the second operating system has started the authorization service, starting the authorization service of the first operating system and invoking, where the authorization service is invoked to query the authorization information of the first service. Therefore, when the authorization service is started in any one of the first operating system and the second operating system, the authorization information can be inquired, so that the authorization service is not started in each operating system, and the running efficiency of the equipment is improved.
The following describes an authorization method provided in the embodiment of the present application with reference to specific scenarios.
As shown in fig. 2, in an application scenario, the robot includes a Rosa framework, the software system runs on the Rosa framework, the Rosa framework includes an Android system, an IOS system, and a Linux system, services on the Android system include a voice service, a navigation service, and an authorization service, services on the IOS system include a video playing service, a call service, and an authorization service, and services on the Linux system include a monitoring service and an authorization service. The service registration manager runs on any system or server. After any system in the Android system, the IOS system and the Linux system starts the service, a registration request corresponding to the service is sent to a service registration manager, and the service registration manager records registration information of the service started by each system. By querying the service registration manager, any system can determine the service started on the robot and can call the service on the current system or cross-process call the service.
Illustratively, the Android system determines that authorization information of the voice service needs to be inquired when detecting a call request of the voice service. When determining that the authorization information needs to be inquired, inquiring whether the registration information of the authorization service exists in the service registration manager. And by inquiring the service registration manager, if the fact that the registration information of the authorization service does not exist is determined, the authorization service of the Android system is started, a registration request of the authorization service is sent to the registration manager, and the service registration manager records the registration information of the authorization service and a calling interface. And then, the Android system calls an authorization service to inquire the authorization information of the voice service.
When detecting a call request of the video playing service, the IOS system determines that the authorization information of the video playing service needs to be inquired, determines that the registration information of the authorization service exists through the inquiry service registration manager, and calls the authorization service through the call interface to inquire the authorization information of the video playing service.
When detecting a calling request of the monitoring service, the Linux system determines authorization information of the monitoring service to be inquired, determines that registration information of the authorization service exists through the inquiry service registration manager, and calls the authorization service through the calling interface to inquire the authorization information of the monitoring service.
As shown in fig. 3, in another application scenario, a user queries a service registration manager through a Linux system, determines that the Android system has started a voice service, and sends a call request of the voice service to the Android system. After receiving a call request of the voice service, the Android system queries a service registration manager and determines that registration information of the authorized service exists. And if the authorization service is started by the IOS system, the Android system calls the authorization service of the IOS system through a calling interface. And after the authorization service is called, the authorization service returns the inquired authorization information to the Android system. And if the authorization information is authorized, the Android system provides voice service for the Linux system.
By adopting the authorization method provided by the embodiment of the application, when the authorization information of the service of the current operating system needs to be inquired, whether the registration information of the authorization service exists in the service registration manager is inquired, if the registration information of the authorization service exists in the service registration manager, the authorization service is directly called, and if the registration information of the authorization service does not exist in the service registration manager, the authorization service of the current operating system is started and called, so that the authorization service does not need to be started in each operating system, and the operating efficiency of the equipment is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 shows a structural block diagram of the authorization apparatus provided in the embodiment of the present application, corresponding to the authorization method described in the above embodiment, and only the relevant parts to the embodiment of the present application are shown for convenience of description.
As shown in fig. 4, the authorization apparatus is applied to an electronic device, the electronic device includes a first operating system, the first operating system shares files with at least one second operating system, and the authorization apparatus includes:
a query module 41, configured to query whether registration information of an authorization service exists in a service registration manager when it is determined that authorization information of a first service of the first operating system needs to be queried, where the service registration manager is configured to add registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, where the authorization information indicates whether the electronic device is authorized to use the first service;
a first calling module 42, configured to, if registration information of an authorization service exists in the service registration manager, call an authorization service corresponding to the registration information, where the authorization service is used to query authorization information of the first service after being called;
a second calling module 43, configured to start the authorization service of the first operating system and call the authorization service of the first operating system if the registration information of the authorization service does not exist in the service registration manager;
and the obtaining module 44 is configured to obtain the authorization information returned by the authorization service.
In a possible implementation manner, the authorization apparatus further includes a detection module, configured to determine that authorization information of the first service needs to be queried when the invocation request of the first service is detected.
In a possible implementation manner, the call request of the first service is sent by the second operating system, and the second operating system is configured to determine that the first operating system has started the first service according to registration information of the first service in the service registration manager.
In a possible implementation manner, the authorization apparatus further includes a detection module, configured to respond to the call request of the second operating system if the authorization information is authorized.
In one possible implementation, the first invoking module 42 is specifically configured to:
and calling the authorization service corresponding to the registration information according to the calling interface recorded in the service registration manager.
In a possible implementation manner, the second invoking module 43 is further configured to:
and storing the authorization information.
In a possible implementation manner, the second invoking module 43 is further configured to:
and acquiring updated authorization information returned by the authorization service according to a set period.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 5, the electronic apparatus of this embodiment includes: a processor 51, a memory 52 and a computer program 53 stored in said memory 52 and executable on said processor 51. The processor 51 implements the steps in the above-described authorization method embodiments, such as steps S101 to S104 shown in fig. 1, when executing the computer program 53. Alternatively, the processor 51 implements the functions of the modules/units in the device embodiments described above when executing the computer program 53, for example, the functions of the query module 41 to the obtaining module 44 shown in fig. 4.
Illustratively, the computer program 53 may be partitioned into one or more modules/units that are stored in the memory 52 and executed by the processor 51 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 53 in the electronic device.
Those skilled in the art will appreciate that fig. 5 is merely an example of an electronic device and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 51 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 52 may be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The memory 52 may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device. Further, the memory 52 may also include both an internal storage unit and an external storage device of the electronic device. The memory 52 is used for storing the computer programs and other programs and data required by the electronic device. The memory 52 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other ways. For example, the above-described apparatus/electronic device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An authorization method applied to an electronic device, wherein the electronic device comprises a first operating system, and the first operating system shares files with at least one second operating system, and the method comprises the following steps:
when determining that authorization information of a first service of the first operating system needs to be queried, querying whether registration information of the authorization service exists in a service registration manager, wherein the service registration manager is used for adding the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, and the authorization information indicates whether the electronic device is authorized to use the first service;
if the registration information of the authorization service exists in the service registration manager, invoking the authorization service corresponding to the registration information, wherein the authorization service is used for inquiring the authorization information of the first service after being invoked;
if the registration information of the authorization service does not exist in the service registration manager, starting the authorization service of the first operating system and calling the authorization service of the first operating system;
and acquiring the authorization information returned by the authorization service.
2. The authorization method according to claim 1, wherein before querying whether registration information of an authorized service exists in a service registration manager when it is determined that authorization information of a first service of the first operating system needs to be queried, the method further comprises:
when the call request of the first service is detected, determining that the authorization information of the first service needs to be inquired.
3. The authorization method according to claim 2, characterized in that the call request of the first service is sent by the second operating system, and the second operating system is configured to determine that the first operating system has started the first service according to the registration information of the first service in the service registration manager.
4. The authorization method according to claim 3, characterized in that after obtaining the authorization information returned by the authorization service, the method further comprises:
and if the authorization information is authorized, responding to the call request of the second operating system.
5. The authorization method according to claim 1, wherein invoking the authorization service corresponding to the registration information comprises:
and calling the authorization service corresponding to the registration information according to the calling interface recorded in the service registration manager.
6. The authorization method according to claim 1, wherein the authorization service is invoked to query authorization information of the first service from a server, and after the authorization service of the first operating system is invoked, the method further comprises:
and storing the authorization information.
7. The authorization method according to claim 6, characterized in that after storing the authorization information, the method further comprises:
and acquiring updated authorization information returned by the authorization service according to a set period.
8. An authorization apparatus applied to an electronic device, the electronic device including a first operating system, the first operating system sharing files with at least one second operating system, the apparatus comprising:
the query module is used for querying whether registration information of the authorization service exists in a service registration manager when the authorization information of the first service of the first operating system needs to be queried, the service registration manager is used for adding the registration information of the authorization service after the authorization service of the first operating system or the authorization service of the second operating system is started, and the authorization information represents whether the electronic equipment is authorized to use the first service;
a first calling module, configured to call an authorization service corresponding to registration information if the registration information of the authorization service exists in the service registration manager, where the authorization service is used to query the authorization information of the first service after being called;
the second calling module is used for starting the authorization service of the first operating system and calling the authorization service of the first operating system if the registration information of the authorization service does not exist in the service registration manager;
and the acquisition module is used for acquiring the authorization information returned by the authorization service.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202111556434.6A 2021-12-17 2021-12-17 Authorization method, authorization device, electronic equipment and storage medium Pending CN114357476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111556434.6A CN114357476A (en) 2021-12-17 2021-12-17 Authorization method, authorization device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111556434.6A CN114357476A (en) 2021-12-17 2021-12-17 Authorization method, authorization device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114357476A true CN114357476A (en) 2022-04-15

Family

ID=81099030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111556434.6A Pending CN114357476A (en) 2021-12-17 2021-12-17 Authorization method, authorization device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114357476A (en)

Similar Documents

Publication Publication Date Title
CN110059110B (en) Business data security processing method and device, computer equipment and storage medium
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN111353176B (en) Method and system for inquiring block chain data
CN108200053B (en) Method and device for recording APT attack operation
CN112416616B (en) Micro-service calling method and device, electronic equipment and storage medium
CN111225082B (en) Identity management method and device of Internet of things intelligent equipment and Internet of things platform
WO2018010480A1 (en) Network locking method for esim card, terminal, and network locking authentication server
CN111259049A (en) Information query method, information query device and terminal equipment
CN113779545A (en) Data cross-process sharing method, terminal equipment and computer readable storage medium
CN111143782A (en) Authority management method and device of application software, server and storage medium
CN110865848B (en) Component interception method and terminal equipment
CN114357476A (en) Authorization method, authorization device, electronic equipment and storage medium
CN109699030B (en) Unmanned aerial vehicle authentication method, device, equipment and computer readable storage medium
CN112149097A (en) Identity authentication method, device, equipment and storage medium
CN112162797A (en) Data processing method, system, storage medium and electronic device
CN111310166A (en) Authority management method, device, equipment and storage medium
CN109348053B (en) Telephone number mark processing method, server, terminal device and computer readable storage medium
CN112130900B (en) User information management method, system, equipment and medium for BMC
CN110175038B (en) Soft lock permission updating method and device
CN112995900B (en) SIM card distribution method, device, server and computer readable storage medium
CN113961253A (en) Driver calling method and device, electronic equipment and storage medium
CN108513287B (en) SIM card activation method, device, terminal and storage medium
CN113127847A (en) Data management method and device
CN114553930B (en) System integration method, device, computer equipment and storage medium
CN110765426A (en) Equipment permission setting method, device, equipment and computer 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