CN111343626A - SIM card initialization method and device, terminal equipment and computer storage medium - Google Patents

SIM card initialization method and device, terminal equipment and computer storage medium Download PDF

Info

Publication number
CN111343626A
CN111343626A CN201811556599.1A CN201811556599A CN111343626A CN 111343626 A CN111343626 A CN 111343626A CN 201811556599 A CN201811556599 A CN 201811556599A CN 111343626 A CN111343626 A CN 111343626A
Authority
CN
China
Prior art keywords
initialization
sim card
card
component
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811556599.1A
Other languages
Chinese (zh)
Inventor
蔡中军
胡运翠
段宏洋
李玉英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Liaoning Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Liaoning Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Liaoning Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811556599.1A priority Critical patent/CN111343626A/en
Publication of CN111343626A publication Critical patent/CN111343626A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/183Processing at user equipment or user record carrier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)

Abstract

Disclosed are a SIM card initialization method and device, a terminal device and a computer storage medium, wherein the SIM card initialization method comprises the following steps: reading the SIM card to obtain a serial number of the SIM card, wherein the serial number comprises a card merchant code; selecting a corresponding card identification component according to the card merchant code; calling a card identification component to acquire characteristic information from the serial number; selecting a corresponding initialization component according to the characteristic information, and acquiring initialization component information of the initialization component; acquiring a management authority authentication value according to the card merchant code; and the initialization component information and the management authority authentication value call the initialization component to initialize the SIM card. The initialization process in the embodiment of the invention relieves the limitation on the type of the SIM card, enhances the universality of the initialization of the SIM card and reduces the cost.

Description

