Permission data processing method and device and electronic equipment

By pre-generating permission data during the application compilation stage, the time increase caused by multiple permission applications in the application loading stage is solved, faster application loading and system startup are achieved, and the system application experience is improved.

CN119670134APending Publication Date: 2025-03-21ZEBRED NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311229085.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, applications need to apply for multiple permissions to other applications during the loading stage, resulting in an increase in the application loading time and system startup time, which reduces the system's application experience.

Method used

During the application compilation stage, permission application information and permission authorization information are pre-determined, and resource access is achieved through the generated permission data when the application is run, avoiding the dynamic generation of permission data during the application loading process.

Benefits of technology

By pre-generating permission data during the application compilation stage, the application loading and system startup time is reduced, the application loading and system startup performance is optimized, and the system application experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670134A_ABST
    Figure CN119670134A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a permission data processing method and device and electronic device.The method comprises the steps that in the application compiling stage, permission application information of an application is determined, the permission application information comprises to-be-applied permission fields and application identifiers corresponding to the to-be-applied permission fields, and the application identifiers correspond to the to-be-applied permission fields; determining permission authorization information corresponding to each application identifier, matching with the permission authorization information according to a to-be-applied permission field in the permission application information and the application identifier corresponding to each to-be-applied permission field, if matching succeeds, generating permission data corresponding to the successfully-matched to-be-applied permission field, and when the application runs, generating permission data corresponding to the to-be-applied permission field; and realizing access of the resource data through the permission data. According to the scheme, the application loading and system starting time is shortened, and the application loading and system starting performance is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing technology, and in particular, to a permission data processing method, device and electronic device. Background Art

[0002] With the development of network technology, the application of operating systems is becoming more and more common, and the security requirements for applications related to operating systems are becoming higher and higher.

[0003] In the prior art, during the implementation process of an application, it may require scheduling permissions for resources such as system resources, files, and network ports, and some permissions may need to be applied for from other applications.

[0004] However, when an application applies for permissions from other applications, it may involve applying for multiple permissions, and all of them need to be applied for during the application loading phase, which increases the application loading time, further increases the system startup time, and reduces the system application experience. Summary of the invention

[0005] Embodiments of the present application provide a permission data processing method, device, and electronic device to reduce application loading time.

[0006] In a first aspect, an embodiment of the present application provides a method for processing permission data, including:

[0007] In the application compilation stage, determining permission application information of the application, wherein the permission application information includes permission fields to be applied for and application identifiers corresponding to each permission field to be applied for;

[0008] Determine the permission authorization information corresponding to each of the application identifiers;

[0009] Matching the permission authorization information according to the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for;

[0010] If the match is successful, permission data corresponding to the successfully matched permission field to be applied for is generated, and when the application is running, the resource data is accessed through the permission data.

[0011] Optionally, the matching the permission authorization information with the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for, includes:

[0012] For each permission field to be applied for, if the application identifier corresponding to the permission field to be applied for matches the application to which the permission authorization information belongs, and the application identifier contained in the permission authorization information matches the application to which the permission field to be applied for belongs, then obtaining the authorization permission field contained in the permission authorization information;

[0013] The permission field to be applied for is matched with the authorized permission field.

[0014] Optionally, matching the permission field to be applied for with the authorized permission field includes:

[0015] Matching the resource information field in the permission to be applied field with the resource information field in the authorized permission field;

[0016] The resource permission field in the permission field to be applied for is matched with the resource permission field in the authorized permission field.

[0017] Optionally, if the match is successful, permission data corresponding to the permission field to be applied for that is successfully matched is generated, and when the application is running, resource data is accessed through the permission data, including:

[0018] If the permission field to be applied for is the same as the authorized permission field, the match is successful, and permission data corresponding to the successfully matched permission field to be applied for is generated;

[0019] The permission data is stored in a preset file of the application, and when the application is running, the resource data is accessed through the permission data.

[0020] Optionally, the determining the permission application information of the application includes:

[0021] Obtaining first permission configuration information of the application;

[0022] The first permission configuration information is parsed to determine at least one permission application information, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

[0023] Optionally, the determining the permission authorization information corresponding to each application identifier includes:

