A method for remotely writing SIM card information to a communication module

The method of remotely writing SIM card information and saving it through the communication module, using the boot loader and new communication protocol, solves the security and stability problems when remotely updating SIM card data, and achieves safe transmission and efficient storage of data.

CN118474719BActive Publication Date: 2024-10-29QIBEN TECH GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410580839.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-10-29
Estimated Expiration
2044-05-11

AI Technical Summary

Technical Problem

When updating SIM card data remotely, there are problems with data transmission security, data downloading and saving. Especially when the storage capacity is limited and the communication protocol is not supported, it is difficult to ensure the stability and security of the data.

Method used

The communication module remotely writes the SIM card information and saves it. By obtaining the request instruction, judging the request type, calling the boot loader, including the main boot loader and the second-stage boot loader, the storage of data in the memory is organized, using The new communication protocol performs data packetization and decryption, and performs data transmission between non-volatile memory and volatile memory for security assessment and data verification.

Benefits of technology

It solves the data transmission security and preservation problems when updating SIM card data remotely, ensures the stability and security of data, makes full use of the storage speed of different memories, avoids memory constraints and code duplication, and improves the efficiency of data writing. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474719B_ABST
    Figure CN118474719B_ABST
Patent Text Reader

Abstract

A method for storing information written into a SIM card remotely by a communication module, the method comprising the following steps: S1, obtaining request instruction information, the request instruction information comprising a user-side request instruction and a network-side request instruction; S2, determining the type of request instruction; S3, calling a boot loader; the loader comprises a main boot loader and a second-stage boot loader, the second-stage boot loader being used to load boot data when the main boot loader does not support updating; S4, organizing the data received in the memory and storing them in a non-volatile memory and / or a volatile memory respectively. The method of the present invention optimizes the download and storage process of data in the process of remotely writing into a SIM card, and improves the security and storage speed of data communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method for storing information written into a SIM card by a communication module remotely. Background Art

[0002] SIM card is the user identification card of cellular mobile devices, and its full name is Subscriber Identity Module. SIM card contains microprocessor and memory, which can store customer information, encryption key, SMS information, etc. It can provide the operator network with the identity of the terminal customer, and encrypt the customer's call to prevent the call voice from being eavesdropped. Now there is a new SIM card, which is based on the form of memory card and adds SIM card contacts, so that the storage function and SIM card communication function are realized on one card at the same time. At present, the IC chip of most SIM cards has only 128KB storage capacity, which can only be used to store contacts. The new SIM card supports 32GB, 64GB and 128GB storage capacity, which allows users to store large files such as movies and music, with a reading speed of 90MB / s and a writing speed of 60MB / s.

[0003] Updating SIM data remotely, without plugging and unplugging the SIM card back and forth, can be achieved by interacting with the operator server (cloud server) through a mobile phone or a reading and writing device with a communication module, which can improve user experience. In remote data transmission, it is necessary to consider data security issues, data storage issues after receiving data, and communication establishment issues. For this reason, we propose a method for remotely writing SIM card information to save by a communication module. Summary of the invention

[0004] One of the invention objects of the present invention is to provide a method for storing information of a SIM card remotely written by a communication module, the method comprising the following steps:

[0005] S1. Obtain request instruction information, where the request instruction information includes a user-side request instruction and a network-side request instruction;

[0006] S2, determining the request instruction type;

[0007] If it is a user-side request instruction, a data download request is sent to the operator; after obtaining the data sent by the operator, the download is started;

[0008] If it is a network request command, a data parsing command is sent. After receiving the command, the communication module parses the data to determine whether the data information is for the SIM card. If so, the download is started, otherwise the data parsing is performed again;

[0009] S3, calling a boot loader; the boot loader includes a main boot loader and a second-stage boot loader, the second-stage boot loader is used to load boot data when the main boot loader does not support updating;

[0010] S4. The data received in the organization memory are stored in the non-volatile memory and / or the volatile memory respectively.

[0011] Preferably, after obtaining the data sent by the operator in S2, starting the download includes the following steps:

[0012] S2.1, Evaluate and build communication protocols;

[0013] Use the existing communication protocol to send and receive data; if the existing communication protocol does not support it, establish a new communication protocol;

[0014] The new communication protocol is used to sub-packetize the data and provide metadata for binary files in the new data;