SIM card initialization method and device, terminal equipment and computer storage medium
Technical Field
The invention relates to the field of SIM card initialization, in particular to an SIM card initialization method and device, terminal equipment and a computer storage medium.
Background
With the rapid development of modern communication technology, users use Subscriber Identity Module (SIM) cards to implement network interconnection through various devices. SIM cards are divided into a variety of card types depending on card suppliers, operators, applicable territories, and the like.
SIM card initialization, also called re-personalization of SIM cards, refers to an operation of rewriting and emptying personalized data of a personalized SIM card to achieve the purpose of recycling.
At present, the operation of initializing the SIM card is mainly performed by terminal devices with built-in initialization programs, wherein for the SIM card of a predetermined card type, each terminal device is matched with a corresponding initialization program, but cannot initialize other types of SIM cards. If an initialization program matched with all types of SIM cards is built in the terminal equipment, an internal system of the terminal equipment is too complicated to realize.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for initializing SIM cards, a terminal device and a computer storage medium, which can perform corresponding initialization operations on different types of SIM cards, thereby enhancing the versatility of SIM card initialization.
In a first aspect, an embodiment of the present invention provides a method for initializing a SIM card, including: reading a SIM card to obtain a serial number of the SIM card, wherein the serial number comprises a card quotient code; selecting a corresponding card identification component according to the card merchant code; calling the card identification component to acquire characteristic information from the serial number; selecting a corresponding initialization component according to the characteristic information, and acquiring initialization component information of the initialization component; acquiring a management authority authentication value according to the card merchant code; and calling the initialization component to initialize the SIM card according to the initialization component information and the management authority authentication value.
According to an aspect of the embodiment of the present invention, before the step of calling the initialization component to initialize the SIM card, the method further includes: acquiring a corresponding authentication key according to the characteristic information; and performing authentication according to the authentication key, wherein if the authentication is passed, the rest steps are continued, and if the authentication is not passed, the rest steps are stopped, and the SIM card is failed to initialize.
According to an aspect of the embodiment of the present invention, the step of authenticating according to the authentication key includes performing bidirectional authentication with a provider of the card identification component.
According to an aspect of the embodiment of the present invention, the step of reading the SIM card further includes obtaining personalization information of the SIM card, and the SIM card initialization method further includes: and recovering and storing the personalized information.
According to an aspect of the embodiment of the present invention, the step of invoking the card identification component to obtain the feature information from the serial number includes: calling the card identification component to identify the serial number so as to obtain card information of the SIM card; and selecting the characteristic information from the card information.
According to an aspect of the embodiment of the present invention, the types of the feature information obtained according to different selections of the serial number bits are different.
According to an aspect of the embodiment of the present invention, if the number of digits of the serial number is 16, the selected feature information is a type of the SIM card and card inherent information; and if the digit of the serial number is 20, selecting the obtained characteristic information as a card quotient code.
According to an aspect of the embodiment of the present invention, the step of obtaining the authentication value of the management authority according to the card merchant code includes: selecting a corresponding private table from a card merchant table according to the card merchant code; and selecting the corresponding management authority authentication value from a private list according to the card information.
In a second aspect, an embodiment of the present invention provides an apparatus for initializing a SIM card, including: the reading and writing module is used for reading the SIM card according to the reading instruction and rewriting the SIM card according to the initialization instruction so as to initialize the SIM card; the communication module is used for acquiring the card identification component and the management authority authentication value and acquiring the initialization component according to the characteristic information; and the initialization processing module is connected with the read-write module and the communication module and used for sending the read instruction to the read-write module, calling the card identification component to acquire the characteristic information and sending the characteristic information to the communication module, receiving the initialization component and identifying the initialization component to obtain initialization component information, and calling the initialization component to send the initialization instruction to the read-write module according to the initialization component information and the management authority authentication value.
According to an aspect of the embodiment of the present invention, the SIM card initialization apparatus further includes: and the authentication module is connected with the communication module and/or the initialization processing module, and is further used for acquiring an authentication key according to the characteristic information and authenticating according to the authentication key.
According to an aspect of the embodiment of the present invention, the SIM card initialization apparatus further includes: and the storage module is connected with the read-write module and/or the initialization processing module, the read-write module reads the personalized information of the SIM card, and the storage module is used for recovering and storing the personalized information.
According to an aspect of the embodiment of the present invention, the SIM card initialization apparatus further includes: the human-computer interaction module is used for acquiring a user instruction and displaying a processing result; and the central processing module is connected with the human-computer interaction module and the initialization processing module and used for sending a control instruction to the initialization processing module according to the user instruction, and the initialization processing module carries out corresponding operation according to the control instruction.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor and a memory storing computer program instructions, where the processor implements the SIM card initialization method according to any one of the foregoing methods when executing the computer program instructions.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium having computer program instructions stored thereon, where the computer program instructions, when executed by a processor, implement the SIM card initialization method of any one of the foregoing.
According to the SIM card initialization method and device, the terminal equipment and the computer storage medium provided by the embodiment of the invention, aiming at any type of SIM card, the corresponding card identification component can be obtained from the server end through the card manufacturer code in the serial number of the SIM card, the preset characteristic information can be obtained by identifying the SIM card through the corresponding card identification component, the matched initialization component is obtained from the server end through the preset characteristic information, and the initialization operation of the type of SIM card can be realized through the corresponding matched initialization component. The initialization process in the embodiment of the invention relieves the limitation on the type of the SIM card, and only needs to download the corresponding initialization component in real time when the SIM card needs to be initialized, thereby enhancing the universality of the SIM card initialization, reducing the cost and having wider application range.
In some optional embodiments, a bidirectional authentication step is further added in the SIM card initialization process, so as to improve the security of the SIM card initialization operation.
In some optional embodiments, the original personalized data of the SIM card is also recovered in the SIM card initialization process, so that resources are saved and the SIM card can be reused in subsequent card writing operations of the SIM card.
Drawings
Other features, objects and advantages of the invention will become apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings in which like or similar reference characters refer to the same or similar parts.
Fig. 1 shows a flow chart of a SIM card initialization method according to a first embodiment of the present invention;
fig. 2 shows a flow chart of a SIM card initialization method according to a second embodiment of the present invention;
fig. 3 is a block diagram showing the construction of a SIM card initialization apparatus according to a first embodiment of the present invention;
fig. 4 is a block diagram showing the construction of a SIM card initialization apparatus according to a second embodiment of the present invention;
fig. 5 shows a hardware configuration diagram of a terminal device according to an embodiment of the present invention;
figure 6 shows a flow diagram of computer program instructions stored by a terminal device according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is in no way limited to any specific configuration and algorithm set forth below, but rather covers any modification, replacement or improvement of elements, components or algorithms without departing from the spirit of the invention. In the drawings and the following description, well-known structures and techniques are not shown in order to avoid unnecessarily obscuring the present invention.
Embodiments of the present invention provide a method for initializing an SIM card, where the term "SIM card" refers to a User identity Module (SIM) card used in a terminal for performing a communication function, and includes cards with different names and the same actual functions, such as a User Identity Module (UIM) card. In addition, the SIM card may be a general SIM card, a Universal Subscriber Identity Module (USIM) card (also called an upgraded SIM card), or various types of SIM cards generated according to different SIM card providers or suppliers.
Fig. 1 shows a flowchart of a SIM card initialization method according to a first embodiment of the present invention, which includes steps S110 to S160.
In step S110, the SIM card is read to obtain a serial number of the SIM card, where the serial number may be an Integrated Circuit Card Identification (ICCID) or an empty card serial number, and the serial number includes a card manufacturer code.
In step S120, the corresponding card identification component is selected according to the card merchant code. The card identification components of various types of SIM cards can be positioned at a server end, each type of SIM card corresponds to one card merchant code, and the corresponding matched card identification components can be obtained from the server end according to the read card merchant code.
In step S130, the calling card identification group may be a member that acquires the feature information from the serial number.
Specifically, the step of invoking the card identification component to obtain the feature information from the serial number may include: firstly, calling a card identification component to identify the serial number of the SIM card so as to obtain the card information of the SIM card, wherein the preset card information can be obtained after the number of the preset position in the serial number of the SIM card is identified. Then, characteristic information is selected from the card information. In some embodiments, the type of feature information obtained according to different selections of the number of bits of the serial number is different.
For example, in one embodiment, if the number of bits of the serial number of the SIM card is 16, the card information corresponding to the 7 th and 8 th bits of the serial number is selected as the feature information, that is, the selected feature information is the SIM card type and the card inherent information (ATR). If the digit of the serial number of the SIM card is 20, selecting the card information corresponding to the 13 th digit of the serial number as the characteristic information, namely selecting the obtained characteristic information as the card quotient code.
In step S140, the corresponding initialization component is selected according to the feature information, and the initialization component information of the initialization component is obtained. The initialization component information may include a name of the initialization component, a version number, and the like. Initialization components of various types of SIM cards of a predetermined card merchant can be located at a server side, and corresponding matched initialization components can be obtained from the server side according to different feature information corresponding to different types of SIM cards.
In the above embodiment, if the number of bits of the serial number of the SIM card is 16, the corresponding initialization component may be selected by the SIM card type and the ATR, and if the number of bits of the serial number of the SIM card is 20, the corresponding initialization component may be selected by the card vendor code.
In step S150, an administrative authority Authentication (ADM) value is acquired according to the card merchant code. Step S150 may specifically include: and selecting a corresponding private list from the card merchant list according to the card merchant code, and then selecting a corresponding management authority authentication value from the private list according to the card information.
It is understood that step S150 may be performed after the cardholder code is obtained in step S110, and step S150 may be performed after step S120 to step S140, before step S120 to step S140, or simultaneously with step S120 to step S140.
In step S160, the initialization component is called to initialize the SIM card according to the initialization component information and the management authority authentication value, so that the initialization of the SIM card is completed. Calling the initialization component requires initialization component information such as the name of the initialization component and ADM values, otherwise, the initialization component cannot be called, and the SIM card is not initialized.
According to the SIM card initialization method, for any type of SIM card, the corresponding card identification component can be obtained from the server end through the card quotient code in the serial number of the SIM card, the SIM card can be identified through the corresponding card identification component to obtain the preset characteristic information, the matched initialization component is obtained from the server end through the preset characteristic information, and the initialization operation of the type of SIM card can be realized through the corresponding matched initialization component. The initialization process in the embodiment of the invention removes the limitation on the type of the SIM card and the limitation on the terminal, only needs to obtain the component corresponding to any type of SIM card without pre-arranging the whole corollary program, and any terminal with the conditions of reading and writing the SIM card can finish the initialization of any type of SIM card, thereby enhancing the universality of the SIM card initialization and reducing the cost.
Fig. 2 shows a flowchart of a SIM card initialization method according to a second embodiment of the present invention, which includes steps S210 to S290.
In step S210, the SIM card is read to obtain a serial number of the SIM card, where the serial number includes a card merchant code. In this embodiment, the step of reading the SIM card further includes acquiring personalization information of the SIM card.
In step S220, the corresponding card identification component is selected according to the card merchant code. The card identification components of various types of SIM cards can be positioned at a server end, each type of SIM card corresponds to one card merchant code, and the corresponding matched card identification components can be obtained from the server end according to the read card merchant code.
In step S230, the calling card identification component acquires the feature information from the serial number.
Specifically, the step of invoking the card identification component to obtain the feature information from the serial number may include: firstly, calling a card identification component to identify the serial number of the SIM card so as to obtain the card information of the SIM card, wherein the preset card information can be obtained after the number of the preset position in the serial number of the SIM card is identified. Then, characteristic information is selected from the card information. In some embodiments, the type of feature information obtained according to different selections of the number of bits of the serial number is different.
For example, in one embodiment, if the number of bits of the serial number of the SIM card is 16, the card information corresponding to the 7 th and 8 th bits of the serial number is selected as the feature information, that is, the selected feature information is the SIM card type and the card inherent information (ATR). If the digit of the serial number of the SIM card is 20, selecting the card information corresponding to the 13 th digit of the serial number as the characteristic information, namely selecting the obtained characteristic information as the card quotient code.
In step S240, the corresponding initialization component is selected according to the feature information, and the initialization component information of the initialization component is obtained. The initialization component information may include a name of the initialization component, a version number, and the like. Initialization components of various types of SIM cards of preset card merchants can be located at a server side, and corresponding matched initialization components can be obtained from the server side according to different feature information corresponding to different types of SIM cards.
In the above embodiment, if the number of bits of the serial number of the SIM card is 16, the corresponding initialization component may be selected by the SIM card type and the ATR, and if the number of bits of the serial number of the SIM card is 20, the corresponding initialization component may be selected by the card vendor code.
In this embodiment, after obtaining the feature information and before invoking the initialization component to initialize the SIM card, steps S250 and S260 may also be included.
In step S250, a corresponding authentication key is obtained according to the feature information.
In step S260, authentication is performed based on the authentication key. If the authentication is passed, the rest steps are continued, if the authentication is not passed, the rest steps are stopped, and the initialization of the SIM card fails.
In some embodiments, the step of authenticating according to the authentication key includes performing bidirectional authentication with a provider of the card identification component, that is, performing bidirectional authentication between the terminal or client that is performing initialization and the provider of the card identification component, such as the server, so as to improve the security of the SIM card operation.
In step S270, an administrative authority Authentication (ADM) value is acquired according to the card merchant code. Step S270 may specifically include: and selecting a corresponding private list from the card merchant list according to the card merchant code, and then selecting a corresponding management authority authentication value from the private list according to the card information.
It is understood that step S270 may be performed after the cardholder code is obtained in step S210, and step S270 may be performed after step S220 to step S260, before step S220 to step S260, or simultaneously with step S220 to step S260.
In step S280, the initialization component is called to initialize the SIM card according to the initialization component information and the management authority authentication value. Calling the initialization component requires initialization component information such as an initialization component name, and ADM values, or else, the calling cannot be called, which results in failure to initialize the SIM card.
The embodiment of the present invention further includes step S290, that is, the personalized information is recovered and stored, so as to save resources and be reused in the subsequent card writing operation of the SIM card. So far, the initialization of the SIM card is completed.
According to the SIM card initialization method, for any type of SIM card, the corresponding card identification component can be obtained from the server end through the card quotient code in the serial number of the SIM card, the SIM card can be identified through the corresponding card identification component to obtain the preset characteristic information, the matched initialization component is obtained from the server end through the preset characteristic information, and the initialization operation of the type of SIM card can be realized through the corresponding matched initialization component. The initialization process in the embodiment of the invention removes the limitation on the type of the SIM card and the limitation on the terminal, only needs to obtain the component corresponding to any type of SIM card without pre-arranging the whole corollary program, and any terminal with the conditions of reading and writing the SIM card can finish the initialization of any type of SIM card, thereby enhancing the universality of the SIM card initialization and reducing the cost.
The embodiment of the invention also provides a SIM card initialization device which is used for initializing various types of SIM cards.
Fig. 3 is a block diagram showing the construction of a SIM card initialization apparatus according to a first embodiment of the present invention. The SIM card initialization apparatus 100 includes a read/write module 110, a communication module 120, and an initialization processing module 130.
The read-write module 110 is configured to read the SIM card 910 according to the reading instruction, and rewrite the SIM card 910 according to the initialization instruction to initialize the SIM card 910. When the read/write module 110 reads the SIM card 910, the serial number of the SIM card 910 can be obtained by reading.
The communication module 120 is used to obtain the card identification component, the management authority authentication value, and the initialization component according to the characteristic information. Specifically, each card merchant and the card identification components of the various types of SIM cards 910 of each card merchant may be located at the server 920, and the communication module 120 may implement communication with the server 920, obtain the card identification components according to the card merchant codes, obtain the card identification component management authority authentication values according to the card merchant codes, and obtain the initialization components according to the feature information.
The initialization processing module 130 is connected to the read/write module 110 and the communication module 120, and is configured to send a read instruction to the read/write module 110, call the card identification component to obtain the feature information and send the feature information to the communication module 120, receive the initialization component and identify the initialization component to obtain initialization component information, and call the initialization component to send the initialization instruction to the read/write module 110 according to the initialization component information and the management authority authentication value by the initialization processing module 130.
Specifically, the initialization processing module 130 sends a reading instruction to the read/write module 110 and receives the serial number obtained by the read/write module 110, and then identifies the card merchant code from the serial number. The initialization processing module 130 transmits the card merchant code to the communication module 120 and receives the card identification component acquired by the communication module 120. The initialization processing module 130 calls the card identification component to acquire feature information from the serial number, then sends the feature information to the communication module 120 and receives the initialization component acquired by the communication module 120. The initialization processing module 130 identifies initialization component information from the initialization component, and the initialization component information may include a name, a version number, and the like of the initialization component. The initialization processing module 130 calls an initialization component, such as initialization component information, which requires initializing a component name, and an authentication value of the management authority, otherwise, the initialization processing module cannot call the initialization component, which results in a failure to initialize the SIM card.
According to the SIM card initialization device provided by the embodiment of the invention, the communication module 120 can be connected with the server 920, so that the corresponding card identification component and the matched initialization component can be obtained for any type of SIM card, the limitation on the type of the SIM card is removed in the initialization process, the corresponding initialization component only needs to be downloaded in real time when the SIM card is required to be initialized, the generality of SIM card initialization is enhanced, the cost is reduced, and the application range is wider.
Fig. 4 is a block diagram showing a configuration of a SIM card initialization apparatus according to a second embodiment of the present invention. The SIM card initialization apparatus 200 includes a read/write module 210, a communication module 220, and an initialization processing module 230.
The read-write module 210 is configured to read the SIM card 910 according to the read instruction, and rewrite the SIM card 910 according to the initialization instruction to initialize the SIM card 910. When the read/write module 210 reads the SIM card 910, the serial number of the SIM card 910 can be obtained by reading.
The communication module 220 is used for acquiring the card identification component, the management authority authentication value, and the initialization component according to the characteristic information. Specifically, the card identification components of various types of SIM cards 910 of the card merchant may be located at the server 920, and the communication module 220 may implement communication with the server 920, obtain the card identification components according to the card merchant code, obtain the management authority authentication value of the card identification components according to the card merchant code, and obtain the initialization components according to the feature information.
The initialization processing module 230 is connected to the read/write module 210 and the communication module 220, and configured to send a read instruction to the read/write module 210, call the card identification component to obtain the feature information and send the feature information to the communication module 220, receive the initialization component and identify the initialization component to obtain initialization component information, and the initialization processing module 230 calls the initialization component to send the initialization instruction to the read/write module 210 according to the initialization component information and the management authority authentication value.
Specifically, the initialization processing module 230 sends a reading instruction to the read/write module 210 and receives the serial number obtained by the read/write module 210, and then identifies the card merchant code from the serial number. The initialization processing module 230 transmits the card merchant code to the communication module 220 and receives the card identification component acquired by the communication module 220. The initialization processing module 230 calls the card identification component to acquire feature information from the serial number, and then transmits the feature information to the communication module 220 and receives the initialization component acquired by the communication module 220. The initialization processing module 230 identifies initialization component information from the initialization component, and the initialization component information may include a name, a version number, and the like of the initialization component. The initialization processing module 230 calls an initialization component, such as initialization component information, such as a component name, that needs to be initialized, and a management authority authentication value, otherwise, the initialization component cannot be called, which results in a failure to initialize the SIM card.
In this embodiment, the SIM card initialization apparatus 200 further includes an authentication module 240, and the authentication module 240 is connected to the communication module 220 and/or the initialization processing module 230, wherein the communication module 220 is further configured to obtain an authentication key according to the feature information, and the authentication module 240 is configured to perform authentication according to the authentication key. If the authentication is passed, SIM card initialization is continued, if the authentication is not passed, SIM card initialization is stopped, and SIM card initialization fails.
In some embodiments, the authentication module 240 performs bidirectional authentication between the SIM card initialization apparatus 200 and the providing end of the card identification component, that is, performs bidirectional authentication with the server 920 end, thereby improving the security of the SIM card operation.
In some embodiments, the SIM card initialization apparatus 200 further includes a storage module 250, the storage module 250 is connected to the read/write module 210 and/or the initialization processing module 230, the read/write module 210 reads the personalization information of the SIM card, and the storage module 250 is used for recycling and storing the personalization information, so as to save resources and enable the personalization information to be reused in subsequent card writing operations of the SIM card.
The SIM card initialization apparatus 200 of the present embodiment further includes a human-computer interaction module 260 and a central processing module 270. The human-computer interaction module 260 is configured to obtain a user instruction of the user 930, and may further display a processing result, so as to feed back the processing result of the SIM card initialization to the user. The central processing module 270 is connected to the human-computer interaction module 260 and the initialization processing module 230, and is configured to send a control instruction to the initialization processing module 230 according to a user instruction, and the initialization processing module 230 performs a corresponding operation according to the control instruction.
According to the SIM card initialization device provided by the embodiment of the invention, the communication module 220 can be connected with the server 920, so that the corresponding card identification component and the matched initialization component can be obtained for any type of SIM card, the limitation on the type of the SIM card is removed in the initialization process, the corresponding initialization component only needs to be downloaded in real time when the SIM card is required to be initialized, the generality of SIM card initialization is enhanced, the cost is reduced, and the application range is wider.
Fig. 5 shows a hardware configuration diagram of a terminal device according to an embodiment of the present invention.
An embodiment of the present invention provides a terminal device, which includes a processor 501 and a memory 502 storing computer program instructions.
Specifically, the processor 501 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. The memory 502 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 502 is non-volatile solid-state memory. In a particular embodiment, the memory 502 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement any one of the SIM card initialization methods in the above embodiments.
In one example, the end device can also include a communication interface 503 and a bus 510. As shown in fig. 5, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 to complete communication therebetween.
The communication interface 503 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 510 includes hardware, software, or both. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 510 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
The terminal device may execute the SIM card initialization method in the embodiments of the present invention based on the instruction of the user, thereby implementing the SIM card initialization method and apparatus described in conjunction with fig. 1 to 4.
The following describes in detail a terminal device implementing the SIM card initialization method according to the second embodiment of the present invention, and fig. 6 shows a flowchart of computer program instructions stored in the terminal device and corresponding to the SIM card initialization method according to the second embodiment.
The computer program instruction is embodied by a client program, after the SIM card is inserted, an initialization menu in the client can be clicked, card reading is completed through a card reading page, and card personalized information and a serial number are acquired.
And then, acquiring the manufacturer code, and inquiring the name and the version number of the corresponding card identification component from a database table of the server side according to the manufacturer code. And if the database does not have corresponding information, popping up a prompt, writing the prompt into a log table, and terminating the process. And if the local dynamic library card identification component version number exists, calling the local dynamic library card identification component version number for comparison. And if downloading is needed, downloading the card identification component of the corresponding card merchant from the database table to the local.
And then, acquiring card information, and inquiring the name, the version number and the authentication key of the corresponding initialization component in a database table by using the characteristic information in the card information. And if the corresponding value does not exist in the database, popping up prompt information, writing the prompt information into a log table, and terminating the process. If so, a comparison is made with the local initialization component to determine if a download is required. Downloading the corresponding formatted components from the database tables to the local if necessary.
And then, the server and the client finish the bidirectional authentication by using an algorithm, the authentication is passed to carry out the next step, and the process is ended if the authentication is not passed.
And then, searching the corresponding private list name from the card merchant list according to the card merchant code, reading the card information obtained by calling the card identification component from the cache, and obtaining the ADM value from the private list of the card merchant on the condition of the card information.
Then, parameters required by the function method of the client, namely the name of the formatting component, the authentication key and the ADM value are received from the cache. And calling an initialization component to initialize the SIM card, wherein the initialization is successful and the initialization is written into a log table. The initialization fails, the result is written into the log table, and the process ends.
In addition, the program also periodically carries out recovery operation on the personalized data generated by the initialization operation in the card writing resource library, and resource comparison is carried out on the personalized data and the network side in the recovery process to judge whether the personalized data is the sales card or not.
According to the SIM card initialization method, the SIM card initialization device 200 and the terminal equipment provided by the embodiment of the invention, for any type of SIM card, a corresponding card identification component can be obtained from a server end through a card manufacturer code in a serial number of the SIM card, the SIM card can be identified through the corresponding card identification component to obtain preset characteristic information, then a matched initialization component is obtained from the server end through the preset characteristic information, and the initialization operation of the type of SIM card can be realized through the corresponding matched initialization component. The initialization process in the embodiment of the invention removes the limitation on the type of the SIM card and the limitation on the terminal, only needs to obtain the component corresponding to any type of SIM card without pre-arranging the whole corollary program, and any terminal with the conditions of reading and writing the SIM card can finish the initialization of any type of SIM card, thereby enhancing the universality of the SIM card initialization and reducing the cost.
Because the step of bidirectional authentication is added in the SIM card initialization process, the safety of the SIM card operation can be improved. In addition, the original personalized data of the SIM card is also recycled in the SIM card initialization process, so that the resources are saved, and the SIM card can be repeatedly utilized in the subsequent card writing operation of the SIM card.
The two-way authentication may be implemented according to a predetermined method, one way of which will be shown below.
When obtaining the authentication key from the database at the server end, the server can simultaneously generate a random number, the random number is converted into 16 bits, wherein less than 16 bits can be left-complemented by 0, and 16 bits are taken from one bit after exceeding 16 bits. The authentication key and the random number are stored in a cache. Calling a local client initialization component, generating a client random number by taking the name of the initialization component as a parameter, and storing the random number by a page. If the random number is null, the authentication fails, and the page prompts the flow of 'the client of the bidirectional authentication initialization component generates a random number error, and the error code is X1 (preset value)'. If the random number is not null, calling a client method, authenticating the client component, if the authentication result is null, prompting that the client authentication component fails when the bidirectional authentication initializes the component, and the error code is X2 (preset value), and writing into a log table, and ending the process. If the authentication result is not null, the page stores the number and disperses the server authentication key. The initialization component client calls a method to disperse the server side authentication key and the mixed key (program preset key) and receives the client side random number, secondary encryption is carried out by using the random number of the client side and the random number of the server side, and the secondary encryption result of the server random number and the mixed dispersed key (program preset key) is compared with the client side authentication result. If not, prompting that the authentication client fails when the bidirectional authentication component is used for the following reasons: and if the encryption result is different, logging in a log table, and ending the process. The initializing component client method is invoked for verification conditioned on the name of the initializing component and the authentication key. And if the result of the function is not 0, prompting that the authentication server fails and the error code is X3 (preset value), writing the error code into a card clearing log table, and ending the process, otherwise, passing the authentication.
In the terminal device of the embodiment of the present invention, the client program may be an Object Linking and Embedding (OLE) Control Extension (OCX) component, and may be written by VC, where the method for invoking the initialization function includes obtaining a formatted dynamic library version number interface, obtaining a random number interface, completing an authentication interface of the card initialization component to the system, comparing the authentication result with the interface, and initializing the interface.
The card identification component and the initialization component are Dynamic Link Library (DLL) files.
The dynamic link library file name of the card identification component is 8 bits long and comprises a card business English name abbreviation (3 bits) and a plug-in identification (5 bits). The prototype declaration of the interface function of the card identification component is uniformly appointed by a _ stdcall standard call, and the function interface comprises an interface for acquiring the version information of the card merchant identification component and an interface for acquiring the card type information of the card merchant.
The dynamic link library filename of the formatting component is 8 bits long, including the English abbreviation (3 bits) and "R" characters from each vendor and the serial number (4 bits). The serial number is incremented according to the number of components provided by each card vendor. The prototype declaration of the interface function of the card identification component uniformly uses a _ stdcall standard calling convention, a default calling convention mode is not recommended, and each card manufacturer generates a DLL according to the rule. The function interface of the card identification component comprises an interface for acquiring the version information of the card initialization component, an interface for acquiring the random number and an encryption algorithm interface.
The embodiment of the invention uses the DLL assembly and the OCX assembly to complete the initialization of the SIM card, and the SIM card is downloaded once and used for many times in the initialization process, thereby improving the efficiency and saving the network resources.
In addition, in combination with the SIM card initialization method in the foregoing embodiments, embodiments of the present invention may provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon. The computer program instructions, when executed by a processor, implement any of the SIM card initialization methods in the above embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. For example, the algorithms described in the specific embodiments may be modified without departing from the basic spirit of the invention. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (14)