[0024] Obtain second permission configuration information corresponding to each application identifier;

[0025] Each of the second permission configuration information is parsed to determine permission authorization information.

[0026] In a second aspect, an embodiment of the present application provides a rights data processing device, including:

[0027] A determination module, used to determine permission application information of the application during the application compilation phase, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for;

[0028] The determination module is further used to determine the permission authorization information corresponding to each application identifier;

[0029] A processing module, used for matching the permission authorization information with the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for;

[0030] The processing module is further configured to generate permission data corresponding to the successfully matched permission field to be applied for if the match is successful, and to access the resource data through the permission data when the application is running.

[0031] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0032] The memory stores computer-executable instructions;

[0033] The processor executes the computer-executable instructions stored in the memory to implement the permission data processing method described in the first aspect and various possible designs of the first aspect.

[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the permission data processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the permission data processing method described in the first aspect and various possible designs of the first aspect.

[0036] The embodiments of the present application provide a permission data processing method, device and electronic device. After adopting the above scheme, during the application compilation stage, permission application information including permission fields to be applied for and application identifiers corresponding to each permission field to be applied for can be determined, and then permission authorization information corresponding to each application identifier can be determined. The permission fields to be applied for in the permission application information and the application identifiers corresponding to each permission field to be applied for can be matched with the permission authorization information. If the match is successful, permission data corresponding to the successfully matched permission fields to be applied for can be generated, and when the application is running, resource data can be accessed through the permission data. By pre-generating permission data during the application compilation stage, there is no need to dynamically generate permission data during the application loading process, thereby achieving the effect of directly accessing permission data during the application loading process, reducing the time for application loading and system startup, optimizing application loading and system startup performance, and improving the application experience of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 A schematic diagram of the architecture of an application system for the permission data processing method provided in an embodiment of the present application;

[0039] Figure 2 A flowchart of a method for processing permissions data provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the principle of the permission data processing method provided in the embodiment of the present application;

[0041] Figure 4 A schematic diagram of the application of the permission configuration information provided in the embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of a permission data processing device provided in an embodiment of the present application;

[0043] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can also include other sequential instances in addition to those illustrated or described. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] In the prior art, during the implementation process, an application may require scheduling permissions for system resources, files, network ports and other resources, and some permissions may need to be applied for from other applications. In order to improve the security of resource scheduling, it may be necessary to perform permission control on resource scheduling. For example, the protection of system resources, files, network ports and other resources can be achieved through the Capability security access control system. However, when an application applies for permissions from other applications, it may involve the application of multiple permissions, and all of them need to be applied for during the application loading phase, that is, before accessing the capability permission data, the application permissions need to be matched and authorized to generate permission data. This operation is relatively time-consuming, especially when the application applies for more permissions, it needs to access and match different application permission configuration files. If the software is complex, it may need to match and authorize dozens or hundreds of permission information, which seriously affects the application loading time. If more applications need to be loaded during system startup or applications with too many permission entries need to be loaded, the system startup time will be seriously affected. Generally, manufacturers will have strict requirements on the system startup time, thereby reducing the application experience of the system.

[0047] Based on the above technical problems, the present application pre-generates permission data during the application compilation phase, eliminating the need to dynamically generate permission data during the application loading process, thereby achieving the effect of directly accessing permission data during the application loading process, thereby achieving the technical effect of reducing the time of application loading and system startup, and optimizing application loading and system startup performance, thereby improving the application experience of the system.

[0048] Figure 1 A schematic diagram of the architecture of an application system for the permission data processing method provided in an embodiment of the present application, such as Figure 1As shown, in this embodiment, the system may include: an operating system 101, an application 102 (also referred to as a first application 102) and other applications 103 (also referred to as a second application 103). During the compilation phase, the first application 102 may first determine the permission application information of the first application 102, which may include one or more permission fields to be applied for, and an application identifier corresponding to each permission field to be applied for, and then the permission authorization information in the second application 103 corresponding to each application identifier may be determined. Subsequently, matching processing may be performed based on the permission application information of the first application 102 and the permission authorization information in the second application 103, and after a successful match, permission data corresponding to the successfully matched permission field to be applied is generated. Subsequently, when the application is running, permission data may be used to access resource data.

