File reading method and non-transient computer readable storage medium

By determining whether the file in the user identification module card in the communication device is stored in non -instantaneous memory, it reads and stores it when necessary, solving the problem of low work efficiency caused by the frequent reading of the file, which improves the communication device. Work efficiency.

CN114518835BActive Publication Date: 2025-01-24REALTEK SEMICON CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011299901.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2025-01-24
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

In the prior art, the processor of the communication device needs to frequently read files in the user identification module card, resulting in low working efficiency.

Method used

Determine whether the files in the user recognition module card are stored in non -instantaneous memory. If it is not stored in non -instantaneous memory, the read program reads the file from the user recognition module card and stores into the non -instantaneous memory.

Benefits of technology

The next time the processor can read the file directly from the non -instantaneous memory, which improves the work efficiency of the communication device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114518835B_ABST
    Figure CN114518835B_ABST
Patent Text Reader

Abstract

A file reading method includes the following operations: judging whether the file in the user identification module card is stored in the non-transient memory by a processor; if the file is not stored in the non-transient memory, executing a reading program by the processor to read the file from the user identification module card; and storing the file in the non-transient memory by the processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a file reading technology, and more particularly, to a file reading method and a non-transient computer-readable storage medium. Background Art

[0002] With the development of technology, communication devices can communicate with each other through communication technology. Generally speaking, the processor in the communication device needs to read the files stored in the Subscriber Identity Module (SIM) card in the communication device to initialize the communication device. Then, the initialized communication device can start working to transmit / receive data. In addition, during normal operation, the processor in the communication device will also read or update the files stored in its Subscriber Identity Module card. Summary of the invention

[0003] Some embodiments of the present invention are related to a file reading method. The file reading method includes the following operations: determining by a processor whether a file in a subscriber identity module card is stored in a non-transient memory; if the file is not stored in the non-transient memory, executing a reading program by the processor to read the file from the subscriber identity module card; and storing the file in the non-transient memory by the processor.

[0004] Some embodiments of the present invention are related to a non-transient computer-readable storage medium. The non-transient computer-readable storage medium includes at least one program code. A processor is used to execute the at least one program code to perform the following operations: determine whether a file in a subscriber identity module card is stored in a non-transient memory; if the file is not stored in the non-transient memory, execute a reading program to read the file from the subscriber identity module card; and store the file in the non-transient memory.

[0005] In summary, in the present application, if the file in the SIM card is not stored in the non-transient memory, the processor can execute a read program to read out the file from the SIM card and store the file in the non-transient memory. In this way, the processor can directly read the file from the non-transient memory next time to improve the operating efficiency of the communication device. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] In order to make the above-mentioned purpose, other purposes, features, advantages and embodiments of the present invention more clearly understood, the following are the descriptions of the accompanying drawings:

[0007] Figure 1 is a schematic diagram of a communication device according to some embodiments of the present invention;

[0008] Figure 2is a schematic diagram of a file structure of a user identification module card according to some embodiments of the present invention;

[0009] Figure 3 is a flowchart of a file reading method according to some embodiments of the present invention;

[0010] Figure 4 is a flow chart of a reading procedure according to some embodiments of the present application;

[0011] Figure 5 is a schematic diagram of a signal transmission process under a transmission protocol according to some embodiments of the present invention; and

[0012] Figure 6 It is a schematic diagram of a signal transmission process under a transmission protocol illustrated in accordance with some embodiments of the present invention.

[0013] Explanation of symbols

[0014] 100: Communication device

[0015] 120: Processor

[0016] 140: Subscriber Identity Module Card

[0017] 160: Non-transient memory

[0018] 180: Memory

[0019] 300: File reading method

[0020] C: Program code

[0021] MF, DF, EF, ADF: Archives

