CN117786706A - Access control method and electronic equipment - Google Patents

Access control method and electronic equipment Download PDF

Info

Publication number
CN117786706A
CN117786706A CN202211146476.7A CN202211146476A CN117786706A CN 117786706 A CN117786706 A CN 117786706A CN 202211146476 A CN202211146476 A CN 202211146476A CN 117786706 A CN117786706 A CN 117786706A
Authority
CN
China
Prior art keywords
communication node
application
call chain
service
electronic device
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
CN202211146476.7A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211146476.7A priority Critical patent/CN117786706A/en
Publication of CN117786706A publication Critical patent/CN117786706A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides an access control method and electronic equipment, and relates to the technical field of terminals. According to the method and the device, the permission verification is carried out on the communication nodes in the call chain according to the needs through the call relation among the communication nodes in the call chain, so that the access safety is ensured. The method comprises the following steps: in response to a user operation on a first application, the electronic device creates or queries a call chain including n communication nodes each having first information including a call relationship between each of the n communication nodes and a preceding communication node of each communication node, n being an integer greater than or equal to 2. And then, the electronic equipment verifies whether part or all of the n communication nodes have the authority to access the first service module according to the first information, and allows the first application to access the first service module under the condition that verification is passed.

Description

Access control method and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to an access control method and electronic equipment.
Background
With the development of terminal technology, various electronic devices are increasingly popularized, and an electronic device operating system protects personal data and privacy security of a user through an application authority access control mechanism. Specifically, in the application permission access control mechanism, a system process for providing data verifies permission of a process for calling the data to ensure data security.
However, during a data call, data transfer between multiple processes may be involved. The unauthorized process may also acquire the data provided by the system process through the authorized process, which causes a data security risk.
Disclosure of Invention
In order to solve the technical problems, the embodiment of the application provides an access control method and electronic equipment, and authority verification is performed on communication nodes in a call chain according to needs through call relations among all communication nodes in the call chain so as to ensure access safety.
In a first aspect, there is provided an access control method, the method comprising: in response to a user operation on a first application, the electronic device creates or accesses a call chain including n communication nodes each having first information including a call relationship between each of the n communication nodes and a preceding communication node of each communication node, n being an integer greater than or equal to 2. And the electronic equipment verifies whether part or all of the n communication nodes have the authority to access the first service module according to the first information. In case the authentication is passed, the electronic device allows the first application to access the first service module.
In some examples, after detecting the operation of the user on the first application, the electronic device may query whether a call chain including a communication node corresponding to the first application exists. If so, the electronic device may directly invoke the call chain. If not, the electronic device can create a call chain that includes the communication node to which the first application corresponds.
In some examples, each communication node in the call chain has first information by which the electronic device can determine a call relationship between the communication node and a previous communication node. The first information of the first modulator in the call chain is used for indicating that the corresponding communication node is the first modulator.
In this way, the communication nodes in the electronic equipment can determine the calling relationship among the communication nodes in the access process. The access authority of the communication node can be checked by the subsequent electronic equipment according to the requirement, the access risk is reduced, and the access safety is ensured.
According to a first aspect, the n communication nodes include a first communication node, a second communication node and a third communication node, the first communication node corresponds to a first application, the second communication node corresponds to m applications or service modules that the first application accesses the first service module, the third communication node corresponds to the first service module, and m is 0 or an integer greater than 0.
As such, during the access procedure, the electronic device adds the first information of each communication node via to the call chain. In this way, in the process of authority verification, each communication node accessing the first service module can be determined by the subsequent first service module, so that access safety is ensured.
According to the first aspect, or any implementation manner of the first aspect, after the electronic device creates the call chain, the method further includes: the electronic device stores the first information of the created n communication nodes of the call chain. Such as in the kernel.
According to a first aspect, or any implementation manner of the first aspect, the electronic device queries the call chain, including: the electronic device may query the call chain, for example, in the kernel.
Illustratively, the communication node may save the call chain information to the kernel after updating the call chain information. Then the other communication nodes may then query the kernel for relevant call chain information.
According to the first aspect, or any implementation manner of the first aspect, before the electronic device creates the call chain, the method further includes: the electronic device determines that the electronic device does not include first information of a first communication node corresponding to the first application. For example, the first information is not stored in the kernel.
Illustratively, the call relationship of the communication node includes an end-to-end correspondence between the current communication node and a communication node preceding the current communication node in the call chain. Then, in some embodiments, the application process may query the kernel for call chain information, and determine that the communication node corresponding to the current application process does not have information of a corresponding previous communication node. Then the application process may set the current application process as the initiator, creating a new call chain.
According to a first aspect, or any implementation of the first aspect above, each of the n communication nodes corresponds to one or more threads, and multiple threads of the same communication node correspond to the same first information.
For example, the processes corresponding to the communication nodes in the call chain may include one or more threads, and the multiple threads may asynchronously execute the service. After the threads in the process acquire the call chain information sent by other processes and update the call chain information, the call chain information can be forwarded to different threads in the same process until the call chain information is sent to other processes.
In this way, in the calling process, when a plurality of threads are called in a process or the process changes a processing thread, each thread in the same process can inherit the information of the communication node corresponding to the created process, so that the access risk is further reduced.
According to the first aspect, or any implementation manner of the first aspect, the electronic device verifies, according to the first information, whether some or all of the n communication nodes have authority to access the first service module, including: the first service module determines n communication nodes included in the call chain according to the first information. And the first service module is used for determining i communication nodes to be subjected to authority verification in the n communication nodes, wherein i is a positive integer less than or equal to n. The first service module verifies whether the i communication nodes have authority to access the first service module through the authority management service.
According to the first aspect, or any implementation manner of the first aspect, the determining, by the first service module in the electronic device, n communication nodes included in the call chain according to the first information includes: and the first service module in the electronic equipment determines n communication nodes included in the call chain in a recursive backtracking mode according to the call relation in the first information.
Illustratively, the first service module determines that the authority of one or more communication nodes in the call chain needs to be checked according to the service logic, and obtains the information of the one or more communication nodes. And then, the first service module generates a permission verification request according to the information of one or more communication nodes and the permission identification of the permission corresponding to the data to be accessed, and sends the permission verification request to the permission management service so as to verify whether the one or more communication nodes have the permission corresponding to the permission identification.
For example, the first service module determines that the current service has higher security requirements according to service logic, and needs to perform authority verification on all communication nodes in the call chain. The first service module may then generate a rights verification request carrying information of the n communication nodes and the rights identification. The first service module then sends the rights verification request to the rights management service. Thereby realizing the verification of the data access authority of the communication node.
In this way, in the process of inter-process communication, the process can combine the identity information of the process and the identity information of the caller to create a corresponding communication node, and fill the call relationship corresponding to the newly created communication node in the call chain. In the process of authority verification, the authority verification of the process in the process of interprocess communication can be realized by recursion backtracking of the call chain, the trusted call chain is constructed, the security risk is reduced, and the privacy security of the user is protected.
According to a first aspect, or any implementation manner of the first aspect, the i communication nodes include a first communication node corresponding to the first application, and/or a previous communication node of a third communication node corresponding to the first service module.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: the electronic equipment determines that the life cycle of the target communication node in the n communication nodes is ended, and destroys the first information corresponding to the target communication node in the call chain.
According to the first aspect, or any implementation manner of the first aspect, after the electronic device creates the call chain, the method further includes: the electronic equipment determines that the life cycle of the first communication node corresponding to the first application is ended, and destroys the call chain.
According to a first aspect, or any implementation manner of the first aspect, the end of the lifecycle of the target communication node includes the end of the lifecycle of all threads corresponding to the target communication node.
Thus, the electronic equipment responds to the service execution condition to destroy the data which is no longer needed in the call chain stored in the kernel, and the occupation of the kernel is reduced.
In a second aspect, embodiments of the present application provide an electronic device. The electronic device includes: a processor and a memory coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform: in response to a user operation on a first application, the electronic device creates or queries a call chain including n communication nodes each having first information including a call relationship between each of the n communication nodes and a preceding communication node of each communication node, n being an integer greater than or equal to 2. And the electronic equipment verifies whether part or all of the n communication nodes have the authority to access the first service module according to the first information. In case the authentication is passed, the electronic device allows the first application to access the first service module.
According to a second aspect, the n communication nodes include a first communication node, a second communication node and a third communication node, the first communication node corresponds to a first application, the second communication node corresponds to m applications or service modules that the first application accesses the first service module, the third communication node corresponds to the first service module, and m is 0 or an integer greater than 0.
According to a second aspect, or any implementation manner of the second aspect, the processor reads the computer readable instructions from the memory, and further causes the electronic device to perform the following operations: the electronic device stores first information of n communication nodes of the created call chain in the kernel.
According to a second aspect, or any implementation manner of the second aspect, the processor reads the computer readable instructions from the memory, and further causes the electronic device to perform the following operations: the electronic device determines that the kernel does not include first information of a first communication node corresponding to the first application.
According to a second aspect, or any implementation of the second aspect above, each of the n communication nodes corresponds to one or more threads, and multiple threads of the same communication node correspond to the same first information.
According to a second aspect, or any implementation manner of the second aspect, the electronic device verifies, according to the first information, whether some or all of the n communication nodes have authority to access the first service module, including: the first service module determines n communication nodes included in the call chain according to the first information. And the first service module is used for determining i communication nodes to be subjected to authority verification in the n communication nodes, wherein i is a positive integer less than or equal to n. The first service module verifies whether the i communication nodes have authority to access the first service module through the authority management service.
According to a second aspect, or any implementation manner of the second aspect, the determining, by a first service module in the electronic device, n communication nodes included in the call chain according to the first information includes: and the first service module in the electronic equipment determines n communication nodes included in the call chain in a recursive backtracking mode according to the call relation in the first information.
According to a second aspect, or any implementation manner of the second aspect above, the i communication nodes include a first communication node corresponding to the first application, and/or a previous communication node of a third communication node corresponding to the first service module.
According to a second aspect, or any implementation manner of the second aspect, the processor reads the computer readable instructions from the memory, and further causes the electronic device to perform the following operations: the electronic equipment determines that the life cycle of the target communication node in the n communication nodes is ended, and destroys the first information corresponding to the target communication node in the call chain.
According to a second aspect, or any implementation manner of the second aspect, the processor reads the computer readable instructions from the memory, and further causes the electronic device to perform the following operations: the electronic equipment determines that the life cycle of the first communication node corresponding to the first application is ended, and destroys the call chain.
According to a second aspect, or any implementation manner of the second aspect, the end of the lifecycle of the target communication node includes the end of the lifecycle of all threads corresponding to the target communication node.
The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes: a receiving and transmitting unit and a processing unit. The receiving and transmitting unit is used for detecting the operation of the user on the first application. And the processing unit is used for responding to the operation of the user on the first application, creating or inquiring a call chain, wherein the call chain comprises n communication nodes, each of the n communication nodes has first information, the first information comprises a call relation between each communication node in the n communication nodes and a previous communication node of each communication node, and n is an integer greater than or equal to 2. And the processing unit is further used for verifying whether part or all of the n communication nodes have the authority to access the first service module according to the first information. And the processing unit is also used for allowing the first application to access the first service module under the condition that the verification is passed.
According to a third aspect, the n communication nodes include a first communication node, a second communication node and a third communication node, the first communication node corresponds to a first application, the second communication node corresponds to m applications or service modules that the first application accesses the first service module, the third communication node corresponds to the first service module, and m is 0 or an integer greater than 0.
According to a third aspect, or any implementation manner of the third aspect, the electronic device further comprises a storage unit, configured to store first information of the n communication nodes of the created call chain in the kernel.
According to a third aspect, or any implementation manner of the third aspect, the processing unit is further configured to determine that the kernel does not include the first information of the first communication node corresponding to the first application.
According to a third aspect, or any implementation of the above third aspect, each of the n communication nodes corresponds to one or more threads, and the multiple threads of the same communication node correspond to the same first information.
According to a third aspect, or any implementation manner of the third aspect, the processing unit is further configured to determine, by the first service module, n communication nodes included in the call chain according to the first information. The processing unit is further configured to determine, through the first service module, i communication nodes to be subjected to authority verification from the n communication nodes, where i is a positive integer less than or equal to n. The processing unit is further configured to verify, through the first service module, whether the i communication nodes have permission to access the first service module through the permission management service.
According to a third aspect, or any implementation manner of the third aspect, the processing unit is further configured to determine, by using the first service module according to the call relation in the first information, n communication nodes included in the call chain by using a recursive backtracking manner.
According to a third aspect, or any implementation manner of the third aspect, the i communication nodes include a first communication node corresponding to the first application, and/or a previous communication node of a third communication node corresponding to the first service module.
According to a third aspect, or any implementation manner of the third aspect, the processing unit is further configured to determine that a life cycle of a target communication node of the n communication nodes is ended, and destroy first information corresponding to the target communication node in the call chain.
According to a third aspect, or any implementation manner of the third aspect, after the electronic device creates the call chain, the processing unit is further configured to determine that a lifecycle of the first communication node corresponding to the first application ends, and destroy the call chain.
According to a third aspect, or any implementation manner of the third aspect, the end of life cycle of the target communication node includes the end of life cycle of all threads corresponding to the target communication node.
The technical effects corresponding to the third aspect and any implementation manner of the third aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, and are not described herein again.
In a fourth aspect, an embodiment of the present application provides an electronic device, where the electronic device has a function of implementing the access control method as described in the first aspect and any one of possible implementation manners. The functions may be implemented by hardware, or by corresponding software executed by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
The technical effects corresponding to the fourth aspect and any implementation manner of the fourth aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium. The computer readable storage medium stores a computer program (which may also be referred to as instructions or code) which, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any implementation of the first aspect.
The technical effects corresponding to the fifth aspect and any implementation manner of the fifth aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a sixth aspect, embodiments of the present application provide a computer program product for, when run on an electronic device, causing the electronic device to perform the method of the first aspect or any of the embodiments of the first aspect.
The technical effects corresponding to the sixth aspect and any implementation manner of the sixth aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a seventh aspect, embodiments of the present application provide circuitry comprising processing circuitry configured to perform the first aspect or the method of any one of the embodiments of the first aspect.
The technical effects corresponding to the seventh aspect and any implementation manner of the seventh aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein again.
In an eighth aspect, an embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, where the at least one interface circuit is configured to perform a transceiver function and send an instruction to the at least one processor, and when the at least one processor executes the instruction, the at least one processor performs the method of the first aspect or any implementation manner of the first aspect.
The technical effects corresponding to the eighth aspect and any implementation manner of the eighth aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein again.
Drawings
Fig. 1 is a schematic flow chart of data access of an application process based on a call chain in a system provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of inter-process data access based on an initiator identity delivery mechanism in the system according to the embodiment of the present application;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
fig. 6 is a schematic flow chart of an access control method provided in an embodiment of the present application;
fig. 7A is a schematic view of a scenario in which a social application process accesses data in a camera service process according to an embodiment of the present application;
fig. 7B is a schematic view of process interaction in a scenario in which a social application process accesses data in a camera service process according to an embodiment of the present application;
fig. 8 is a second schematic flow chart of an access control method provided in the embodiment of the present application;
Fig. 9 is a schematic flow chart III of an access control method provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application are described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terminology used in the embodiments below is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include, for example, "one or more" such forms of expression, unless the context clearly indicates to the contrary. It should also be understood that in the various embodiments herein below, "at least one", "one or more" means one or more than two (including two).
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise. The term "coupled" includes both direct and indirect connections, unless stated otherwise. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In some scenarios, sensitive data such as personal data, private data and the like of a user are stored in electronic equipment (such as a mobile phone, a tablet and the like), and security of the sensitive data is protected by applying a permission access control mechanism. Wherein the identity of the data visitor is identified in units of processes. Such as an application process accessing data in a service process, the application process being a data visitor.
For example, an application process may access a user photo, which is personal data of a user, through a camera service. Then, the camera service needs to request the rights management service to verify the access rights of the application process accessing the user's photo to determine that the application process has the rights to access the camera service. When an application process has the right to access the camera service, the camera service can allow the application process to access the user photos; when an application process does not have the right to access the camera service, the camera service does not allow the application process to access the user's photograph or request the user's authorization. Thereby protecting the safety of user data and reducing the risk of data access.
In some embodiments, during data access, data transfer between multiple application processes may be involved. For example, the electronic device initiates a social application process to run a social application (e.g., a WeChat application). Thereafter, in response to a user's operation in the social application,the electronic device starts a map repair application process to run the map repair application. In the process of running the map maintenance application, the electronic device can start a camera application process, and access the camera service through the camera application process so as to start a camera shooting function and access user photo data. That is, the social application process may access user photo data in the camera service through the map maintenance application process and the camera application process. Then, the rights management service needs to verify the access rights of the social application process, the mapping application process and the camera application process to ensure the security of the user photo data.
For example, in one operating system, data access by application processes may be performed based on a call chain. Specifically, the system provides an interface for constructing the call chain, and whether the call chain is participated in the construction of the call chain can be selected in the application process data access process. In the permission verification process, the permission management service verifies the permission process of the application process of each node in the call chain, and determines whether the application process corresponding to the node has data access permission.
As shown in fig. 1, after the application process a determines that data access is required and creates a corresponding call chain (i.e. step S101), the application process B is instructed to execute a service by means of inter-process communication (inter-process communication, IPC) (i.e. step S102). The application process B may choose whether to join the call chain (i.e. step S103) and instruct the application process C to execute the service by means of IPC communication (i.e. step S104). The application process C may choose whether to join the call chain (i.e. step S105) and request access to the target data in the service process D by means of IPC communication (i.e. step S106). The service process D sends the call chain information to the authority management service, and the authority management service verifies the data access authority of the nodes in the call chain. The service process D determines that the application process of each node in the call chain has the data access right according to the right verification result sent by the right management service (i.e. step S107), and then the target data is fed back to the application process C, and the application process C forwards the target data to the application process a via the application process B (i.e. step S108). Finally, the application process a acquires the target data (i.e., step S109).
The communication sequence of each process in the scene is preconfigured in the process by a developer according to different service scenes. In the business scenario where the social application process accesses user photo data as described above, the social application process accesses user photo data in the camera service via the repair application process and the camera application.
It can be seen that in the process of data access by the application process in the system through the call chain, the application process of each node in the call chain needs to be added into the call chain, and the possibility that the application process is attacked is high, and the application process belongs to an untrusted domain. Therefore, there is a great risk of rights management of the call chain built by the application processes of the respective nodes.
Also exemplary, in another operating system, inter-process data access based on the initiator identity delivery mechanism may be provided. Specifically, the intermediate process node manually sets the master process, and the authority management service checks the authority of the master process so as to ensure the data security.
As shown in fig. 2, after the application process a determines that data access is required and creates a corresponding call chain, the application process B is instructed to execute a service by means of IPC communication (i.e. step S201). The application process B instructs the service process C to execute the service by means of IPC communication (i.e. step S202). The service process C may set the application process B as the initiator in a preconfigured manner (i.e. step S203), and send the initiator information to the service process D in an IPC communication manner (i.e. step S204). And the service process D checks the data access rights of the head regulator according to the head regulator information through the rights management service. The service process D determines that the initiator (i.e. the application process B) has the data access right according to the right verification result sent by the right management service, and then determines the target data (i.e. step S205), and feeds back the target data to the service process C, where the target data is forwarded to the application process a through the application process B (i.e. step S206). Finally, the application process a acquires the target data (i.e., step S207).
It can be seen that in the process of inter-process data access based on the initiator identity transfer mechanism in the above system, the transfer of the initiator requires the active adaptation of the intermediate service process, and the initiator is set, but cannot be set by the application process. And, the initiator may only refer to the application process of the last node in the call chain, and even if the authority of the initiator passes the verification, other unauthorized application processes can access the data of the service process through the initiator, so that the data security is affected.
Therefore, the embodiment of the application provides an access control method, which realizes permission verification on communication nodes in a call chain according to needs by automatically filling caller information on the call chain so as to ensure data access safety.
The access control method provided in the embodiment of the present application may be applied to the electronic device 100. For example, as shown in fig. 3, the electronic device 100 may specifically be a mobile phone 31, a notebook computer 32, a tablet computer 33, a large screen display device 34, a wearable device 35 (such as a smart watch, a smart bracelet, etc.), a vehicle-mounted device 36, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), an artificial intelligence (artificial intelligence, AI) device, and other terminal devices. Operating systems installed on electronic device 100 include, but are not limited to Or other operating system. The specific type of electronic device 100, and the installed operating system, is not limited in this application.
Fig. 4 shows a schematic structural diagram of the electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may be manufactured using a liquid crystal display (liquid crystal display, LCD), for example, using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a Mini-led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
In some embodiments, after the electronic device 100 detects a touch operation of the user on the display screen 194 through the touch sensor 180K, it determines that the user indicates to launch the first application, and may launch the first application process. Then, in response to the user operation on the first application, the first application process determines to access the service process data, a call chain can be created, and the call chain is automatically filled with the first application process information. Therefore, the follow-up service process can verify the authority of the first application process according to the information of the first application process carried in the call chain so as to protect the data security.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 5 is a software configuration block diagram of the electronic device 100 of the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, runtime (run time) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in FIG. 5, the application packages may include social, map, camera, calendar, music, gallery, map, conversation, video, and like applications.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 5, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a camera service, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The runtime (runtime) includes core libraries and virtual machines. The runtime (run) is responsible for scheduling and management of the android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The two-dimensional graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with a camera scene in a social application. When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the original input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a social application icon, the social application calls an interface of an application framework layer, and the social application is started. Then, the electronic device detects the touch operation of the user in the social application through the touch sensor 180K through the steps, determines that the user instructs to start the image capturing function, and can start the image repairing application process through the social application process according to the business logic of starting the image capturing function in the social application so as to run the image repairing application. In the process of running the graph repairing application, the electronic equipment starts a camera application process according to business logic, accesses the camera service of the application program framework layer through the camera application process, and realizes cross-process access of data in the camera service process through the social application process.
The following describes in detail the access control method provided in the embodiment of the present application, taking the electronic device 100 as an electronic device, where the application process a accesses the data in the service process C via the application process B.
It should be appreciated that in a different business scenario, application process a may access data in service process C directly, or application process a may access data in service process C via one or more processes (e.g., application process B and/or service process). Each communication node is identified in the call chain by taking a process as a unit, and the number of communication nodes included in the call chain is not limited in the embodiment of the application, and different communication nodes correspond to different processes.
Fig. 6 is a schematic flow chart of a rights control method according to an embodiment of the present application. As shown in fig. 6, the method includes the following steps.
S601, an application process A creates a call chain and generates call chain information, wherein the call chain information comprises information of a communication node A.
In some embodiments, an Application (APP) that is running in the system may correspond to an application process. An application process includes at least one thread, which is referred to as a main thread. Where multiple threads are included in a process, the multiple threads may execute traffic asynchronously. In other embodiments, an application may correspond to multiple application processes, with the same application process including at least one thread.
For example, as shown in fig. 6, an application program a running in the electronic device corresponds to an application process a that executes a service through a thread A1.
In some embodiments, in response to a user operation on application a, application a in the electronic device determines to invoke thread A1 to perform a service indicated by the current user operation, e.g., the service is accessing service process C, to invoke data in service process C. Thread A1 determines that thread A1 is the service initiator, then thread A1 may create a call chain and create a communication node a (nodeA) in the call chain before initiating the call.
For example, in response to a user clicking on a capture control in the social application, the electronic device determines that the user instructs the camera application to be opened to capture an image. Then the electronic device creates a call chain through the social application's process and creates a corresponding communication node in the call chain.
In some examples, thread A1 creates a nodeA in the kernel based on an identity of application process A, such as a token identifier (tokenIdA) of application process A, and an identity of thread A1, such as a thread controller (tidA 1) of thread A1.
It should be appreciated that in the embodiments provided herein, the content related to the call chain is saved primarily by the kernel, but is not limited thereto. In some examples, other software or hardware in the electronic device may also be used to save content related to the call chain.
Illustratively, as shown in Table 1 below, thread A1 may create call chain information (nodelist) in the kernel and set to nodeA as the starting node of the call chain. Then the call chain information includes the information of the communication node a. Optionally, in the call chain information, the information of the communication node a includes a call relationship corresponding to the nodeA, such as { nodeA, tokenIdA }.
TABLE 1
In some embodiments, process isolation exists between different application processes in the electronic device, and resources cannot be directly accessed to each other. Thus, communication of different application processes may be achieved by way of cross-process communication. And e.g. the application process realizes the inter-process communication in an IPC binder mode.
Illustratively, thread A1 maps the communication node that generated the current application process A in the IPC binder.
S602, the application process A sends call chain information to the application process B.
In some embodiments, the user may trigger a function of the application a to access the application B, and then the application B invokes a piece of hardware or software of the electronic device; the hardware and the service process, such as the service process C, can have a corresponding relation, and the software is the same. Correspondingly, according to business logic in the electronic device, in this scenario, a call chain may be established between the application a, the application B and the service process C. Then application a may launch application B and send call chain information to application B.
In some examples, application process a performs a service through thread A1, thread A1 initiates an IPC communication to application process B, and carries call chain information in the communication request.
It should be noted that different service scenarios correspond to different service logics, and the application process determines the communication node that needs to communicate according to the different service logics. Such as application process a may access service process C; alternatively, the application process a may access the service process C via the application process B, which will not be described in detail. It should be appreciated that the functions implemented by the two access manners described above may be the same or different.
S603, the application process B updates the call chain information according to the information of the communication node B.
In some embodiments, after receiving a communication request sent by the application process a, the application process B invokes the thread B1 to execute a corresponding service.
In some examples, thread B1 may obtain call chain information sent by thread A1, or thread B1 may query the call chain information from the kernel. Then, the thread B1 obtains information of the last communication node in the call chain, i.e. identity information of the caller, such as information of the communication node a. Furthermore, the thread B1 may create a communication node B (nodeB) corresponding to the application process B in the kernel according to the identity of the application process B, such as the token identifier (tokenIdB) of the application process B, and the identity of the thread B1, such as the thread controller (tidB 1) of the thread B1. Alternatively, thread B1 maps the communication node that generated the current application process B in the IPC binder.
Illustratively, as shown in Table 1 above, thread B1 updates the call chain information based on the information of communication node A and the information of communication node B. Optionally, in the updated call chain information, the call relationship corresponding to the nodeB is { nodeA, tokenIdA, nodeB, tokenIdB }, for example.
In some examples, as shown in table 1 above, the call relationship of the communication node includes an end-to-end correspondence between the current communication node and a communication node preceding the current communication node in the call chain. Then, in some embodiments, the application process queries the kernel for call chain information, and determines that the communication node corresponding to the current application process does not have information of a corresponding previous communication node. Then, the application process may set the current application process as the initiator, and create a new call chain, as in step S601 described above, the application process a creates a call chain.
In some embodiments, according to the business logic preconfigured in the electronic device, in the communication process, when the number of processes between the application process a and the service process C is multiple, the multiple processes may create a corresponding communication node according to the caller identity information of the previous communication node according to the method described in step S603, and generate a corresponding call relationship to update the call chain information. The specific process may refer to the details of step S603, and will not be repeated in this embodiment of the present application.
S604, the application process B sends updated call chain information to the service process C.
In some embodiments, after receiving the IPC communication request sent by the application process a, the application process B may start the service process C and send updated call chain information to the application process C.
For example, in response to a user clicking on a capture control in a social application, the electronic device determines that the user indicates that an image was captured by the camera. In this process, the social application process sends an IPC communication request to the camera application process, carrying call chain information in the request. Correspondingly, the camera application process determines that the camera service process needs to be accessed according to the IPC communication request; for example, the camera application process may invoke a functional interface provided by the camera service process. After the call chain information is updated, an IPC communication request can be sent to the camera service process, and the request carries the updated call chain information.
In other embodiments, in response to a user operation in application B, application B corresponding to application B determines to send an IPC communication request to service process C. Then, the application process B may update the acquired call chain information, and then carry the updated call chain information in the IPC communication request sent to the service process C.
In some examples, application process B performs a service through thread B1, thread B1 initiates an IPC communication to service process C, and carries updated call chain information in the communication request.
In some examples, the updated call chain information sent by application process B to service process C includes a call relationship corresponding to application process B.
S605, the service process C generates a complete call chain according to the information of the communication node C.
In some embodiments, after receiving the communication request sent by the application process B, the service process C invokes the thread C1 to execute the corresponding service.
In some examples, thread C1 may obtain updated call chain information sent by thread B1, or thread C1 may query the kernel for corresponding call chain information. Then thread C1 obtains information about the last communication node in the call chain, i.e. the identity information of the caller, e.g. the information of communication node B. Furthermore, the thread C1 may create a communication node C (nodeC) corresponding to the service process C in the kernel according to the identity of the service process C, such as the token identifier (tokenIdC) of the service process C, and the identity of the thread C1, such as the thread controller (tidC 1) of the thread C1. Optionally, thread C1 maps a communication node that generates the current service process C in the IPC binder.
For example, as shown in table 1 above, according to the service logic preconfigured in the electronic device, after receiving the communication request sent by the application process B, the service process C may determine that the communication node C corresponding to the service process C is the last communication node of the call chain corresponding to the current service. Then thread C1 generates complete call chain information from the information of communication node B and the information of communication node C. Optionally, in the complete call chain information, the call relationship corresponding to the nodeC is { nodeB, tokenIdB, nodeC, tokenIdC }, for example.
In other embodiments, in response to a user operating a determined service, the electronic device may initiate other services, and the electronic device determines that application process a accesses service process D via application process B and service process C in the newly initiated service. The call chain corresponding to the new service may include the communication node a, the communication node B, the communication node C, and the communication node D corresponding to the service process D, that is, the communication node C is no longer the last communication node, and the call chain including the communication node a, the communication node B, and the communication node C is further extended in the new service. That is, different user operations may trigger the same or different services, different services having different service logic, the implementation of different service logic requiring different call chains to be created. In step S605, the service process generates a complete call chain, which is used to represent the call chain corresponding to the current service, and does not limit the creation of the call chain.
S606, the service process C sends a permission verification request to the permission management service.
In some embodiments, after the service process C determines the complete call chain corresponding to the current service, each communication node in the call chain information may be recursively traced back, and it is determined that the traced back communication node is the communication node to be subjected to the permission verification.
In some examples, the service process C executes the service through the thread C1, the thread C1 obtains complete call chain information from the kernel, determines a communication node included in the call chain through a recursive backtracking manner, and sends a permission verification request to the permission management service to request the permission management service to verify the permission of the application process corresponding to the communication node.
For example, as shown in Table 1 above, thread C1 determines the communication node B (i.e., nodeB) based on the call relationship { nodeB, tokenidB, nodeC, tokenidC } corresponding to nodeC, and the communication node B corresponds to application process B. Thereafter, the thread C1 determines the communication node a (i.e., nodeA) from the call relations { nodeA, tokenIdA, nodeB, tokenIdB } corresponding to nodeB, and the communication node a corresponds to the application process a. Then, the thread C1 determines that the communication node A is the first communication node in the call chain and the application process A corresponding to the communication node is the first call according to the call relation { nodeA, tokenizing }. In this way, thread C1 may determine that the communication nodes in the call chain include communication node A, communication node B, and communication node C.
In some embodiments, the thread C1 determines, according to the service logic, that the authority of one or more communication nodes in the call chain needs to be checked, and obtains information of the one or more communication nodes. And then, the thread C1 generates a permission verification request according to the information of one or more communication nodes and the permission identification of the permission corresponding to the data to be accessed, and sends the permission verification request to the permission management service so as to verify whether the one or more communication nodes have the permission corresponding to the permission identification.
For example, the thread C1 determines, according to the service logic, that the current service security requirement is high, and needs to perform permission verification on all communication nodes in the call chain. Then thread C1 may generate a permission check request carrying information of communication node a, information of communication node B, information of communication node C, and permission identification. Thereafter, thread C1 sends the rights verification request to the rights management service.
For another example, the thread C1 determines, according to the service logic, that the current service needs to perform permission checking on the first caller in the call chain. Then thread C1 generates a permission check request carrying the information of communication node a and the permission identification. Thereafter, thread C1 sends the rights verification request to the rights management service.
For another example, the thread C1 determines, according to the service logic, that the current service needs to perform permission checking on a previous communication node of the communication node C corresponding to the thread C1 in the call chain. Then thread C1 generates a permission check request carrying the information of the communication node B and the permission identity. Thereafter, thread C1 sends the rights verification request to the rights management service.
S607, the authority management service performs authority verification on the communication node according to the authority verification request.
In some embodiments, after receiving the rights management request, the rights management service may determine, according to information carried therein, a communication node to be subjected to rights verification, and rights to be verified, and may perform rights verification on the communication node.
In some examples, the service process may be a system process in the electronic device, and the permission protection is performed on the system process to protect the data security of the electronic device and reduce the data access risk.
In some examples, the rights management service responds to the rights verification request, and determines whether the application process corresponding to the communication node has the rights to access the target data in the service process C according to the communication node information carried in the rights verification request. Such as camera data access rights, etc.
In some examples, different application processes may access the same or different data in the service process, the different data corresponding to different rights. Then the rights management service needs to check whether the application process has rights to access the target data in the service process.
It should be noted that, the process of verifying the authority of the application process to access the data in the service process by the authority management service may refer to the prior art, which is not specifically limited in the embodiment of the present application.
In some embodiments, in step S606 and step S607, thread C1 sends a permission check request to the permission management service, and may also carry the call chain identifier in the permission check request. After receiving the permission verification request, the permission management service searches corresponding call chain information in the kernel according to the call chain identification. And then, the authority management service determines each communication node included in the call chain information according to the call chain information, and performs authority verification on each communication node.
That is, after determining that the complete call chain corresponding to the current service is created, the service process C may directly send the call chain identifier to the rights management service, and the rights management service determines the communication nodes in the call chain and performs rights verification, without determining the communication nodes included in the call chain by the service process C.
And S608, the rights management service sends a rights verification response to the service process C.
In some embodiments, after the rights management service rights verification is completed, a rights verification response may be fed back to service process C. Correspondingly, the service process C receives the permission verification response sent by the permission management service.
S609, the service process C determines the target data.
In some embodiments, the service process C determines, according to the permission check response, a permission check result of the application process, for example, whether to allow the application process to perform data access, and further determines whether the call chain is a trusted call chain. In the case where the service process C determines that the application process is permitted to make data access, the callable chain is a trusted callable chain. Then, the service process C determines target data to be accessed by the application process.
S610, the service process C sends the target data according to the trusted call chain.
In some embodiments, after the service process C call chain is a trusted call chain, the target data may be sent according to the communication node relationship of the trusted call chain.
For example, the service process C transmits the target data to the application process B. And after receiving the target data, the application process B forwards the target data to the application process A.
S611, the application process A acquires target data.
In some embodiments, after receiving the target data forwarded by the application process B, the application process a realizes cross-process access to the data in the service process C.
In this way, in the process of inter-process communication, the process can combine the identity information of the process and the identity information of the caller to create a corresponding communication node, and automatically fill the call relationship corresponding to the newly created communication node in the call chain. In the process of authority verification, the authority verification of the process in the process of interprocess communication can be realized by recursion backtracking of the call chain, the trusted call chain is constructed, the security risk is reduced, and the privacy security of the user is protected.
The above-described trusted call chain construction process is described in detail below in connection with a specific example scenario.
Exemplary, as shown in interface 701 of FIG. 7A (a), the electronic device displays a social application (e.g., a WeChat application) In the process of detecting a user clicking on control 71, an interface 702 is displayed as shown in fig. 7A (b). Then, in response to a user clicking on the capture control 72 displayed on the interface 702, the electronic device determines that the camera service needs to be started through a social application process corresponding to the social application.
As shown in fig. 7B, in response to the user clicking the shooting control 72, the social application process may query the kernel for call chain information through the social application thread, determine that the social application thread is a call chain initiator, and the social application thread may create a new call chain, create a communication node corresponding to the social application process, and save call chain information of the call chain that is created first to the kernel. And then, the social application thread sends an IPC communication request to the camera application process in an IPC communication mode, and call chain information is carried in the IPC communication request.
And after receiving the IPC communication request, the camera application process creates a communication node corresponding to the camera application process through the camera application thread. And then the camera application thread generates a calling relation between communication nodes according to the information of the previous communication node (namely the communication node corresponding to the social application process) in the calling chain information so as to update the calling chain information, and stores the updated calling chain information to the kernel. And then, the camera application thread sends an IPC communication request to the camera service process, and the IPC communication request carries updated call chain information.
And after receiving the IPC communication request, the camera service process creates a communication node corresponding to the camera service process through the camera service thread. And then, the camera service thread generates a calling relation between communication nodes according to the information of the previous communication node (namely the communication node corresponding to the camera application process) in the calling chain information so as to update the calling chain information, and stores the updated calling chain information to the kernel.
And finally, the camera service thread determines that the current call chain is used for accessing data in the camera service process, and can determine that the call chain is completed, so that communication nodes included in the call chain can be determined in a recursion backtracking mode, and access rights of processes corresponding to the communication nodes are checked through the rights management service.
If the authority verification is passed, the camera service thread determines that the call chain is a trusted call chain. Then, the social application process in the electronic device may implement access to the data in the camera service process, and the electronic device may display the shooting interface 703 as shown in (c) of fig. 7A.
In some scenarios, as described above, multiple threads may be included in an application process, and the multiple threads may execute traffic asynchronously. If the process determines that a plurality of thread asynchronous execution services need to be invoked. Then, in the calling process, different threads in the same process can acquire the updated calling chain information of the previous thread, such as the calling relation of the process corresponding to the current thread. Therefore, in the calling process, the access risk caused by the fact that calling of a plurality of threads in a process or process replacement processing of the threads can not be inherited and transferred by calling relations among the processes is avoided.
Fig. 8 is a schematic flow chart of another authority control method according to an embodiment of the present application. As shown in fig. 8, the application process B calls the thread B1 and the thread B2 to process the current service, and after step S603, steps S801 to S803 are included.
It should be understood that the process corresponding to each communication node in the call chain may include one or more processing threads, and the processing method of each processing thread in each process for the call chain may refer to the following processing methods of thread B1 and thread B2 for the call chain, which are not described in detail in this embodiment of the present application.
S801, the thread B1 sends updated call chain information to the thread B2.
In some embodiments, thread B1 creates a communication node B and updates the call chain information in step S603 described above, and then sends the updated call chain information to thread B2. Correspondingly, the thread B2 receives updated call chain information sent by the thread B1.
In some examples, the inter-thread communication may include, for example, message queues, semaphores, mutex locks, and the like.
S802, the thread B2 determines that the updated call chain information comprises the information of the communication node B.
In some embodiments, thread B2 receives updated call chain information sent by thread B1, or thread B2 queries the corresponding call chain information from the kernel. Then thread B2 may determine that the call chain already includes information for the corresponding communication node B for application process B, such as call relationships including communication node B.
Illustratively, as shown in Table 1 above, thread B2 queries in the kernel, determines that a nodeB has been included in the call chain, and that the corresponding call relationship for the nodeB.
S803, the thread B2 forwards the updated call chain information to the service process C.
In some embodiments, thread B2 determines that the call chain already includes information for communication node B, and may forward the call chain information updated by thread B1 directly to service process C. Such as thread B2 forwarding the information of communication node B created by thread B1 directly to the serving process C.
In this way, in the calling process, when a plurality of threads are called in a process or the process changes a processing thread, each thread in the same process can inherit the information of the communication node corresponding to the created process, so that the access risk is further reduced.
In some scenarios, the thread execution service has a corresponding life cycle, and after the life cycle is finished, if the thread execution completes the current service, the corresponding communication node in the call chain can be destroyed.
In some examples, after all communication nodes in the call chain are destroyed, the electronic device may automatically destroy the corresponding call chain.
In some examples, the lifecycle of each thread may be monitored in the electronic device by a preset module. The management of the thread lifecycle may refer to the prior art, and the embodiments of the present application do not specifically limit this.
For example, after the thread C1 determines the target data, the thread C1 sends the target data to the thread B1 according to the service logic corresponding to the call chain as described in step S609. After that, the thread C1 determines that the service is executed, and the lifecycle of the thread C1 is ended, so that the communication node C corresponding to the service process C in the call chain can be destroyed. Optionally, destroying the communication node includes deleting all the cached data corresponding to the communication node, for example. If the electronic device determines that the life cycle of the thread C1 is over during the current service execution process, as shown in the above table 1, the thread C1 may delete the nodeC stored in the kernel and the call relationship corresponding to the nodeC, such as { nodeB, tokenIdB, nodeC, tokenIdC }.
Also illustratively, as described in the above step S610, after the thread B1 forwards the received target data to the thread A1, it is determined that the service is executed, and the lifecycle of the thread B1 is ended, and the communication node B corresponding to the application process B in the call chain may be destroyed. If the electronic device determines that the life cycle of the thread B1 is over during the current service execution process, as shown in the above table 1, the thread B1 may delete the node B stored in the kernel and the call relationship corresponding to the node B, such as { node a, token id a, node B, token id B }.
Also exemplary, as described in step S611, after the thread A1 obtains the target data, it is determined that the service is executed, and the life cycle of the thread A1 is ended, and the communication node a corresponding to the application process a in the call chain may be destroyed. If the electronic device determines that the life cycle of the thread A1 is over during the current service execution process, as shown in the above table 1, the thread A1 may delete the store nodeA in the kernel and the call relationship corresponding to the nodeA, such as { nodeA, tokenIdA }. Then, the electronic device can determine that all communication nodes in the call chain corresponding to the current service are destroyed, and can destroy the call chain.
Further exemplary, as described in the above steps S801 and S802, the application process B calls the thread B1 and the thread B2 to execute the service. In step S610, after the thread B2 forwards the received target data to the thread B1, it is determined that the service is completed, and the lifecycle of the thread B2 is ended. However, thread B2 determines that the communication node B corresponding to application process B in the call chain corresponds to thread B1 and thread B2, i.e., the communication node also corresponds to the other threads. Then thread B2 may not destroy communication node B first.
After receiving the target data sent by the thread B2, the thread B1 forwards the target data to the thread A1, determines that the service execution is finished, and the life cycle of the thread B1 is ended. And, the thread B1 determines that the communication node B corresponding to the application process B in the call chain corresponds to the thread B1 and the thread B2, wherein the lifecycle of the thread B1 and the thread B2 is finished. Then thread B1 may destroy the communication node B in the call chain saved in the kernel.
Thus, the electronic equipment responds to the service execution condition to destroy the data which is no longer needed in the call chain stored in the kernel, and the occupation of the kernel is reduced.
Fig. 9 is a schematic flow chart of another authority control method according to an embodiment of the present application. As shown in fig. 9, the method includes the following steps.
S901, in response to an operation of a user on a first application, the electronic device creates or queries a call chain, where the call chain includes n communication nodes, where each of the n communication nodes has first information.
The first information includes a call relationship between each of n communication nodes and a previous communication node of each communication node, where n is an integer greater than or equal to 2.
In some embodiments, after detecting the operation of the user on the first application, the electronic device may query whether a call chain including a communication node corresponding to the first application exists.
In some embodiments, when a call chain is present, the electronic device may directly call the call chain.
In other embodiments, when there is no call chain, the electronic device may create a call chain that includes the communication node to which the first application corresponds.
Optionally, after detecting the operation of the user on the first application, the electronic device may directly create a call chain including the communication node corresponding to the first application.
In some embodiments, the n communication nodes include a first communication node, a second communication node, and a third communication node, where the first communication node corresponds to a first application, the second communication node corresponds to m applications or service modules that the first application accesses the first service module, and the third communication node corresponds to the first service module, and m is 0 or an integer greater than 0.
For example, the application program a is a first application, and the application program a determines that there is no call chain including the application process a corresponding to the application program a in response to an operation of a user. Then, a call chain may be created by the thread A1 in the application process a, and call chain information, i.e., first information, is determined. The application process a corresponds to a first communication node.
Thereafter, as described in the above steps S601-S605, if the application process a determines that the user operates a function for triggering the application program a to access the application program B, the thread A1 may send the call chain information to the application process B corresponding to the application program B. After receiving the call chain information, the application process B may update the call chain information, that is, update the first information, according to the call relationship by the thread B1. The application process B corresponds to the second communication node, and the updated call chain information comprises a call relation between the application process A and the application process B.
After that, the thread B1 determines that the call chain is used to trigger access to the service process C, i.e. the first service module, and then the updated call chain information may be sent to the service process C. After receiving the updated call chain information, the service process C may update the call chain information, that is, update the first information, according to the call relationship by using the thread C1. The application process C corresponds to the third communication node, and the updated call chain information comprises a call relation between the application process B and the service process C.
The call chain created by the application program a includes a first communication node corresponding to the application process a of the application program a, a second communication node corresponding to the application process B of the application program B, and a third communication node corresponding to the service process C of the first service module, that is, n is equal to 3, and m is equal to 1. The call chain information, i.e., the first information, includes a call relationship between the application process a and the application process B, and a call relationship between the application process B and the service process C.
Also exemplary, the application program D is a first application, and in response to an operation by a user, the application program D creates a call chain through a thread D1 in the application process D and determines call chain information, i.e., first information. The application process D corresponds to the first communication node. The application process D determines that the user operates a function for triggering the application program D to access a service process E, which corresponds to the first service module. Then thread D1 in application D may send call chain information to service process E. After receiving the call chain information, the service process E can update the call chain information, that is, update the first information, according to the call relationship by the thread E1. The service process E corresponds to the third communication node, and the updated call chain information comprises a call relation between the application process D and the service process E.
The call chain created by the application program D includes the first communication node corresponding to the application process D, and the third communication node corresponding to the service process E of the first service module, that is, n is equal to 2, and m is equal to 0. The call chain information, i.e., the first information, includes a call relationship between the application process D and the service process E.
In some embodiments, after the electronic device creates the call chain, the first information of the n communication nodes of the created call chain may also be saved in the kernel.
Illustratively, the communication node may save the call chain information to the kernel after updating the call chain information. Then the other communication nodes may then query the kernel for relevant call chain information.
In some embodiments, before the electronic device creates the call chain, the electronic device may first determine that the first information of the first communication node corresponding to the first application is not included in the kernel. Thereafter, the electronic device recreates the call chain.
Illustratively, the call relationship of the communication node includes an end-to-end correspondence between the current communication node and a communication node preceding the current communication node in the call chain. Then, in some embodiments, the application process queries the kernel for call chain information, and determines that the communication node corresponding to the current application process does not have information of a corresponding previous communication node. Then the application process may set the current application process as the initiator, creating a new call chain. In the new call chain, the first information of the communication node corresponding to the application process is used for indicating that the application process is a master.
In some embodiments, each of the n communication nodes corresponds to one or more threads, and the plurality of threads of the same communication node correspond to the same first information.
For example, the processes corresponding to the communication nodes in the call chain may include one or more threads, and the multiple threads may asynchronously execute the service. After the threads in the process acquire the call chain information sent by other processes and update the call chain information, the call chain information can be forwarded to different threads in the same process until the call chain information is sent to other processes.
In this way, in the calling process, when a plurality of threads are called in a process or the process changes a processing thread, each thread in the same process can inherit the information of the communication node corresponding to the created process, so that the access risk is further reduced.
And S902, the electronic equipment verifies whether part or all of the n communication nodes have the authority to access the first service module according to the first information.
In some embodiments, a first service module in the electronic device determines, from the first information, n communication nodes included in the call chain. And then, a first service module in the electronic equipment determines i communication nodes to be subjected to authority verification from n communication nodes, wherein i is a positive integer less than or equal to n. And then, the first service module in the electronic equipment checks whether the i communication nodes have the authority for accessing the first service module through the authority management service.
In some examples, the first service module in the electronic device determines n communication nodes included in the call chain by way of recursive backtracking according to the call relationship in the first information.
Illustratively, the first service module determines that the authority of one or more communication nodes in the call chain needs to be checked according to the service logic, and obtains the information of the one or more communication nodes. And then, the first service module generates a permission verification request according to the information of one or more communication nodes and the permission identification of the permission corresponding to the data to be accessed, and sends the permission verification request to the permission management service so as to verify whether the one or more communication nodes have the permission corresponding to the permission identification.
In some embodiments, the i communication nodes requiring permission checking include a first communication node corresponding to the first application and/or a previous communication node of a third communication node corresponding to the first service module.
The first service module determines that the current service has high security requirements according to service logic, and needs to perform authority verification on all communication nodes in the call chain. The first service module may then generate a rights verification request carrying information of the n communication nodes and the rights identification. The first service module then sends the rights verification request to the rights management service.
S903, in the case that the verification is passed, the electronic device allows the first application to access the first service module.
In some embodiments, a first service module in the electronic device may obtain a rights verification response sent by the rights management service, and may determine a rights verification result according to the rights verification response.
For example, the first service module determines whether the first application is allowed to access the first service module, and further determines whether the call chain is a trusted call chain. In the event that the first service module determines that the application process is allowed to access the first service module, the callable chain is a trusted callable chain. And then, the first service module determines target data to be accessed by the first application, so that the first application accesses the target data.
In this way, in the process of inter-process communication, the process can combine the identity information of the process and the identity information of the caller to create a corresponding communication node, and fill the call relationship corresponding to the newly created communication node in the call chain. In the process of authority verification, the authority verification of the process in the process of interprocess communication can be realized by recursion backtracking of the call chain, the trusted call chain is constructed, the security risk is reduced, and the privacy security of the user is protected.
In some embodiments, the electronic device determines that a lifecycle of a target communication node of the n communication nodes ends, and destroys the first information corresponding to the target communication node in the call chain. The life cycle end of the target communication node comprises the life cycle end of all threads corresponding to the target communication node.
In some embodiments, after the electronic device creates the call chain, the electronic device determines that a lifecycle of the first communication node corresponding to the first application ends, destroying the call chain. That is, after the lifecycle of the communication node corresponding to the initiator is finished, the corresponding call chain can be destroyed.
Thus, the electronic equipment responds to the service execution condition to destroy the data which is no longer needed in the call chain stored in the kernel, and the occupation of the kernel is reduced.
The access control method provided in the embodiment of the present application is described in detail above in connection with fig. 6 to 9. The electronic device provided in the embodiment of the present application is described in detail below with reference to fig. 10.
In one possible design, fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device 1000 may include: a transceiver unit 1001 and a processing unit 1002. The electronic device 1000 may be used to implement the functionality of the electronic device referred to in the method embodiments described above.
Alternatively, the transceiver unit 1001 is configured to support the electronic device 1000 to execute S901 in fig. 9.
Optionally, a processing unit 1002, configured to support the electronic device 1000 to execute S601-S611 in fig. 6; and/or for supporting the electronic device 1000 to perform S801-S803 in fig. 8; and/or for supporting the electronic device 1000 to perform S902 and S903 in fig. 9.
The transceiver unit may include a receiving unit and a transmitting unit, may be implemented by a transceiver or a transceiver related circuit component, and may be a transceiver or a transceiver module. The operations and/or functions of each unit in the electronic device 1000 may be referred to as a functional description of a corresponding functional unit for brevity, so that corresponding flows of the access control method described in the above method embodiments are implemented, and all relevant contents of each step related to the above method embodiments are not described herein.
Optionally, the electronic device 1000 shown in fig. 10 may further include a storage unit (not shown in fig. 10) in which a program or instructions are stored. When the transceiver unit 1001 and the processing unit 1002 execute the program or instructions, the electronic device 1000 shown in fig. 10 is enabled to execute the access control method described in the above-described method embodiment.
The technical effects of the electronic device 1000 shown in fig. 10 may refer to the technical effects of the access control method described in the above method embodiment, and will not be described herein.
In addition to the form of the electronic device 1000, the technical solution provided in the present application may also be a functional unit or a chip in the electronic device, or a device used in cooperation with the electronic device.
The embodiment of the application also provides a chip system, which comprises: a processor coupled to a memory for storing programs or instructions which, when executed by the processor, cause the system-on-a-chip to implement the method of any of the method embodiments described above.
Alternatively, the processor in the system-on-chip may be one or more. The processor may be implemented in hardware or in software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general purpose processor, implemented by reading software code stored in a memory.
Alternatively, the memory in the system-on-chip may be one or more. The memory may be integrated with the processor or may be separate from the processor, and embodiments of the present application are not limited. For example, the memory may be a non-transitory processor, such as a ROM, which may be integrated on the same chip as the processor, or may be separately disposed on different chips, and the type of memory and the manner of disposing the memory and the processor in the embodiments of the present application are not specifically limited.
Illustratively, the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (AP device plication specific integrated circuit, ASIC), a system on chip (SoC), a central processor (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), a microcontroller (micro controller unit, MCU), a programmable controller (programmable logic device, PLD) or other integrated chip.
It should be understood that the steps in the above-described method embodiments may be accomplished by integrated logic circuitry in hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor or in a combination of hardware and software modules in a processor.
The present application also provides a computer-readable storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the above-described related steps to implement the access control method in the above-described embodiments.
The present application also provides a computer program product which, when run on a computer, causes the computer to perform the above-mentioned related steps to implement the access control method in the above-mentioned embodiments.
In addition, the embodiment of the application also provides a device. The apparatus may be a component or module in particular, and may comprise one or more processors and memory coupled. Wherein the memory is for storing a computer program. The computer program, when executed by one or more processors, causes an apparatus to perform the access control method in the method embodiments described above.
Wherein an apparatus, a computer-readable storage medium, a computer program product, or a chip provided by embodiments of the present application are each configured to perform the corresponding method provided above. Therefore, the advantages achieved by the method can be referred to as the advantages in the corresponding method provided above, and will not be described herein.
The steps of a method or algorithm described in connection with the disclosure of the embodiments disclosed herein may be embodied in hardware, or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access memory (random access memory, RAM), flash memory, read Only Memory (ROM), erasable programmable read only memory (erasable programmable ROM), electrically Erasable Programmable Read Only Memory (EEPROM), registers, hard disk, a removable disk, a compact disc read only memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (AP device plication specific integrated circuit, ASIC).
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that the foregoing functional block divisions are merely illustrative for convenience and brevity of description. In practical application, the above functions can be allocated by different functional modules according to the need; i.e. the internal structure of the device is divided into different functional modules to perform all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
In the several embodiments provided in this application, it should be understood that the disclosed methods may be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules or units is only one logic function division, and other division modes can be adopted when the modules or units are actually implemented; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, module or unit indirect coupling or communication connection, which may be electrical, mechanical or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Computer readable storage media include, but are not limited to, any of the following: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. An access control method, the method comprising:
responding to the operation of a user on a first application, creating or inquiring a call chain by the electronic equipment, wherein the call chain comprises n communication nodes; the n communication nodes all have first information, the first information comprises a calling relation between each communication node in the n communication nodes and a previous communication node of each communication node, and n is an integer greater than or equal to 2;
The electronic equipment verifies whether part or all of the n communication nodes have the authority to access the first service module according to the first information;
in the event that the verification is passed, the electronic device allows the first application to access the first service module.
2. The method according to claim 1, wherein the n communication nodes include a first communication node, a second communication node and a third communication node, the first communication node corresponds to the first application, the second communication node corresponds to m applications or service modules that the first application accesses the first service module, and the third communication node corresponds to the first service module, and m is 0 or an integer greater than 0.
3. The method of claim 1 or 2, wherein after the electronic device creates the call chain, the method further comprises:
the electronic device stores first information of the created n communication nodes of the call chain.
4. The method of claim 2, wherein prior to the electronic device creating the call chain, the method further comprises:
The electronic device determines that the electronic device does not include first information of a first communication node corresponding to the first application.
5. The method of any of claims 1-4, wherein each of the n communication nodes corresponds to one or more threads, and wherein multiple threads of a same communication node correspond to a same first information.
6. The method according to any of claims 1-5, wherein the electronic device verifying, based on the first information, whether some or all of the n communication nodes have permission to access the first service module comprises:
the first service module determines n communication nodes included in the call chain according to the first information;
the first service module determines i communication nodes to be subjected to authority verification in the n communication nodes, wherein i is a positive integer less than or equal to n;
and the first service module verifies whether the i communication nodes have the authority to access the first service module through the authority management service.
7. The method of claim 6, wherein the i communication nodes include a first communication node corresponding to the first application, and/or a previous communication node of a third communication node corresponding to the first service module.
8. The method according to any one of claims 1-7, further comprising:
the electronic equipment determines that the life cycle of a target communication node in the n communication nodes is ended, and destroys the first information corresponding to the target communication node in the call chain.
9. The method of claim 8, wherein after the electronic device creates a call chain, the method further comprises:
and the electronic equipment determines that the life cycle of the first communication node corresponding to the first application is ended, and destroys the call chain.
10. The method according to claim 8 or 9, wherein the end of the lifecycle of the target communication node comprises an end of the lifecycle of all threads corresponding to the target communication node.
11. An electronic device, comprising: a processor and a memory coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the method of any of claims 1-10.
12. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program which, when run on an electronic device, causes the electronic device to perform the method according to any one of claims 1-10.
13. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the method according to any of claims 1-10.
CN202211146476.7A 2022-09-20 2022-09-20 Access control method and electronic equipment Pending CN117786706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211146476.7A CN117786706A (en) 2022-09-20 2022-09-20 Access control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211146476.7A CN117786706A (en) 2022-09-20 2022-09-20 Access control method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117786706A true CN117786706A (en) 2024-03-29