[0049] There may be one or more second applications 103 , and different permission fields to be applied for may be applied for from different second applications 103 , which may be customized according to actual application scenarios.

[0050] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0051] Figure 2 This is a flow chart of a method for processing permission data provided in an embodiment of the present application. The method of this embodiment can be executed by an operating system. Figure 2 As shown, the method of this embodiment may include:

[0052] S201: In the application compilation stage, the permission application information of the application is determined, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

[0053] In this embodiment, different applications can implement different functions, and the source program of the application can be described by a high-level language. In addition, after determining the source program of the application, the application can be compiled to obtain an executable program corresponding to the application, and the corresponding application can be implemented according to the executable program. Optionally, in order to improve the implementation efficiency of the application, the permission application information of the application can be determined first during the application compilation stage, and then the corresponding permission can be obtained according to the permission application information.

[0054] In addition, the permission application information of the application may include permission fields to be applied for and application identifiers corresponding to each permission field to be applied for. The permission fields to be applied for may indicate the permission information that the application needs to apply for from other applications, and the application identifiers corresponding to the permission fields to be applied for indicate the applications that can authorize the permission information corresponding to the permission fields to be applied for. Different permission fields to be applied for may correspond to different applications, and therefore, different permission fields to be applied for may correspond to different application identifiers.

[0055] S202: Determine the permission authorization information corresponding to each application identifier.

[0056] In this embodiment, after obtaining the application identifier corresponding to the permission field to be applied for, the application corresponding to each application identifier can be determined, and then the permission authorization information corresponding to each application identifier can be further determined according to the application corresponding to the application identifier.

[0057] In addition, different permission fields to be applied for may correspond to different application identifiers, so it may be necessary to determine multiple permission authorization information from applications corresponding to multiple application identifiers. Optionally, multiple permission authorization information may be determined from applications corresponding to multiple application identifiers at one time, or the permission authorization information in the corresponding application may be determined according to each application identifier in turn.

[0058] In addition, the permission authorization information of an application may include multiple pieces of information to be authorized that match the permission field to be applied for, and the multiple pieces of information to be authorized may correspond to different applications.

[0059] S203: Matching the permission authorization information according to the permission fields to be applied for in the permission application information and the application identifier corresponding to each permission field to be applied for.

[0060] In this embodiment, after obtaining one or more permission fields to be applied for in the permission application information, and the application identifier corresponding to each permission field to be applied for, the permission authorization information can be matched according to the permission fields to be applied for in the permission application information, and the application identifier corresponding to each permission field to be applied for to obtain a matching result.

[0061] Optionally, the matching results generally include two types, one is that the permission fields to be applied for in the permission application information, and the application identifier corresponding to each permission field to be applied for successfully match the permission authorization information; the other is that the permission fields to be applied for in the permission application information, and the application identifier corresponding to each permission field to be applied for fail to match the permission authorization information, and then subsequent operations can be performed according to the matching results.

[0062] S204: If the match is successful, permission data corresponding to the successfully matched permission field to be applied for is generated, and when the application is running, the resource data is accessed through the permission data.

[0063] In this embodiment, if the match is successful, it indicates that the application can obtain permission information from the application corresponding to the application identifier, and then can generate permission data based on the obtained permission information. When the application is running later, the resource data can be accessed directly through the permission data, without the need to obtain permissions from other applications in real time when the application is running, thereby improving the efficiency of obtaining permissions.

[0064] After adopting the above scheme, the permission application information including the permission fields to be applied for and the application identifier corresponding to each permission field to be applied for can be determined in the application compilation stage, and then the permission authorization information corresponding to each application identifier can be determined. The permission fields to be applied for in the permission application information and the application identifier corresponding to each permission field to be applied for can be matched with the permission authorization information. If the match is successful, the permission data corresponding to the successfully matched permission fields to be applied for can be generated, and the access to resource data can be achieved through the permission data when the application is running. By pre-generating permission data in the application compilation stage, there is no need to dynamically generate permission data during the application loading process, thereby achieving the effect of directly accessing permission data during the application loading process, reducing the time of application loading and system startup, optimizing application loading and system startup performance, and improving the application experience of the system.