[0022] S302, S304, S306, S308, S310, S312, S402, S404, S406, S408, S410, S412, S414, S416, S418, S502, S504, S506, S508, S510, S512, S514, S516, S518, S520, S602, S604, S606, S608: Operation DETAILED DESCRIPTION

[0023] The following is a detailed description with examples and accompanying drawings, but the specific embodiments described are only used to explain the present invention and are not used to limit the present invention. The description of the structural operation is not used to limit the order of its execution. Any structure recombined by the components to produce a device with equal efficacy is within the scope of the present invention application.

[0024] All words used herein have their usual meanings. The definitions of the above words in commonly used dictionaries and the use examples of any of the words discussed herein in the content of the present application are only examples and should not limit the scope and meaning of the present application. Similarly, the present application is not limited to the various embodiments shown in this specification.

[0025] As used herein, the word “coupled” may also refer to “electrically coupled”, and the word “connected” may also refer to “electrically connected.” “Coupled” and “connected” may also refer to two or more components cooperating or interacting with each other.

[0026] refer to Figure 1 . Figure 1 1 is a schematic diagram of a communication device 100 according to some embodiments of the present invention. In some embodiments, the communication device 100 may be, for example, a mobile phone, but the present invention is not limited thereto.

[0027] by Figure 1 For example, the communication device 100 includes a processor 120, a Subscriber Identity Module (SIM) card 140, a non-transient memory 160, and a memory 180. The processor 120 is coupled to the Subscriber Identity Module 140, the non-transient memory 160, and the memory 180. The Subscriber Identity Module 140 is coupled to the non-transient memory 160.

[0028] In some embodiments, the processor 120 is a central processing unit (CPU), an application-specific integrated circuit (ASIC), a multiprocessor or a distributed processing system, but the present invention is not limited thereto. Various other applicable circuits or units are also within the scope of the present invention.

[0029] In some embodiments, the SIM card 140 is a Universal Subscriber Identity Module (USIM) card.

[0030] In some embodiments, the non-transient memory 160 is a non-volatile random access memory (NVRAM), but the present invention is not limited thereto. Other applicable non-transient memories are also within the scope of the present invention.

[0031] In some embodiments, the memory 180 includes a non-transitory computer-readable storage medium and the non-transitory computer-readable storage medium stores one or more program codes C. In operation, the processor 120 may execute one or more program codes C to perform corresponding operations.

[0032] refer to Figure 2 . Figure 2 FIG. 1 is a schematic diagram of the file structure of the user identification module card 140 according to some embodiments of the present invention. Figure 2 For example, the file structure of the SIM card 140 is composed of a master file MF, a plurality of dedicated files DF and a plurality of elementary files EF. In addition, an application dedicated file ADF is also included in the file structure as a special dedicated file.

[0033] It should be noted that the "reading program" mentioned below refers to Figure 2 Each basic file EF has corresponding file control parameters. The file control parameters include file ID, short file ID, file size, file structure, access conditions, etc.

[0034] Taking access rights as an example, access rights include read access rights (read access conditions), write access rights (update access conditions), activate access rights (activate access conditions) and deactivate access rights (deactivate access conditions). The access rights levels can be divided into the always allowed (ALW) level, the personal identification number (PIN) (PIN2) allowed level, the administrator allowed (AMD) level and the forbidden (NEV) level. In other words, when the access rights level of a basic file EF is the always allowed level or the personal identification number allowed level, the user is allowed to perform relevant operations on the basic file EF. When the access rights level of a basic file EF is the administrator allowed level or the forbidden level, the user has no right to perform relevant operations on the basic file EF.

[0035] refer to Figure 1 , Figure 2 as well as Figure 3 . Figure 3 is a flowchart of a file reading method 300 according to some embodiments of the present invention. As mentioned above, Figure 1The processor 120 in the memory 180 can execute the program code C to perform Figure 3 The file reading method 300, and then Figure 2 A target elementary file (for example, one of the elementary files EF) is read.

