File access methods and related devices

By directly determining the data file type as an access rule reference type based on the file identifier when accessing files within a general-purpose integrated circuit card, and using the index number to read security attributes, the problems of long processing time and infinite loops in existing technologies are solved, achieving efficient and correct file access.

CN116303254BActive Publication Date: 2025-10-28伟光有限公司(CN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211546486.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-10-28
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

In existing technologies, accessing files within a general-purpose integrated circuit card requires obtaining security attributes multiple times, resulting in long processing times and the possibility of getting stuck in an infinite loop, making it impossible to access the file correctly.

Method used

When accessing a file, if the data file type is determined directly by the file identifier and is an access rule reference type, the security attributes are read by the index number to avoid creating security conditions repeatedly.

Benefits of technology

It improves file access efficiency, avoids infinite loops, and ensures the correctness and efficiency of the access process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303254B_ABST
    Figure CN116303254B_ABST
Patent Text Reader

Abstract

This application provides a file access method and related apparatus. In this method, in response to a first access request to access a first base file, a first file identifier and a first index number are obtained from the first file control parameters corresponding to the first base file. The first file identifier is the identifier of a first data file corresponding to the first base file. The first data file stores a first security attribute of the first base file. The first index number indicates the location of the first security attribute within the first data file. If the file type of the first data file determined by the first file identifier is an access rule reference type, the first security attribute in the first data file is read according to the first index number to access the first base file. In this application, when the type of the first data file is an access rule reference type, the first security attribute in the first data file is directly read according to the first index number, improving access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a file access method and related apparatus. Background Technology

[0002] Universal integrated circuit cards (UICCs) include storage space for storing user accounts, keys, and other files. Accessing files within a UICC requires creating matching security conditions, which are based on corresponding security attributes. In existing technology, when file access is detected, the system first retrieves the file's security attributes to create the necessary security conditions. If these security attributes are stored in a log file, and accessing that log file also requires creating matching security conditions, the system will continue retrieving the log file's security attributes to create the access conditions. This process is time-consuming, and if the log file's security attributes are also stored within the log file, it may fail to access the corresponding security attributes, resulting in an access error. Summary of the Invention

[0003] This application provides a file access method and related apparatus. When accessing a first basic file and needing to create security conditions for access, the file type of the first data file corresponding to the first basic file is an access rule reference type. The first security attribute is directly obtained from the first data file based on the first index number, avoiding the access process from getting stuck in an infinite loop and improving access efficiency.

[0004] Firstly, this application provides a file access method, including:

[0005] In response to a first access request to access a first basic file, first file control parameters corresponding to the first basic file are obtained, wherein the first basic file is a file stored in a general-purpose integrated circuit card.

[0006] Obtain the first file identifier and the first index number from the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file.

[0007] If the file type of the first data file determined according to the first file identifier is an access rule reference type, then the first security attribute in the first data file is read according to the first index number to access the first basic file.

[0008] Secondly, embodiments of this application provide a file access device, the device comprising:

[0009] The first acquisition unit is configured to, in response to a first access request to access a first basic file, acquire first file control parameters corresponding to the first basic file, wherein the first basic file is a file stored in a general-purpose integrated circuit card.

[0010] The second acquisition unit is used to acquire the first file identifier and the first index number in the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file.

[0011] The determining unit is configured to, if the file type of the first data file determined according to the first file identifier is an access rule reference type, read the first security attribute in the first data file according to the first index number to access the first basic file.

[0012] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication module, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing steps in any method of the first aspect of this application.

[0013] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in any method of the first aspect of this application.

[0014] Fifthly, this application provides a computer program operable to cause a computer to perform some or all of the steps described in any of the methods of the first aspect of the embodiments of this application. The computer program may be a software installation package.

[0015] As can be seen, in this embodiment of the application, the general-purpose integrated circuit card includes a first basic file. In response to a first access request to access the first basic file, the card obtains the first file control parameters corresponding to the first basic file, and obtains the first file identifier and first index number within the first file control parameters. If the file type of the first data file determined by the first file identifier is an access rule reference type, then the card reads the first security attribute from the first data file according to the first index number to access the first basic file. When the file type of the first data file is determined to be an access rule reference type, the card directly reads the first security attribute from the first data file according to the first index number. This improves access efficiency while avoiding the situation where accessing the first data file also requires creating security conditions, and the security attributes of the security conditions for creating the first data file are stored in the first data file using the same storage method, making it impossible to obtain the security attributes of the first data file, thus causing access errors. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A system architecture diagram of a file access method provided in an embodiment of this application;

[0018] Figure 2 A flowchart illustrating a file access method provided in an embodiment of this application;

[0019] Figure 3 A flowchart illustrating another file access method provided in an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of the structure of another electronic device provided in an embodiment of this application;

[0021] Figure 5 A functional unit block diagram of a file access device provided in an embodiment of this application;

[0022] Figure 6 This is a block diagram of the functional units of another file access device provided in an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0024] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] The background technology and related terms of this application are explained below.