[0065] based on Figure 2 The present specification also provides some specific implementation plans of the method, which are described below.

[0066] In addition, in another embodiment, the matching the permission authorization information according to the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for may include:

[0067] For each permission field to be applied for, if the application identifier corresponding to the permission field to be applied for matches the application to which the permission authorization information belongs, and the application identifier contained in the permission authorization information matches the application to which the permission field to be applied belongs, then the authorization permission field contained in the permission authorization information is obtained.

[0068] The permission field to be applied for is matched with the authorized permission field.

[0069] In this embodiment, there may be one or more permission fields to be applied for. For each permission field to be applied for, when matching the permission fields to be applied for in the permission application information and the application identifier corresponding to each permission field to be applied for with the permission authorization information, if the application identifier corresponding to the permission field to be applied for matches the application to which the permission authorization information belongs, and the application identifier contained in the permission authorization information matches the application to which the permission field to be applied belongs, then the authorized permission field contained in the permission authorization information can be obtained, and then the permission field to be applied for can be matched with the authorized permission field.

[0070] Furthermore, matching the permission field to be applied for with the authorized permission field may specifically include:

[0071] The resource information field in the permission to be applied field is matched with the resource information field in the authorized permission field.

[0072] The resource permission field in the permission field to be applied for is matched with the resource permission field in the authorized permission field.

[0073] Specifically, the resource information field may indicate detailed information of the resource, and the resource information field may be a file name (e.g., abc.txt) field, a process field, or a service field, etc. The resource permission field may indicate file permissions. Exemplarily, the resource permission field may be r, or rwx, where r is read and w is write. The resource permissions may be file permissions (e.g., rw), process permissions, or service permissions, etc.

[0074] In addition, if the match is successful, permission data corresponding to the permission field to be applied for that matches successfully is generated, and when the application is running, the resource data is accessed through the permission data, which may specifically include:

[0075] If the permission field to be applied for is the same as the authorized permission field, the match is successful, and permission data corresponding to the successfully matched permission field to be applied for is generated.

[0076] The permission data is stored in a preset file of the application, and when the application is running, the resource data is accessed through the permission data.

[0077] Specifically, if the permission field to be applied for is the same as the authorization field, it indicates that the permission field to be applied for matches the authorization field successfully, and permission data corresponding to the successfully matched permission field to be applied for can be generated. The permission data can then be stored in a preset file of the application. Exemplarily, the preset file can be an elf file.

[0078] Optionally, the permission configuration file (cap_example.crp) of the application (cap_example) includes permission application information. The permission application information may include permission fields to be applied for and application identifiers corresponding to each permission field to be applied for. The permission fields to be applied for describe the resource permissions that need to be used. The resource permissions may be {permission owner name pm, description file resource information, permission resource permissions}. The resource permission owner application (pm) describes the permission authorization information in the permission configuration file (pm.crp). The permission authorization information may describe the same resource information, except for the permission applicant name, such as {permission applicant name pm1, description file resource information, permission resource permissions}. The permission matching authorization is completed by matching the same information in the permission application field and the permission granting field to generate corresponding permission data, such as capability data.

[0079] For example, Figure 3 A schematic diagram of the principle of the permission data processing method provided in the embodiment of the present application is as follows: Figure 3As shown, in the application compilation stage, the permission configuration file of the current application can be parsed (for example, crp_parser can be used for parsing), the matching authorization of permissions can be completed, and the generation of capability data can be realized. In this embodiment, the application cap_example can be taken as an example. As a permission applicant, cap_example needs to apply for permissions such as files and network ports from permission owners such as pm, ramfs, and network. Specifically, it can include: when compiling the application cap_example, the crp_parser tool can load the cap_example.crp file corresponding to the parsed application. As a permission applicant, cap_example can obtain the application permission field information of cap_example.crp through the crp_parser tool. Then the name of the permission owner in the field can be found and the corresponding permission configuration file can be loaded (taking pm.crp as an example). The crp_parser tool can parse the pm.crp file to obtain the granted permission field information. The crp_parser tool can also match and verify the application permission field in cap_example.crp with the granted permission field in pm.crp. If the description information is the same and describes the name of each other's process (for example, cap_example.crp describes {pm, resource information, resource permission} in the permission application field, and pm.crp describes {cap_example, resource information, resource permission} in the permission application field), then this permission can be granted to the application cap_example, and the crp_parser tool generates capability data and injects it into the elf file of the application cap_example for the application cap_example to verify permissions when the system is running. In addition, if cap_example.crp has multiple permission application information, the previous steps can be repeated, and the crp_parser tool can parse different permission owner permission configuration files until all permission application information of cap_example is matched and authorized.