[0036] by Figure 3 For example, the file reading method 300 includes operations S302 , S304 , S306 , S308 , S310 , and S312 .

[0037] In operation S302 , the communication device 100 is powered on. For example, the communication device 100 is powered on through a booting procedure.

[0038] In operation S304, the processor 120 determines whether the target basic file EF in the SIM card 140 is stored in the non-transient memory 160. For example, if the communication device 100 is just turned on, the target basic file EF is not stored in the non-transient memory 160 (the determination result of operation S304 is "No"). In this case, enter operation S306.

[0039] In operation S306, the processor 120 executes a reading procedure to read the target basic file EF from the SIM card 140. The detailed operation of the "reading procedure" will be described in the following paragraphs. Figure 4 Describe in detail.

[0040] In operation S308, the processor 120 stores the target basic file EF in the non-transitory memory 160. In this way, the processor 120 can later directly read the target basic file EF from the non-transitory memory 160. In some embodiments, in addition to the target basic file EF, the processor 120 also stores the identification value of the subscriber identity module card 140 in the non-transitory memory 160.

[0041] In some embodiments, if the user has the authority to update (or modify) the file and the target basic file EF in the subscriber identity module card 140 has been updated (or modified), the processor 120 will also correspondingly update the target basic file EF in the non-transitory memory 160. For example, the processor 120 may execute operations S306 and S308 to store the updated (or modified) target basic file EF in the non-transitory memory 160 to keep the content of the target basic file EF in the non-transitory memory 160 consistent with the content of the target basic file EF in the subscriber identity module card 140.

[0042] Returning to operation S304 , if the target basic file EF has been stored in the non-transitory memory 160 (the determination result of operation S304 is “yes”), the process proceeds to operation S310 .

[0043] In operation S310, the processor 120 determines whether the identification value in the non-transient memory 160 is identical to the identification value of the SIM card 140. If the identification value in the non-transient memory 160 is identical to the identification value of the SIM card 140 (the determination result of operation S310 is "yes"), it means that the SIM card 140 is identical to the previous one and has not been changed. In this case, operation S312 is entered.

[0044] In operation S312 , the processor 120 directly reads the target elementary file EF from the non-volatile memory 160 .

[0045] Get back in operation S310, if the identification value in the non-transient memory 160 is different from the identification value of the SIM card 140 (the judgment result of operation S310 is "No"), it represents that the SIM card 140 may have been changed, so enter operation S306 and operation S308. In operation S306 and operation S308, the processor 120 performs a read program to read the target basic file EF in the new SIM card 140 and the target basic file EF and the identification value in the new SIM card 140 are stored in the non-transient memory 160, to cover the target basic file EF and the identification value of the SIM card 140 previously stored. Like this, the processor 120 can directly read the target basic file EF from the non-transient memory 160 in the future.

[0046] In some related arts, the processor in the communication device needs to directly read the files stored in the SIM card of the communication device to initialize the communication device. In addition, during normal operation, these processors also need to directly read or update the files stored in the SIM card. That is to say, in these related arts, the processor needs to frequently read the files stored in the SIM card. However, this will make the working efficiency of the communication device low.

[0047] Compared to these related arts, in the present invention, the processor 120 only needs to read the target basic file EF once from the SIM card 140 and store the target basic file EF in the non-transient memory 160. In this way, when the processor 120 needs to read the target basic file EF in the future, the processor 120 can directly read the target basic file EF from the non-transient memory 160. Since the speed at which the processor 120 reads data from the non-transient memory 160 is faster, the method of the present invention can actually improve the working efficiency of the communication device 100.

[0048] It should be noted that the above-mentioned file reading method 300 operations are only examples and are not limited to being executed in the order in this example. Without violating the operation mode and scope of each embodiment of the application content of the present invention, the various operations of the file reading method 300 can be appropriately increased, replaced, omitted or executed in a different order.