[0015] S2.2. Perform security assessment and decrypt confidential bytes in the data using the new communication protocol.

[0016] Preferably, the step S2.2 further includes the following steps:

[0017] Check whether data is damaged;

[0018] Verify that the data is sent by a trusted server;

[0019] The detection of whether the data is damaged is to perform a hash function on the received data digest and compare it with the digest sent by the server to determine whether modification has occurred;

[0020] The verification data is whether it is sent by a trusted server, specifically by verifying the server identity through an asymmetric key.

[0021] Preferably, the security assessment may also be performed using a hash chain, including the following steps:

[0022] Send data packet distribution instructions to the server;

[0023] The server distributes multiple packets;

[0024] When a packet arrives, it is hashed and the signature is cached;

[0025] Compare the first data packet payload with the second data packet payload. If they match, determine that the source of subsequent data packets is a trusted server.

[0026] Preferably, among the multiple data packets, the payload of the first data packet is a signature, the payload of the second data packet includes a binary portion and the signature of the third data packet.

[0027] Preferably, step S4 includes the following sub-steps:

[0028] S4.1. Determine whether the received data is compressed. If it is compressed data, call the decompression program to decompress the data. Otherwise, proceed to the next step.

[0029] S4.2, writing the received data to be written to the target location in the non-volatile memory;

[0030] S4.3. The data in the non-volatile memory is placed in the volatile memory (SRAM) for caching, and during the SIM card writing process, the non-volatile memory is read and written.

[0031] Preferably, step S4 comprises the following steps:

[0032] Erasing a location in volatile memory;

[0033] Write the received data to be written to this location.

[0034] The step S4 comprises the following steps:

[0035] A storage area is reserved in the volatile memory; and the data to be written is stored in the area;

[0036] When the area fills up, data is written to the non-volatile memory to clear the area.

[0037] Preferably, step S4 comprises the following steps:

[0038] The data to be written is stored in the volatile memory;

[0039] Check whether the data transmission is completed. If the transmission is not completed, repeat the previous step; otherwise, proceed to the next step;

[0040] Write the data in the volatile memory to the non-volatile memory.

[0041] Preferably, the boot loader comprises:

[0042] Call the primary boot loader;

[0043] Download server data via the main bootloader;

[0044] The second-stage boot loader is used to load boot data when the main boot loader does not support updating, and specifically includes the following steps:

[0045] Set the reset command value for primary and second stage bootloader loading;

[0046] Assign a value to reset;

[0047] When the reset command value is 1, the main boot loader is loaded to download data; when the main boot loader does not support downloading, the reset command value is assigned to 0, and the second-stage boot loader is started to download data.

[0048] Preferably, the boot loader further comprises: storing the main boot loader in a SIM card.

[0049] Beneficial Effects

[0050] 1. The method of the present invention can solve the problems of data transmission security, data downloading and storage faced in remotely updating SIM card data.

[0051] 2. In the present invention, by setting the storage and loading process of the second-stage boot loader, when the main loading boot loader does not support data downloading, data is loaded through the second-stage boot loader to ensure the stability of data acquisition written to the SIM card.

[0052] 3. In the present invention, by optimizing the storage location of the main loading boot program, the storage space of the SIM card is utilized to store the main loading boot program in the SIM card without occupying the memory. When updating, the main loading boot program stored in the SIM card is used to guide the download of the update data, thereby omitting the second stage boot loading process and avoiding the client memory constraint on the functional setting of the SSBL.

[0053] 4. In the present invention, by organizing the distribution of data in the memory, by partially using the flash memory or completely using the flash memory, the storage speed of different storage devices is fully utilized without weakening the flash memory (non-volatile storage). BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 Shown is a flow chart of a method for remotely writing SIM card information for storage by a communication module of the present invention. DETAILED DESCRIPTION

[0055] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.

[0056] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.

[0057] Embodiment 1:

[0058] A method for storing SIM card information remotely written by a communication module, the method comprising the following steps:

[0059] S1. Obtain request instruction information, where the request instruction information includes a user-side request instruction and a network-side request instruction;

[0060] S2, determining the request instruction type;

[0061] If it is a user-side request instruction, a data download request is sent to the operator; after obtaining the data sent by the operator, the download is started;