[0080] In summary, by optimizing the permission matching authorization process and pre-generating capability data, the performance of accessing capability data during application loading and system startup is optimized, so that the capability security access control system does not affect the application loading time or the system startup time.

[0081] In addition, in another embodiment, determining the permission application information of the application may specifically include:

[0082] Obtaining first permission configuration information of the application;

[0083] The first permission configuration information is parsed to determine at least one permission application information, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

[0084] In this embodiment, each application may correspond to a permission configuration information, and the permission configuration information may include permission information, permission application information, and permission authorization information. The permission information may be permission data that the application can directly apply. The permission application information is permission data that the application needs to apply for from other applications. The permission authorization information is permission data that the application can authorize to other applications.

[0085] In addition, the determining the permission authorization information corresponding to each application identifier may specifically include:

[0086] Obtain second permission configuration information corresponding to each application identifier;

[0087] Each of the second permission configuration information is parsed to determine permission authorization information.

[0088] Specifically, different application identifiers may correspond to different applications, and different applications may have different permission configuration information. Therefore, after obtaining the application identifier, the corresponding second permission configuration information may be determined according to the application identifier, and then each second permission configuration information may be parsed to determine the permission authorization information. The second permission configuration information may include permission information, permission application information, and permission authorization information.

[0089] For example, Figure 4 The application diagram of the permission configuration information provided in the embodiment of the present application is as follows: Figure 4As shown, in this embodiment, during the process of system loading applications, since the application generation capability data process in the capability security access control system needs to access a large number of configuration files and perform permission matching authorization, it is very time-consuming and seriously affects the application loading and system startup time. Therefore, the capability data generation process can be optimized, and the capability data can be pre-generated in the compilation stage, rather than dynamically generated during the application loading process, so that it does not affect the application loading and system startup time, and optimizes the application loading and system startup performance. In the capability security access control system, it is necessary to control all application processes, and match authorization and authentication operations for all applications. The process is not limited to operating system processes such as upper-level applications, driver modules, process managers, and file systems. In addition, each application can have a permission configuration file, and the permission configuration information corresponding to all applications (which can be a file with crp as the suffix) can be placed in the same directory. In the compilation stage, the application capability data generation is completed by implementing a specific tool (taking crp_parser as an example). Among them, Capability: is a token that allows the owner to access entities (device USB flash drives, cameras, etc.) or objects (files, directories, network ports, memory, etc.) in a computer system.

[0090] In summary, this application optimizes the performance of accessing capability data during application loading and system startup by optimizing the permission matching authorization process and pre-generating capability data, so that the Capability security access control system does not affect the application loading time or the system startup time.

[0091] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 5 A schematic diagram of the structure of the permission data processing device provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, the device provided in this embodiment may include:

[0092] The determination module 501 is used to determine the permission application information of the application during the application compilation stage, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

[0093] The determination module 501 is further configured to determine permission authorization information corresponding to each application identifier.

[0094] The processing module 502 is used to match the permission authorization information with the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for.

[0095] The processing module 502 is further configured to generate permission data corresponding to the successfully matched permission field to be applied for if the match is successful, and implement access to resource data through the permission data when the application is running.

[0096] In another embodiment, the processing module 502 is further configured to:

[0097] For each permission field to be applied for, if the application identifier corresponding to the permission field to be applied for matches the application to which the permission authorization information belongs, and the application identifier contained in the permission authorization information matches the application to which the permission field to be applied belongs, then the authorization permission field contained in the permission authorization information is obtained.

[0098] The permission field to be applied for is matched with the authorized permission field.

[0099] In this embodiment, the processing module 502 is further used for:

[0100] The resource information field in the permission to be applied field is matched with the resource information field in the authorized permission field.