[0049] refer to Figure 1 as well as Figure 4 . Figure 4 is a flowchart of a reading procedure according to some embodiments of the present invention. Figure 4 Details Figure 3 The detailed process of operation S306 (ie, the processor 120 executes the reading program to read the target basic file EF from the SIM card 140) is shown in FIG.

[0050] In operation S402, the processor 120 determines whether the read access permission meets the specific access permission level. For example, the processor 120 determines whether the read access permission of the target basic file EF is the aforementioned always allowed level or personal identification number allowed level. If the read access permission of the target basic file EF is not the always allowed level or the personal identification number allowed level (the result of the determination of operation S402 is "no") (for example, it is the administrator allowed level or the prohibited level), the process proceeds to operation S404. In other words, the user cannot read, so the processor 120 determines that the reading procedure fails. On the contrary, if the read access permission of the target basic file EF is the always allowed level or the personal identification number allowed level (the result of the determination of operation S402 is "yes"), the process proceeds to operation S406.

[0051] In operation S406, the processor 120 determines whether the reading program supports the short file identification format. If the reading program does not support the short file identification format (the determination result of operation S406 is "No"), the process proceeds to operation S408. For example, if the reading program does not support the short file identification format, it means that the basic file in the current directory cannot be directly read using the shorter identification number in the command, but the basic file must be selected using the complete identification number (ID) before the file can be read.

[0052] In operation 408, the processor 120 selects a target basic file EF. For example, the processor 120 outputs a selection command to select the target basic file EF in the SIM card 140. Then, the process proceeds to operation S410.

[0053] In operation S410 , the processor 120 reads the target basic file EF. For example, the processor 120 outputs a read command to read the target basic file EF from the SIM card 140 .

[0054] Returning to operation S406, if the reading program supports the short file identification format (the determination result of operation S406 is "yes"), proceed to operation S412. For example, if the reading program supports the short file identification format, it means that the basic file in the current directory can be directly read using the shorter identification number in the command.

[0055] In operation S412, the processor 120 determines whether the target basic file EF supports the short file identification format. If the target basic file EF does not support the short file identification format (the determination result of operation S412 is "No"), the process proceeds to operation S408 and operation S410 to output a selection command and a read command to select and read the target basic file EF. On the contrary, if the target basic file EF supports the short file identification format (the determination result of operation S412 is "Yes"), the process proceeds to operation S414.

[0056] In operation S414, the processor 120 determines whether the target basic file EF is located in the current directory. If the target basic file EF is not located in the current directory (the determination result of operation S414 is "No"), the process proceeds to operation S416.

[0057] In operation S416, the processor 120 selects the parent directory of the target basic file EF. For example, the processor 120 selects the dedicated file DF or the application dedicated file ADF to which the target basic file EF belongs (for example, by directly specifying a path guidance, etc.), such as Figure 2 Next, enter operation S418.

[0058] In operation S418, the processor 120 reads the target basic file EF using the short file identification format. For example, the processor 120 outputs a read command to read the target basic file EF from the SIM card 140 using the short file identification format.

[0059] Returning to operation S414 , if the processor 120 determines that the target basic file EF is located in the current directory (the determination result of operation S414 is “yes”), the process directly proceeds to operation S418 to read the target basic file EF from the SIM card 140 using the short file recognition format.

[0060] As mentioned above, the process of reading the target basic file EF roughly comprises the process of selecting files (such as operation S408) and reading files (such as operation S410). And the application protocol data unit (APDU) transmission protocol of the SIM card 140 is divided into T=0 protocol and T=1 protocol.

[0061] refer to Figure 5 . Figure 5It is a schematic diagram of a signal transmission process under a T=0 transmission protocol according to some embodiments of the present invention.