[0027] Background technology related:

[0028] General purpose integrated circuit (GPIB) cards require a secure environment context to ensure the security of file access. Different file access security levels correspond to different security conditions. When accessing a file, matching security conditions must be created. Only when the security conditions corresponding to the file's access mode are met will the GPIB card allow file access. The file's access mode (AM) and security condition (SC) together constitute the file's security attributes. If the file's security attributes are stored in a data file, this data file is called an access rule reference (ARR) file. If the security attributes corresponding to this data file are also stored in this data file, it will cause the access to enter an infinite loop, resulting in errors in the file access process.

[0029] The key concepts involved in the embodiments of this application are explained below:

[0030] The elementary file (EF) is the basic file in a general-purpose integrated circuit card. It is used to store data. The EF is the most basic data storage file, used to store SMS messages, contact numbers, and so on.

[0031] The following combination Figure 1 The system architecture of a file access method according to an embodiment of this application will be described. Figure 1 This application provides a system architecture diagram for a file access method, which includes a terminal device 110. Specifically, the terminal device includes a general-purpose integrated circuit (GPIB) card. The GPIB card is primarily used for user account information, authentication keys, SMS notifications, payment methods, and other information. The GPIB card can store service subscriber keys for identification purposes on the terminal device (e.g., mobile phones and computers). On one hand, it allows users to change the terminal device by simply removing the GPIB card from one mobile phone and inserting it into another mobile phone or broadband phone. On the other hand, the GPIB card can also be implemented within a portion of the terminal device's memory, without needing to be a separate or removable circuit, chip, or card.

[0032] The aforementioned terminal device 110 may include, but is not limited to, devices with data processing capabilities such as smartphones, tablets, handheld computers, laptops, video matrix mobile internet devices (MIDs), or wearable devices, etc., without specific limitations.

[0033] The embodiments of this application are described in detail below:

[0034] After understanding the software and hardware architecture of the embodiments of this application, the following will be combined with... Figure 2 This application describes a file access method according to an embodiment. Figure 2 A flowchart illustrating a file access method provided in this application embodiment specifically includes the following steps:

[0035] Step 201: In response to the first access request to access the first basic file, obtain the first file control parameters corresponding to the first basic file.

[0036] The first basic file is a file stored within a general-purpose integrated circuit card (GPIB). Upon receiving a first access request, the terminal device, including the GPIB, parses the request, determines the first basic file to be accessed, and retrieves the corresponding first file control parameters from the GPIB.

[0037] As can be seen, when an access request is received, obtaining the corresponding file control parameters based on the access request can provide data support for subsequently obtaining the file identifier and index number.

[0038] It is understood that the embodiments of this application use access to the first basic file as an example for illustration. It is also understood that other files can be accessed, and no specific restrictions are made here.

[0039] Step 202: Obtain the first file identifier and the first index number from the first file control parameters.

[0040] Wherein, the first file identifier is the identifier of the first data file corresponding to the first basic file, the first data file is used to store the first security attribute of the first basic file, and the first index number is used to indicate the location of the first security attribute within the first data file. Specifically, after the terminal device obtains the first file control parameters, it parses the first file identifier and the first index number from the first file control parameters. Specifically, different data files correspond to different file identifiers, and a single data file includes at least one file attribute. Different file attributes correspond to different index numbers. Therefore, the corresponding first data file can be determined based on the first file identifier, and the corresponding first security attribute within the first data file can be determined based on the first index number, thereby improving the efficiency of file retrieval.

[0041] As can be seen in this example, obtaining the first file identifier and the first index number within the first file control parameters provides data support for obtaining the corresponding first security attribute.

[0042] Step 203: If the file type of the first data file determined according to the first file identifier is an access rule reference type, then read the first security attribute in the first data file according to the first index number to access the first basic file.

[0043] Specifically, after identifying the first data file using the first file identifier, the file type of the first data file is determined. If the file type of the first data file is an access rule reference type, the first security attribute within the first data file is directly obtained based on the first index number, and a security condition is created based on this first security attribute to access the first basic file. That is, accessing the first data file also requires creating a corresponding security condition. However, the type of the first file data can be determined first. If the type of the first file data is an access rule reference type, there is no need to create a security condition for accessing the first data file again; the content within the first data file can be read directly.