[0101] The resource permission field in the permission field to be applied for is matched with the resource permission field in the authorized permission field.

[0102] In another embodiment, the processing module 502 is further configured to:

[0103] If the permission field to be applied for is the same as the authorized permission field, the match is successful, and permission data corresponding to the successfully matched permission field to be applied for is generated.

[0104] The permission data is stored in a preset file of the application, and when the application is running, the resource data is accessed through the permission data.

[0105] In another embodiment, the determining module 501 is further configured to:

[0106] Obtain first permission configuration information of the application.

[0107] The first permission configuration information is parsed to determine at least one permission application information, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

[0108] In another embodiment, the determining module 501 is further configured to:

[0109] The second permission configuration information corresponding to each application identifier is obtained.

[0110] Each of the second permission configuration information is parsed to determine permission authorization information.

[0111] The device provided in the embodiment of the present application can realize the above-mentioned Figure 2 The implementation principle and technical effect of the method in the embodiment shown are similar and will not be described in detail here.

[0112] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device 600 provided in this embodiment includes: a processor 601 and a memory connected to the processor in communication. The processor 601 and the memory 602 are connected via a bus 603 .

[0113] In a specific implementation process, the processor 601 executes the computer execution instructions stored in the memory 602, so that the processor 601 executes the method in the above method embodiment.

[0114] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0115] In the above Figure 6 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0116] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0117] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0118] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the permission data processing method of the above method embodiment is implemented.

[0119] An embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the permission data processing method as described above is implemented.

[0120] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0121] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0122] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing authority data, characterized in that: include: In the application compilation stage, determining permission application information of the application, wherein the permission application information includes permission fields to be applied for and application identifiers corresponding to each permission field to be applied for; Determine the permission authorization information corresponding to each of the application identifiers; Matching the permission authorization information according to the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for; If the match is successful, permission data corresponding to the successfully matched permission field to be applied for is generated, and when the application is running, the resource data is accessed through the permission data.

2. The method according to claim 1, characterized in that The matching of the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for with the permission authorization information includes: For each permission field to be applied for, if the application identifier corresponding to the permission field to be applied for matches the application to which the permission authorization information belongs, and the application identifier contained in the permission authorization information matches the application to which the permission field to be applied for belongs, then obtaining the authorization permission field contained in the permission authorization information; The permission field to be applied for is matched with the authorized permission field.

3. The method according to claim 2, characterized in that The matching of the permission field to be applied for with the authorized permission field includes: Matching the resource information field in the permission to be applied field with the resource information field in the authorized permission field; The resource permission field in the permission field to be applied for is matched with the resource permission field in the authorized permission field.

4. The method according to claim 1, characterized in that If the match is successful, permission data corresponding to the permission field to be applied for that matches successfully is generated, and when the application is running, the resource data is accessed through the permission data, including: If the permission field to be applied for is the same as the authorized permission field, the match is successful, and permission data corresponding to the successfully matched permission field to be applied for is generated; The permission data is stored in a preset file of the application, and when the application is running, the resource data is accessed through the permission data.

5. The method according to any one of claims 1 to 4, characterized in that: The determining of the permission application information of the application includes: Obtaining first permission configuration information of the application; The first permission configuration information is parsed to determine at least one permission application information, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for.

6. The method according to any one of claims 1 to 4, characterized in that: The determining the permission authorization information corresponding to each application identifier includes: Obtain second permission configuration information corresponding to each application identifier; Each of the second permission configuration information is parsed to determine permission authorization information.

7. A rights data processing device, characterized in that: include: A determination module, used to determine permission application information of the application during the application compilation phase, wherein the permission application information includes permission fields to be applied for and an application identifier corresponding to each permission field to be applied for; The determination module is further used to determine the permission authorization information corresponding to each application identifier; A processing module, used for matching the permission authorization information with the permission fields to be applied for in the permission application information and the application identifier corresponding to each of the permission fields to be applied for; The processing module is further configured to generate permission data corresponding to the successfully matched permission field to be applied for if the match is successful, and to access the resource data through the permission data when the application is running.

8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the permission data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the permission data processing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing rights data as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Application authorization method and device, medium and electronic equipment

    CN121234392A