[0062] If it is a network request command, a data parsing command is sent. After receiving the command, the communication module parses the data to determine whether the data information is for the SIM card. If so, the download is started, otherwise the data parsing is performed again;

[0063] S3, calling a boot loader; the boot loader includes a main boot loader and a second-stage boot loader, the second-stage boot loader is used to load boot data when the main boot loader does not support updating;

[0064] S4. The data received in the organization memory are stored in the non-volatile memory and / or the volatile memory respectively.

[0065] The boot loader includes:

[0066] Call the primary boot loader;

[0067] Download server data via the primary bootloader.

[0068] After the data sent by the operator is obtained in S2, downloading is started, including the following steps:

[0069] S2.1, Evaluate and build communication protocols;

[0070] Use the existing communication protocol to send and receive data; if the existing communication protocol is not supported, the feedback call value NoSP is fed back. When the NoSP value is 1, a request to update the communication protocol occurs and waits for feedback;

[0071] After the preset waiting time T is reached, an automatic download request is sent to the communication module, the server is connected, a new communication protocol is obtained, and the new communication protocol is used to communicate with the server;

[0072] The new communication protocol is used to sub-packetize the data and provide metadata for binary files in the new data;

[0073] S2.2. Perform security assessment and decrypt confidential bytes in the data using the new communication protocol.

[0074] The step S2.2 further includes the following steps:

[0075] Check whether data is damaged;

[0076] Verify that the data is sent by a trusted server;

[0077] The detection of whether the data is damaged is to perform a hash function on the received data digest and compare it with the digest sent by the server to determine whether modification has occurred;

[0078] The verification data is whether it is sent by a trusted server, specifically by verifying the server identity through an asymmetric key.

[0079] The security assessment may also be performed using a hash chain, including the following steps:

[0080] Send data packet distribution instructions to the server;

[0081] The server distributes multiple packets;

[0082] When a packet arrives, it is hashed and the signature is cached;

[0083] Compare the first data packet payload with the second data packet payload. If they match, determine that the source of subsequent data packets is a trusted server.

[0084] Among the multiple data packets, the payload of the first data packet is a signature, the payload of the second data packet includes a binary portion and the signature of the third data packet.

[0085] The step S4 comprises the following sub-steps:

[0086] S4.1. Determine whether the received data is compressed. If it is compressed data, call the decompression program to decompress the data. Otherwise, proceed to the next step.

[0087] S4.2, writing the received data to be written to the target location in the non-volatile memory;

[0088] S4.3. The data in the non-volatile memory is placed in the volatile memory for caching, and during the SIM card writing process, the non-volatile memory is read and written.

[0089] The bootloader is a program that permanently resides in the microcontroller's read-only memory. It is executed at every reset and usually performs some necessary hardware initialization and can load data into memory.

[0090] The bootloader does not need to do any loading, just transfer control to the program in flash. If the primary bootloader does not have any support for downloading data, it is necessary to use a second stage bootloader (SSBL). Like the primary bootloader, the second stage bootloader will run on every reset, but will implement the data download process. On some microcontrollers, the primary bootloader always runs the program of the Interrupt Vector Table (IVT), which is a key part of the application that describes the interrupt handling functions and is located at address 0. This means that some form of reset mapping is required to relocate the IVT to the downloaded data. In this embodiment, the reset value is assigned based on the power cycle state. After the power cycle, reset is assigned to 1. If the power cycle occurs during the IVT relocation process, it may leave the system in a permanently corrupted state. This problem can be alleviated by setting the second stage bootloader at address 0. Since the second stage bootloader is a non-RTOS program, it can safely switch to a new application. There is no need to be concerned about power cycling because the second stage bootloader at address 0 of the IVT is never reset.

[0091] Embodiment 2:

[0092] Adding an SSBL means that each program must be responsible for downloading and verifying the next data (program). This can lead to code duplication in the wireless stack, device firmware, and data update software. On the other hand, there is an option to push the entire data update process to the SSBL. In this case, the application only needs to set a flag in the ToC to request an update and then perform a reset. The SSBL then performs the download sequence and verification process. This will minimize code duplication and simplify application-specific software. However, deciding what functionality to place in the SSBL will depend on the memory constraints of the client device, the similarities between the downloaded data, and the portability of the data writing software.

[0093] In order to solve this problem, the present invention proposes a technical solution: a method for remotely writing SIM card information for storage by a communication module, comprising the following steps:

[0094] S1. Obtain request instruction information, where the request instruction information includes a user-side request instruction and a network-side request instruction;

[0095] S2, determining the request instruction type;

[0096] If it is a user-side request instruction, a data download request is sent to the operator; after obtaining the data sent by the operator, the download is started; in this embodiment, the user actively clicks on the STK menu to trigger the sending of a message to the operator. After the operator receives the message, the operator will send the corresponding information to the user side. At this time, the communication module uses the BIP protocol to download the corresponding data to update the SIM card application.

[0097] If it is a network request instruction, a data parsing instruction is sent. After receiving the instruction, the communication module parses the data to determine whether the data information is for the SIM card. If so, the download is started, otherwise the data is re-parsed. In this embodiment, the operator can send configuration information to the user end through the server, and the user end downloads data through SMS PP. The communication module (Modem) will parse the data. If it is for the SIM card, the command will be directly used to operate the SIM card to achieve the effect of updating the data. After the update is completed, an update message is sent to the AP end through Rild.

[0098] S3, calling a boot loader; the boot loader includes a main boot loader and a second-stage boot loader, the second-stage boot loader is used to load boot data when the main boot loader does not support updating;

[0099] S4. The data received in the organization memory are stored in the non-volatile memory and / or the volatile memory respectively.

[0100] The main boot loader is stored in the SIM card; the main boot loader is loaded by calling the original program in the SIM card; the server data is downloaded through the main boot loader; in this embodiment, the SIM card can adopt the 5G super SIM card jointly developed by Guangzhou Unicom and Ziguang Guowei, which supports 32GB, 64GB and 128GB storage capacity and can store the main boot loader.

[0101] Set the reset command value for primary and second stage bootloader loading;

[0102] Assign a value to reset; when the reset command value is 1, load the main boot loader to download data; when the main boot loader does not support downloading, assign the reset command value to 0, start the second stage boot loader to download data.

[0103] After the data sent by the operator is obtained in S2, downloading is started, including the following steps:

[0104] S2.1, Evaluate and build communication protocols;

[0105] Use the existing communication protocol to send and receive data; if the existing communication protocol does not support it, establish a new communication protocol;

[0106] The new communication protocol is used to sub-packetize the data and provide metadata for binary files in the new data;

[0107] S2.2. Perform security assessment and decrypt confidential bytes in the data using the new communication protocol.

[0108] The step S2.2 further includes the following steps:

[0109] Check whether data is damaged;

[0110] Verify that the data is sent by a trusted server;

[0111] The detection of whether the data is damaged is to perform a hash function on the received data digest and compare it with the digest sent by the server to determine whether modification has occurred;

[0112] The verification data is whether it is sent by a trusted server, specifically by verifying the server identity through an asymmetric key.

[0113] The step S4 comprises the following sub-steps:

[0114] S4.1. Determine whether the received data is compressed. If it is compressed data, call the decompression program to decompress the data. Otherwise, proceed to the next step.

[0115] S4.2, erasing a location in the volatile memory; writing the received data to be written to the location;

[0116] S4.3, when the data in the non-volatile memory is placed in the volatile memory (SRAM) for caching, during the SIM card writing process, a storage area is reserved in the volatile memory; the data to be written is stored in the area; when the area is full, the data is written to the non-volatile memory to clear the area. In this embodiment, a page of non-volatile memory (flash memory) can be cached in the SRAM, and when it is full or the next data packet belongs to a different page, the cache is refreshed by writing the flash memory of the page, which can partially utilize the read and write speed advantages of the cache.

[0117] Embodiment three:

[0118] When considering data transmission security, most microcontrollers do not have hardware accelerators to implement these asymmetric cryptographic operations. Although these asymmetric cryptographic operations solve the trust problem during data transmission, they are costly in terms of processing time and require signatures to be sent along with the data, which increases the size of the data packet.

[0119] To solve this problem, the following technical solution is proposed: a method for remotely writing SIM card information for storage by a communication module, which is different from the first embodiment in that:

[0120] The security assessment may also be performed using a hash chain, including the following steps:

[0121] Send a data packet distribution instruction to the server, wait for the data packet to be received and call the hash processing program at the same time; when the data packet arrives, hash the data packet and cache the signature;