1. A SIM card initialization method, comprising:
reading a SIM card to obtain a serial number of the SIM card, wherein the serial number comprises a card quotient code;
selecting a corresponding card identification component according to the card merchant code;
calling the card identification component to acquire characteristic information from the serial number;
selecting a corresponding initialization component according to the characteristic information, and acquiring initialization component information of the initialization component;
acquiring a management authority authentication value according to the card merchant code; and
and calling the initialization component to initialize the SIM card according to the initialization component information and the management authority authentication value.
2. The SIM card initialization method of claim 1, wherein before the step of invoking the initialization component to initialize the SIM card, the method further comprises:
acquiring a corresponding authentication key according to the characteristic information;
performing authentication according to the authentication key,
wherein, if the authentication is passed, the rest steps are continued,
and if the authentication is not passed, stopping the rest steps, and failing to initialize the SIM card.
3. The SIM card initialization method of claim 2, wherein the step of authenticating according to the authentication key comprises performing a bidirectional authentication with a provider of the card identification component.
4. The SIM card initialization method of claim 1, wherein the step of reading the SIM card further comprises obtaining personalization information of the SIM card,
the SIM card initialization method further comprises the following steps:
and recovering and storing the personalized information.
5. The SIM card initialization method of claim 1, wherein the step of invoking the card identification component to obtain feature information from the serial number comprises:
calling the card identification component to identify the serial number so as to obtain card information of the SIM card;
and selecting the characteristic information from the card information.
6. The method according to claim 5, wherein the type of the feature information selected according to the number of bits of the serial number is different.
7. The SIM card initialization method according to claim 6, wherein if the number of bits of the serial number is 16, the selected feature information is a type of the SIM card and card inherent information; and if the digit of the serial number is 20, selecting the obtained characteristic information as a card quotient code.
8. The SIM card initialization method according to claim 5, wherein the step of obtaining the authentication value of the management authority according to the card merchant code comprises:
selecting a corresponding private table from a card merchant table according to the card merchant code;
and selecting the corresponding management authority authentication value from a private list according to the card information.
9. A SIM card initialization apparatus, comprising:
the reading and writing module is used for reading the SIM card according to the reading instruction and rewriting the SIM card according to the initialization instruction so as to initialize the SIM card;
the communication module is used for acquiring the card identification component and the management authority authentication value and acquiring the initialization component according to the characteristic information; and
the initialization processing module is connected with the read-write module and the communication module and used for sending the read instruction to the read-write module, calling the card identification component to acquire the characteristic information and send the characteristic information to the communication module, receiving the initialization component and identifying the initialization component to obtain initialization component information, and calling the initialization component to send the initialization instruction to the read-write module according to the initialization component information and the management authority authentication value.
10. The SIM card initialization apparatus of claim 9, further comprising:
and the authentication module is connected with the communication module and/or the initialization processing module, and is further used for acquiring an authentication key according to the characteristic information and authenticating according to the authentication key.
11. The SIM card initialization apparatus of claim 9, further comprising:
and the storage module is connected with the read-write module and/or the initialization processing module, the read-write module reads the personalized information of the SIM card, and the storage module is used for recovering and storing the personalized information.
12. The SIM card initialization apparatus of claim 9, further comprising:
the human-computer interaction module is used for acquiring a user instruction and displaying a processing result;
and the central processing module is connected with the human-computer interaction module and the initialization processing module and used for sending a control instruction to the initialization processing module according to the user instruction, and the initialization processing module carries out corresponding operation according to the control instruction.
13. A terminal device comprising a processor and a memory storing computer program instructions,
the processor, when executing the computer program instructions, implements the SIM card initialization method of any one of claims 1 to 8.
14. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement the SIM card initialization method according to any one of claims 1 to 8.
CN201811556599.1A 2018-12-19 2018-12-19 SIM card initialization method and device, terminal equipment and computer storage medium Pending CN111343626A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811556599.1A CN111343626A (en) 2018-12-19 2018-12-19 SIM card initialization method and device, terminal equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811556599.1A CN111343626A (en) 2018-12-19 2018-12-19 SIM card initialization method and device, terminal equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN111343626A true CN111343626A (en) 2020-06-26