[0044] As can be seen in this example, when the type of the first data file is determined to be an access rule reference type, there is no need to create security conditions for accessing the first data file again. This avoids an infinite loop when the security attributes corresponding to the first data file are also stored within the first data file. Furthermore, direct access to the first data file improves access efficiency.

[0045] The following combination Figure 3 Another file access method described in the embodiments of this application will be illustrated by way of example. Figure 3 A flowchart illustrating another file access method provided in this application embodiment is shown, specifically including the following steps:

[0046] Step 301: In response to the first access request to access the first basic file, obtain the first file control parameters corresponding to the first basic file.

[0047] Step 302: Obtain the first file identifier and the first index number from the first file control parameters.

[0048] Steps 301 to 302 are the same as steps 201 to 202, and will not be repeated here.

[0049] Step 303: Obtain the second file identifier and second index number from the second file control parameters corresponding to the first data file.

[0050] Wherein, the second file identifier is the identifier of the second data file corresponding to the first data file, the second data file is used to store the second security attribute of the first data file, and the second index number is used to indicate the location of the second security attribute within the second data file. Specifically, the corresponding first data file is found through the first file identifier. If accessing the content of the first data file also requires the creation of corresponding security conditions, then the second file control parameters corresponding to the first data file are determined, and the second file identifier and second index number within the second file control parameters are obtained to obtain the security attribute of the first data file, thereby creating security conditions for accessing the first data file.

[0051] Step 304: If the second security attribute cannot be read, then it is determined that the second data file and the first data file are the same data file, an error message is output, and the step of reading the first security attribute in the first data file according to the first index number if the file type of the first data file determined according to the first file identifier is an access rule reference type is executed.

[0052] Specifically, if the data file obtained based on the second file identifier is a second data file, and this second data file is the same as the first data file, but accessing the first data file requires a corresponding security attribute, then the access will enter an infinite loop, and the second security attribute cannot be read. If the second security attribute cannot be read, an error message is output. After indicating an access error, the file type of the first data file is determined. If the file type of the first data file is an access rule reference type, then the first security attribute of the first data file is directly read based on the first index number. If the data file obtained based on the second file identifier is a second data file, and this second data file is not the same as the first data file, then the second security attribute corresponding to the first data file is obtained from the second data file based on the second index number, thereby creating a security condition for accessing the first data file. The first security attribute of the first basic file within the first data file is obtained based on the first index number, and a security condition is created based on the first security attribute, thereby accessing the first basic file. It can be seen that only after the second security attribute of the first data file cannot be obtained is the determination of whether the file type of the first data file is an access rule reference type. If it is an access rule reference type, then the first security attribute of the first data file is read based on the first index number. Improve the intelligence and security of the access process.

[0053] In one possible example, the file operation permission of the first data file of the access rule reference type within the general-purpose integrated circuit card is free access. This allows for direct access to the first data file when its file type is an access rule reference type, improving access efficiency.

[0054] In one possible example, the step of reading the first security attribute in the first data file according to the first index number to access the first base file includes: obtaining the first security attribute in the first data file according to the first index number; creating security conditions that satisfy access to the first base file according to the first security attribute; and accessing the first base file if the security conditions are created.

[0055] Specifically, after obtaining the first index number, the first security attribute in the first data file is obtained based on the first index number, and a security condition for accessing the first basic file is created based on the first security attribute. Once the security condition is detected to be created, the first basic file is accessed.

[0056] As can be seen in this example, when the file type of the first data file is an access rule reference type, the first data file is accessed directly to obtain the security attributes of the first base file, thereby creating the access conditions corresponding to the first base file to access it. This avoids creating security conditions multiple times and improves access efficiency.

[0057] Step 305: Obtain the first access mode corresponding to the first access request and the first file identifier corresponding to the first basic file.

[0058] The access mode (AM) includes modes such as READ, UPDATE, ACTIVATE, and DEACTIVATE. In this embodiment, the first access mode corresponding to the first access request and the first file identifier corresponding to the first basic file are obtained. For example, if the first basic file needs to be READ, the first access mode is obtained as READ. Obtaining the first access mode and the first file identifier corresponding to the first basic file provides data support for subsequent storage in the cache.

[0059] Step 306: If the preset cache area does not contain a cache partition with the first file identifier as the subject, then create a first cache partition with the first file identifier as the subject in the cache area.