[0122] Compare the first data packet payload with the second data packet payload. If they match, determine that the source of subsequent data packets is a trusted server.

[0123] Among the multiple data packets, the payload of the first data packet is a signature, the payload of the second data packet includes a binary portion and the signature of the third data packet.

[0124] The embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.

Claims

1. A method for storing SIM card information remotely written by a communication module, characterized in that: The method comprises the following steps: S1. Obtain request instruction information, where the request instruction information includes a user-side request instruction and a network-side request instruction; S2, determining the request instruction type; If it is a user-side request instruction, a data download request is sent to the operator; after obtaining the data sent by the operator, the download is started; If it is a network request command, a data parsing command is sent. After receiving the command, the communication module parses the data to determine whether the data information is for the SIM card. If so, the download is started, otherwise the data parsing is performed again; S3, calling a boot loader; the boot loader includes a main boot loader and a second-stage boot loader, the second-stage boot loader is used to load boot data when the main boot loader does not support updating; S4, organizing the data received in the memory and storing them in the non-volatile memory and / or the volatile memory respectively; The boot loader includes: Call the primary boot loader; Download server data via the main bootloader; The second-stage boot loader is used to load boot data when the main boot loader does not support updating, and specifically includes the following steps: Set the reset command value for primary and second stage bootloader loading; Assign the reset command value; When the reset command value is 1, the main boot loader is loaded to download data; when the main boot loader does not support downloading, the reset command value is assigned to 0, and the second-stage boot loader is started to download data; Store the primary boot loader on the SIM card.

2. A method for storing SIM card information remotely written by a communication module according to claim 1, characterized in that: After the data sent by the operator is obtained in S2, downloading is started, including the following steps: S2.1, Evaluate and build communication protocols; Use the existing communication protocol to send and receive data; if the existing communication protocol does not support it, establish a new communication protocol; The new communication protocol is used to sub-packetize the data and provide metadata for binary files in the new data; S2.

2. Perform security assessment and decrypt confidential bytes in the data through the new communication protocol with the server.

3. A method for storing SIM card information remotely written by a communication module according to claim 2, characterized in that: The step S2.2 further includes the following steps: Check whether data is damaged; Verify that the data is sent by a trusted server; The detection of whether the data is damaged is to perform a hash function on the received data digest and compare it with the digest sent by the server to determine whether modification has occurred; The verification data is whether it is sent by a trusted server, specifically by verifying the server identity through an asymmetric key.

4. A method for storing SIM card information remotely written by a communication module according to claim 2, characterized in that: The security assessment may also be performed using a hash chain, including the following steps: Send data packet distribution instructions to the server; Waiting for receiving data packets and calling hash processing procedures; When a packet arrives, it is hashed and the signature is cached; Compare the first data packet payload with the second data packet payload. If they match, determine that the source of subsequent data packets is a trusted server. Among the multiple data packets, the payload of the first data packet is a signature, the payload of the second data packet includes a binary portion and the signature of the third data packet.

5. The method for storing SIM card information remotely written by a communication module according to claim 1, characterized in that: The step S4 comprises the following sub-steps: S4.

1. Determine whether the received data is compressed. If it is compressed data, call the decompression program to decompress the data. Otherwise, proceed to the next step. S4.2, writing the received data to be written to the target location in the non-volatile memory; S4.

3. The data in the non-volatile memory is placed in the volatile memory for caching, and during the SIM card writing process, the non-volatile memory is read and written.

6. A method for storing SIM card information remotely written by a communication module according to claim 1, characterized in that: The step S4 comprises the following steps: Erasing a location in volatile memory; Write the received data to be written to this location.

7. A method for storing SIM card information remotely written by a communication module according to claim 6, characterized in that: A storage area is reserved in the volatile memory; and data to be written is stored in the area; When the area fills up, data is written to the non-volatile memory to clear the area.

8. A method for storing SIM card information remotely written by a communication module according to claim 1, characterized in that: The step S4 comprises the following steps: The data to be written is stored in the volatile memory; Check whether the data transmission is completed. If the transmission is not completed, repeat the previous step; otherwise, go to the next step; write the data in the volatile memory into the non-volatile memory.

Citation Information

Patent Citations

  • Communication module, communication method and system for realizing eSIM remote configuration

    CN110446201A

  • Remote SIM card writing method and device

    CN112449340A