Family

ID=90393297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211146476.7A Pending CN117786706A (en) 2022-09-20 2022-09-20 Access control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117786706A (en)

Similar Documents

Publication Publication Date Title
US11947974B2 (en) Application start method and electronic device
CN111191213B (en) Method for deleting security service and electronic equipment
CN111859418B (en) Atomic capability calling method and terminal equipment
CN113408016B (en) Method and device for storing ciphertext
CN114968384B (en) Function calling method and device
CN112738143A (en) Account number binding method, device and system
CN114553814A (en) Method and device for processing push message
CN115499897B (en) WiFi network access method and related device
CN114862398A (en) Distributed safety equipment-based risk control method and related device
CN114546969A (en) File sharing method and device and electronic equipment
CN113468606A (en) Application program access method and electronic equipment
CN117544717A (en) Risk identification method and electronic equipment
CN117786706A (en) Access control method and electronic equipment
CN117425227A (en) Method and device for establishing session based on WiFi direct connection
CN115701018A (en) Method for safely calling service, method and device for safely registering service
CN115002939B (en) Method and device for joining WiFi group
CN117354884B (en) APN switching method and related equipment
CN116056176B (en) APN switching method and related equipment
CN118227222A (en) Application management method, server, electronic equipment and system
CN117241263A (en) Message communication method and device
CN116661987A (en) Memory application method and electronic equipment
CN115994051A (en) Picture backup system, method and equipment
CN117632534A (en) Inter-process communication method and electronic equipment
CN116846853A (en) Information processing method and electronic equipment
CN116933219A (en) Application program authority management method, system and related device

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