Resource authority processing method and device, storage medium and chip

文档序号:1327707 发布日期:2020-07-14 浏览:4次 中文

阅读说明:本技术 资源权限处理方法、装置、存储介质及芯片 (Resource authority processing method and device, storage medium and chip ) 是由 肖福洲 尹友展 谌力 于 2018-03-27 设计创作,主要内容包括:一种资源权限处理方法、装置、存储介质及芯片,在对终端设备的系统软件进行版本升级时,可以根据第一资源权限配置文件,更新终端设备的资源的标签(S202)。由于第一资源权限配置文件仅涵盖系统软件版本升级前后标签发生变化的路径信息,因此,在对终端设备上存储的资源更新标签的过程中,在第一资源权限配置文件中查找与所遍历的资源的路径信息匹配的路径信息时的匹配量大大减少,可以减少为存储的资源打标签的所耗费的时间,进而可以提高打标签的效率,从而可以减少系统软件版本升级所耗费的时间,提高了系统软件版本升级的效率。(A resource authority processing method, a device, a storage medium and a chip can update the label of the resource of a terminal device according to a first resource authority configuration file when the version of the system software of the terminal device is upgraded (S202). Because the first resource authority configuration file only covers the path information of which the label changes before and after the system software version is upgraded, the matching amount when the path information matched with the traversed resource path information is searched in the first resource authority configuration file in the process of updating the label of the resource stored on the terminal device is greatly reduced, the time consumed for labeling the stored resource can be reduced, the labeling efficiency can be improved, the time consumed for upgrading the system software version can be reduced, and the upgrading efficiency of the system software version can be improved.)

A resource authority processing method is characterized by comprising the following steps:

when version upgrading is performed on system software of a terminal device, a first resource authority configuration file is obtained, wherein the first resource authority configuration file comprises: the system comprises at least one piece of first path information and a label corresponding to the at least one piece of first path information in a second resource permission configuration file, wherein the second resource permission configuration file is a resource permission configuration file corresponding to a new version of system software, a third resource permission configuration file is a resource permission configuration file corresponding to an old version of the system software, and the first path information is the path information which is the same as the path information in the third resource permission configuration file in the second resource permission configuration file and corresponds to a different label;

and updating the label of the resource of the terminal equipment according to the first resource authority configuration file.

The method of claim 1, wherein prior to obtaining the first resource permission profile, the method further comprises:

acquiring the second resource authority configuration file and the third resource authority configuration file;

comparing the label corresponding to each path information in the second resource authority configuration file with the label corresponding to each path information in the third resource authority configuration file, and taking the path information with different labels as the first path information;

generating a first resource authority configuration file according to each first path information and a corresponding label of each first path information in the second resource authority configuration file;

and storing the first resource authority configuration file.

The method of claim 2, wherein prior to storing the first resource permission profile, the method further comprises:

and encrypting and signing the first resource authority configuration file.

The method according to claim 2 or 3, wherein the obtaining the second resource permission configuration file and the third resource permission configuration file comprises:

before analyzing the system software version upgrade package, acquiring the third resource authority configuration file stored in the terminal equipment;

and when the system software version upgrading package is analyzed, acquiring the second resource authority configuration file carried in the system software version upgrading package.

The method according to any of claims 1-4, wherein said updating the label of the resource of the terminal device according to the first resource right profile comprises:

and when the first path information contains regular expression characters, updating the labels of all resources under the upper-level path of the first path according to the corresponding label of the first path information in the second resource authority configuration file.

The method according to any of claims 1-4, wherein said updating the label of the resource in the terminal device according to the first resource right profile comprises:

and when the first path information contains a regular expression character string in a preset format, updating the labels of all resources under the first path according to the label corresponding to the first path information in the second resource authority configuration file.

The method according to any one of claims 1-6, further comprising:

and if the first resource authority configuration file fails to be acquired, updating the label of the resource of the terminal equipment according to the second resource authority configuration file.