[0060] Specifically, after obtaining the first file identifier, it checks whether the cache area contains a cache partition with the first file identifier as its subject. If not found, it creates the first cache partition with the first file identifier as its subject.

[0061] Step 307: Store the first security attribute and the first access mode of the first basic file in the first cache partition.

[0062] Specifically, after creating the first cache partition, the first security attribute and the first access mode of the first basic file are stored in the first cache partition. This allows the first basic file to be accessed again in the first access mode, enabling the corresponding security attribute to be retrieved quickly and further improving access efficiency.

[0063] In one possible example, a single cache partition within the cache area corresponds to a deletion time point, which is determined based on a preset storage duration and the time when the single cache partition was created. The deletion time point is used to prompt the deletion of the single cache partition.

[0064] Each cache partition corresponds to a deletion time point. Specifically, the deletion time point can be determined by polling or periodic access. If the deletion time point has been reached, the cache partition is deleted.

[0065] As can be seen in this example, the cache partition corresponds to the deletion time point. Once the deletion time point is reached, the cache partition is deleted in a timely manner to ensure file security.

[0066] Step 308: In response to the second access request to access the second basic file, obtain the second file identifier corresponding to the second basic file and the second access mode corresponding to the second access request.

[0067] Specifically, upon receiving a second access request to access the second basic file, the second access request is parsed to obtain the second file identifier corresponding to the second basic file and the second access mode corresponding to the second access request.

[0068] Step 309: If the second file identifier is the same as the first file identifier, and the second access mode is the same as the first access mode in the first cache partition, then obtain the first security attribute from the first cache partition as the security attribute of the second basic file to access the second basic file.

[0069] Specifically, if the second file identifier is the same as the first file identifier, it is determined that the same basic file is being accessed. Based on the obtained second access mode, the first security attribute is obtained from the first cache partition as the security attribute of the second basic file to access the second basic file.

[0070] As can be seen in this example, upon re-access, security attributes can be preferentially obtained from the cache based on the file identifier and access mode, further improving access efficiency.

[0071] The following combination Figure 4 An electronic device according to an embodiment of this application will be described. Figure 4 A schematic diagram of the structure of another electronic device provided in the embodiments of this application is shown below. Figure 4 As shown, the electronic device 400 includes a processor 401, a communication module 402, and a memory 403, which are interconnected. The electronic device 400 may also include a bus 404, through which the processor 401, communication module 402, and memory 403 are interconnected. The bus 404 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 404 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 4 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The memory 403 is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions and execute the above-mentioned... Figure 2 , Figure 3All or part of the methods described herein.

[0072] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0073] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0074] When dividing functional modules according to their respective functions, the following is combined with... Figure 5 This application provides a detailed description of a file access device according to an embodiment. Figure 5 This application provides a functional unit block diagram of a file access device, which includes:

[0075] The first acquisition unit 510 is used to acquire the first file control parameters corresponding to the first basic file in response to a first access request to access the first basic file, wherein the first basic file is a file stored in a general-purpose integrated circuit card.

[0076] The second acquisition unit 520 is used to acquire the first file identifier and the first index number in the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file.

[0077] The determining unit 530 is configured to, if the file type of the first data file determined according to the first file identifier is an access rule reference type, read the first security attribute in the first data file according to the first index number to access the first basic file.

[0078] As can be seen, the file access method and related apparatus firstly obtain the first file control parameters corresponding to the first basic file upon receiving the first access request; then, obtain the first file identifier and the first index number within the first file control parameters; finally, if the file type of the first data file determined by the first file identifier is an access rule reference type, then read the first security attribute in the first data file according to the first index number to access the first basic file. This improves access efficiency while avoiding the situation where accessing the first data file also requires creating security conditions, and the security attributes of the security conditions for creating the first data file are stored in the first data file using the same storage method, making it impossible to obtain the security attributes of the first data file, thus causing access errors.

[0079] When using integrated units, the following is combined with Figure 6 For a detailed description of another file access device in the embodiments of this application, please refer to [link to relevant documentation]. Figure 6 , Figure 6 The present application provides a functional unit block diagram of another file access device 600, which includes a processing unit 601 and a communication unit 602. The processing unit 601 is used to perform any step as described in the above method embodiments, and when performing data transmission such as sending, it can selectively call the communication unit 602 to complete the corresponding operation.

[0080] The file access device 600 may further include a storage unit 603 for storing program code and data. The processing unit 601 may be a processor, the communication unit 602 may be a wireless communication module, and the storage unit 603 may be a memory.

[0081] The processing unit 601 is specifically used for:

[0082] In response to a first access request to access a first basic file, first file control parameters corresponding to the first basic file are obtained, wherein the first basic file is a file stored in a general-purpose integrated circuit card.

[0083] Obtain the first file identifier and the first index number from the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file.

[0084] If the file type of the first data file determined according to the first file identifier is an access rule reference type, then the first security attribute in the first data file is read according to the first index number to access the first basic file.

[0085] As can be seen, with the above-described device, firstly, upon receiving a first access request, the first file control parameters corresponding to the first basic file are obtained; then, the first file identifier and the first index number within the first file control parameters are obtained; finally, if the file type of the first data file determined by the first file identifier is an access rule reference type, the first security attribute in the first data file is read according to the first index number to access the first basic file. This improves access efficiency while avoiding the situation where accessing the first data file also requires creating security conditions, and the security attributes of the security conditions for creating the first data file are stored in the first data file using the same storage method, making it impossible to obtain the security attributes of the first data file, thus causing access errors.

[0086] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0087] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0088] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0089] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0090] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0091] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0092] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0093] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0094] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0095] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A file access method, characterized in that, include: In response to a first access request to access a first basic file, first file control parameters corresponding to the first basic file are obtained, wherein the first basic file is a file stored in a general-purpose integrated circuit card. Obtain the first file identifier and the first index number from the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file. If the file type of the first data file determined according to the first file identifier is an access rule reference type, then the first security attribute in the first data file is read according to the first index number to access the first basic file.

2. The method according to claim 1, characterized in that, If the file type of the first data file determined according to the first file identifier is an access rule reference type, before reading the first security attribute in the first data file according to the first index number, the method further includes: Obtain the second file identifier and the second index number from the second file control parameters corresponding to the first data file. The second file identifier is the identifier of the second data file corresponding to the first data file. The second data file is used to store the second security attribute of the first data file. The second index number is used to indicate the position of the second security attribute in the second data file. If the second security attribute cannot be read, it is determined that the second data file and the first data file are the same data file, an error message is output, and the step of reading the first security attribute in the first data file according to the first index number if the file type of the first data file determined according to the first file identifier is an access rule reference type is executed.

3. The method according to claim 1, characterized in that, The file operation permission for the first data file of the access rule reference type within the general-purpose integrated circuit card is free access permission.

4. The method according to any one of claims 1-3, characterized in that, After reading the first security attribute from the first data file according to the first index number, the method further includes: Obtain the first access mode corresponding to the first access request, and the first file identifier corresponding to the first basic file; If the preset cache area does not contain a cache partition with the first file identifier as the subject, then a first cache partition with the first file identifier as the subject is created in the cache area. The first security attribute and the first access mode of the first basic file are stored in the first cache partition.

5. The method according to claim 4, characterized in that, After storing the first security attribute and the first access mode of the first basic file in the first cache partition, the method further includes: In response to a second access request to access a second base file, obtain the second file identifier corresponding to the second base file and the second access mode corresponding to the second access request; If the second file identifier is the same as the first file identifier, and the second access mode is the same as the first access mode in the first cache partition, then the first security attribute is obtained from the first cache partition as the security attribute of the second basic file to access the second basic file.

6. The method according to claim 4, characterized in that, The deletion time point corresponds to a single cache partition in the cache area. The deletion time point is determined based on the preset storage duration and the time when the single cache partition was created. The deletion time point is used to prompt the deletion of the single cache partition.

7. The method according to claim 1, characterized in that, The step of reading the first security attribute from the first data file according to the first index number to access the first base file includes: The first security attribute in the first data file is obtained according to the first index number; Based on the first security attribute, create security conditions that satisfy access to the first basic file; If the security conditions are successfully created, then the first base file is accessed.

8. A file access device, characterized in that, The device includes: The first acquisition unit is configured to, in response to a first access request to access a first basic file, acquire first file control parameters corresponding to the first basic file, wherein the first basic file is a file stored in a general-purpose integrated circuit card. The second acquisition unit is used to acquire the first file identifier and the first index number in the first file control parameters. The first file identifier is the identifier of the first data file corresponding to the first basic file. The first data file is used to store the first security attribute of the first basic file. The first index number is used to indicate the position of the first security attribute in the first data file. The determining unit is configured to, if the file type of the first data file determined according to the first file identifier is an access rule reference type, read the first security attribute in the first data file according to the first index number to access the first basic file.

9. An electronic device, characterized in that, Includes a processor for executing instructions for the steps of the method as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Device and method for managing access control permission of integrated circuit card

    CN101950342A

  • Configuration access management method, ISIM card, terminal and system

    CN115174387A