[0062] First, processor 120 sends selection command header (SELECT commandheader) (operation S502) to SIM card 140. Then, SIM card 140 sends first group of procedure bytes (procedure byte) (operation S504) to processor 120. If the program bytes received equal selection command number (SELECT commandINS), processor 120 sends selection command data (SELECT command data) (operation S506) to SIM card 140. Then, processor 120 can receive first group of status words (status words) (operation S508). If status words are not equal to 0x61XX (XX can represent length), program terminates. If status words equal 0x61XX, processor 120 sends acquisition reply command header (GET RESPONSE command header) (operation S510) to SIM card 140. Then, SIM card 140 sends second group of procedure bytes (operation S512) to processor 120. If the program byte received equals to obtain the reply command number (GET RESPONSE command INS), processor 120 continues to receive the target file or the file control parameter of the target directory that SIM card 140 sends and the second group of status word group (operation S514). Then, processor 120 sends to SIM card 140 and reads two-bit command header (READ BINARY command header) or reads the record command header (READ RECORD command header) according to the structure type of the target file, to start reading the target file (operation S516). Then, SIM card 140 sends the third group of program byte (operation S518) to processor 120. If the program byte received equals to read two-bit command number (READ BINARY command INS) or reads the record command number (READ RECORD command INS), processor 120 continues to receive the file content and the third group of status word group (operation S520) that SIM card 140 sends, and then ends the read program.

[0063] refer to Figure 6 . Figure 6 It is a schematic diagram of a signal transmission process under a T=1 transmission protocol according to some embodiments of the present invention.

[0064] First, the processor 120 sends a select command (SELECT command) to the SIM card 140 (operation S602). The select command includes a select command header and select command data. That is, Figure 6 In the embodiment of the present invention, the command header and the command data are selected to be sent to the SIM card 140 together. Then, the SIM card 140 sends the file control parameter and the first group of status word group (operation S604) of the target file or the target directory to the processor 120. If the status word group display that is received selects the file to be normally completed, the processor 120 sends the two-bit command header or the read record command header to the SIM card 140 according to the structure type of the target file, to start reading the target file (operation S606). Then, the processor 120 continues to receive the file content and the second group of status word group (operation S608) that the SIM card 140 sends, and then ends the read program.

[0065] Generally speaking, when selecting the application supported by the SIM card 140, the EFDIR file (comprising the application and the corresponding identification number (ID)) needs to be read. In addition, in the process of each boot initialization, nearly 20 files need to be read. These files are for example but not limited to, EFECC files about emergency call codes, EFLI (EFPL) files about languages, EFUST files about the service list supported by the universal SIM card, EFEST files about the service list enabled, EFAD files about the operation mode and the mobile network code length, EFIMSI files about the identification number of the SIM card, EFACC files about the access control level, and EFFPLMN files about the prohibited public land mobile network list). Reading a file from the SIM card 140 all needs to be performed according to the transmission protocol respectively. Figure 5 or Figure 6 That is to say, during each startup initialization or normal operation, a large amount of signal transmission will be performed between the processor 120 and the user identification module card 140. This will have a great impact on the startup time and work efficiency of the communication device 100.

[0066] However, as mentioned above, in the present invention, the processor 120 only needs to read the file from the SIM card 140 once and store the read file in the non-transient memory 160. In this way, when the file needs to be read in the future, the processor 120 can directly read the file from the non-transient memory 160. Since the speed at which the processor 120 reads data from the non-transient memory 160 is faster, the method of the present invention can actually speed up the startup time of the communication device 100 and improve the working efficiency of the communication device 100.

[0067] In summary, in the present application, if the file in the SIM card is not stored in the non-transient memory, the processor can execute a read program to read out the file from the SIM card and store the file in the non-transient memory. In this way, the processor can directly read the file from the non-transient memory next time to improve the operating efficiency of the communication device.