The method according to any one of claims 1-7, further comprising:

and if the time length for updating the label of the resource of the terminal equipment exceeds the preset time length, restarting the terminal equipment and acquiring the first resource authority configuration file again.

The method according to any one of claims 1-8, wherein the operating system of the terminal device is an L inux operating system, the method further comprising:

and after the updating operation of the label of the resource of the terminal equipment is finished, updating the hash value corresponding to the currently used resource authority configuration file stored in the terminal equipment by using the hash value corresponding to the second resource authority configuration file.

A resource right processing apparatus, comprising:

a first obtaining module, configured to obtain a first resource permission configuration file when version upgrade is performed on system software of a terminal device, where the first resource permission configuration file includes: the system comprises at least one piece of first path information and a label corresponding to the at least one piece of first path information in a second resource permission configuration file, wherein the second resource permission configuration file is a resource permission configuration file corresponding to a new version of system software, a third resource permission configuration file is a resource permission configuration file corresponding to an old version of the system software, and the first path information is the path information which is the same as the path information in the third resource permission configuration file in the second resource permission configuration file and corresponds to a different label;

and the updating module is used for updating the label of the resource of the terminal equipment according to the first resource authority configuration file.

The apparatus of claim 10, further comprising:

the second acquisition module is used for acquiring the second resource authority configuration file and the third resource authority configuration file before the first acquisition module acquires the first resource authority configuration file;

a processing module, configured to compare a tag corresponding to each piece of path information in the second resource permission configuration file with a tag corresponding to each piece of path information in the third resource permission configuration file, use piece of path information with different tags as the first path information, and generate the first resource permission configuration file according to each piece of first path information and the tag corresponding to each piece of first path information in the second resource permission configuration file;

and the storage module is used for storing the first resource authority configuration file.

The apparatus of claim 11, wherein the processing module is further configured to encrypt and sign the first resource permission profile before the storage module stores the first resource permission profile.

The apparatus according to claim 11 or 12, wherein the second obtaining module is specifically configured to obtain the third resource permission configuration file stored in the terminal device before parsing the system software version upgrade package, and obtain the second resource permission configuration file carried in the system software version upgrade package when parsing the system software version upgrade package.

The apparatus according to any one of claims 10 to 13, wherein the updating module is specifically configured to, when the first path information contains a regular expression character, update the labels of all resources in the upper-level path of the first path according to the label corresponding to the first path information in the second resource permission configuration file.

The apparatus according to any one of claims 10 to 13, wherein the updating module is specifically configured to, when the first path information contains a regular expression string in a preset format, update the labels of all resources in the first path according to the label corresponding to the first path information in the second resource permission configuration file.

The apparatus according to any one of claims 10 to 15, wherein the updating module is further configured to update the tag of the resource of the terminal device according to the second resource right configuration file when the first obtaining module fails to obtain the first resource right configuration file.

The apparatus according to any one of claims 10-16, further comprising:

the restarting module is used for restarting the terminal equipment when the time length for updating the label of the resource of the terminal equipment by the updating module exceeds the preset time length;

the first obtaining module is further configured to obtain the first resource authority configuration file again.

The apparatus according to any one of claims 10 to 17, wherein the operating system of the terminal device is an L inux operating system, and the updating module is further configured to update the hash value corresponding to the currently used resource right configuration file stored in the terminal device, using the hash value corresponding to the second resource right configuration file after the update operation of the tag of the resource of the terminal device is completed.

A resource right processing apparatus, characterized in that the resource right processing apparatus comprises: a processor, a memory;

wherein the memory is to store computer-executable program code, the program code comprising instructions; when executed by the processor, the instructions cause the resource privilege processing means to perform the resource privilege processing method as claimed in any one of claims 1-9.

A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, performs the resource right processing method according to any one of claims 1 to 9.

A chip on which a computer program is stored, which, when executed by a processor, performs the resource right processing method according to any one of claims 1 to 9.

1页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:分支预测电路的输入的编码

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!