Family

ID=71185015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811556599.1A Pending CN111343626A (en) 2018-12-19 2018-12-19 SIM card initialization method and device, terminal equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111343626A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1946235A (en) * 2006-11-09 2007-04-11 中国移动通信集团江苏有限公司 User identifying module service and method and system for using personalized tailered issuing
CN1997056A (en) * 2006-09-04 2007-07-11 中国移动通信集团江苏有限公司 Method and system for reuse and the reformatting of the old card of the mobile communication smart card
CN101359413A (en) * 2008-07-25 2009-02-04 大唐微电子技术有限公司 Wireless terminal for processing personalization smart card and method
CN104584603A (en) * 2012-08-24 2015-04-29 高通股份有限公司 Optimization of SIM card initialization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997056A (en) * 2006-09-04 2007-07-11 中国移动通信集团江苏有限公司 Method and system for reuse and the reformatting of the old card of the mobile communication smart card
CN1946235A (en) * 2006-11-09 2007-04-11 中国移动通信集团江苏有限公司 User identifying module service and method and system for using personalized tailered issuing
CN101359413A (en) * 2008-07-25 2009-02-04 大唐微电子技术有限公司 Wireless terminal for processing personalization smart card and method
CN104584603A (en) * 2012-08-24 2015-04-29 高通股份有限公司 Optimization of SIM card initialization