[0068] Various functional components and blocks have been disclosed herein. It will be apparent to those skilled in the art that the functional blocks may be implemented by circuits (whether dedicated circuits or general purpose circuits operating under the control of one or more processors and coded instructions) that generally include transistors or other circuit components that control the operation of electrical circuits corresponding to the functions and operations described herein. It will be further understood that the specific structure and interconnection of the circuit components may generally be determined by a compiler, such as a Register Transfer Language (RTL) compiler. The RTL compiler operates on a script that is quite similar to assembly language code and compiles the script into a form that is used to lay out or fabricate the final circuit.

[0069] Although the content of the present invention application has been disclosed as above through specific implementation methods, these multiple embodiments are not used to limit the content of the present invention application. Ordinary technicians in this field can modify or adjust the technical solution of the present invention application according to the explicit or implicit content of the present invention application without departing from the concept and scope of the content of the present invention application. All these changes may fall within the scope of patent protection sought by the present invention application. In other words, the scope of protection of the content of the present invention application shall be based on the scope defined in the claims.

Claims

1. A file reading method, characterized in that: The file reading method comprises: determining, by the processor, whether the file in the subscriber identity module card is stored in the non-transient memory; If the file is not stored in the non-transient memory, executing a reading program by the processor to read the file from the SIM card; as well as storing the file in the non-transitory memory by the processor, Wherein, executing the reading program by the processor to read the file from the SIM card includes: Determining, by the processor, whether the read access permission of the file meets a specific access permission level; If the read access permission meets the specific access permission level, determining by the processor whether the read program supports a short file identification format; If the reading program does not support the short file identification format, outputting a first selection command through the processor to select the file in the subscriber identification module card; and The processor outputs a first read command to read the file from the subscriber identification module card.

2. The file reading method according to claim 1, wherein: The file reading method further comprises: If the file is stored in the non-transient memory, determining by the processor whether the identification value in the non-transient memory is the same as the identification value of the SIM card; and If the identification value in the non-transient memory is the same as the identification value of the SIM card, the file is read out from the non-transient memory by the processor.

3. The file reading method according to claim 1, wherein: The file reading method further comprises: If the file in the SIM card is updated, the file in the non-transitory memory is updated by the processor.

4. The file reading method according to claim 1, wherein: The file reading method further comprises: If the reading program supports the short file identification format, determining by the processor whether the file supports the short file identification format; If the file does not support the short file identification format, outputting the first selection command through the processor to select the file in the subscriber identification module card; as well as The processor outputs the first read command to read the file from the subscriber identification module card.

5. The file reading method according to claim 4, characterized in that: The file reading method further comprises: If the file supports the short file identification format, determining by the processor whether the file is located in the current directory; as well as If the file is located in the current directory, the processor outputs a second read command to read the file from the SIM card using the short file recognition format.

6. The file reading method according to claim 5, characterized in that: The file reading method further comprises: If the file is not located in the current directory, outputting a second selection command through the processor to select the parent directory of the file; as well as The processor outputs the second read command to read the file from the SIM card using the short file identification format.

7. The file reading method according to claim 1, wherein: The file reading method further comprises: If the read access permission does not conform to the specific access permission level, the processor determines that the read procedure fails.

8. The file reading method according to claim 1, wherein: The subscriber identification module card is a universal subscriber identification module card.

9. A non-transitory computer-readable storage medium, characterized in that: The system comprises at least one program code, and the processor is used to execute the at least one program code to perform the following operations: Determining whether the file in the SIM card is stored in the non-transient memory; If the file is not stored in the non-transient memory, executing a reading procedure to read the file from the SIM card; and storing the file in the non-transient memory, The execution of the reading program to read the file from the SIM card includes: Determining whether the read access permission of the file meets the specified access permission level; If the read access permission meets the specific access permission level, determining whether the reading program supports a short file identification format; If the reading program does not support the short file identification format, output a first selection command to select the file in the subscriber identification module card; and Output a first read command to read the file from the SIM card.

Citation Information

Patent Citations

  • Methods and apparatus for optimization of SIM card initialization

    US20140057679A1