Similar Documents

Publication Publication Date Title
US20220109974A1 (en) Esim card change method and related device
US7395049B2 (en) Security element commanding method and mobile terminal
CN107733847B (en) Method and device for platform login website, computer equipment and readable storage medium
US20050266886A1 (en) Method and mobile communication device capable of resuming operating function of temporarily disabled SIM card
CN104021018A (en) Terminal, upgrade patch generation method and upgrade patch recognition method
US20170013451A1 (en) Network locking or card locking method and device for a mobile terminal, terminal, sim card, storage media
CN110381103B (en) Method, device and system for downloading operator configuration file
CN113038451B (en) Machine-card binding method and device, communication module and storage medium
CN103974250A (en) Configuration method and equipment
CN111130602B (en) Near field communication card data writing system, method, device and medium
CN113572715A (en) Data transmission method and system based on block chain
CN106465076B (en) Method and terminal for controlling short message reading
KR20070021826A (en) System and Method for Payment, Devices for Payment, Terminals for Payment, Mobile Devices and Recording Medium
AU2021312655A1 (en) Data processing method and apparatus, device and medium
US9298949B2 (en) Method for programming a mobile end device chip
CN112187783B (en) Authentication method and device, electronic equipment and storage medium
CN110505225B (en) Terminal card locking method and device and computer readable storage medium
CN111343626A (en) SIM card initialization method and device, terminal equipment and computer storage medium
CN112819454A (en) Payment method, gateway device, server and storage medium
US9838372B2 (en) Identifying service providers for integrating a secure element into a short-range wireless communication apparatus
CN110956723A (en) Encryption verification communication method and device for Bluetooth intelligent lock and storage medium
CN107315610B (en) Method, device and computer readable storage medium for realizing password function
KR20170089887A (en) Method of restoring a secure element to a factory state
CN110859046A (en) Information processing method, electronic device, server and information processing system
CN110768696B (en) NFC SIM card identification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626

RJ01 Rejection of invention patent application after publication